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

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?


Solution 1:

When all else fails look for the answer yourself

Add the following line right at 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")