小编use*_*035的帖子

在Inno Setup中安装之前使用[Code]更改AppID

在设置中,我为用户提供了使用单选按钮安装32位或64位版本的选项.

然后,我想将"_32"或"_64"附加到AppID.

我知道我可以使用脚本常量更改AppID,但在安装程序启动时会调用所需的函数.但此时单选按钮尚不存在,因此我收到错误"无法调用proc".

我咨询了Inno Setup帮助,我读到你可以在insatllation过程开始之前的任何给定点更改AppID(如果我没有正确使用).

那么我该如何设法做到这一点?

我期待着你的回答!

inno-setup constants app-id

4
推荐指数
1
解决办法
2621
查看次数

如何在InnoSetup中更改页面顺序?

我想在我的设置中将SelectDir页面与Components页面交换.

我找到了一个解决方案,其他页面的内容被分配给当前页面.

Procedure CurPageChanged(CurPageID: Integer);
Begin
  Case CurPageID of
  wpSelectDir:
    begin
      WizardForm.SelectDirPage.Notebook.ActivePage:= WizardForm.SelectComponentsPage;
      WizardForm.PageNameLabel.Caption:= SetupMessage(msgWizardSelectComponents)
      WizardForm.Hint:= WizardForm.PageDescriptionLabel.Caption;
      WizardForm.PageDescriptionLabel.Caption:= SetupMessage(msgSelectComponentsDesc)
    end;
  wpSelectComponents:
    begin
      WizardForm.SelectComponentsPage.Notebook.ActivePage:= WizardForm.SelectDirPage;
      WizardForm.DiskSpaceLabel.Caption:= WzardForm.ComponentsDiskSpaceLabel.Caption;
      WizardForm.PageNameLabel.Caption:= SetupMessage(msgWizardSelectDir)
      WizardForm.PageDescriptionLabel.Caption:= WizardForm.Hint
    end;
  end;
End;
Run Code Online (Sandbox Code Playgroud)

使用此方法的问题是仅更改内容而不更改实际页面.消息框和错误消息不受影响.我编写了许多代码来解决这些问题,但我遇到的问题越来越多......

有更好的解决方案吗?我希望你能帮帮我!

编辑:经过实验,我想出了这个:

procedure RedesignWizard;
var
  Page: TWizardPage;
begin
  Page := CreateCustomPage(wpWelcome, 'bla', 'bla');
  WizardForm.ComponentsList.Parent := Page.Surface;
  //Here  I am changing the layout of the pages...
end;

procedure InitializeWizard;
begin
  RedesignWizard;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if (CurPageID = Page.ID) then
  begin
  //perform your actions specific to …
Run Code Online (Sandbox Code Playgroud)

swap pascal inno-setup

3
推荐指数
1
解决办法
3866
查看次数

标签 统计

inno-setup ×2

app-id ×1

constants ×1

pascal ×1

swap ×1