tags:

views:

42

answers:

2

I have a program that has only a few differences between Development, QA and Production.

I'd like to be able to use the same compiled file for each environment and include a small configuration file containing the settings which are environment specific.

Does anyone know how I can accomplish this?

Thanks

A: 

Can you not just add a private variable or constant within InnoSetup that indicates which build it should create and code against this within InnoSetup?

Mark Redman
Then I still have to rebuild for each environment. I'm trying to get away from that.
Brad Bruce
true, missed that bit, in that case commandLine paramaters selecting the option sounds like a good idea as William Leader suggested.
Mark Redman
+1  A: 

Inno Setup is capable of accepting command line parameters. You could then use those parameters to make decisions about what gets installed or how settings are configured. Then you can do something like call the installation program "Setup.exe -QA" to install with the QA settings, or "Setup.exe -PROD" to install with the Production Settings.

Have a look in the Inno Setup help files for documentation on how to use command line parameters in your installer.

William Leader
I started down this road, then I found that there were differences in some of the configuration files that were being installed on the user's machines.It turned into a more complex solution for others to maintain. I'm going to stick with the seperate setups, but thanks for the heads up on the command line arguments.
Brad Bruce
You can still do a single install, you just need to have multiple config files packed inside the installer and only copy the appropriate file to the target machine based on the parameters received. Alternatively if the config files are something simple like .INI format, you can modify them directly from Inno Setup.
William Leader