Inno setup 在Inno设置脚本中将很长的字符串参数拆分为多行
我的Inno安装脚本中有一个很长的字符串,其中包含文件排除:Inno setup 在Inno设置脚本中将很长的字符串参数拆分为多行,inno-setup,Inno Setup,我的Inno安装脚本中有一个很长的字符串,其中包含文件排除: [Files] Source: "..\bin\x64\Release\*"; \ Excludes: ".editorconfig,PackageContents.xml,\runtimes\win-arm\*,\runtimes\win-x86\*,System.Buffers.dll,System.Memory.dll,System.Numerics.Vectors.dll,System.R
[Files]
Source: "..\bin\x64\Release\*"; \
Excludes: ".editorconfig,PackageContents.xml,\runtimes\win-arm\*,\runtimes\win-x86\*,System.Buffers.dll,System.Memory.dll,System.Numerics.Vectors.dll,System.Runtime.CompilerServices.Unsafe.dll"; \
DestDir: "{app}\Contents"; \
Flags: ignoreversion recursesubdirs createallsubdirs
为了更好的可读性,我想将其拆分,例如:
[Files]
Source: "..\bin\x64\Release\*"; \
Excludes: ".editorconfig," + \
"PackageContents.xml," + \
"\runtimes\win-arm\*," + \
"\runtimes\win-x86\*," + \
"System.Buffers.dll," + \
"System.Memory.dll," + \
"System.Numerics.Vectors.dll," + \
"System.Runtime.CompilerServices.Unsafe.dll"; \
DestDir: "{app}\Contents"; \
Flags: ignoreversion recursesubdirs createallsubdirs
这有可能吗
提前谢谢 您可以使用多行表达式定义预处理器变量,然后在(
排除
)参数中使用该变量:
[Files]
#define Excludes \
".editorconfig," + \
"PackageContents.xml," + \
"\runtimes\win-arm\*," + \
"\runtimes\win-x86\*," + \
"System.Buffers.dll," + \
"System.Memory.dll," + \
"System.Numerics.Vectors.dll," + \
"System.Runtime.CompilerServices.Unsafe.dll"
Source: "..\bin\x64\Release\*"; \
Excludes: "{#Excludes}"; \
DestDir: "{app}\Contents"; \
Flags: ignoreversion recursesubdirs createallsubdirs
非常感谢,这很有效!