Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2020, 15:09
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,018 Times in 239 Posts
altef_4 is on a distinguished road
Exclamation Add Alpha Skins support to Inno Setup: Tutorial

Hi all, after some testing and searching and also request from
Cuttlas, i decide to upload step-by-step tutorial how to add alpha skins support into inno setup, like title said, so lets go.
  1. you must be abble to compile inno setup on your PC (inno setup source code), follow instructions from provided link
  2. download latest alpha skins lite pacage from alphaskins site, and install it in your delphi IDE, use lite version cuz it free
  3. in addition also download and install RemObjects component and install it
    i don't provide step-by-step instructions for this steps cuz all installation info is present on links i provided

  4. open Setup.dpr project (.\issrc-master\Projects\Setup.dpr)
  5. select build configuration to Release
  6. optional: edit build configuration by adding postbuild event command - copy /B "$(OutputPath)" "..\Files\$(OutputName).e32"
  7. this command will copy Setup.exe to FIles\Setup.e32
  8. add AlphaSkins_R.Pas to Setup.dpr
  9. open AlphaSkins_R.dfm and configure sSkinManager as you wont(effects, animations etc)
  10. in attached archive present base AlphaSkins_R.Pas and AlphaSkins_C.Pas, use them as start point
  11. open ScriptClasses_R.pas and add AlphaSkins_R unit in uses section
  12. search for "RegisterBidiCtrls_R(Cl);"
  13. add "RegisterSkinManager_R(Cl);" after it
  14. search for "ScriptClassesLibraryUpdateVars"
  15. add "SetVariantToClass(ScriptInterpreter.GetVarNo(Scrip tInterpreter.GetVar('SKINMANAGER')), DataModule1.SkinManager);" line as first call in function
  16. view source of Setup.dpr and search for "Application.CreateForm(TDataModule1, DataModule1);" and remove it
  17. search for "Application.HookMainWindow(TDummyClass.AntiShutdow nHook);" and add "Application.CreateForm(TDataModule1, DataModule1);" after it
  18. recompile Setup.exe
  19. open ISCmplr.dpr
  20. select build configuration to Release
  21. optional: edit build configuration by adding postbuild event command - copy /B "$(OutputPath)" "..\Files\$(OUTPUTFILENAME)"
  22. this command will copy ISCmplr.dll to FIles\ISCmplr.dll
  23. add AlphaSkins_C.pas to ISCmplr.dpr
  24. open ScriptClasses_C.pas and add AlphaSkins_C unit in uses section
  25. search for "AddImportedClassVariable(Cl, 'WizardForm', 'TWizardForm');"
  26. add "RegisterSkinManager_C(Cl);" line before "AddImportedClassVariable(Cl, 'WizardForm', 'TWizardForm');" line
  27. recompile ISCmplr.dll
  28. compile Compil32.dpr, ISCC, ISPP, SetupLdr projects
  29. copy destination compiled project binaries into Files folder
  30. create inno setup script file in FIles folder with following content:
    Code:
    [Setup]
    AppName=My Program
    AppVersion=1.5
    DefaultDirName={pf}\My Program
    Compression=lzma2
    SolidCompression=yes
    DisableWelcomePage=no
    OutputDir=.\
    //WindowVisible=True
    
    [Code]
    procedure SetSkinParameters(u: Boolean);
    begin
      with SkinManager do begin
       if not u then begin
          SkinDirectory := ExpandConstant('{src}\Skins_V15\')
          SkinName := GetRandomSkin;
          //SkinName := ExpandConstant('{src}\Skins_V15\Pulsar.asz');
         end;
        //HUEOffset := Random(360); //value from 0 to 360
        //Saturation := Random(200) - 100; //value from -100 to 100
        //Brightness := Random(40) - 25; //value from -25 to 15
        Active := TRUE;
      end;
    end;
    function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external '[email protected] stdcall';
    function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external '[email protected] stdcall';
    function GetWindow (HWND: Longint; uCmd: cardinal): Longint;external '[email protected] stdcall';
    
    
    function InitializeSetup: Boolean;
    begin
      SetSkinParameters(False);
      Result := TRUE;
    end;
    
    function InitializeUninstall: Boolean;
    begin
      SetSkinParameters(True);
      Result := TRUE;
    end;
    
    procedure InitializeWizard;
    begin
    SetWindowLong(WizardForm.Handle, -8,GetWindowLong(GetWindow(WizardForm.Handle, 4),-8));
      WizardForm.BorderStyle := BsSizeable; //work with this style, only wizardform
    end;
  31. NewStaticText aligment fix:
    open Components/NewStaticText.pas
    add FAlignment: TAlignment; into private section of TNewStaticText Class
    add procedure SetAlignment(Value: TAlignment); into private section of TNewStaticText Class
    add property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify; into published section of TNewStaticText Class
    press Ctrl+Shift+C and search for TNewStaticText.SetAlignment
    add following code into this procedure:
    Code:
    if FAlignment <> Value then
       begin
       FAlignment := Value;
       RecreateWnd;
    end;
    save NewStaticText.pas and recompile Setup.dpr
  32. 5px frame fix
    Remove or comment '//' this 2 lines in setup.dpr file:
    {$SETPEOSVERSION 6.0}
    {$SETPESUBSYSVERSION 6.0}

    and recompile setup.e32 (setup.dpr file), thanks for fix Cuttlas, there is attached 5px_frame_fix.zip with recompiled setup.e32 and edited setup.dpr, not sure if this change can couse any bugs in inno setup itself
attached archive containe all this changes and inno setup 6.0.4 src version, i tryed to check if it works on latest beta source but i get some errors during compilation of original unchanged source and i don't have time to figure out how to fix this errors, so at least it work with this version and should work with new one, also 5px_frame_fix.zip contains setup.dpr with necessary changes to fix 5 px unskined frame and recompiled setup.e32 file, so to use this fix just replace setup.e32 file in base archive with new one
Attached Images
File Type: jpg scr1.jpg (115.8 KB, 153 views)
File Type: jpg scr2.jpg (128.8 KB, 153 views)
File Type: jpg scr3.jpg (142.6 KB, 152 views)
File Type: jpg scr4.jpg (136.1 KB, 151 views)
Attached Files
File Type: rar issrc-master_with_alpha_skins.rar (23.83 MB, 171 views)
File Type: zip 5px_frame_fix.zip (1.79 MB, 59 views)

Last edited by altef_4; 16-10-2020 at 02:42.
Reply With Quote
The Following 12 Users Say Thank You to altef_4 For This Useful Post:
Cesar82 (03-10-2020), Cuttlas (03-10-2020), DiCaPrIo (04-10-2020), felice2011 (04-10-2020), ffmla (16-10-2020), Grumpy (03-10-2020), Gupta (03-10-2020), Mortal Lord (04-10-2020), oo7 (20-12-2020), papas (21-10-2020), Razor12911 (04-10-2020), XxAZAxX (15-10-2020)
Sponsored Links
  #2  
Old 03-10-2020, 23:11
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
Thank you altef_4, my bro

nice and clean.
Reply With Quote
  #3  
Old 03-10-2020, 23:50
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
I think this post should be Sticky
Reply With Quote
  #4  
Old 15-10-2020, 01:14
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,018 Times in 239 Posts
altef_4 is on a distinguished road
Exclamation

First post updated, added 5px frame fix, thanks for info about fix going to Cuttlas
Info about fix:
Code:
{$SETPEOSVERSION 6.0}
{$SETPESUBSYSVERSION 6.0}
if required Windows version is old (6.0), then GetWindowRect and GetClientRect functions works not correctly under new Windows versions
Reply With Quote
The Following User Says Thank You to altef_4 For This Useful Post:
Cuttlas (15-10-2020)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BlackBox v2 y_thelastknight Conversion Tutorials 567 16-12-2024 22:22
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 06:51
Inno Setup With Alpha Skins Cuttlas Conversion Tutorials 0 01-10-2020 12:54
Useful Dll for Inno Setup users peterf1999 Conversion Tutorials 88 01-12-2017 17:00
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 07:57



All times are GMT -7. The time now is 13:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com