How to declare an Inno Setup preprocessor variable by reading from a file

前端 未结 4 890
南旧
南旧 2020-12-09 18:46

Ok I know you can do this in Inno Setup:

#define AppVer \"0.0.11\"

Then use it like

[Setup]
AppVerName={#AppVer}

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 19:18

    From: http://www.jrsoftware.org/ishelp/

    A C-like #include directive is supported, which pulls in lines from a separate file into the script at the position of the #include directive. The syntax is:

    #include "filename.txt"
    

    If the filename is not fully qualified, the compiler will look for it in the same directory as the file containing the #include directive. The filename may be prefixed by compiler:, in which case it looks for the file in the Compiler directory.

提交回复
热议问题