• Advertisement
Sign in to follow this  

Making an installer (C++)

This topic is 4619 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm faced with the task of writing an installer that properly installs an application with all the files required for the application to run properly. Does anyone know of any C++ libraries, templates, whatever that may alleviate this task? I know that there are installer builder studios available that basically let you design your installer using a GUI, but unfortunately I can't use those as my installer must be created in an automated build process. The source code of the application the installer is for is under Clearcase version control and is compiled via cronjob. This build process pops out a bunch of files around which I (or rather another automated build process) must then build an installer. The end result should be an installer exe that installs the application when double-clicked. Sorry, getting a little carried away here ... I was really only going to explain why I can't use one of them "drag & drop design your own installer without coding a single line" installer studios. :) Anyway, anyone have any experience with this? Any suggestions on good libraries to use or something? Thanks! P.S. Oh yeah, my target platform is Windows XP/2k/NT ... but platform independence wouldn't hurt.

Share this post


Link to post
Share on other sites
Advertisement
You could write a little program that generates a script file for NSIS, after your build finished and finally passes this file on to the installer creator.

Share this post


Link to post
Share on other sites
I used to do some work with InstallShield and company, and I'm pretty sure everything can be done via command line, and therefore, can be easily automated.

How complicated is the install process anyway? if it's just "copy files where the user wants them", then you can do much more primitive things.

Share this post


Link to post
Share on other sites
Quote:
Original post by Replicon
I used to do some work with InstallShield and company, and I'm pretty sure everything can be done via command line, and therefore, can be easily automated.

How complicated is the install process anyway? if it's just "copy files where the user wants them", then you can do much more primitive things.


What if you've got all the files packed into one .exe installer? Then it's more then just copy/paste, right? Moreover, just because I brought it up, how does one get the files in the executable anyway?

Share this post


Link to post
Share on other sites
If your install process is at all non-trivial (i.e. anything beyond extracting your files to a target directory) then I'd highly recommend InstallShield. It's not very difficult to integrate with an automated build process, and the time and headache it will save you is incalculable. As soon as you have any OS-lockable DLLs, or shared data files, or anything of that kind, you will run into nasty headaches when rolling your own installers. Having a solid, reliable, and widely trusted installer supporting your app goes a long ways.

InstallShield also lets you get very deeply involved in the installation script, including things as sophisticated as scripting custom UI dialogs and invoking external library code.

Share this post


Link to post
Share on other sites
I hate installers. I have refused to use apps in the past the required anything other than xcopy to install.

Just thought I'd throw that in :). Feel free to ignore me.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anon Mike
I hate installers. I have refused to use apps in the past the required anything other than xcopy to install.

Just thought I'd throw that in :). Feel free to ignore me.


I agree with you, I hate the thought of copying stuff into OS areas where the sun don't shine =).

As for "how to put the files into just one exe"... WiZip will do it. And InstallShield has such an option too.

Share this post


Link to post
Share on other sites
For the time being, all that must be done to install the application is copy the executable to where ever the user wants it, along with a bunch of dll's, but this might change to become a little more complicated in the future, so I think a flexible tool is probably not a bad idea. Anyway, thanks for your suggestions. I'll have a look into both InstallShield and NSIS. Thanks again!

Share this post


Link to post
Share on other sites
From the looks of it I'd say NSIS is exactly what I need. Seems like a very powerful too. Thanks BRooksWackerman!

Share this post


Link to post
Share on other sites
Not sure if this helps but I usually just make a Setup Project - it creates an exe too and is incredibly easy to use and you can customise with icons etc to a professional-looking level.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement