I'm trying to use the /D parameter of the Inno Setup Command Line Compiler to choose which files should be included in my setup.
The code looks like the following:
#define MyAppName "MyApp"
#define MyAppVersion "1.0.0"
(....)
#define PHASE
[Setup]
AppVersion={#MyAppVersion}
(....)
[Files]
Source: "C:\temp\myfile.txt"; DestDir: "{app}";
#if PHASE == "test"
Source: "C:\temp\onlyInTestBuildNeeded.txt"; DestDir: "{app}";
#endif
I try to compile the script ISCC /DPHASE=test "D:\foo\bar.iss"
but it seems to have no effect on my PHASE define.
So can anyone explain me what I'm doing wrong? I can't find any more information at the Inno Setup Help.
You overwrite PHASE
in the .iss
file with the line
#define PHASE
Delete that line or check it with #ifdef in order to define it only when it is not set via command line /D
switch:
#ifndef PHASE
#define PHASE
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With