我正在尝试为普通安装和便携式安装创建一个安装程序。对于便携式安装,我将禁用所有图标和卸载程序的创建。
我唯一遇到的问题是在运行便携式安装时如何禁用程序组页面。我在这里误会了吗?
[Setup]
;This works as expected
Uninstallable=not IsPortable()
;This does NOT work, can't compile (DisableProgramGroupPage=yes alone compiles fine)
DisableProgramGroupPage=yes IsPortable()
编译失败并显示错误
[Setup]节指令的值...无效。
这是IsPortable()
功能:
function IsPortable(): Boolean;
begin
if(StandardRadioButton.Checked = True) then
Result := False
else
Result := True;
end;
(详细介绍@TLama的评论)
DisableProgramGroupPage
不支持“布尔表达式”:
[[Setup]:DisableProgramGroupPage有效值:
DisableProgramGroupPage
,auto
或yes
与no
相反:
[[Setup]:不可安装有效值:
Uninstallable
或Uninstallable
,或布尔表达式
您可以改用yes
:
no