两个或多个函数在检查参数中使用时不起作用

问题描述:

我一直在尝试使Check中的两个函数工作。当我使用多个功能时,它们都不起作用。例如:两个或多个函数在检查参数中使用时不起作用

[Files] 
Source: MyProg.exe; DestDir: "{app}"; Flags: ignoreversion; Check: portable and install; 
Source: MyProg.dll; DestDir: "{app}"; Flags: ignoreversion; Check: portable and install; 
Source: MyProg.ini; DestDir: "{app}"; Flags: ignoreversion; Check: portable and install; 

当我只用一个检查便携式或安装,它的工作原理虽然我知道我可以重复的源代码目录,并把其他检查这样的:

[Files] 
Source: MyProg.exe; DestDir: "{app}"; Flags: ignoreversion; Check: portable; 
Source: MyProg.dll; DestDir: "{app}"; Flags: ignoreversion; Check: portable; 
Source: MyProg.ini; DestDir: "{app}"; Flags: ignoreversion; Check: portable; 

Source: MyProg.exe; DestDir: "{app}"; Flags: ignoreversion; Check: install; 
Source: MyProg.dll; DestDir: "{app}"; Flags: ignoreversion; Check: install; 
Source: MyProg.ini; DestDir: "{app}"; Flags: ignoreversion; Check: install; 

但正如我有很多文件,我想在一个Check中使用多个函数,因为它不会复制和粘贴[Files]部分中的太多源代码行。

此:

[Files] 
Source: MyProg.exe; DestDir: {app}; Check: portable and install 

不相同到:

[Files] 
Source: MyProg.exe; DestDir: {app}; Check: install 
Source: MyProg.exe; DestDir: {app}; Check: portable 

第一说安装该文件,当两个portableinstall为真/选择。可能永远不会发生。

而后者称安装该文件,当任portableinstall为真/选择


所以,你要使用or操盘的and

[Files] 
Source: MyProg.exe; DestDir: {app}; Check: portable or install 
+0

它是相同的,当我使用Check:IsWin64;或检查:“不是IsWin64”;我可以结合他们吗?例如:检查:IsWin64或安装; ? – Thebig1825

+1

是的。虽然'IsWin64或Install'对我来说没有意义。你可能想要'IsWin64和Install'。 –

+0

Ahh ok,所以我可以将它们合并为:检查:Iswin64并安装或可移植 – Thebig1825