Skip to content
The Road to Delphi — Delphi, VCL, VCL Styles, UxTheme and WinAPI

VCL Styles for Inno Setup

, , ,

Introduction

As part of the VCL Styles Utils project, I made a plugin (dll) to skin the installers created by Inno setup. The current size of the plugin is about 1.6 mb, but when is included (and compressed) in the script only add ~490 Kb to the final installer.

output_qkRcra

How to use it

In order to use the plugin you must follow these steps

  1. Add the VclStylesinno.dll file to your inno setup script and the VCL Style file to use.
  2. Import the function LoadVCLStyleW for Unicode versions of Inno setup or the LoadVCLStyleA method for the Ansi version
  3. Import the function UnLoadVCLStyles
  4. In the InitializeSetup function extract the style to use and call the LoadVCLStyle method passing the name of the style file
  5. Finally in the DeinitializeSetup function call the UnLoadVCLStyles method.

Check the next sample script

[sourcecode language=”delphi”]
[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;

[/sourcecode]

TODO

  • Add support for TFolderTreeView and TStartMenuFolderTreeView components
  • Add support for themed controls in the TNewCheckBoxList component
  • Add support for the npbstMarquee style in the TNewProgressBar component

Source code and Installer

The source code and installer is available on Github.

As always all your comments and feedback is welcome.

49 responses

  1. Beautiful! I did not see in your article what minimum version of Delphi is required. (But I did see on the project home page.)

    1. Thanks. This is a dll compiled using Delphi XE2, I used this version because produces smaller binaries than XE5.

  2. Absolutely brilliant. Many thanks …

  3. Very cool!

  4. Well done! Thanks alot!

  5. Loursonwinny Avatar
    Loursonwinny

    Do you sleep sometimes

  6. […] Introduction As part of the VCL Styles Utils project, I made a plugin (dll) to skin the installers created by Inno setup.  […]

  7. Nice! What is the minimum version number of Inno Setup required?

    1. Alvaro, The plugin was tested with the 5.5.4 inno setup version.

  8. lucasmmiller Avatar
    lucasmmiller

    Very nice addition to InnoSetup. Did find one small bug. Please feel free to email me for additional details. To replicate, just run the VCLStylesDemo project and cancel. The text in the Exit Setup dialog does not word wrap. You only see “Setup is not complete. If you exit now, the program will not be installed. You ma”.

    1. You are welcome and thanks for you feedback, the word wrap issue was just fixed. You can download the installer again and check.

      1. lucasmmiller Avatar
        lucasmmiller

        That fixed the problem. Ran into another bug when using a dark theme like Amakrits. On the License page the the text for the radio buttons (I accept the agreement/I do not accept the agreement) is black and thus almost impossible to see. The other text on the page is what and readable.

        1. Thanks for your feedback again, can you please report this issue using the issue page of the project. http://code.google.com/p/vcl-styles-utils/issues/list

  9. there is a serious access violation crash when rightclick the installer setup titlebar :)

    1. Sorry but I can’t reproduce this issue. Can you please report this using the issue page of the project http://code.google.com/p/vcl-styles-utils/issues/list ?

  10. i have downloaded “SetupVCLStylesInno.exe” from your dropbox, started it, welcome page appeared

    went to the titlebar “Setup – VCL Styles for Innosetup” and did a right mouse button click on it and it crashes

    1. This bug was fixed in the last version (1.0.7.51).

  11. Hi there , i am having an issue with the code :( .. it compiles well , but when i try to run the installer it appears this error(image link)
    http://puu.sh/5Z0bd.jpg

    1. It seems which you are using the Ansi version of Inno setup, so you must import the function LoadVCLStyleA instead.

      1. Thank you very much, it works like a charm , one more thing , if i may, is there any way to edit/create some themes? Thank you in advance for support :)

        1. The themes used by the plugin can be created and edited using the VCL Style Designer (http://docwiki.embarcadero.com/RADStudio/XE2/en/VCL_Style_Designer)

  12. Thanks for sharing.

    But there’s one more thing. If you build multi-languages setup, the themes cannot apply on the first selection language.

    1. Hi Juan, please report this, using the issue page of the project http://code.google.com/p/vcl-styles-utils/issues/list. Thanks.

  13. Nice

  14. It’s a wonderfull idea to customize setup but I have an exception in InitializeSetup() function on LoadVCLStyle() line… With the message “External Exception EEDFADE… Could you help me ?

    1. Hi, please report this in the issue page of the project https://code.google.com/p/vcl-styles-utils/issues/list

  15. how do i make the about button go black, done everything but still no luck, any help bro

    1. Can you please elaborate your question?

  16. ABAllA Avatar
    ABAllA

    @Rodrigo

    I have inno setup script
    but I have problem for apply VCL :(

    http://www6.0zz0.com/2015/04/02/22/173456720.png

    help bor :)

  17. work fine in new script

    but I have a problem in my old script m any help bro?

    1. Please use the issue page (https://github.com/RRUZ/vcl-styles-plugins/issues) of the project to report any problem.

  18. @Rodrigo

    how to skin in unstall? code please

    1. Check the Uninstaller sample script located in the wiki page – https://github.com/RRUZ/vcl-styles-plugins/wiki/Inno-Setup

      1. work now

        thank u my brother :)

  19. I don’t know this mean
    “Import the function LoadVCLStyleW for Unicode versions of Inno setup or the LoadVCLStyleA method for the Ansi version”
    success compile, but the skin does not change
    how to solve this?

    1. Please check the samples in the page of the project https://github.com/RRUZ/vcl-styles-plugins/wiki/Inno-Setup

  20. Missing dependency files for included binaries inside SetupVCLStylesInno.exe v1.5.1.0

    SHA-1 fd3e6a4452e28fbacf0e01d9d7e76091efa8fa5e

    BitmapStyleDesigner.exe v17.0.4625.53395

    SHA-1: 8625ad680d701b7f49d6afabbbcfae74a9435814

    designide170.bpl
    rtl170.bpl
    vcl170.bpl
    vclactnband170.bpl
    vclimg170.bpl
    vclx170.bpl
    xmlrtl170.bpl

    VclStyleViewer.exe v17.0.4625.53395

    SHA-1: 7937f70eed12ca70b23cc7cd778e40f68c71ab04

    rtl170.bpl
    vcl170.bpl
    vclactnband170.bpl
    vclx170.bpl

    just add if allowed the missing bpls aside binaries in updated installer and please create a noinstall zip version
    it is pretty annoying to unpack installer again and again manually when updated……

    TDWP

    1. Thanks for the report. I just created (and fixed) a new issue in the project page (https://github.com/RRUZ/vcl-styles-plugins/issues/23) of the plugin. Try the new installer. Also if you want report any issue or suggest a new feature please use the issue page of the project.

  21. Brian Christensen Avatar
    Brian Christensen

    Ok the installer SetupVCLStylesInno.exe has a style, when I create using the sample I dont see any style change. Currently using Windows 7 Pro SP 1, Inno Setup 5.5.6. Ideas?

    1. Hi Brian, please use the issue page of the project to report this, attaching the script which you are using.

  22. Elektro Avatar
    Elektro

    Really, we must download 3 GB of Delphi installation to compile the dll? I remember that time ago the installer was downloadable in this site, why you just don’t publish a release in your Github with the project COMPILED for those like me who don’t want to spent time (and residous) by intalling and unindtalling delphi IDE just to compile the project?.

    Thankyou anyways

    1. The installer is available in github, check at the end of the page https://github.com/RRUZ/vcl-styles-plugins/wiki/Inno-Setup

  23. Hi Rodrigo,

    When I use the darker styles with InnoSetup the text is virtually unreadable. The font colour appears to be black when it should be white.

    Inno Script Studio 5.5.9 (u)
    VCL Styles Inno 1.5.4.1

    Here are two examples of the problem:

    http://www.stevegill.com.au/images/WelcomeScreenFontColour.png

    http://www.stevegill.com.au/images/InstallScreenFontColour.png

    Thanks,

    Steve

    1. Hi Steve, please report this using the issue page of the project https://github.com/RRUZ/vcl-styles-plugins/issues

  24. Erick Rodriguez Avatar
    Erick Rodriguez

    Hey Rodrigo! thanks for your work! I tried using your dll in my project, but none of the skins are loaded. Even I tried compiling your samples and none of the skins are shown there either. I’m using Inno Setup 5.5.9 and Windows 10 64bit build 1703. What can I try?

    1. Please follow the instructions of the wiki page https://github.com/RRUZ/vcl-styles-plugins/wiki/Inno-Setup, Also check if you are using the UNICODE or ANSI version of inno setup.

      1. Erick Rodriguez Avatar
        Erick Rodriguez

        Hi, I’ve read many times the Wiki… followed all the instructions, triple checked my functions.. and nothing. Ah, the app VclStyleViewer.exe also doesn’t load any demo style, just Windows. Any clue? As I said, I ran the sample scripts and didn’t load any skin. If you need additional info about anything just tell me :) I’m using the Inno version that downloads the Quick Start Pack (I use the Inno Script Studio and ISSI).

        Thanks for your help.

        1. Erick, please open a new issue in the GitHub page (https://github.com/RRUZ/vcl-styles-plugins/issues) attaching all the info provided in your comments. like Windows version (full version including build number), Inno setup version (including if is Unicode or ANSI).

  25. thank you very much, nice coder;

Leave a Reply