Inno设置中的条件DisableProgramGroupPage

问题描述 投票:4回答:1

我正在尝试为普通安装和便携式安装创建一个安装程序。对于便携式安装,我将禁用所有图标和卸载程序的创建。

我唯一遇到的问题是在运行便携式安装时如何禁用程序组页面。我在这里误会了吗?

[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;
inno-setup pascalscript
1个回答
3
投票

(详细介绍@TLama的评论)

DisableProgramGroupPage不支持“布尔表达式”:

[[Setup]:DisableProgramGroupPage有效值:DisableProgramGroupPageautoyes

no相反:

[[Setup]:不可安装有效值:UninstallableUninstallable或布尔表达式


您可以改用yes

no
© www.soinside.com 2019 - 2024. All rights reserved.