Inno Setup the setup wizard size is fixed, but I want to change wizard setup size and change a few items including image and ...
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.
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.
Inno Setup is a free installer for Windows programs by Jordan Russell and Martijn Laan.
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
).
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
LicensePage
SelectDirPage
SelectComponentsPage
SelectTasksPage
ReadyPage
InstallingPage
FinishedPage
Other, less common, pages are left as an exercise to the readers:
Similar questions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With