How do I build two different installers from the s

2020-06-16 08:44发布

I want to make a "standard" install for external use, but I also want to use the same script and tell it (with a command line param perhaps?) to include another set of files (PDB files for debugging) for our lab installations. (And make a totally different install exe)

How can I do this? Is it possible?

I don't see how to set this in the [Files] section (conditionally add files based on some value/param)

Note – this is not for allowing the user an option DURING the install. I want a build-time option to set in my hudson build or batch file.

I suppose I can just create a separate installer for the pdbs, but I'd rather just have one file to do everything.

标签: inno-setup
2条回答
\"骚年 ilove
2楼-- · 2020-06-16 09:16

You can simply use

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

and then call the Inno compiler like this:

iscc.exe -DDebugVersion ...

I'd also add something like this so you get different output file names:

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

Note that you'll probably need the InnoSetup precompiler for this, 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 Pack" from the InnoSetup download page.

查看更多
太酷不给撩
3楼-- · 2020-06-16 09:25

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

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

查看更多
登录 后发表回答