我正在使用Inno Setup版本5.4.2.
我想定义要复制的文件的路径([Files]部分中的Source:参数作为两个部分,一个基本路径和子目录名称,我用于特殊文件(如.dlls).我试过下列:
#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
Run Code Online (Sandbox Code Playgroud)
但我得到以下编译错误
[ISPP] Expression expected but opening brace ("{") found.
Run Code Online (Sandbox Code Playgroud)
我也尝试将括号括在""中,就像
#define MyAppSetupQtDLLs "{#MyAppSetupDir}\DLLs"
Run Code Online (Sandbox Code Playgroud)
但这次我得到了
Error: Source file "D:\MyApp\setup\{#MyAppSetupDir}\DLLs\mstext35.dll" does not exist.
Run Code Online (Sandbox Code Playgroud)
因此,ISSP正确地替换了MyAppSetupDir变量,但随后再次放入简单文本,就好像它不能识别该指令一样.
我到处搜索过,我已经找到了关于使用它的讨论{commonappdata},但我无法在文档和KB中找到如何做到这一点.我真的很感激一些提示,因为它看起来我很接近,但没有找到正确的解决方案..
And*_*and 68
#define MyAppSetupDir "D:\MyApp\setup"
#define MyAppSetupQtDLLs MyAppSetupDir + "\DLLs"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13066 次 |
| 最近记录: |