Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ISCC - /D compiler-parameter seems to have no effect

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.

like image 951
Nitro.de Avatar asked Oct 15 '15 11:10

Nitro.de


1 Answers

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
like image 161
Wosi Avatar answered Oct 22 '22 01:10

Wosi