Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Inno setup Inno设置:如何在#错误指令消息中展开预处理器变量_Inno Setup_Preprocessor - Fatal编程技术网

Inno setup 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

我有一个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只在编译时写入文本源代码行:

script.iss:[ISPP]在{#a#u path}上找不到安装程序

是否可以展开
#error
指令中的预处理器变量?

的参数不能包含变量

但您可以使用以下选项:

#pragma error "No installer found at " + a_path