ideinno-setup

ISCC passing a parameter in the Compiler IDE


I want to know if it's possible to pass ISCC option if I compile my script within the Inno Setup Compiler IDE (optimal in Inno Script Studio).

I found this question which says I should do something like

#ifndef myDefine
    #define myDefine "value"
#endif

I've already tried that because of the answer of my other question.

What I try to achive in the IDE is:

ISCC /DPHASE=test "D:\foo\bar.iss"

So is there an option in the IDE where I can pass preprocessor parameters?


Solution

  • No, there's no other way than to define some meaningful defaults in your .iss file.

    If you do not want the value to be directly in the main .iss file, you can import them from other file using

    #include "Defaults.iss"
    

    Maybe conditionally:

    #ifexist "Defaults.iss"
      #include "Defaults.iss"
    #endif
    

    See Inno Setup Preprocessor: #include.


    Note that the Inno Setup IDE does not actually launch the iscc.exe binary for the compilation. It has the "iscc" linked into itself. Were it launching an external process for the compilation, it would be possible to somehow inject the parameters.