Inno Setup 中带有拉伸图像的自定义欢迎和完成页面
Custom Welcome and Finished page with stretched image in Inno Setup
我创建了一个图像,我希望它出现在安装程序的整个欢迎页面和完成页面上,只显示底部按钮。
欢迎向导页面应如下所示:
完成页面如:
我得到
请帮忙!
提前致谢
首先,请注意欢迎页面自 Inno Setup 5.5.7. If you really want it, you have to enable it using DisableWelcomePage=no
起默认禁用。
要仅在页面上显示图像,您需要执行以下操作:
- 在各自的父页面上拉伸
WizardBitmapImage
(欢迎)和 WizardBitmapImage2
(完成)。
- 隐藏其他组件,主要是标签。
- 确保安装程序永远不需要重新启动机器,否则您会在图像上看到重新启动提示。
- 出于同样的原因,请确保
[Run]
部分中没有任何 postinstall
条目。
[Setup]
DisableWelcomePage=no
WizardImageFile=godfather.bmp
[Code]
procedure InitializeWizard();
begin
{ Welcome page }
{ Hide the labels }
WizardForm.WelcomeLabel1.Visible := False;
WizardForm.WelcomeLabel2.Visible := False;
{ Stretch image over whole page }
WizardForm.WizardBitmapImage.Width :=
WizardForm.WizardBitmapImage.Parent.Width;
{ Finished page }
{ Hide the labels }
WizardForm.FinishedLabel.Visible := False;
WizardForm.FinishedHeadingLabel.Visible := False;
{ Stretch image over whole page }
WizardForm.WizardBitmapImage2.Width :=
WizardForm.WizardBitmapImage2.Parent.Width;
end;
我创建了一个图像,我希望它出现在安装程序的整个欢迎页面和完成页面上,只显示底部按钮。
欢迎向导页面应如下所示:
完成页面如:
我得到
请帮忙! 提前致谢
首先,请注意欢迎页面自 Inno Setup 5.5.7. If you really want it, you have to enable it using DisableWelcomePage=no
起默认禁用。
要仅在页面上显示图像,您需要执行以下操作:
- 在各自的父页面上拉伸
WizardBitmapImage
(欢迎)和WizardBitmapImage2
(完成)。 - 隐藏其他组件,主要是标签。
- 确保安装程序永远不需要重新启动机器,否则您会在图像上看到重新启动提示。
- 出于同样的原因,请确保
[Run]
部分中没有任何postinstall
条目。
[Setup]
DisableWelcomePage=no
WizardImageFile=godfather.bmp
[Code]
procedure InitializeWizard();
begin
{ Welcome page }
{ Hide the labels }
WizardForm.WelcomeLabel1.Visible := False;
WizardForm.WelcomeLabel2.Visible := False;
{ Stretch image over whole page }
WizardForm.WizardBitmapImage.Width :=
WizardForm.WizardBitmapImage.Parent.Width;
{ Finished page }
{ Hide the labels }
WizardForm.FinishedLabel.Visible := False;
WizardForm.FinishedHeadingLabel.Visible := False;
{ Stretch image over whole page }
WizardForm.WizardBitmapImage2.Width :=
WizardForm.WizardBitmapImage2.Parent.Width;
end;