How to create two different installers from the same script in inno?

I want to make a “standard” installation for external use, but I also want to use the same script and say (with a command line option, maybe?) To include a different set of files (PDB files for debugging) for our lab installations. (And do a completely different exe installation)

How can i do this? Is it possible?

I do not see how to set this in the [files] section. (conditionally add files based on some / param value)

NOTE. This does not mean that the user can select the option DURING installation. I want the build time option to be set in the hudson assembly or batch file.

I suppose I can just create a separate installer for pdbs, but I would prefer one file to do everything.

+5
source share
2 answers

You can just use

#ifdef DebugVersion
File: *.pdb ...
#endif

and then call the Inno compiler as follows:

iscc.exe -DDebugVersion ...

I would also add something like this so that you get different output file names:

#ifdef DebugVersion
OutputBaseFileName=mysetup-dbg
#else
OutputBaseFileName=mysetup
#endif

Note that for this you will probably need the InnoSetup precompiler, which for some inexplicable reason is not part of the default InnoSetup package. The easiest way to get it is to get the “Quick Start Package” on the InnoSetup download page.

+8
source

The answer is simple: create two files for each version, but put the common material in the third file and # include it in the other two.

http://rickborup.blogspot.com/2006/09/inno-setup-include-directive.html

+2

All Articles