Inno Setup: How do I see the output (translation) of the Inno Setup Preprocessor?

血红的双手。 提交于 2019-12-17 07:38:28

问题


I have an Inno Setup script with preprocessor directives (#defines, #ifs, etc.)

I want to run the Inno Setup preprocessor on my script and see the preprocessor's output (translation in Inno-Setup-speak). That is, I want to look at the result of the preprocessor which it normally feeds into the Inno Setup Compiler, where all the references to {#something} are changed into whatever something was defined as.

I look at the command line options (of iscc.exe) and #pragma directives and did not find what I'm looking for. I see that I can specify not to run the compiler (#pragma -c- | /$c-) but I did not find a way to look at the output of the preprocessor.

In short, how do I look at the output of the Inno Setup preprocessor?


回答1:


When all else fails look for the answer yourself

Add the following line right as the end of the script.

This will generate a file preprocessed.iss with all macros expanded and #defines, #ifs etc. processed.

#expr SaveToFile(AddBackslash(SourcePath) + "Preprocessed.iss")


来源:https://stackoverflow.com/questions/3328375/inno-setup-how-do-i-see-the-output-translation-of-the-inno-setup-preprocessor

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