I would like to use both the InnoIDE and ISCC/ISPP, the difference being that I would like to pass in a parameter, which will override a #define in the script.
In the command line I can pass /Dmyarg=myvalue
. That is the same as #define myarg myvalue
in the script.
Sadly, the script takes precedence over the command line value. I know, as I tried. I can obviously comment out the #define
in the script and the command line define will work, however then I will not be able to use the IDE to build.
Is it possible to set a #define
inside InnoIDE somewhere for the project or is there some means to have the command line #define
take precedence?
In your script, do something like this:
#ifndef myarg
# define myarg "mydefault"
#endif
Now, if you compile in the IDE or if you use the command line without specifying /Dmyarg="something"
, then it will use the default specified in the script. Otherwise, if you do specify something on the command line then it will use that instead.
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