Inno Setup - 自定义安装页面

use*_*104 2 inno-setup

如何自定义Inno Setup的安装页面?

这里准确地显示了将要进行的更改。

前

后

现在,状态文本“正在安装 Collectica”将是静态的而不是动态的。

此外,还为进度条添加了额外的时间。

我会很感激你的回答。谢谢

Mar*_*ryl 5

你必须定制WizardForm.InstallingPage

  • 隐藏FilenameLabelStatusLabel
  • 添加您的自定义标签
  • 添加图像

对于前两个:

procedure InitializeWizard();
var
  CustomStatusLabel: TNewStaticText;
begin
  WizardForm.FilenameLabel.Visible := False;
  WizardForm.StatusLabel.Visible := False;

  WizardForm.ProgressGauge.Top := WizardForm.InstallingPage.Height - ScaleY(60);

  CustomStatusLabel := TNewStaticText.Create(WizardForm);
  CustomStatusLabel.Parent := WizardForm.InstallingPage;
  CustomStatusLabel.Caption := 'Installing Colectica';
  CustomStatusLabel.Font.Size := CustomStatusLabel.Font.Size + 4;
  CustomStatusLabel.Font.Style := [fsBold];
  CustomStatusLabel.AutoSize := True;
  CustomStatusLabel.Top :=
    WizardForm.ProgressGauge.Top - CustomStatusLabel.Height - ScaleY(8);
  CustomStatusLabel.Left :=
    WizardForm.ProgressGauge.Left +
    ((WizardForm.ProgressGauge.Width - CustomStatusLabel.Width) div 2);
end;
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

对于图像,请参阅:
Inno Setup 在自定义页面上放置图像/控件