Inno Setup - RRUZ/vcl-styles-plugins GitHub Wiki
Introduction
VCL Styles for Inno Setup is a Free and Open Source plugin (dll) that allows you to add skins to the installers created by Inno setup.
Features
The plugin supports all the Inno controls
- TNewEdit
- TPasswordEdit
- TNewMemo
- TNewComboBox
- TNewListBox
- TNewButton
- TNewCheckBox
- TNewRadioButton
- TSelectFolderForm
- TFolderTreeView
- TStartMenuFolderTreeView
- TRichEditViewer
- TNewStaticText
- TNewNotebook
- TNewNotebookPage
Support for ANSI and Unicode versions of Inno setup.
Support for menus.
Support for shell dialogs (open/save file, select folder).
Includes 30+ VCL Styles (skins), a set of wizard images and samples inno scripts.
The current size of the plugin is about 1.6 mb, but when is included (and compressed) in the script only add ~500 Kb to the final installer.
Screenshots
How to use it
In order to use the plugin you must follow these steps
- Add the VclStylesinno.dll file to your inno setup script and the VCL Style file (skin) to use.
- Import the function LoadVCLStyleW for Unicode versions of Inno setup or the LoadVCLStyleA method for the Ansi version
- Import the function UnLoadVCLStyles
- In the InitializeSetup function extract the style to use and call the LoadVCLStyle method passing the name of the style file
- Finally in the DeinitializeSetup function call the UnLoadVCLStyles method.
Note : To avoid a delay in the startup of the setup list the VclStylesinno.dll and the skin file at the top of the Files section.
This is documented in the Inno Setup Help.
...If you use a 'files:' prefix and solid compression is enabled, be sure to list your DLLs at (or near) the top of the Files section. In order to extract an arbitrary file in a solid-compressed installation, Setup must first decompress all prior files (to a temporary buffer in memory). This can result in a substantial delay if a number of other files are listed above the specified file in the Files section.
Installer Sample script
[Files]
Source: ..\VclStylesinno.dll; DestDir: {app}; Flags: dontcopy
Source: ..\Styles\Amakrits.vsf; DestDir: {app}; Flags: dontcopy
[Code]
// Import the LoadVCLStyle function from VclStylesInno.DLL
procedure LoadVCLStyle(VClStyleFile: String); external 'LoadVCLStyleW@files:VclStylesInno.dll stdcall';
// Import the UnLoadVCLStyles function from VclStylesInno.DLL
procedure UnLoadVCLStyles; external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Amakrits.vsf');
LoadVCLStyle(ExpandConstant('{tmp}\Amakrits.vsf'));
Result := True;
end;
procedure DeinitializeSetup();
begin
UnLoadVCLStyles;
end;
Uninstaller sample script
#define VCLStylesSkinPath "{localappdata}\VCLStylesSkin"
[Files]
Source: ..\VclStylesinno.dll; DestDir: {#VCLStylesSkinPath}; Flags: uninsneveruninstall
Source: ..\Styles\Amakrits.vsf; DestDir: {#VCLStylesSkinPath}; Flags: uninsneveruninstall
[Code]
// Import the LoadVCLStyle function from VclStylesInno.DLL
procedure LoadVCLStyle(VClStyleFile: String); external 'LoadVCLStyleW@files:VclStylesInno.dll stdcall setuponly';
procedure LoadVCLStyle_UnInstall(VClStyleFile: String); external 'LoadVCLStyleW@{#VCLStylesSkinPath}\VclStylesInno.dll stdcall uninstallonly';
// Import the UnLoadVCLStyles function from VclStylesInno.DLL
procedure UnLoadVCLStyles; external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall setuponly';
procedure UnLoadVCLStyles_UnInstall; external 'UnLoadVCLStyles@{#VCLStylesSkinPath}\VclStylesInno.dll stdcall uninstallonly';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Amakrits.vsf');
LoadVCLStyle(ExpandConstant('{tmp}\Amakrits.vsf'));
Result := True;
end;
procedure DeinitializeSetup();
begin
UnLoadVCLStyles;
end;
function InitializeUninstall: Boolean;
begin
Result := True;
LoadVCLStyle_UnInstall(ExpandConstant('{#VCLStylesSkinPath}\Amakrits.vsf'));
end;
procedure DeinitializeUninstall();
begin
UnLoadVCLStyles_UnInstall;
end;
Looking for the installer? Check the Release Area