Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 19-12-2015, 01:47
ramazan19833 ramazan19833 is offline
Banned
 
Join Date: Apr 2012
Location: abc
Posts: 248
Thanks: 16
Thanked 10 Times in 8 Posts
ramazan19833 is on a distinguished road
//************************** Àâòîğ Namiq666***************************\\

// Name of the game
#define GameName "Dark Blue"
// name EXE
#define GameExe "Data.exe"
//name EXE 2
#define GameExe2 "Data2.exe"
// version Games
#define GameVersion "1.0"
//version installs
#define InstallVersion "1.3"
// name Groups
#define RGName "R.G.Unknow"
//Name Repakera
#define RePackerName "namiq666"
//Required sv.mesto for Games
#define NeedSize "3592"
//Sv.mesto required for installation
#define NeedInstallSize "2210"
//Required RAM for installation
// Component_s
;#define Components
// Information about the author
#define AuthorButton

////////////Possible to select only one of the three options////////////////////
////////////(Var1) Option 1 - only a selection of tablets
////////////(Var2) Option 2 - only a choice of additional components
////////////(Var3) Option 3 - Selecting and additional components and tablets
;#define Var1
;#define Var2
;#define Var3

//Tasks
#define Tasks
// splash
#define Splash
// Music
#define Music

////ISDone/////////////////
;#define records
;#define PrecompInside
#define SrepInside
;#define Reflate
#define facompress
#define OGGRecoding
;#define precomp "0.38"
;#define unrar
;#define XDelta
;#define PackZIP


[Setup]
AppName={#GameName}
DefaultDirName={pf}\{#RGName}\{#GameName}
DefaultGroupName={#RGName}\{#GameName}
AppVerName={#GameName}{#GameVersion}
VersionInfoDescription={#GameName}by{#RePackerName }
VersionInfoTextVersion={#InstallVersion}
AppCopyright={#RGName}
InternalCompressLevel=ultra64
SolidCompression=true
Compression=lzma/ultra64
SetupIconFile="InstallFiles/icon.ico"
UninstallDisplayIcon={app}\Del.ico
ShowTasksTreeLines=Yes
#define VCLStylesSkinPath "{localappdata}\VCLStylesSkin"
[Files]
//////Graphics files and installer///////////
Source: InstallFiles\*; DestDir: {app}\Temp; Attribs: hidden system;
Source: InstallFiles\VclStylesinno.dll; DestDir: {#VCLStylesSkinPath}; Flags: uninsneveruninstall
Source: InstallFiles\Amethyst Kamri.vsf; DestDir: {#VCLStylesSkinPath}; Flags: uninsneveruninstall
/////// files music///////////////////////
#ifdef Music
Source: Music\*; DestDir: {tmp}; Flags: dontcopy
#endif
//////////////the files of the splash/////////////
#ifdef Splash
Source: Splash\*; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
#endif
///////////////////////////Files ISDone\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\
Source: Include\english.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\lz77.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\arc.ini; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef Reflate
Source: include\Reflate\*; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef OGGRecoding
Source: Include\aac_dec.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\rebuild_d.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\facompress_mt.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.42"
Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.43"
Source: Include\precomp043.exe; DestDir: {tmp}; Flags: dontcopy
#else
#endif
#endif
#endif
#endif
#endif
#endif
#ifdef unrar
Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef XDelta
Source: Include\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PackZIP
Source: Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
#endif
[Languages]
Name: "eng"; MessagesFile: "compilerefault.isl"

[Messages]
ButtonBack=< Back
ButtonNext=Next >
ButtonCancel=Exit
ButtonInstall=Install
ButtonFinish=Finish
ButtonWizardBrowse=Browse...

[CustomMessages]
Uninstall=Remove {#GameName}
Run=Start {#GameName}

WelcomeLabel1=Welcome to Setup Game %n {#GameName}
WelcomeLabel2=The program will set {#GameName} %non your computer.%n%nIt is recommended to close the anti-virus packages%nand all other applications before continuing.%n%nclick «Next», to continue with the installation,%nor «Exit», to exit the installation program.
SelectDirLabel=The program will install the game in the following folder.
TotalSpaceLabel=Total disk space:
FreeSpaceLabel=Available disk space:
InstallSpacelabel=Required space for installation:
NeedSpaceLabel=Required disk space:
SelectDirBrowseLabel=click «Next», to continue. If you want to %nchoose a different folder, click «Browse».
SelectComponentsLabel=Select the components you want to install and remove %nflags with the components you do not want to install. %nclick «Next», when you are ready to continue

////////////////////choice of tablet ///////////
Crack=The choice of crack
Crack1=Crack from THETA
Crack2=Crack from 3DM
Crack3=Crack from SKiDROW
/////////////////////////////////////
Text=Interface language:
Voice=Language voice:
Russian=Russian.
English=English.
SelectStartMenuFolderLabel=The program creates shortcuts in the following folder menu «Start».
SelectStartMenuFolderBrowseLabel=click «Next», to continue. If you want to select another folder, press «Browse».
NoIconsCheck=Do not create a folder in the «Start»
SelectTasksLabel=Select the additional tasks that must be met %nat installation {#GameName}, after that click «Next».
Icons=Additional shortcuts:
CreateDesktopIcon=Create a shortcut on the desktop.
CreateDesktopIcon2=Create a shortcut on the desktop (Settings Live)
CreateQuickLaunchIcon=Create a shortcut to the Quick Launch toolbar.
Soft=Additional Soft:
Physx=update | Install Physx.
DirectX=update | Install DirectX.
ReadyLabel=click «Next», to begin installation, or «Back», %nIf you want to view or change setup options.
InstallingLabel=Please wait while the game is installed on your computer.
ExtractedFile=Extract files:
Extracted=Unpacking the archives ...
ElapsedTime=Posted:
RemainingTime=Remaining Time:
EstimatedTime=Elapsed Time:
AllElapsedTime=time installation:
Error=Error unpacking!
StatusRollback=Rolling back changes ...
FinishedHeadingLabel=Installing the game"{#GameName}" %nsuccessfully completed
FinishedLabel=game "{#GameName}" It was %nsuccessfully installed on your computer. %n%nTo run the program, select the appropriate shortcut menu "Start" %nor on the desktop. %n%nclick "Finish", to exit the installation program.
ErrorFinishedHeadingLabel=Installing the game "{#GameName}" %n not completed
ErrorFinishedLabel=The installation was not completed.%n%nPlease correct the problem and run the installation again.
UninstDescript=Please wait while the game will be deleted %nfrom your computer.
StatusUninst=Removing games {#GameName}...
fold=
#ifdef Tasks
[Icons]
Name: {commondesktop}\{#GameName}; Filename: {app}\{#GameExe}; WorkingDir: {app}\; Tasks: Icons\DesktopIcon; Check: CheckError;
#ifdef GameExe2
//Name: {commondesktop}\{#GameName}.(Settings Live); Filename: {app}\{#GameExe2}; WorkingDir: {app}\; IconFilename: {app}\{#GameExe2}; Tasks: Icons\DesktopIcon2; Check: CheckError
#endif
Name: {group}\{#GameName}; Filename: {app}\{#GameExe}; WorkingDir: {app}\; Check: CheckError;
Name: {group}\{cm:UninstallProgram,{#GameName}}; Filename: {uninstallexe}; Check: CheckError;
#endif

#ifdef Components
[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
#ifdef Var1
Name: Crack; Description: {cm:Crack}; Flags: fixed; Types: Full;
Name: crack\theta; Description: {cm:Crack2}; Flags: exclusive;
Name: crack\3dm; Description: {cm:Crack1}; Flags: exclusive;
#endif

#ifdef Var2
Name: Text; Description: {cm:Text}; Flags: fixed; Types: Full;
Name: Text\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000;
Name: Text\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000;
Name: Voice; Description: {cm:Voice}; Flags: fixed; Types: Full;
Name: Voice\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000;
Name: Voice\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000;
#endif

#ifdef Var3
Name: Text; Description: {cm:Text}; Flags: fixed; Types: Full;
Name: Text\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000;
Name: Text\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000;
Name: Voice; Description: {cm:Voice}; Flags: fixed; Types: Full;
Name: Voice\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000;
Name: Voice\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000;
Name: Crack; Description: {cm:Crack}; Flags: fixed; Types: Full;
Name: crack\theta; Description: {cm:Crack2}; Flags: exclusive;
Name: crack\3dm; Description: {cm:Crack1}; Flags: exclusive;
#endif
#endif

#ifdef Tasks
[Tasks]
Name: Icons; Description: {cm:Icons}; Flags: unchecked;
Name: Icons\DesktopIcon; Description: {cm:CreateDesktopIcon}; Flags: unchecked
#ifdef GameExe2
//Name: Icons\DesktopIcon2; Description: {cm:CreateDesktopIcon2}; Flags: unchecked
#endif
//Name: Icons\QuickLaunchIcon; Description: {cm:CreateQuickLaunchIcon}; Flags: unchecked;

Name: DPO; Description: {cm:Soft};
Name: DPO\VCCheck; Description: Install Visual C++2008 Redist 32-õ bit; Flags: unchecked
Name: DPO\VCCheck1; Description: Install Visual C++2008 Redist 64-õ bit; Flags: unchecked
Name: DPO\DirectX; Description: update DirectX ( Install); Flags: unchecked; Components: ; Languages: ;
//Name: DPO\Net; Description: Microsoft NET Framework 4.0 ; Flags: unchecked
//Name: DPO\PhysXCheck; Description: Install Nvidia PhysX
//Name: DPO\UbisoftLuncher; Description: Install Ubisoft Lunccher; Flags: unchecked
//Name: DPO\WinLive; Description: Install Windows Live; Flags: unchecked
#endif

[Run]

#ifdef Tasks
Filename: {src}\Soft\Redist\vcredist_x86.exe; StatusMsg: installable Visual C++ 2008 Redist...; Flags: skipifdoesntexist; Tasks: DPO\VCCheck; Components: ; Check: CheckError
Filename: {src}\Soft\Redist\vcredist_x64.exe; StatusMsg: installable Visual C++ 2005 Redist...; Flags: skipifdoesntexist; Tasks: DPO\VCCheck1; Components: ; Check: CheckError
Filename: {src}\Soft\DirectX\dxwebsetup.exe; WorkingDir: {src}\Soft\DirectX\; Flags: waituntilterminated; Tasks: DPO\DirectX; StatusMsg: update DirectX...; Check: CheckError
//Filename: {src}\Soft\MicrosoftNET Framework\dotNetFx40_Full_x86_x64.exe; WorkingDir: {src}\Soft\MicrosoftNET Framework\; StatusMsg: update NET Framework...; Flags: waituntilterminated; Tasks: DPO\Net
//Filename: {src}\Soft\PhysX\PhysX.exe; Parameters: /qn; StatusMsg: installable Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: DPO\PhysXCheck; Check: CheckError
//Filename: {src}\Soft\Ubisoft\UbisoftGameLauncherInstaller.ex e; WorkingDir: {src}\Soft\Ubisoft\; StatusMsg: installable Ubisoft Luncher...; Flags: waituntilterminated; Tasks: DPO\UbisoftLuncher
//Filename: {src}\Soft\WinLive\gfwlivesetup.exe; WorkingDir: {src}\Soft\WinLive\; StatusMsg: installable Windows Live...; Flags: waituntilterminated; Tasks: DPO\WinLive
#endif
[UninstallDelete]
Type: filesandordirs; Name: {app}

[Code]
#ifdef Splash
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7: integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
#endif
#include "ModulesEng\Botva2.iss"
#include "ModulesEng\PB.iss"
#include "ModulesEng\Header.iss"
#include "ModulesEng\WinTB.iss"


///////////module music////////////////
#ifdef Music
#include "ModulesEng\BASS.iss"
#endif

////////////////////////////////////////////////////////////Texture buttons\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
procedure SetStateNewButtons;
begin
with WizardForm.BackButton do begin
BtnSetText(hBackBtn,PAnsiChar(Caption));
BtnSetVisibility(hBackBtn,Visible);
BtnSetEnabled(hBackBtn,Enabled);
end;
with WizardForm.NextButton do begin
BtnSetText(hNextBtn,PAnsiChar(Caption));
BtnSetVisibility(hNextBtn,Visible);
BtnSetEnabled(hNextBtn,Enabled);
end;
with WizardForm.CancelButton do begin
BtnSetText(hCancelBtn,PAnsiChar(Caption));
BtnSetVisibility(hCancelBtn,Visible);
BtnSetEnabled(hCancelBtn,Enabled);
end;
BtnSetText(hDirBrowseBtn,PAnsiChar(WizardForm.DirB rowseButton.Caption));
BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.Gr oupBrowseButton.Caption));
end;





procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$00 01);
case hBtn of
hCancelBtn: Btn:=WizardForm.CancelButton;
hNextBtn: Btn:=WizardForm.NextButton;
hBackBtn: Btn:=WizardForm.BackButton;
hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;
hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;

procedure WFBtnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$ 0001);
end;

procedure ButtonsTextures;
begin
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,205,320,88,3 0,ExpandConstant('BackBtn.png'),0,False);
BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnC allback(@WFBtnEnter,1));
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallba ck(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,WFButtonFont.Handle);
BtnSetFontColor(hBackBtn,$FFFFFF,$E16941,$000000,$ B6B6B6);
Width:=0;
Height:=0;
end;

with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,409,320,88,3 0,ExpandConstant('NextBtn.png'),1,False);
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnC allback(@WFBtnEnter,1));
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallba ck(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,$FFFFFF,$E16941,$000000,$ B6B6B6);
Width:=0;
Height:=0;
end;

with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,295,320,11 2,30,ExpandConstant('CancelBtn.png'),1,False);
BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBt nCallback(@WFBtnEnter,1));
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCall back(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn,$FFFFFF,$E16941,$000000 ,$B6B6B6);
Width:=0;
Height:=0;
end;

with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,520,173 ,88,30,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,Wra pBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnC allback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,$FFFFFF,$E16941,$000 000,$B6B6B6);
Width:=0;
Height:=0;
end;

with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,520,1 73,88,30,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,W rapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBt nCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,$FFFFFF,$E16941,$0 00000,$B6B6B6);
Width:=0;
Height:=0;
end;


end;
#ifdef AuthorButton
procedure AuthorBtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$00 01);
LoadStringFromFile(ExpandConstant('{tmp}')+'\ReadM eRus.rtf', Readme)
InfoForm := CreateCustomForm();
with InfoForm do
begin
ClientWidth:=ScaleX(325);
ClientHeight:=ScaleY(225);
Caption := 'Information'
CenterInsideControl(WizardForm, False);
RichEditViewer := TRichEditViewer.Create(InfoForm);
with RichEditViewer do
begin
SetBounds(ScaleX(12),ScaleY(12),ScaleX(301),ScaleY (165));
Parent := InfoForm;
Font.Size := 8;
RTFText:= Readme;
ScrollBars:= ssVertical;
ReadOnly := True;
end;
NewButton := TNewButton.Create(InfoForm);
with NewButton do
begin
SetBounds(ScaleX(240),ScaleY(189),ScaleX(75),Scale Y(23));
Parent := InfoForm;
Caption := 'OK';
ModalResult := mrOk;
BtnSetEnabled(NoIconsCheck, not BtnGetEnabled(NoIconsCheck));
NoIconsLabel.Enabled := not (NoIconsLabel.Enabled);
BtnSetEnabled(hBackBtn, not BtnGetEnabled(hBackBtn));
BtnSetEnabled(hNextBtn, not BtnGetEnabled(hNextBtn));
BtnSetEnabled(hCancelBtn, not BtnGetEnabled(hCancelBtn));
BtnSetEnabled(hDirBrowseBtn, not BtnGetEnabled(hDirBrowseBtn));
BtnSetEnabled(hGroupBrowseBtn, not BtnGetEnabled(hGroupBrowseBtn));
end;
ShowModal;
Free;
end;

//BtnSetEnabled(Bass_OnOffBtn, not BtnGetEnabled(Bass_OnOffBtn));

BtnSetEnabled(NoIconsCheck, not BtnGetEnabled(NoIconsCheck));
NoIconsLabel.Enabled := not (NoIconsLabel.Enabled);
BtnSetEnabled(hBackBtn, not BtnGetEnabled(hBackBtn));
BtnSetEnabled(hNextBtn, not BtnGetEnabled(hNextBtn));
BtnSetEnabled(hCancelBtn, not BtnGetEnabled(hCancelBtn));
BtnSetEnabled(hDirBrowseBtn, not BtnGetEnabled(hDirBrowseBtn));
BtnSetEnabled(hGroupBrowseBtn, not BtnGetEnabled(hGroupBrowseBtn));

begin
#ifdef Components
WizardForm.ComponentsList.Width := ScaleX(350);
#endif
#ifdef Tasks
WizardForm.TasksList.Width := ScaleX(350);
#endif
ReadyPanel.Width := ScaleX(350);
end;

ImgApplyChanges(WizardForm.Handle);
end;

#endif
#ifdef AuthorButton
procedure CreateAuthorBtn;
begin
AuthorBtn := BtnCreate(WizardForm.Handle,ScaleX(576), ScaleY(317), ScaleX(34), ScaleY(41), ExpandConstant('about.png'),1,True);
BtnSetEvent(AuthorBtn, BtnMouseEnterEventID, WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(AuthorBtn, BtnClickEventID, WrapBtnCallback(@AuthorBtnClick,1));
end;
#endif
/////////////////////////////////////////////////êîíåö\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\
////////////////////////////////////////////////Âñòàâêà èçîáğàæåíèé\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\



procedure TBChangePos(pos:integer);
var
t:integer;
begin
t:=pos*1800 div 100;
PerformanceChanger:=(t);
L1.Caption:='RAM for acceleration unarc = '+IntToStr(t)+'MB';
end;


procedure TB2ChangePos(pos:integer);
var
t:integer;
begin
t:=pos*1600 div 100;
PerformanceChangerSREP:=(t);
L2.Caption:='RAM for acceleration srep = '+IntToStr(t)+'MB';
end;


#ifdef PrecompInside
procedure TB3ChangePos(pos:integer);
var
t:integer;
begin
t:=pos*900 div 100;
PerformanceChangerPCF:=(t);
L3.Caption:='RAM for acceleration precomp = '+IntToStr(t)+'MB';
end;
#endif


#include "ModulesEng\IsDone.iss"





procedure CreateWizardForm;
var
i:integer;
n: Integer;
begin
with WizardForm do begin

InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
ClientWidth:=ScaleX(700);
ClientHeight:=ScaleY(400);
DirEdit.OnChange:=@ObjectFunc;
GroupEdit.OnChange:= @ObjectFunc
OnMouseDown:=@LabelOnMouseDown;
Center;
end;
WizardFormFree:= True;
WFButtonFont:=TFont.Create;
with WFButtonFont do begin
Style:=[fsBold];
Size:=10;
Name:='Tahoma';
end;

BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BMPImage.bmp', BGImageStream);
BGImageStream.Position := 0;

BTNImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('btnimage.bmp', BTNImageStream);
BTNImageStream.Position := 0;

BGImage := TBitmapImage.Create(WizardForm);
BGImage.Bitmap.LoadFromStream(BGImageStream);

BTNImage := TBitmapImage.Create(WizardForm);
BTNImage.Bitmap.LoadFromStream(BTNImageStream);

ImgLoad(WizardForm.Handle,ExpandConstant('MainImag e.png'),0,0,0,0,False,True);
//////////////////////////////////////////!!!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\

/////////////////////////////////////////////////// Main St\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\
WelcomeLabel1:= CreateLabel(WizardForm, ScaleX(90), ScaleY(95), ScaleX(522), ScaleY(80), ExpandConstant('{cm:WelcomeLabel1}'), False);
LabelSetFont(WelcomeLabel1, 12, 'Tahoma', $FFFFFF, [fsBold]);
WelcomeLabel1.Alignment := taCenter;

WelcomeLabel2:= CreateLabel(WizardForm, ScaleX(90), ScaleY(160), ScaleX(522), ScaleY(150), ExpandConstant('{cm:WelcomeLabel2}'), False);
LabelSetFont(WelcomeLabel2, 10, 'Tahoma', $FFFFFF, [fsBold]);
WelcomeLabel2.Alignment := taCenter;
//////////////////////////////////////////////////article the Choice of Directorii\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\
DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstan t('DirFolder.png'),ScaleX(120),ScaleY(75),ScaleX(4 5),ScaleY(45),True,True);
DirEditImg:=ImgLoad(WizardForm.Handle,ExpandConsta nt('DirEditImg.png'),ScaleX(105),ScaleY(178),Scale X(420),ScaleY(22),True,True);
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('HDD .png'),ScaleX(130),ScaleY(235),ScaleX(62),ScaleY(6 0),True,True);
HDD2:=ImgLoad(WizardForm.Handle,ExpandConstant('Ha rdDrivePanel.png'),ScaleX(129),ScaleY(231),ScaleX( 350),ScaleY(63),True,True);

ImgLoad(WizardForm.Handle,ExpandConstant('Workspac e.png'),ScaleX(65),ScaleY(63),ScaleX(569),ScaleY(2 74),True,True);

SelectDirLabel:= CreateLabel(WizardForm, ScaleX(186), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectDirLabel}'), true);
LabelSetFont(SelectDirLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);

SelectDirBrowseLabel:= CreateLabel(WizardForm, ScaleX(165), ScaleY(115), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectDirBrowseLabel}'), true);
LabelSetFont(SelectDirBrowseLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectDirBrowseLabel.Alignment := taCenter;

DirEditLabel:= CreateLabel(WizardForm, ScaleX(110), ScaleY(180), ScaleX(450), ScaleY(20), '', false);
LabelSetFont(DirEditLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
DirEditLabel.Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);

TotalSpaceLabel:= CreateLabel(WizardForm, ScaleX(196), ScaleY(230), ScaleX(0), ScaleY(0), ExpandConstant('{cm:TotalSpaceLabel}'), true);
LabelSetFont(TotalSpaceLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);

FreeSpaceLabel:= CreateLabel(WizardForm, ScaleX(196), ScaleY(245), ScaleX(0), ScaleY(0), ExpandConstant('{cm:FreeSpaceLabel}'), true);
LabelSetFont(FreeSpaceLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);

InstallSpacelabel:= CreateLabel(WizardForm, ScaleX(196), ScaleY(260), ScaleX(0), ScaleY(0), ExpandConstant('{cm:InstallSpacelabel}'), true);
LabelSetFont(InstallSpacelabel, 8, 'Tahoma', $FFFFFF, [fsBold]);

NeedSpaceLabel:= CreateLabel(WizardForm, ScaleX(196), ScaleY(275), ScaleX(0), ScaleY(0), ExpandConstant('{cm:NeedSpaceLabel}'), true);
LabelSetFont(NeedSpaceLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);

TotalSpaceLabel2:= CreateLabel(WizardForm, ScaleX(470), ScaleY(230), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(TotalSpaceLabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
TotalSpaceLabel2.Alignment := taRightJustify;

FreeSpaceLabel2:= CreateLabel(WizardForm, ScaleX(470), ScaleY(245), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(FreeSpaceLabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
FreeSpaceLabel2.Alignment := taRightJustify;

InstallSpacelabel2:= CreateLabel(WizardForm, ScaleX(470), ScaleY(260), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(InstallSpacelabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
InstallSpacelabel2.Alignment := taRightJustify;

NeedSpaceLabel2:= CreateLabel(WizardForm, ScaleX(470), ScaleY(275), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(NeedSpaceLabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
NeedSpaceLabel2.Alignment := taRightJustify;

#ifdef Components
//////////////////////////////////////////Components\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\
SelectComponentsLabel:= CreateLabel(WizardForm, ScaleX(145), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectComponentsLabel}'), true);
LabelSetFont(SelectComponentsLabel, 9, 'Tahoma', $FFFFFF, [fsBold]);
SelectComponentsLabel.Alignment := taCenter;
with WizardForm.ComponentsList do begin
Parent:= WizardForm;
SetBounds(ScaleX(175), ScaleY(150), ScaleX(350), ScaleY(110));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:=$FFFFFF;
for n:=0 to ItemCount-1 do begin
ItemFontStyle[n]:= [fsBold];
SubItemFontStyle[n]:= [fsBold];
end;
BorderWidth := (WizardForm.ComponentsList.Width-WizardForm.ComponentsList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.ComponentsList.Left+BorderWidth, WizardForm.ComponentsList.Top+BorderWidth);
// LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
#endif

/////////////////////////////////////////////////The Select Group\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConst ant('GroupFolder.png'),ScaleX(90),ScaleY(75),Scale X(45),ScaleY(45),True,True);

SelectStartMenuFolderLabel:= CreateLabel(WizardForm, ScaleX(140), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectStartMenuFolderLabel}'), true);
LabelSetFont(SelectStartMenuFolderLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectStartMenuFolderLabel.Alignment := taCenter;

SelectStartMenuFolderBrowseLabel:= CreateLabel(WizardForm, ScaleX(170), ScaleY(115), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectDirBrowseLabel}'), true);
LabelSetFont(SelectStartMenuFolderBrowseLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectStartMenuFolderBrowseLabel.Alignment := taCenter;

GroupEditLabel:= CreateLabel(WizardForm, ScaleX(110), ScaleY(180), ScaleX(450), ScaleY(20), WizardForm.GroupEdit.Text, false);
LabelSetFont(GroupEditLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);

NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(2 34),ScaleY(251),ScaleX(13),ScaleY(13),ExpandConsta nt('CheckBox.png'),1,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCa llback(@NoIconsClick,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649 ));

NoIconsLabel:= CreateLabel(WizardForm, ScaleX(250), ScaleY(250), ScaleX(0), ScaleY(0), ExpandConstant('{cm:NoIconsCheck}'), true);
LabelSetFont(NoIconsLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);
with NoIconsLabel do begin
Cursor := crHand;
OnClick:= @ObjectFunc;
end;
/////////////////////////////////////////////Tasks\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\
SelectTasksLabel:= CreateLabel(WizardForm, ScaleX(190), ScaleY(70), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectTasksLabel}'), true);
LabelSetFont(SelectTasksLabel, 9, 'Tahoma', $FFFFFF, [fsBold]);
SelectTasksLabel.Alignment := taCenter;


L1:=TLabel.Create(WizardForm);
with L1 do begin
SetBounds(80,120,150,21);
AutoSize:=True;
Font.Color:=clWhite;
Font.Style:=[fsBold];
Caption:='RAM for acceleration unarc = 0'+'MB';
Parent:=WizardForm;
Transparent:=True;
end;




L2:=TLabel.Create(WizardForm);
with L2 do begin
SetBounds(80,190,150,21);
AutoSize:=True;
Font.Color:=clWhite;
Font.Style:=[fsBold];
Caption:='RAM for acceleration srep = 0'+'MB';
Parent:=WizardForm;
Transparent:=True;
end;

#ifdef PrecompInside
L3:=TLabel.Create(WizardForm);
with L3 do begin
SetBounds(80,260,150,21);
AutoSize:=True;
Font.Color:=clWhite;
Font.Style:=[fsBold];
Caption:='RAM for acceleration precomp = 0'+'MB';
Parent:=WizardForm;
Transparent:=True;
end;
#endif

TasksBevel1 := TBevel.Create(WizardForm);
with TasksBevel1 do
begin
Parent := WizardForm;
#ifdef PrecompInside
SetBounds(ScaleX(75), ScaleY(109), ScaleX(210), ScaleY(205));
#else
SetBounds(ScaleX(75), ScaleY(109), ScaleX(210), ScaleY(136));
#endif
Style := bsRaised;
end;


#ifdef Tasks
with WizardForm.TasksList do begin
Parent:= WizardForm;
SetBounds(ScaleX(300), ScaleY(117), ScaleX(320), ScaleY(180));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:=$FFFFFF;
BorderStyle := bsSingle;
//TreeViewStyle := True;
BorderWidth := (WizardForm.TasksList.Width-WizardForm.TasksList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.TasksList.Left+BorderWidth, WizardForm.TasksList.Top+BorderWidth);
//LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;

#endif

/////////////////////////////////////////////////Total\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\
BGImageStream.position:=0;

ReadyLabel:= CreateLabel(WizardForm, ScaleX(160), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:ReadyLabel}'), true);
LabelSetFont(ReadyLabel, 9, 'Tahoma', $FFFFFF, [fsBold]);
ReadyLabel.Alignment := taCenter;

ReadyPanel := TPanel.Create(WizardForm);
with ReadyPanel do begin
Parent := WizardForm;
SetBounds(ScaleX(180), ScaleY(150), ScaleX(350), ScaleY(140));
BorderStyle := bsSingle;
end;

ReadyBitmap := TBitmapImage.Create(WizardForm);
with ReadyBitmap do begin
Parent := ReadyPanel;
SetBounds(ScaleX(-182), ScaleY(-152), ScaleX(700), ScaleY(400));
Bitmap.LoadFromStream(BGImageStream);
end;

ReadyScrollBar := TScrollBar.Create(WizardForm);
with ReadyScrollBar do begin
Parent := ReadyPanel;
SetBounds(ScaleX(330), ScaleY(0), ScaleX(136), ScaleY(15));
Kind := sbVertical;
OnScroll:=@ScrollText3Scroll;
end;

ReadyPanelLabel := TLabel.Create(WizardForm);
with ReadyPanelLabel do begin
Parent := ReadyPanel;
WordWrap := true;
Transparent:=true;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
SetBounds(ScaleX(5), ScaleY(5), ScaleX(325), ScaleY(130));
Caption := WizardForm.ReadyMemo.Lines.Text;
end;
////////////////////////////////////////////Installation\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\

IsDoneAddComponents

InstallingLabel:= CreateLabel(WizardForm, ScaleX(120), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:InstallingLabel}'), true);
LabelSetFont(InstallingLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);

StatusLabel:= CreateLabel(WizardForm, ScaleX(105), ScaleY(130), ScaleX(0), ScaleY(0), ExpandConstant('{cm:Extracted}'), true);
LabelSetFont(StatusLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);

/////////////////////////////////////////////The end\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\

FinishedHeadingLabel:= CreateLabel(WizardForm, ScaleX(90), ScaleY(95), ScaleX(522), ScaleY(80), ExpandConstant('{cm:FinishedHeadingLabel}'), false);
LabelSetFont(FinishedHeadingLabel, 12, 'Tahoma', $FFFFFF, [fsBold]);
FinishedHeadingLabel.Alignment := taCenter;

FinishedLabel:= CreateLabel(WizardForm, ScaleX(90), ScaleY(160), ScaleX(522), ScaleY(150), ExpandConstant('{cm:FinishedLabel}'), false);
LabelSetFont(FinishedLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
FinishedLabel.Alignment := taCenter;
end;






procedure HideComponents;
begin
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
SelectDirLabel.Hide;
SelectDirBrowseLabel.Hide;
#ifdef Components
SelectComponentsLabel.Hide;
WizardForm.ComponentsList.Hide;
#endif
SelectTasksLabel.Hide;
#ifdef Tasks
WizardForm.TasksList.Hide;
#endif
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
L1.Hide;
L2.Hide;
#ifdef PrecompInside
L3.Hide;
#endif
DirEditLabel.Hide;
TotalSpaceLabel.Hide;
FreeSpaceLabel.Hide;
InstallSpacelabel.Hide;
NeedSpaceLabel.Hide;
TotalSpaceLabel2.Hide;
FreeSpaceLabel2.Hide;
InstallSpacelabel2.Hide;
NeedSpaceLabel2.Hide;
GroupEditLabel.Hide;
NoIconsLabel.Hide;
InstallingLabel.Hide;
StatusLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
IMGSetVisibility(DirFolder,False);
IMGSetVisibility(DirEditImg,False);
IMGSetVisibility(HDD,False);
IMGSetVisibility(HDD2,False);
IMGSetVisibility(GroupFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
BtnSetVisibility(AuthorBtn,False);
ReadyPanel.Hide;
ReadyBitmap.Hide;
ReadyScrollBar.Hide;
ReadyPanelLabel.Hide;
ReadyLabel.Hide;
IsDoneHide;
TasksBevel1.Hide;
#ifdef PrecompInside
ImgTBDelete(TB3);
#endif
ImgTBDelete(TB2);
ImgTBDelete(TB);
end;

procedure ShowComponents(CurPageID: Integer);
begin
HideComponents;
if CurPageID = wpWelcome then
begin
WelcomeLabel1.Show;
WelcomeLabel2.Show;
BtnSetVisibility(AuthorBtn,True);

end;

if CurPageID = wpSelectDir then
begin
SelectDirLabel.Show;
SelectDirBrowseLabel.Show;
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
InstallSpacelabel.Show;
NeedSpaceLabel.Show
TotalSpaceLabel2.Show;
FreeSpaceLabel2.Show;
InstallSpacelabel2.Show;
NeedSpaceLabel2.Show;
IMGSetVisibility(DirFolder,True);
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(HDD,True);
IMGSetVisibility(HDD2,True);
BtnSetVisibility(hDirBrowseBtn,True);
end;

#ifdef Components
if CurPageID = wpSelectComponents then
begin
SelectComponentsLabel.Show;
WizardForm.ComponentsList.Show;
end;
#endif

if CurPageID = wpSelectProgramGroup then
begin
SelectStartMenuFolderLabel.Show;
SelectStartMenuFolderBrowseLabel.Show;
GroupEditLabel.Show;
NoIconsLabel.Show;
ImgTBDelete(TB2);
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(GroupFolder,True);
BtnSetVisibility(NoIconsCheck,True);
BtnSetVisibility(hGroupBrowseBtn,True);
end;


if CurPageID = wpSelectTasks then
begin
TB:=ImgTBCreate(WizardForm.Handle,'trackbar_bkg.pn g','trackbar_btn.png',80,140,190,10,87,268,132,18, 33,1)
ImgTBSetChangePosEvent(TB,@TBChangePos);
L1.Show;
TB2:=ImgTBCreate(WizardForm.Handle,'trackbar_bkg.p ng','trackbar_btn.png',80,210,190,10,87,268,202,18 ,33,1)
ImgTBSetChangePosEvent(TB2,@TB2ChangePos);
L2.Show;
#ifdef PrecompInside
TB3:=ImgTBCreate(WizardForm.Handle,'trackbar_bkg.p ng','trackbar_btn.png',80,290,190,10,87,268,282,18 ,33,1)
ImgTBSetChangePosEvent(TB3,@TB3ChangePos);
L3.Show;
#endif
TasksBevel1.Show;
SelectTasksLabel.Show;
#ifdef Tasks
WizardForm.TasksList.Show;
#endif
end;

if CurPageID = wpReady then
begin
ReadyBitmap.Show;
ReadyScrollBar.Show;
ReadyPanelLabel.Show;
ReadyPanel.Show;
ReadyLabel.Show;
ReadyPanelLabel.Caption := WizardForm.ReadyMemo.Lines.Text;
end;

if CurPageID = wpInstalling then
begin
InstallingLabel.Show;
StatusLabel.Show;
IsDoneShow();
end;

if CurPageID = wpFinished then
begin
FinishedHeadingLabel.Show;
FinishedLabel.Show;
LabelTime3.Show;
end;
if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
end;
end;



function UninstPBProc(h:hWnd;Msg,wParam,lParam:Longint):Lon gint;
var
pr,i1,i2:Extended;
p:string;
begin
if Msg=$2 then SetWindowLong(h,-4,UninstPBOldProc);
Result:=CallWindowProc(UninstPBOldProc,h,Msg,wPara m,lParam);
if (Msg=$402) and (UninstallProgressForm.ProgressBar.Position>Uninst allProgressForm.ProgressBar.Min) then begin
i1:=UninstallProgressForm.ProgressBar.Position-UninstallProgressForm.ProgressBar.Min;
i2:=UninstallProgressForm.ProgressBar.Max-UninstallProgressForm.ProgressBar.Min;
pr:=(i1*100)/i2;
p:=+Format('%f',[pr])+'%';
UnLabelPct.Caption:=p;
StringChange(p,',','.');
ImgPBSetPositionUn(UninstPB,pr);
ImgApplyChangesBotvaU(UninstallProgressForm.Handle );
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
IsDoneUnpack(CurStep);
end;


procedure CurPageChanged(CurPageID: Integer);
begin

WizardForm.NextButton.Enabled:= True;
if CurPageID = wpSelectDir then
ObjectFunc(WizardForm.DirEdit);
if (CurPageID = wpFinished) and ISDoneError then begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
FinishedLabel.Font.Color:= $0000FF;
FinishedHeadingLabel.Caption:= ExpandConstant('{cm:ErrorFinishedHeadingLabel}');
FinishedLabel.Caption:= ExpandConstant('{cm:ErrorFinishedLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
end;
SetStateNewButtons;
ShowComponents(CurPageID);
ImgApplyChanges(WizardForm.Handle);
end;


procedure InitializeWizard;
begin


/////////////////commands for splash/////////////
#ifdef Splash
ExtractTemporaryFile('splash.png');
ExtractTemporaryFile('isgsg.dll');

ShowSplashScreen(WizardForm.Handle,ExpandConstant( '{tmp}')+'\splash.png',1000,3000,1000,0,255,False, $FFFFFF,10);
#endif
/////////////////////commands for music///////////////////
#ifdef Music
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('MusicButton.png');
ExtractTemporaryFile('Music.mp3');
BASS_Init(ExpandConstant('{tmp}\Music.mp3'))
BASS_CreateOnOffButton(ExpandConstant('{tmp}\Music Button.png'), 90, 320, 34, 34, 4)
BtnSetEvent(Bass_OnOffBtn,BtnMouseEnterEventID,Wra pBtnCallback(@WFBtnEnter,1));

#endif

////////////////////////the end of the command for music////////////

CreateWizardForm;
ButtonsTextures;
#ifdef AuthorButton
CreateAuthorBtn;
#endif

TaskBarV10(MainForm.Handle, WizardForm.Handle, false, false, 0, 0, _m_);
end;



function InitializeSetup: Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
if not FileExists(ExpandConstant('{tmp}\CallbackCtrl.dll' )) then ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('Click.wav');
ExtractTemporaryFile('WFEnter.wav');
ExtractTemporaryFile('Check.wav');
if not FileExists(ExpandConstant('{tmp}\WinTB.dll')) then ExtractTemporaryFile('WinTB.dll');
if not FileExists(ExpandConstant('{tmp}\Amethyst Kamri.vsf')) then
begin
if not FileExists(ExpandConstant('{tmp}\VclStylesinno.dll ')) then ExtractTemporaryFile('VclStylesinno.dll');
if not FileExists(ExpandConstant('{tmp}\Amethyst Kamri.vsf')) then ExtractTemporaryFile('Amethyst Kamri.vsf');
LoadVCLStyle(ExpandConstant('{tmp}\Amethyst Kamri.vsf'));
if not FileExists(ExpandConstant('{tmp}\ReadMeRus.rtf')) then ExtractTemporaryFile('ReadMeRus.rtf');
Result:=True;
end;
end;








function InitializeUninstall(): Boolean;
begin
FileCopy(ExpandConstant('{app}\Temp\botva2.dll'), ExpandConstant('{tmp}\botva2.dll'), False);
FileCopy(ExpandConstant('{app}\Temp\CallbackCtrl.d ll'), ExpandConstant('{tmp}\CallbackCtrl.dll'), False);
FileCopy(ExpandConstant('{app}\Temp\CancelBtn.png' ), ExpandConstant('{tmp}\CancelBtn.png'), False);
FileCopy(ExpandConstant('{app}\Temp\MainImage.png' ), ExpandConstant('{tmp}\MainImage.png'), False);
FileCopy(ExpandConstant('{app}\Temp\pbbkg.png'), ExpandConstant('{tmp}\pbbkg.png'), False);
FileCopy(ExpandConstant('{app}\Temp\pb.png'), ExpandConstant('{tmp}\pb.png'), False);
Result:=True;
LoadVCLStyle_UnInstall(ExpandConstant('{#VCLStyles SkinPath}\Amethyst Kamri.vsf'));
end;

procedure InitializeUninstallProgressForm();
begin
with UninstallProgressForm do begin
Bevel.Hide;
InnerNotebook.Hide;
OuterNotebook.Hide;
ClientWidth:= ScaleX(700);
ClientHeight:= ScaleY(400);
end;

UnInstallingLabel:= CreateLabel(UninstallProgressForm, ScaleX(180), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:UninstDescript}'), true);
LabelSetFont(UnInstallingLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
UnInstallingLabel.Alignment := taCenter;

UnStatusLabel:= CreateLabel(UninstallProgressForm, ScaleX(220), ScaleY(130), ScaleX(0), ScaleY(0), ExpandConstant('{cm:StatusUninst}'), true);
LabelSetFont(UnStatusLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
UnStatusLabel.Alignment := taCenter;

UnLabelPct:= CreateLabel(UninstallProgressForm, ScaleX(328), ScaleY(250), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(UnLabelPct, 20, 'Monotype Corsiva', $FFFFFF, [fsBold]);
UnLabelPct.Alignment := taCenter;

UninstallProgressForm.CancelButton.Visible:=False;
with UninstallProgressForm.CancelButton do begin
hCancelUninstBtn:=BtnCreateBotvaU(UninstallProgres sForm.Handle,295,320,112,34,ExpandConstant('{tmp}\ CancelBtn.png'),1,False);
BtnSetTextBotvaU(hCancelUninstBtn, UninstallProgressForm.CancelButton.Caption);
BtnSetFontColorBotvaU(hCancelUninstBtn,$FFFFFF,$E1 6941,$000000,$B6B6B6);
BtnSetEnabledBotvaU(hCancelUninstBtn,False);
end;

ImgLoadBotvaU(UninstallProgressForm.Handle,ExpandC onstant('{tmp}\MainImage.png'),0,0,0,0,False,True) ;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep=usUninstall then begin
UninstPB:=ImgPBCreateUn(UninstallProgressForm.Hand le, ExpandConstant('{tmp}\pbbkg.png'),ExpandConstant(' {tmp}\pb.png'),ScaleX(105), ScaleY(178), ScaleX(495), ScaleY(22));
UninstPBOldProc:=SetWindowLong(UninstallProgressFo rm.ProgressBar.Handle,-4,CallBackProc(@UninstPBProc,4));
ImgApplyChangesBotvaU(UninstallProgressForm.Handle );
end;
end;

procedure DeinitializeUninstall;
begin
gdipShutdownBotvaU;
UnLoadVCLStyles_UnInstall;
end;


procedure DeinitializeSetup;
begin
#ifdef Music
BASS_DeInit; //Release process for music
#endif
gdipShutdown;
UnLoadVCLStyles;
BGImageStream.Free;
BTNImageStream.Free;
WFButtonFont.Free;
TaskBarV10Kill;
WizardForm.Free;
end;
Reply With Quote
 


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
Reflate test Razor12911 Conversion Tutorials 8 09-09-2015 00:35
Test Drive Unlimited 2 Beta Dopefish PC Games - Protection List 5 06-02-2011 04:46
n00b question, how to unpack? bloodriot DC Games 1 01-07-2003 08:32
Messiah 2 v1.30 TEST REVIEW PS2 v8 charlie_ps2 PS2 Games 0 04-03-2003 09:13



All times are GMT -7. The time now is 20:44.


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