Examples, Tips and
Troubleshooting
|
We have developed several examples which are ready for instant
start with Graphical Installer (can be found in {Inno Setup
6}\Graphical Installer\Examples folder):
Basic
example - This is basic example for Graphical Installer.
Basic example
(graphics) - file with graphic settings for example.
Install
Designer example - This example shows how to integrate
dialog(s) created with Install Designer tool with Graphical
Installer.
Install
Designer example (graphics) - file with graphic settings for
Install Designer example.
Code
Classes example - This example shows how to use the WizardForm
object and the various VCL classes.
Code
Classes example (graphics) - file with graphic settings for
example.
Skinned Button & Progress Bar Colors example - This example
shows how to create custom installer page with components. Newly
created page contains Skinned Button with click event and
TNewProgressBar control with changed foreground and background
colors.
Skinned Button & Progress Bar Colors example (graphics) -
file with graphic settings for example.
VCL
Styles for Inno Setup example - This example shows how
Graphical Installer for Inno Setup and VCL Styles plug-in works
together in single installer.
VCL Styles for Inno Setup example (graphics) - file with
graphic settings for example.
Auto DPI example -
This example demonstrates creating non rectangular forms (forms
with transparent areas). It works well with all DPIs (Dots Per Inch
settings): 96, 120, 144 and 192 and higher.
Auto DPI
example (graphics) - file with graphic settings for
example.
Multiple
Backgrounds example - This example demonstrates using of
Multiple OLE images (.jpg .gif .bmp) for background image.
Multiple
Backgrounds example (graphics) - file with graphic settings for
Multiple Backgrounds example.
Visual
& Installer example - This example demonstrates integrating
NSIS into Microsoft Visual Studio (any version).
Visual
& Installer example (graphics) - file with graphic settings
for Visual & Installer example.
RAD
& Installer example - This example demonstrates integrating
NSIS into Embarcadero RAD Studio (any version).
RAD & Installer example (graphics) - file with graphic
settings for RAD & Installer example.
Irregular Form
example - This example demonstrates creating non rectangular
forms (forms with transparent areas).
Irregular
Form example (graphics) - file with graphic settings for
Irregular Form example.
In next section you can find several situations which can occur in
your installer and solutions for them.
To enable skinning mechanism of Graphical Installer you need to
define symbol GRAPHICAL_INSTALLER_PROJECT. See the section
File <project>.graphics.iss for
details.
When this symbols is defined skinning mechanism is enabled. Simply
delete this symbol (or comment it out) and rebuild so the installer
will look like any regular Inno Setup one.
; Semicolon character (;) at the
beginning of line is a comment. Use it to comment the line
out
; #define GRAPHICAL_INSTALLER_PROJECT "Some value"
And of course if you define this symbol (remove comment) and
rebuild the installer the skinning will work again.
Compiler Error / File: C:\Program
Files (x86)\Inno Setup 6\Graphical
Installer\GraphicalInstaller_functions.iss
Line 500: Column 14: Unknown identifier 'SETTEXTSCOLORS'
The Graphical Installer and Inno Setup versions must match
EXACTLY. That means you need to install for
example Inno Setup 6.0.4 together with Graphical
Installer for Inno Setup v6.0.4 (Vanka).
If the versions do not match the script compiler complains that it
cannot find function from SetTextsColors() which is defined inside
Graphical Installer.
Solution: Uninstall
both products and install Inno Setup, then Graphical Installer with
the exact version number.
Your existing code looks typically like this:
Wizardform.NextButton.Enabled :=
False; or Wizardform.CancelButton.Visible :=
True;
Use the following function to enable/disable GI buttons:
ButtonSetEnabled(hNextButton, False);
// False to disable, True to enable the button
Use the following function to show/hide GI buttons:
ButtonSetVisibility(hCancelButton,
False); // False to hide, True to show the button
The correct variables of the Back / Next / Cancel buttons are:
hBackButton / hNextButton /
hCancelButton
See this technical section how to properly create background images for Inno Setup.
Exception: Control 'TNewStaticText($03931670)' has no parent
window. Path:
WizardForm
.TWizardPage($0205B590)
.TNewStaticText($03931670).