ISCC passing a parameter in the Compiler IDE

a 夏天 提交于 2019-12-10 22:56:42

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/33148701/iscc-passing-a-parameter-in-the-compiler-ide

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!