Inno Setup - Image as installer background

2019-01-25 00:08发布

Image as installer background. How to do that with inno 5.5.9?

enter image description here

标签: inno-setup
2条回答
The star\"
2楼-- · 2019-01-25 00:53

I do not think this is possible in Inno Setup proper. Maybe is some Inno Setup clone.

The problem is that all labels in Inno Setup are TStaticText, which is not transparent. So you would have to replace all with TLabel. And there's a lot of them. And they are managed by Inno Setup. So you would somehow have to continuously update the new TStaticText's to the values set to original TLabel's by the Inno Setup. It may not even be possible.


So actually, it's possible to create a page like in your question. But only because there are no standard Inno Setup labels. But you cannot hide all of them.

Installer with background image

procedure InitializeWizard();
var
  BackImage: TBitmapImage;
begin
  { Hide top panel }
  WizardForm.MainPanel.Visible := False;

  { Adjust "select dir" page controls for a stretched inner page size }
  WizardForm.DirEdit.Left := WizardForm.DirEdit.Left + WizardForm.InnerNotebook.Left;
  WizardForm.DirEdit.Top := WizardForm.DirEdit.Top + WizardForm.InnerNotebook.Top;
  WizardForm.DirBrowseButton.Left :=
    WizardForm.DirBrowseButton.Left + WizardForm.InnerNotebook.Left;
  WizardForm.DirBrowseButton.Top :=
    WizardForm.DirBrowseButton.Top + WizardForm.InnerNotebook.Top;

  { Hide non-transparent labels }    
  WizardForm.DiskSpaceLabel.Visible := False;
  WizardForm.SelectDirBrowseLabel.Visible := False;
  WizardForm.SelectDirLabel.Visible := False;

  { Stretch the outer page across whole form }
  WizardForm.OuterNotebook.Width := WizardForm.ClientWidth;
  WizardForm.OuterNotebook.Height := WizardForm.ClientHeight;

  { Stretch the inner page across whole outer page }
  WizardForm.InnerNotebook.Left := 0;
  WizardForm.InnerNotebook.Top := 0;
  WizardForm.InnerNotebook.Width := WizardForm.OuterNotebook.ClientWidth;
  WizardForm.InnerNotebook.Height := WizardForm.OuterNotebook.ClientHeight;

  { Put buttons on top of the page (image) }
  WizardForm.BackButton.BringToFront()
  WizardForm.NextButton.BringToFront();
  WizardForm.CancelButton.BringToFront();

  { Add a background image }    
  BackImage := TBitmapImage.Create(WizardForm);
  BackImage.Parent := WizardForm.SelectDirPage;
  BackImage.Top := 0;
  BackImage.Left := 0;  
  { ... }
  BackImage.Bitmap.LoadFromFile(...);
end;

Similar questions:

查看更多
该账号已被封号
3楼-- · 2019-01-25 00:56

Maybe you can try Graphical Installer for Inno Setup which is specially designed for this purpose.

With it you can create cool looking installers and they support changing background (this picture is from last project for Shadow Tactics game) mod:

Graphical Installer example

I am developer of this project (commercial) so if you need more info feel free to ask.

查看更多
登录 后发表回答