Brad Bruce
Brad Bruce

Reputation: 7807

How do I create 1 InnoSetup script that can run in multiple environments?

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

Upvotes: 0

Views: 857

Answers (2)

William Leader
William Leader

Reputation: 844

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.

Upvotes: 1

Mark Redman
Mark Redman

Reputation: 24515

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?

Upvotes: 0

Related Questions