Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change wizard size (width and height) in an Inno Setup installer?

Tags:

inno-setup

Inno Setup the setup wizard size is fixed, but I want to change wizard setup size and change a few items including image and ...

enter image description here

like image 987
HoseinCS Avatar asked Aug 02 '12 13:08

HoseinCS


People also ask

How do I change the icon on my Inno?

As you know the application icon is built into the .exe file. The Inno Setup cannot modify the .exe files. And there's no other way to override the application icon by an external one. You have to edit the .exe file yourself, before building the installer.

How do I Setup an inno compiler?

Go to Menu, Project, then Compile to compile and create the setup file. This will create a complete installer. Run the Setup and your application will be installed correctly. Innosetup offers an awesome alternative to create great looking Installers for free.

Is Inno Setup free?

Inno Setup is a free installer for Windows programs by Jordan Russell and Martijn Laan.


1 Answers

Inno Setup 6

Inno Setup 6 supports changing a size of the wizard window.

You can use WizardSizePercent to change a size of the wizard window.

You can also use WizardResizable to allow the user to resize the wizard (this is default behaviour, if you use the modern WizardStyle).

Inno Setup 5

There's no magic way to make the wizard pages larger. They are designed for a specific size. If you want to make them larger, you have to go page-by-page, control-by-control and carefully decide how to layout them for your new size.

The following code is just an example, you may want to choose another change in layout.

procedure ShiftDown(Control: TControl; DeltaY: Integer);
begin
  Control.Top := Control.Top + DeltaY;
end;

procedure ShiftRight(Control: TControl; DeltaX: Integer);
begin
  Control.Left := Control.Left + DeltaX;
end;

procedure ShiftDownAndRight(Control: TControl; DeltaX, DeltaY: Integer);
begin
  ShiftDown(Control, DeltaY);
  ShiftRight(Control, DeltaX);
end;

procedure GrowDown(Control: TControl; DeltaY: Integer);
begin
  Control.Height := Control.Height + DeltaY;
end;

procedure GrowRight(Control: TControl; DeltaX: Integer);
begin
  Control.Width := Control.Width + DeltaX;
end;

procedure GrowRightAndDown(Control: TControl; DeltaX, DeltaY: Integer);
begin
  GrowRight(Control, DeltaX);
  GrowDown(Control, DeltaY);
end;

procedure GrowRightAndShiftDown(Control: TControl; DeltaX, DeltaY: Integer);
begin
  GrowRight(Control, DeltaX);
  ShiftDown(Control, DeltaY);
end;

procedure GrowWizard(DeltaX, DeltaY: Integer);
begin
  GrowRightAndDown(WizardForm, DeltaX, DeltaY);

  with WizardForm do
  begin
    GrowRightAndShiftDown(Bevel, DeltaX, DeltaY);
    ShiftDownAndRight(CancelButton, DeltaX, DeltaY);
    ShiftDownAndRight(NextButton, DeltaX, DeltaY);
    ShiftDownAndRight(BackButton, DeltaX, DeltaY);
    GrowRightAndDown(OuterNotebook, DeltaX, DeltaY);
    GrowRight(BeveledLabel, DeltaX);

    { WelcomePage }
    GrowDown(WizardBitmapImage, DeltaY);
    GrowRight(WelcomeLabel2, DeltaX);
    GrowRight(WelcomeLabel1, DeltaX);

    { InnerPage }
    GrowRight(Bevel1, DeltaX);
    GrowRightAndDown(InnerNotebook, DeltaX, DeltaY);

    { LicensePage }
    ShiftDown(LicenseNotAcceptedRadio, DeltaY);
    ShiftDown(LicenseAcceptedRadio, DeltaY);
    GrowRightAndDown(LicenseMemo, DeltaX, DeltaY);
    GrowRight(LicenseLabel1, DeltaX);

    { SelectDirPage }
    GrowRightAndShiftDown(DiskSpaceLabel, DeltaX, DeltaY);
    ShiftRight(DirBrowseButton, DeltaX);
    GrowRight(DirEdit, DeltaX);
    GrowRight(SelectDirBrowseLabel, DeltaX);
    GrowRight(SelectDirLabel, DeltaX);

    { SelectComponentsPage }
    GrowRightAndShiftDown(ComponentsDiskSpaceLabel, DeltaX, DeltaY);
    GrowRightAndDown(ComponentsList, DeltaX, DeltaY);
    GrowRight(TypesCombo, DeltaX);
    GrowRight(SelectComponentsLabel, DeltaX);

    { SelectTasksPage }
    GrowRightAndDown(TasksList, DeltaX, DeltaY);
    GrowRight(SelectTasksLabel, DeltaX);

    { ReadyPage }
    GrowRightAndDown(ReadyMemo, DeltaX, DeltaY);
    GrowRight(ReadyLabel, DeltaX);

    { InstallingPage }
    GrowRight(FilenameLabel, DeltaX);
    GrowRight(StatusLabel, DeltaX);
    GrowRight(ProgressGauge, DeltaX);

    { MainPanel }
    GrowRight(MainPanel, DeltaX);
    ShiftRight(WizardSmallBitmapImage, DeltaX);
    GrowRight(PageDescriptionLabel, DeltaX);
    GrowRight(PageNameLabel, DeltaX);

    { FinishedPage }
    GrowDown(WizardBitmapImage2, DeltaY);
    GrowRight(RunList, DeltaX);
    GrowRight(FinishedLabel, DeltaX);
    GrowRight(FinishedHeadingLabel, DeltaX);
  end;
end;

Use the GrowWizard function from the InitializeWizard event function (or elsewhere), giving it a change in width and height as parameters:

procedure InitializeWizard();
begin
  GrowWizard(ScaleX(100), ScaleY(80));
end;

The code takes care of the following pages:

  • WelcomePage

    WelcomePage

  • LicensePage

    LicensePage

  • SelectDirPage

    SelectDirPage

  • SelectComponentsPage

    SelectComponentsPage

  • SelectTasksPage

    SelectTasksPage

  • ReadyPage

    ReadyPage

  • InstallingPage

    InstallingPage

  • FinishedPage

    FinishedPage


Other, less common, pages are left as an exercise to the readers:

  • PasswordPage
  • InfoBeforePage (same as LicensePage)
  • UserInfoPage
  • SelectProgramGroupPage
  • PreparingPage
  • InfoAfterPage (same as LicensePage)

Similar questions:

  • How to display a larger license box in an InnoSetup installer?
  • Larger "Select Components" page in Inno Setup
  • How to change wizard size (width and height) in an Inno Setup installer?
  • Inno Setup: Resize uninstall progress form with all its components
  • How to reduce the line spacing between two input boxes on Inno Setup TInputQueryWizardPage (CreateInputQueryPage)
like image 68
Martin Prikryl Avatar answered Oct 06 '22 06:10

Martin Prikryl