Inno setup Inno设置:如何在#错误指令消息中展开预处理器变量
我有一个Inno安装脚本,它作为预处理器步骤查找文件:Inno setup Inno设置:如何在#错误指令消息中展开预处理器变量,inno-setup,preprocessor,Inno Setup,Preprocessor,我有一个Inno安装脚本,它作为预处理器步骤查找文件: #define a_path GetEnv("INSTALLER_FILES") #define install_file FindFirst(a_path + "\pattern*.*") 如果找不到install\u文件,我想发出一个错误: #if install_file == 0 #error No installer found at {#a_path} #endif 但ISPP只在编译时写入文本源代码行: scrip
#define a_path GetEnv("INSTALLER_FILES")
#define install_file FindFirst(a_path + "\pattern*.*")
如果找不到install\u文件
,我想发出一个错误:
#if install_file == 0
#error No installer found at {#a_path}
#endif
但ISPP只在编译时写入文本源代码行:
script.iss:[ISPP]在{#a#u path}上找不到安装程序
是否可以展开#error
指令中的预处理器变量?的参数不能包含变量
但您可以使用以下选项:
#pragma error "No installer found at " + a_path