2

我想运行一个设置,但只显示一个启动屏幕。我目前正在使用此答案中建议的逻辑在后台运行设置:
如何使用 Inno Setup 进行静默安装?

但是,我想在安装过程中显示一个简单的图像,一旦设置完成,它就会消失。我认为我们可以使用InitializeSetupandDeinitializeSetup函数,但我不确定如何使用。

阅读问题后如何在使用 ISSI 的 Inno Setup 的非常静默模式设置中隐藏启动画面?,似乎 ISSI(Inno Setup Script Includes)具有这种功能。但是 ISSI 无法下载,因为它的网站已经死了。

此外,我还尝试了这个问题Inno Setup - Transparent Splash Screen中建议的答案,但这似乎只适用于InitializeWizard而不适用于InitializeSetup

那么,如何运行背景设置但只显示图像(jpeg、png 或 gif)?

4

1 回答 1

2

要显示启动画面,只需显示表单,不要隐藏它。像这样:

procedure InitializeWizard();
var
  SplashForm: TSetupForm;
begin
  if WizardSilent then
  begin
    SplashForm := CreateCustomForm;
    SplashForm.BorderStyle := bsNone;
    SplashForm.Position := poScreenCenter;
    SplashForm.ClientWidth := ScaleX(500);
    SplashForm.ClientHeight := ScaleY(350);
    SplashForm.Show;

    // Put some image/contents to the splash screen here
  end;
end;

虽然我不确定有没有办法在静默模式下隐藏向导。这可能是一个单独问题的主题。

虽然实际上,在静音模式下,您可以通过用图像覆盖向导将其本身变成启动屏幕。

于 2021-07-24T09:46:02.087 回答