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.
you must be abble to compile inno setup on your PC (inno setup source code), follow instructions from provided link
download latest alpha skins lite pacage from alphaskins site, and install it in your delphi IDE, use lite version cuz it free
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
open Setup.dpr project (.\issrc-master\Projects\Setup.dpr)
copy destination compiled project binaries into Files folder
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;
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
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
Last edited by altef_4; 16-10-2020 at 02:42.
The Following 12 Users Say Thank You to altef_4 For This Useful Post:
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
The Following User Says Thank You to altef_4 For This Useful Post: