【发布时间】:2011-12-17 20:37:36
【问题描述】:
我正在使用 Inno Setup 5.4.2 版。
我想定义要复制的文件的路径([Files] 部分中的 Source: 参数分为两部分,一个基本路径和子目录名称,用于特殊文件(如 .dll)。 我尝试了以下方法:
#define MyAppSetupDir "D:\MyApp\setup"
#define MyAppSetupQtDLLs {#MyAppSetupDir}"\DLLs"
[Files]
Source: {#MyAppSetupDir}\MyApp.exe; DestDir: {app}; Flags: ignoreversion
Source: {#MyAppSetupDLLs}\mstext35.dll; DestDir: {app}; Flags: ignoreversion
但我得到以下编译错误
[ISPP] Expression expected but opening brace ("{") found.
我也尝试将大括号括在“”中,例如
#define MyAppSetupQtDLLs "{#MyAppSetupDir}\DLLs"
但这次我得到了
Error: Source file "D:\MyApp\setup\{#MyAppSetupDir}\DLLs\mstext35.dll" does not exist.
因此,ISSP 正确地替换了 MyAppSetupDir 变量,但随后再次放入了简单文本,就好像它没有识别指令一样。
我到处搜索,我已经找到了一个关于使用{commonappdata} 的discussion,但是我在文档和知识库中都找不到如何做到这一点。
我真的很感激一些提示,因为它看起来很接近,但没有找到正确的解决方案..
【问题讨论】:
标签: inno-setup