Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-------------------This Installer Uses Inno Setup Unicode Version-----------------\\
- //----------------THIS SCRIPT HAS BEEN CREATED BY HPMBOT149@FILEFORUMS--------------\\
- #define AppName "Grand Theft Auto IV"
- #define AppPublisher "Rockstar Games"
- #define AppVersion "1.0.7.0"
- #define AppExec "LaunchGTAIV.exe"
- #define AppURL "http://www.rockstargames.com/IV/"
- #define AppSize "15872"
- #define SetupName "GTA IV Setup"
- #define SetupOut "Output"
- #define PrecompVer "Inside"
- [Setup]
- AppName={#AppName}
- AppPublisher={#AppPublisher}
- AppVersion={#AppVersion}
- AppComments={#AppName}
- DefaultDirName={pf}\{#AppPublisher}\{#AppName}
- DefaultGroupName=Rockstar Games
- DirExistsWarning=No
- OutputBaseFilename={#SetupName}
- OutputDir={#SetupOut}
- UsePreviousAppDir=No
- SetupIconFile=Style\Setup.ico
- WizardImageFile=Style\Background.bmp
- WizardSmallImageFile=Style\smallbitmap.bmp
- Compression=none
- [Icons]
- Name: {group}\Uninstall {#AppName}; Filename: {app}\{uninstallexe}; WorkingDir: {app}; Check: CheckError; IconFileName: {app}\GTAIV.ico
- Name: {group}\{#AppName}; Filename: {app}\{#AppExec}; WorkingDir: {app}; Check: CheckError; IconFileName: {app}\GTAIV.ico
- Name: {commondesktop}\{#AppName}; Filename: {app}\{#AppExec}; WorkingDir: {app}; Check: CheckError; IconFileName: {app}\GTAIV.ico
- [Files]
- Source: Include\*.*; DestDir: {tmp}; Flags: dontcopy
- Source: Style\*.*; DestDir: {tmp}; Flags: dontcopy
- #define i 0
- #ifexist "Slides\1.jpg"
- #sub AddFile
- Source: Slides\{#i}.jpg; DestDir: {tmp}; Flags: dontcopy;
- #endsub
- #for {i = 1; FileExists(StringChange("Slides\FileName.jpg", "FileName", Str(i))) != 0; i++} AddFile
- #endif
- #ifexist "Video.avi"
- Source: Style\Video.avi; DestDir: {tmp}; Flags: dontcopy
- #endif
- #ifexist "Video.mp4"
- Source: Style\Video.mp4; DestDir: {tmp}; Flags: dontcopy
- #endif
- #ifexist "Video.mpeg"
- Source: Style\Video.mpeg; DestDir: {tmp}; Flags: dontcopy
- #endif
- #ifexist "Video.mpg"
- Source: Style\Video.mpg; DestDir: {tmp}; Flags: dontcopy
- #endif
- #ifexist "Video.wmv"
- Source: Style\Video.wmv; DestDir: {tmp}; Flags: dontcopy
- #endif
- [Messages]
- SetupWindowTitle= Welcome to Grand Theft Auto IV Setup Wizard
- [CustomMessages]
- SoundCtrlButtonCaptionSoundOn=Music on
- SoundCtrlButtonCaptionSoundOff=Music off
- [Languages]
- Name: eng; MessagesFile: compiler:Default.isl
- [Components]
- Name: "directx"; Description: "Install DirectX"
- Name: "visualc"; Description: "Install Visual C++"
- Name: "nvidiaphysx"; Description: "Install Nvidia Physx"
- Name: "framework"; Description: "Install Framework"
- [Tasks]
- Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
- [UninstallDelete]
- Type: filesandordirs; Name: {app}
- [Code]
- const
- BASS_SAMPLE_LOOP = 4;
- BASS_ACTIVE_STOPPED = 0;
- BASS_ACTIVE_PLAYING = 1;
- BASS_ACTIVE_STALLED = 2;
- BASS_ACTIVE_PAUSED = 3;
- BASS_UNICODE = $80000000;
- BASS_CONFIG_GVOL_STREAM = 5;
- const
- #ifndef UNICODE
- EncodingFlag = 0;
- #else
- EncodingFlag = BASS_UNICODE;
- #endif
- type
- HSTREAM = DWORD;
- function BASS_Init(device: LongInt; freq, flags: DWORD;
- win: HWND; clsid: Cardinal): BOOL;
- external 'BASS_Init@files:bass.dll stdcall';
- function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
- offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
- external 'BASS_StreamCreateFile@files:bass.dll stdcall';
- function BASS_Start: BOOL;
- external 'BASS_Start@files:bass.dll stdcall';
- function BASS_Pause: BOOL;
- external 'BASS_Pause@files:bass.dll stdcall';
- function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
- external 'BASS_ChannelPlay@files:bass.dll stdcall';
- function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
- external 'BASS_SetConfig@files:bass.dll stdcall';
- function BASS_ChannelIsActive(handle: DWORD): DWORD;
- external 'BASS_ChannelIsActive@files:bass.dll stdcall';
- function BASS_Free: BOOL;
- external 'BASS_Free@files:bass.dll stdcall';
- type
- TDirectShowEventProc = procedure(EventCode, Param1, Param2: Integer);
- function DSGetLastError(var ErrorText: WideString): HRESULT;
- external 'DSGetLastError@files:mediaplayer.dll stdcall';
- function DSPlayMediaFile: Boolean;
- external 'DSPlayMediaFile@files:mediaplayer.dll stdcall';
- function DSStopMediaPlay: Boolean;
- external 'DSStopMediaPlay@files:mediaplayer.dll stdcall';
- function DSSetVolume(Value: LongInt): Boolean;
- external 'DSSetVolume@files:mediaplayer.dll stdcall';
- function DSSetBalance(Value: LongInt): Boolean;
- external 'DSSetBalance@files:mediaplayer.dll stdcall';
- function DSInitializeAudioFile(FileName: WideString; CallbackProc: TDirectShowEventProc): Boolean;
- external 'DSInitializeAudioFile@files:mediaplayer.dll stdcall';
- function DSInitializeVideoFile(FileName: WideString; WindowHandle: HWND; var Width, Height: Integer; CallbackProc: TDirectShowEventProc): Boolean;
- external 'DSInitializeVideoFile@files:mediaplayer.dll stdcall';
- var
- SoundStream: HSTREAM;
- SoundCtrlButton: TNewButton;
- CompactCheckBox: TNewCheckBox;
- NoBackgroundCheckBox: TNewCheckBox;
- procedure SoundCtrlButtonClick(Sender: TObject);
- begin
- case BASS_ChannelIsActive(SoundStream) of
- BASS_ACTIVE_PLAYING:
- begin
- if BASS_Pause then
- SoundCtrlButton.Caption :=
- ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOn}');
- end;
- BASS_ACTIVE_PAUSED:
- begin
- if BASS_Start then
- SoundCtrlButton.Caption :=
- ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
- end;
- end;
- end;
- #ifdef Unicode
- #define A "W"
- #else
- #define A "A"
- #endif
- { RedesignWizardFormBegin } // Don't remove this line!
- // Don't modify this section. It is generated automatically.
- procedure RedesignWizardForm;
- begin
- with WizardForm.ProgressGauge do
- begin
- Height := ScaleY(13);
- end;
- { ReservationBegin }
- // This part is for you. Add your specialized code here.
- { ReservationEnd }
- end;
- // Don't modify this section. It is generated automatically.
- { RedesignWizardFormEnd } // Don't remove this line!
- #ifdef UNICODE
- type
- PChar = PAnsiChar;
- #endif
- const
- PCFonFLY=true;
- notPCFonFLY=false;
- var
- LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
- ISDoneProgressBar1: TNewProgressBar;
- MyCancelButton: TButton;
- ISDoneCancel:integer;
- ISDoneError:boolean;
- PCFVer:double;
- TimerID: LongWord;
- CurrentPicture:integer;
- PicList: TStringlist;
- BackgroundForm: TForm;
- VBRadio1,VBRadio2: TNewRadioButton;
- FWAdd: Boolean;
- BGLabel3,BGLabel2,BGLabel1:TLabel;
- BGBevel1,BGBevel2,BGBevel3,BGBevel4:TBevel;
- PauseBT,PlayBT,PlayBT1:TBitmapImage;
- type
- TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
- function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
- function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
- function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
- function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
- function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
- function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
- function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
- function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
- function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';
- function sndPlaySound(lpszSoundName: string; uFlags: cardinal):integer;
- external 'sndPlaySound{#A}@winmm.dll stdcall';
- function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
- function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
- function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
- function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
- function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
- function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
- function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
- function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
- function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
- function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
- function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
- function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
- function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
- function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
- type
- TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
- function mciSendString(lpstrCommand: string; lpstrReturnString: PChar; uReturnLength:integer; hwndCallback:integer):integer; external 'mciSendStringA@winmm.dll stdcall';
- function GetSystemMetrics(nIndex : Integer): Integer; external 'GetSystemMetrics@user32 stdcall';
- function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:Innocallback.dll stdcall';
- function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
- function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
- procedure InitializeSlideShow(Hwnd:Thandle; l,t,w,h:integer;Animate:boolean; Stretch:integer); external 'InitializeSlideShow@files:isslideshow.dll stdcall';
- procedure DeinitializeSlideShow; external 'DeinitializeSlideShow@files:isslideshow.dll stdcall';
- procedure ShowImage(ipath:PAnsiChar; Effect:integer); external 'ShowImage@files:isslideshow.dll stdcall';
- function GetDC(HWND: DWord): DWord; external 'GetDC@user32.dll stdcall';
- function GetDeviceCaps(DC: DWord; Index: Integer): Integer; external 'GetDeviceCaps@gdi32.dll stdcall';
- function ReleaseDC(HWND: DWord;DC: DWord): Integer; external 'ReleaseDC@user32.dll stdcall';
- //----------------------------------------------------
- function GetScreenHeight(): integer;
- var
- dc: DWord;
- begin
- dc:=GetDC(MainForm.Handle);
- Result:=GetDeviceCaps(dc,10);
- ReleaseDC(MainForm.Handle,dc);
- end;
- function GetScreenWidth(): integer;
- var
- dc: DWord;
- begin
- dc:=GetDC(MainForm.Handle);
- Result:=GetDeviceCaps(dc,8);
- ReleaseDC(MainForm.Handle,dc);
- end;
- procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
- begin
- if NoBackgroundCheckBox.Checked = True then begin
- with WizardForm do begin
- if CurPageID=wpInstalling then begin
- PauseBT.hide;
- CompactCheckBox.Visible := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- //WizardForm.Caption := ' Installing Grand Theft Auto IV';
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- end;
- end;
- end;
- end else begin
- CurrentPicture:=CurrentPicture+1;
- if CurrentPicture=piclist.count+1 then CurrentPicture:=1;
- ShowImage(piclist.strings[CurrentPicture - 1], 1);
- end;
- end;
- procedure MakeSlideShow();
- var
- i :integer;
- begin
- if NoBackgroundCheckBox.Checked = True then begin
- with WizardForm do begin
- if CurPageID=wpInstalling then begin
- PauseBT.hide;
- CompactCheckBox.Visible := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- //WizardForm.Caption := ' Installing Grand Theft Auto IV';
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- end;
- end;
- end;
- end else begin
- BackgroundForm:= TForm.Create(nil);
- BackgroundForm.BorderStyle:= bsNone;
- BackgroundForm.Color:=clBlack;
- BackgroundForm.SetBounds(0, 0, GetSystemMetrics(0), GetSystemMetrics(1))
- BackgroundForm.Visible:=True;
- BackgroundForm.enabled:= False;
- PicList:=tstringlist.Create;
- #ifexist "Slides\1.jpg"
- #sub ExtractFile
- ExtractTemporaryFile('{#i}.jpg');
- #endsub
- #for {i = 1; FileExists(StringChange("Slides\FileName.jpg", "FileName", Str(i))) != 0; i++} ExtractFile
- #endif
- i:=1;
- repeat
- piclist.add(ExpandConstant('{tmp}\'+IntToStr(i)+'.jpg'));
- i:=i+1;
- until FileExists(ExpandConstant('{tmp}\'+IntToStr(i)+'.jpg')) = False;
- BackgroundForm.Show;
- InitializeSlideShow(BackgroundForm.Handle, 0, 0, GetSystemMetrics(0), GetSystemMetrics(1), true, 1);
- ShowImage(ExpandConstant('{tmp}') + '\1.jpg', 1);
- PlayBT1 := PlayBT;
- end;
- end;
- function DirBrowseButtonClick(CurPageID: Integer): Boolean;
- begin
- sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
- Result := False;
- end;
- function GroupBrowseButtonClick(CurPageID: Integer): Boolean;
- begin
- sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
- Result := True;
- end;
- function NextButtonClick(CurPageID: Integer): Boolean;
- begin
- if (CurPageID = wpFinished) or (CurPageID = wpFinished) and ISDoneError then
- begin
- end else begin
- sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
- end;
- Result := True;
- end;
- function BackButtonClick(CurPageID: Integer): Boolean;
- begin
- sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
- Result := True;
- end;
- procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
- begin
- sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
- Confirm:=False;
- Cancel:=ExitSetupMsgBox;
- if CurPageID = wpInstalling then begin;
- if Cancel then begin
- ISDoneError:=True;
- ISDoneCancel:=1;
- DelTree(ExpandConstant('{app}'), True, True, True);
- WizardForm.CancelButton.Enabled:=False;
- end;
- end;
- end;
- procedure Background;
- begin
- if NoBackgroundCheckBox.Checked = True then begin
- with WizardForm do begin
- if CurPageID=wpInstalling then begin
- PauseBT.hide;
- CompactCheckBox.Visible := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- //WizardForm.Caption := ' Installing Grand Theft Auto IV';
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- end;
- end;
- end;
- end else begin
- BackgroundForm := TForm.Create(nil);
- with BackgroundForm do
- begin
- Color := ClBlack
- BorderStyle := bsnone;
- Left := 0;
- Top:= 0;
- Enabled := False;
- Width := GetSystemMetrics(0);
- Height := GetSystemMetrics(1);
- Show();
- Repaint();
- end;
- end;
- end;
- const
- EC_COMPLETE = $01;
- procedure BackgroundVideoPlay(EventCode, Param1, Param2: Integer);
- begin
- if EventCode = EC_COMPLETE then
- BackgroundForm.Hide;
- end;
- procedure Pause(Sender: TObject);
- begin
- if NoBackgroundCheckBox.Checked = False then begin
- if FileExists(ExpandConstant('{tmp}\Video.mp4')) then
- begin
- DSStopMediaPlay;
- end;
- end else begin
- with WizardForm do begin
- if CurPageID=wpInstalling then begin
- PauseBT.hide;
- CompactCheckBox.Visible := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- //WizardForm.Caption := ' Installing Grand Theft Auto IV';
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- end;
- end;
- end;
- end;
- with WizardForm do begin
- if CompactCheckBox.Checked = False then begin
- Top:=GetScreenHeight-ClientHeight-45
- Left:=GetScreenWidth-ClientWidth-20
- end else begin
- Top:=GetScreenHeight-ClientHeight-75
- Left:=GetScreenWidth-ClientWidth-20
- end;
- end;
- PauseBT.hide;
- PlayBT.hide;
- PlayBT1.Show;
- BackgroundForm.Hide;
- end;
- procedure Play1(Sender: TObject);
- var
- Width, Height: Integer;
- begin
- if NoBackgroundCheckBox.Checked = False then begin
- if FileExists(ExpandConstant('{tmp}\Video.mp4')) then
- begin
- if DSInitializeVideoFile(ExpandConstant('{tmp}\Video.mp4'), BackgroundForm.Handle, Width, Height, @BackgroundVideoPlay) then
- begin
- BackgroundForm.Width := GetSystemMetrics(0);
- BackgroundForm.Height := GetSystemMetrics(1);
- DSPlayMediaFile;
- BackgroundForm.show;
- WizardForm.BringToFront;
- PauseBT.Show;
- PlayBT1.hide;
- PlayBT.hide;
- end;
- end else begin
- with WizardForm do begin
- if CurPageID=wpInstalling then begin
- PauseBT.hide;
- CompactCheckBox.Visible := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- //WizardForm.Caption := ' Installing Grand Theft Auto IV';
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- end;
- end;
- end;
- end;
- end;
- end;
- procedure PlayMPEGVideo();
- var
- Width, Height: Integer;
- begin
- if VBRadio2.Checked then begin
- if FileExists(ExpandConstant('{tmp}\Video.mp4')) then
- begin
- if DSInitializeVideoFile(ExpandConstant('{tmp}\Video.mp4'), BackgroundForm.Handle, Width, Height, @BackgroundVideoPlay) then
- begin
- BackgroundForm.Width := GetSystemMetrics(0);
- BackgroundForm.Height := GetSystemMetrics(1);
- DSPlayMediaFile;
- WizardForm.BringToFront;
- PauseBT.Show;
- PlayBT1.hide;
- PlayBT.hide;
- with WizardForm do begin
- WizardForm.NextButton.Caption := 'Install';
- end;
- end;
- end;
- end else begin
- with WizardForm do begin
- if CurPageID=wpInstalling then begin
- PauseBT.hide;
- CompactCheckBox.Visible := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- //WizardForm.Caption := ' Installing Grand Theft Auto IV';
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- end;
- end;
- end;
- end;
- end;
- procedure Play(Sender: TObject);
- begin
- PlayBT.Hide;
- PlayBT1.Hide;
- PauseBT.Show;
- BackgroundForm.Show;
- WizardForm.BringToFront;
- with WizardForm do begin
- if CompactCheckBox.Checked =False then begin
- Top:=GetScreenHeight-ClientHeight-45
- Left:=GetScreenWidth-ClientWidth-20
- end else begin
- Top:=GetScreenHeight-ClientHeight-75
- Left:=GetScreenWidth-ClientWidth-20
- end;
- end;
- end;
- function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
- begin
- if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
- LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
- LabelCurrFileName.Caption:=' Extracting File: '+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
- LabelTime1.Caption:=' Time Elapsed: '+TimeStr2;
- LabelTime2.Caption:='Time Remaining: '+TimeStr1;
- // LabelTime3.Caption:='Installing time:'+TimeStr3;
- Result := ISDoneCancel;
- end;
- procedure CancelButtonOnClick(Sender: TObject);
- begin
- SuspendProc;
- if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
- ResumeProc;
- end;
- procedure HideControls;
- begin
- WizardForm.FileNamelabel.Hide;
- ISDoneProgressBar1.Hide;
- LabelPct1.Hide;
- LabelCurrFileName.Hide;
- LabelTime1.Hide;
- LabelTime2.Hide;
- MyCancelButton.Hide;
- end;
- procedure SoundControls;
- begin
- with WizardForm do begin
- if (CurPageID = wpFinished) or (CurPageID = wpFinished) and ISDoneError then
- begin
- BASS_Pause;
- sndPlaySound(ExpandConstant('{tmp}\SetupCompleted.wav'), $0001);
- end;
- end;
- end;
- procedure CreateControls;
- var PBTop:integer;
- begin
- PBTop:=ScaleY(150);
- ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
- with ISDoneProgressBar1 do begin
- Parent := WizardForm;
- Height := 25;
- Left := ScaleX(77);
- Top := PBTop;
- Width := ScaleX(500);
- Max := 1000;
- end;
- LabelCurrFileName := TLabel.Create(WizardForm);
- with LabelCurrFileName do begin
- Parent := WizardForm;
- AutoSize := False;
- Width := ISDoneProgressBar1.Width;
- Left := ISDoneProgressBar1.Left;
- Top := PBTop-20;
- end;
- LabelTime1 := TLabel.Create(WizardForm);
- with LabelTime1 do begin
- Parent := WizardForm;
- AutoSize := False;
- Width := ISDoneProgressBar1.Width div 2;
- Left := ISDoneProgressBar1.Left;
- Top := PBTop + ScaleY(30);
- end;
- LabelTime2 := TLabel.Create(WizardForm);
- with LabelTime2 do begin
- Parent := WizardForm;
- AutoSize := False;
- Width := LabelTime1.Width+ScaleX(40);
- Left := 400;
- Top := LabelTime1.Top;
- end;
- LabelPct1 := TLabel.Create(WizardForm);
- with LabelPct1 do begin
- Parent := WizardForm;
- AutoSize := true;
- Font.Height:=-24;
- Left := ISDoneProgressBar1.Left -33 + ISDoneProgressBar1.Width div 2;
- Top := ISDoneProgressBar1.Top + ScaleY(70);
- //Width := ScaleX(80);
- end;
- // LabelTime3 := TLabel.Create(WizardForm);
- // with LabelTime3 do begin
- // Parent := WizardForm;
- // AutoSize := False;
- // Width := 300;
- // Left := 180;
- // Top := 200;
- // end;
- MyCancelButton:=TButton.Create(WizardForm);
- with MyCancelButton do begin
- Parent:=WizardForm;
- Width:=ScaleX(150);
- Caption:='Cancel';
- Left:=ScaleX(347);
- Height:=ScaleX(30);
- Left:=(480);
- Top:=WizardForm.cancelbutton.top;
- OnClick:=@CancelButtonOnClick;
- end;
- end;
- function CheckError:boolean;
- begin
- result:= not ISDoneError;
- end;
- // Importing LoadSkin API from ISSkin.DLL
- procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar);
- external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
- // Importing UnloadSkin API from ISSkin.DLL
- procedure UnloadSkin;
- external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';
- // Importing ShowWindow Windows API from User32.DLL
- function ShowWindow(hWnd: Integer; uType: Integer): Integer;
- external 'ShowWindow@user32.dll stdcall';
- var
- WelcomeLbl,DirLbl,GroupLbl,TasksLbl,FreeSpaceLabel,NeedSpaceLabel,GameSpaceLabel,PartitionSpaceLabel,Status: TLabel;
- DirBevel,GroupBevel,TasksBevel,TasksSeparateBevel,Bevel1,Bevel11,Bevel2,Bevel3,Bevel4,Bevel5,Bevel6,Bevel7,Bevel8,Bevel9,Bevel20,Bevel21,Bevel22,Bevel23: TBevel;
- FreeMB,TotalMB: cardinal;
- function InitializeSetup1(): Boolean;
- begin
- ExtractTemporaryFile('isskin.dll');
- ExtractTemporaryFile('skin.cjstyles');
- LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');
- #ifexist "Video.avi"
- ExtractTemporaryFile('Video.avi');
- #endif
- ExtractTemporaryFile('Video.mp4');
- #ifexist "Video.mpeg"
- ExtractTemporaryFile('Video.mpeg');
- #endif
- #ifexist "Video.mpg"
- ExtractTemporaryFile('Video.mpg');
- #endif
- #ifexist "Video.wmv"
- ExtractTemporaryFile('Video.wmv');
- #endif
- Result := True;
- end;
- Function NumToStr(Float: Extended): String;
- Begin
- Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
- while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
- SetLength(Result, Length(Result)-1);
- End;
- Function MbOrTb(Byte: Extended): String;
- begin
- if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
- if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' GB' else
- Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' TB'
- end;
- procedure GetFreeSpaceCaption(Sender: TObject);
- var Path: String;
- begin
- Path := ExtractFileDrive(WizardForm.DirEdit.Text);
- GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
- PartitionSpaceLabel.Caption:= ExpandConstant('Partition Space : ') + MbOrTb(TotalMB);
- FreeSpaceLabel.Caption := ExpandConstant('Free Space : ') + MbOrTb(FreeMB) + ' (' + IntToStr((FreeMB * 100) div TotalMB) + '%)';
- GameSpaceLabel.Caption := ExpandConstant('Game Space : ') + MbOrTb({#AppSize});
- NeedSpaceLabel.Caption := ExpandConstant('Total Needed Space : ') + MbOrTb({#AppSize});
- if (FreeMB<{#AppSize}) then
- FreeSpaceLabel.Font.Color:=clRed
- else
- FreeSpaceLabel.Font.Color:=clBlue;
- PartitionSpaceLabel.Font.Color:=NeedSpaceLabel.Font.Color;
- WizardForm.NextButton.Enabled:=FreeMB>{#AppSize};
- end;
- var
- DirectXCB,VisualCCB,NvidiaPhysx,Framework,IconCB: TNewCheckBox;
- //---COMPONENTS POSITION CONTROL---\\
- procedure Tasks;
- begin
- TasksBevel := TBevel.Create(WizardForm);
- with TasksBevel do
- begin
- Parent := WizardForm;
- Left := ScaleX(90);
- Top := ScaleY(150);
- Width := ScaleX(470);
- Height := ScaleY(73);
- end;
- //------------------------\\
- //---Top---\\
- Bevel20 := TBevel.Create(WizardForm);
- with Bevel20 do
- begin
- Parent := WizardForm;
- Left := ScaleX(92);
- Top := ScaleY(150);
- Width := ScaleX(470);
- Height := ScaleY(2);
- end;
- //---Bottom---\\
- Bevel21 := TBevel.Create(WizardForm);
- with Bevel21 do
- begin
- Parent := WizardForm;
- Left := ScaleX(92);
- Top := ScaleY(308);
- Width := ScaleX(470);
- Height := ScaleY(2);
- end;
- //---Left---\\
- Bevel22 := TBevel.Create(WizardForm);
- with Bevel22 do
- begin
- Parent := WizardForm;
- Left := ScaleX(92);
- Top := ScaleY(152);
- Width := ScaleX(2);
- Height := ScaleY(158);
- end;
- //---Right---\\
- Bevel23 := TBevel.Create(WizardForm);
- with Bevel23 do
- begin
- Parent := WizardForm;
- Left := ScaleX(560);
- Top := ScaleY(152);
- Width := ScaleX(2);
- Height := ScaleY(156);
- end;
- //------------------------\\
- DirectXCB := TNewCheckBox.Create(WizardForm);
- with DirectXCB do
- begin
- Parent := WizardForm;
- Left :=(112);
- Top :=(170);
- Width := ScaleX(265);
- Height := ScaleY(17);
- Caption:='Install Microsoft DirectX Runtime Environment';
- end;
- VisualCCB := TNewCheckBox.Create(WizardForm);
- with VisualCCB do
- begin
- Parent := WizardForm;
- Left :=(112);
- Top :=(190);
- Width := ScaleX(265);
- Height := ScaleY(17);
- Caption := 'Install Visual C++ Redistributable Packages';
- end;
- NvidiaPhysx := TNewCheckBox.Create(WizardForm);
- with NvidiaPhysx do
- begin
- Parent := WizardForm;
- Left :=(112);
- Top :=(210);
- Width := ScaleX(265);
- Height := ScaleY(17);
- Caption:='Install Nvidia Physx System Software';
- end;
- Framework := TNewCheckBox.Create(WizardForm);
- with Framework do
- begin
- Parent := WizardForm;
- Left :=(112);
- Top :=(230);
- Width := ScaleX(265);
- Height := ScaleY(17);
- Caption:='Install Microsoft .NET Framework';
- end;
- TasksSeparateBevel := TBevel.Create(WizardForm);
- with TasksSeparateBevel do
- begin
- Parent := WizardForm;
- Left :=(10);
- Top :=(260);
- Width := TasksBevel.Width - 0;
- Height := ScaleY(2);
- Width := ScaleX(440);
- Left := ScaleX(107);
- end;
- IconCB := TNewCheckBox.Create(WizardForm);
- with IconCB do
- begin
- Parent := WizardForm;
- Left := (112);
- Top :=(275);
- Width := ScaleX(255);
- Height := ScaleY(17);
- Caption := 'Create Desktop Shortcut';
- end;
- end;
- //-----------------------------------\\
- procedure LogoLabelOnClick(Sender: TObject);
- var
- ErrorCode: Integer;
- begin
- ShellExec('open', '{#AppURL}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
- end;
- procedure CompactCheckBoxClick(Sender: TObject);
- begin
- if CompactCheckBox.Checked then
- begin
- with WizardForm do
- begin
- Status.SetBounds(140,85,00,25);
- Status.Caption := 'Installing Components';
- WizardSmallBitmapImage.Hide;
- WizardForm.ClientWidth:=420;
- WizardForm.ClientHeight:=175;
- WizardForm.Caption:= ' Installing Grand Theft Auto IV ';
- MainPanel.Hide;
- Bevel.Hide;
- Bevel1.top:=132
- PauseBT.Top:=101;
- PauseBT.Left:=390;
- PlayBT.Top:=101;
- PlayBT.Left:=390;
- PlayBT1.Top:=101;
- PlayBT1.Left:=390;
- CompactCheckBox.SetBounds(326,150,90,14);
- SoundCtrlButton.SetBounds(16,141,100,30);
- CancelButton.SetBounds(151,141,150,30);
- CancelButton.Enabled:= False
- MyCancelButton.SetBounds(151,141,150,30);
- MyCancelButton.Enabled:= True
- ISDoneProgressBar1.Width:= ScaleX(388);
- ISDoneProgressBar1.height:=20;
- ISDoneProgressBar1.Left:= ScaleX(16);
- ISDoneProgressBar1.Top:=50;
- LabelCurrFileName.Width:=ISDoneProgressBar1.Width;
- LabelTime1.Left:=ISDoneProgressBar1.Left;
- LabelTime1.Top:=ISDoneProgressBar1.Top +25;;
- LabelTime2.Top:= LabelTime1.Top;
- LabelTime2.Left:= 227;
- LabelCurrFileName.Left:= ISDoneProgressBar1.Left;
- LabelCurrFileName.Top:= ISDoneProgressBar1.Top -20;
- LabelPct1.Font.Height:=-24;
- LabelPct1.Left:= ISDoneProgressBar1.Left -33 + ISDoneProgressBar1.Width div 2;
- LabelPct1.Top:= ISDoneProgressBar1.Top + ScaleY(43);
- ProgressGauge.Width:= ScaleX(388);
- ProgressGauge.height:=20;
- ProgressGauge.Left:= ScaleX(16);
- ProgressGauge.Top:=50;
- if Status.Visible then begin
- with WizardForm do begin
- WizardForm.Caption:= ' Installing Software Prerequisites';
- end;
- end else begin
- with WizardForm do begin
- WizardForm.Caption:= ' Installing Grand Theft Auto IV ';
- end;
- end;
- if (BackgroundForm.visible=true) then begin
- Top:=GetScreenHeight-ClientHeight-45
- Left:=GetScreenWidth-ClientWidth-20
- end else begin
- Top:=GetScreenHeight-ClientHeight-75
- Left:=GetScreenWidth-ClientWidth-20
- end;
- end;
- end else begin
- with WizardForm do
- begin
- Status.SetBounds(218,200,227,30);
- Status.Caption := 'Installing Additional Components';
- WizardSmallBitmapImage.show;
- WizardForm.ClientWidth:=654;
- WizardForm.ClientHeight:=407;
- WizardForm.Caption := ' Installing Grand Theft Auto IV';
- Bevel.Show;
- Bevel1.top:=90
- PauseBT.Top:=348;
- PauseBT.Left:=320;
- PlayBT.Top:=348;
- PlayBT.Left:=320;
- PlayBT1.Top:=348;
- PlayBT1.Left:=320;
- CompactCheckBox.SetBounds(560,315,90,14);
- SoundCtrlButton.SetBounds(210,347,100,30);
- CancelButton.SetBounds(480,347,150,30);
- MyCancelButton.SetBounds(480,347,150,30);
- ISDoneProgressBar1.Width:= ScaleX(500);
- ISDoneProgressBar1.height:=25;
- ISDoneProgressBar1.Left:= ScaleX(77);
- ISDoneProgressBar1.Top:=150;
- LabelTime1.Left:=ISDoneProgressBar1.Left;
- LabelTime1.Top:=ISDoneProgressBar1.Top +30;;
- LabelTime2.Top:= LabelTime1.Top;
- LabelTime2.Left:= 400;
- LabelCurrFileName.Left:= ISDoneProgressBar1.Left;
- LabelCurrFileName.Top:= ISDoneProgressBar1.Top -20;
- LabelPct1.Font.Height:=-24;
- LabelPct1.Left:= ISDoneProgressBar1.Left -33 + ISDoneProgressBar1.Width div 2;
- LabelPct1.Top:= ISDoneProgressBar1.Top + ScaleY(70);
- ProgressGauge.Width:= ScaleX(500);
- ProgressGauge.height:=25;
- ProgressGauge.Left:= ScaleX(77);
- ProgressGauge.Top:=150;
- if (BackgroundForm.visible=true) then begin
- if Status.Visible then begin
- with WizardForm do begin
- WizardForm.Caption := ' Installing Software Prerequisites';
- end;
- end else begin
- with WizardForm do begin
- WizardForm.Caption:= ' Installing Grand Theft Auto IV';
- end;
- end;
- Top:=GetScreenHeight-ClientHeight-45
- Left:=GetScreenWidth-ClientWidth-20
- end else begin
- Top:=GetScreenHeight-ClientHeight-75
- Left:=GetScreenWidth-ClientWidth-20
- end;
- end;
- end;
- end;
- procedure NoBackgroundCheckBoxClick(Sender: TObject);
- begin
- if NoBackgroundCheckBox.Checked = True then
- begin
- with WizardForm do
- begin
- VBRadio1.Enabled := False;
- VBRadio2.Enabled := False;
- end;
- end else begin
- VBRadio1.Enabled := True;
- VBRadio2.Enabled := True;
- end;
- end;
- procedure RadioButtonsOnClick(Sender: TObject);
- begin
- Case TNewRadioButton(sender).Tag of
- 1: begin FWAdd:=True;
- TNewRadioButton(sender).Font.Style := [fsBold];
- VBRadio2.Font.Style := [];
- end;
- 2: begin FWAdd:=False;
- TNewRadioButton(sender).Font.Style := [fsBold];
- TNewRadioButton(sender).Visible := True;
- VBRadio1.Font.Style := [];
- end;
- end;
- end;
- procedure InitializeWizard1();
- begin
- ExtractTemporaryFile ('logo.bmp');
- ExtractTemporaryFile ('Play.bmp');
- ExtractTemporaryFile('Video.mp4');
- ExtractTemporaryFile ('Pause.bmp');
- WizardForm.WizardBitmapImage2.Cursor:=crHand;
- WizardForm.WizardBitmapImage2.OnClick:=@LogoLabelOnClick;
- WizardForm.ClientWidth:=654;
- WizardForm.ClientHeight:=402;
- WizardForm.InnerNotebook.Hide;
- WizardForm.OuterNotebook.Hide;
- WizardForm.WizardBitmapImage.Stretch:=True;
- WizardForm.WizardBitmapImage.Parent:=WizardForm;
- WizardForm.WizardBitmapImage2.Width := ScaleX(230);
- WizardForm.WizardBitmapImage2.Height := ScaleX(55);
- WizardForm.WizardBitmapImage2.Top:=340;
- WizardForm.WizardBitmapImage2.Left:=5;
- WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp'));
- WizardForm.WizardBitmapImage2.Parent:=WizardForm;
- WizardForm.WizardSmallBitmapImage.Stretch:=True;
- WizardForm.WizardSmallBitmapImage.Parent:=WizardForm;
- WizardForm.WizardSmallBitmapImage.SetBounds(0,0,WizardForm.ClientWidth,90);
- WizardForm.Bevel1.Parent:=WizardForm;
- WizardForm.Bevel1.Top:=90;
- WizardForm.Bevel1.Width:=WizardForm.ClientWidth;
- WizardForm.Bevel.Parent:=WizardForm;
- WizardForm.Bevel.Top:=330;
- WizardForm.Bevel.Width:=WizardForm.ClientWidth;
- WizardForm.SelectDirBitmapImage.Parent:=WizardForm;
- WizardForm.SelectDirBitmapImage.Top:=125;
- WizardForm.SelectDirBitmapImage.Left:=40;
- WizardForm.DirEdit.Parent:=WizardForm;
- WizardForm.DirEdit.Top:=130;
- WizardForm.DirEdit.Left:=75;
- WizardForm.DirEdit.Width:=430;
- WizardForm.DirEdit.OnChange:=@GetFreeSpaceCaption;
- WizardForm.DirBrowseButton.Parent:=WizardForm;
- WizardForm.DirBrowseButton.Top:=125;
- WizardForm.DirBrowseButton.Left:=515;
- WizardForm.DirBrowseButton.Width:=90;
- WizardForm.DirBrowseButton.Height:=30;
- WizardForm.GroupEdit.Parent:=WizardForm;
- WizardForm.GroupEdit.Top:=255;
- WizardForm.GroupEdit.Left:=75;
- WizardForm.GroupEdit.Width:=430;
- WizardForm.GroupBrowseButton.Parent:=WizardForm;
- WizardForm.GroupBrowseButton.Top:=250;
- WizardForm.GroupBrowseButton.Left:=515;
- WizardForm.GroupBrowseButton.Width:=90;
- WizardForm.GroupBrowseButton.Height:=30;
- WizardForm.NoIconsCheck.Parent:=WizardForm;
- WizardForm.NoIconsCheck.Left:=75;
- WizardForm.NoIconsCheck.Top:=285;
- WizardForm.SelectGroupBitmapImage.Parent:=WizardForm;
- WizardForm.SelectGroupBitmapImage.Top:=250;
- WizardForm.SelectGroupBitmapImage.Left:=40;
- WizardForm.WizardBitmapImage.SetBounds(0,0,WizardForm.ClientWidth,330);
- WizardForm.NextButton.SetBounds(525,347,100,30);
- WizardForm.CancelButton.SetBounds(420,347,100,30);
- WizardForm.BackButton.SetBounds(315,347,100,30);
- CompactCheckBox := TNewCheckBox.Create(WizardForm);
- NoBackgroundCheckBox := TNewCheckBox.Create(WizardForm);
- PauseBT:=TBitmapImage.Create(WizardForm);
- with PauseBT do begin
- Height := 30;
- Width := 31;
- PauseBT.Top:=348;
- PauseBT.Left:=320;
- Bitmap.LoadFromFile(ExpandConstant('{tmp}\Pause.bmp'));
- Parent:=WizardForm;
- PauseBT.Hide;
- OnClick:=@Pause;
- End;
- PlayBT:=TBitmapImage.Create(WizardForm);
- with PlayBT do begin
- Height := 30;
- Width := 31;
- Top:=348;
- Left:=320;
- Bitmap.LoadFromFile(ExpandConstant('{tmp}\Play.bmp'));
- Parent:=WizardForm;
- OnClick:=@Play;
- End;
- PlayBT1:=TBitmapImage.Create(WizardForm);
- with PlayBT1 do begin
- Height := 30;
- Width := 31;
- Top:=348;
- Left:=320;
- Bitmap.LoadFromFile(ExpandConstant('{tmp}\Play.bmp'));
- Parent:=WizardForm;
- OnClick:=@Play1;
- End;
- BGLabel2:=TLabel.Create(WizardForm);
- With BGLabel2 do begin
- Transparent:=true;
- Parent:=WizardForm;
- Alignment:=taCenter;
- Caption := ExpandConstant('Select the Background Option');
- Font.Color:= clWhite
- SetBounds(203,153,240,25);
- end;
- BGLabel3:=TLabel.Create(WizardForm);
- With BGLabel3 do begin
- Transparent:=true;
- Parent:=WizardForm;
- Caption := ExpandConstant('Select a background option to be displayed during the installation process.Otherwise skip'+#13#10+'the selection and click "Install" to begin installation.')
- Font.Color:= clWhite
- SetBounds(111,105,450,40);
- end;
- BGBevel1 := TBevel.Create(WizardForm);
- with BGBevel1 do
- begin
- Style:=bsRaised;
- // bsLowered, bsRaised);
- Parent := WizardForm;
- Top := ScaleY(144);
- Left := ScaleX(203);
- Width := ScaleX(250);
- Height := ScaleY(169);
- end;
- BGBevel2 := TBevel.Create(WizardForm);
- with BGBevel2 do
- begin
- Style:=bsRaised;
- // bsLowered, bsRaised);
- Parent := WizardForm;
- Top := ScaleY(169);
- Left := ScaleX(208);
- Width := ScaleX(240);
- Height := ScaleY(5);
- end;
- BGBevel3 := TBevel.Create(WizardForm);
- with BGBevel3 do
- begin
- Style:=bsLowered;
- // bsLowered, bsRaised);
- Parent := WizardForm;
- Top := ScaleY(149);
- Left := ScaleX(208);
- Width := ScaleX(240);
- Height := ScaleY(159);
- end;
- BGBevel4 := TBevel.Create(WizardForm);
- with BGBevel4 do
- begin
- Style:=bsLowered;
- // bsLowered, bsRaised);
- Parent := WizardForm;
- Top := ScaleY(149);
- Left := ScaleX(208);
- Width := ScaleX(240);
- Height := ScaleY(159);
- end;
- VBRadio1 := TNewRadioButton.Create(WizardForm);
- with VBRadio1 do
- begin
- Parent := WizardForm;
- Tag := 1;
- Left := 260;
- Top := ScaleY(210);
- Width := ScaleX(125);
- Height := ScaleY(23);
- Caption := 'Picture Slideshow';
- Checked := True;
- Font.Style := [fsBold];
- OnClick := @RadioButtonsOnClick;
- end;
- VBRadio2 := TNewRadioButton.Create(WizardForm);
- with VBRadio2 do
- begin
- Parent := WizardForm;
- Tag := 2;
- Left := VBRadio1.Left;
- Top := VBRadio1.Top + 30;
- Width := VBRadio1.Width;
- Height := VBRadio1.Height;
- Caption := 'Video Background';
- Checked := False;
- Font.Style := [fsBold];
- OnClick := @RadioButtonsOnClick;
- end;
- FWAdd := True
- with NoBackgroundCheckBox do
- begin
- Caption := 'No Background Option';
- Name := 'NoBackgroundCheckBox';
- Parent := WizardForm;
- Left := (62);
- Top :=(312);
- Width := ScaleX(125);
- Height := ScaleY(17);
- OnClick := @NoBackgroundCheckBoxClick
- end;
- NoBackgroundCheckBox.Taborder := 3;
- with CompactCheckBox do
- begin
- Name := 'CompactCheckBox';
- Parent := WizardForm;
- Left := ScaleX(560);
- Top := ScaleY(315);
- Width := ScaleX(90);
- Height := ScaleY(14);
- Alignment := taLeftJustify;
- Caption := 'Compact Mode';
- OnClick := @CompactCheckBoxClick;
- end;
- CompactCheckBox.TabOrder := 3;
- WelcomeLbl:=TLabel.Create(WizardForm);
- With WelcomeLbl do begin
- Transparent:=true;
- Parent:=WizardForm;
- Alignment:=taCenter;
- Caption:='Welcome to {#AppName} Setup Wizard.' + #13#10#13#10 + 'It is recommended that you close all other applications before proceeding.' + #13#10#13#10 + 'Click "Next" to continue.';
- Font.Color:=clWhite;
- Font.Size:=9;
- SetBounds(127,205,407,90);
- end;
- //
- Tasks;
- DirBevel := TBevel.Create(WizardForm);
- with DirBevel do
- begin
- Parent := WizardForm;
- Left := ScaleX(28);
- Top := ScaleY(110);
- Width := ScaleX(594);
- Height := ScaleY(110);
- end;
- //-----Bevel Line Page 2 Bottom-----\\
- //---Top---\\
- Bevel3 := TBevel.Create(WizardForm);
- with Bevel3 do
- begin
- Parent := WizardForm;
- Left := ScaleX(27);
- Top := ScaleY(235);
- Width := ScaleX(594);
- Height := ScaleY(2);
- end;
- //---Bottom---\\
- Bevel4 := TBevel.Create(WizardForm);
- with Bevel4 do
- begin
- Parent := WizardForm;
- Left := ScaleX(27);
- Top := ScaleY(313);
- Width := ScaleX(595);
- Height := ScaleY(2);
- end;
- //---Left---\\
- Bevel5 := TBevel.Create(WizardForm);
- with Bevel5 do
- begin
- Parent := WizardForm;
- Left := ScaleX(27);
- Top := ScaleY(236);
- Width := ScaleX(2);
- Height := ScaleY(78);
- end;
- //---Right---\\
- Bevel6 := TBevel.Create(WizardForm);
- with Bevel6 do
- begin
- Parent := WizardForm;
- Left := ScaleX(620);
- Top := ScaleY(235);
- Width := ScaleX(2);
- Height := ScaleY(79);
- end;
- //------------------------\\
- //-----Bevel Line Page 2 Top-----\\
- //---Top---\\
- Bevel7 := TBevel.Create(WizardForm);
- with Bevel7 do
- begin
- Parent := WizardForm;
- Left := ScaleX(27);
- Top := ScaleY(110);
- Width := ScaleX(595);
- Height := ScaleY(2);
- end;
- //---Bottom---\\
- Bevel8 := TBevel.Create(WizardForm);
- with Bevel8 do
- begin
- Parent := WizardForm;
- Left := ScaleX(27);
- Top := ScaleY(218);
- Width := ScaleX(595);
- Height := ScaleY(2);
- end;
- //---Right---\\
- Bevel9 := TBevel.Create(WizardForm);
- with Bevel9 do
- begin
- Parent := WizardForm;
- Left := ScaleX(620);
- Top := ScaleY(110);
- Width := ScaleX(2);
- Height := ScaleY(108);
- end;
- //---Left---\\
- Bevel11 := TBevel.Create(WizardForm);
- with Bevel11 do
- begin
- Parent := WizardForm;
- Left := ScaleX(27);
- Top := ScaleY(111);
- Width := ScaleX(2);
- Height := ScaleY(109);
- end;
- //------------------------\\
- Status:=TLabel.Create(WizardForm);
- With Status do begin
- //Transparent:=true;
- Parent:=WizardForm;
- Alignment:=taCenter;
- //Font.Color:=clWhite;
- Font.Height:=-15;
- SetBounds(0,250,650,30);
- end;
- DirLbl:=TLabel.Create(WizardForm);
- With DirLbl do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- Caption:=' Grand Theft Auto IV will be installed to the following folder ';
- Font.Color:=clWhite;
- SetBounds(52,105,300,15);
- end;
- GroupLbl:=TLabel.Create(WizardForm);
- With GroupLbl do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- Caption:=' Startmenu shortcuts will be created here ';
- Font.Color:=clWhite;
- SetBounds(52,230,235,15);
- end;
- TasksLbl:=TLabel.Create(WizardForm);
- With TasksLbl do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- Caption:='Select the components you want to install; Clear the components you do not want to install.' + #13#10 + 'Click Next when you are ready to continue.';
- Font.Color:=clWhite;
- SetBounds(111,105,450,40);
- end;
- //---PARTITION SPACE---\\
- PartitionSpaceLabel:=TLabel.Create(WizardForm);
- With PartitionSpaceLabel do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- //Font.Color:=clWhite;
- Font.Height:=-13;
- SetBounds(75,160,200,30);
- end;
- //---FREE SPACE---\\
- FreeSpaceLabel:=TLabel.Create(WizardForm);
- With FreeSpaceLabel do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- //Font.Color:=clWhite;
- Font.Height:=-13;
- SetBounds(335,160,200,30);
- end;
- //---GAME SPACE---\\
- GameSpaceLabel:=TLabel.Create(WizardForm);
- With GameSpaceLabel do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- //Font.Color:=clWhite;
- Font.Height:=-13;
- SetBounds(75,190,200,30);
- end;
- //---Total Needed Space---\\
- NeedSpaceLabel:=TLabel.Create(WizardForm);
- With NeedSpaceLabel do begin
- //Transparent:=true;
- Parent:=WizardForm;
- //Alignment:=taCenter;
- //Font.Color:=clWhite;
- Font.Height:=-13;
- SetBounds(335,190,200,30);
- end;
- end;
- Procedure HideComponents();
- begin
- //TasksSeparateBevel.Hide;
- CompactCheckBox.hide;
- NoBackgroundCheckBox.hide;
- WizardForm.WizardSmallBitmapImage.Hide;
- WizardForm.Bevel1.Hide;
- DirBevel.Hide;
- Bevel3.Hide;
- Bevel4.Hide;
- Bevel5.Hide;
- Bevel6.Hide;
- Bevel7.Hide;
- Bevel8.Hide;
- BGLabel2.hide;
- BGLabel3.Hide;
- BGBevel1.hide;
- BGBevel2.hide;
- BGBevel3.hide;
- BGBevel4.hide;
- VBRadio1.hide;
- VBRadio2.hide;
- PauseBT.hide;
- PlayBT.hide;
- PlayBT1.hide;
- Bevel9.Hide;
- Bevel11.Hide;
- Bevel20.Hide;
- Bevel21.Hide;
- Bevel22.Hide;
- Bevel23.Hide;
- TasksBevel.Hide;
- DirLbl.Hide;
- GroupLbl.Hide;
- TasksLbl.Hide;
- DirectXCB.Hide;
- VisualCCB.Hide;
- NvidiaPhysx.Hide;
- Framework.Hide;
- IconCB.Hide;
- WizardForm.SelectDirBitmapImage.Hide;
- WizardForm.SelectGroupBitmapImage.Hide;
- WizardForm.DirEdit.Hide;
- WizardForm.GroupEdit.Hide;
- WizardForm.DirBrowseButton.Hide;
- WizardForm.GroupBrowseButton.Hide;
- WizardForm.NoIconsCheck.Hide;
- WizardForm.WizardBitmapImage.Hide;
- WelcomeLbl.Hide;
- // WizardForm.ComponentsList.Hide;
- // WizardForm.TasksList.Hide;
- TasksSeparateBevel.Hide;
- PartitionSpaceLabel.Hide;
- FreeSpaceLabel.Hide;
- GameSpaceLabel.Hide;
- NeedSpaceLabel.Hide;
- Status.Hide;
- end;
- procedure CurStepChanged1(CurStep: TSetupStep);
- var Comps1,Comps2,Comps3, TmpValue:cardinal;
- FindHandle1,ColFiles1,CurIndex1,tmp:integer;
- ExecError:boolean;
- InFilePath,OutFilePath,OutFileName:PAnsiChar;
- begin
- if CurStep = ssInstall then begin //If necessary, you can change to ssPostInstall
- WizardForm.ProgressGauge.Hide;
- WizardForm.CancelButton.Hide;
- CreateControls;
- WizardForm.StatusLabel.Caption:='Installing Components';
- ISDoneCancel:=0;
- #ifdef PrecompVer
- #if PrecompVer == "0.38"
- ExtractTemporaryFile('precomp038.exe');
- #endif
- #if PrecompVer == "0.40"
- ExtractTemporaryFile('precomp040.exe');
- #endif
- #if PrecompVer == "0.41"
- ExtractTemporaryFile('precomp041.exe');
- #endif
- #if PrecompVer == "0.42"
- ExtractTemporaryFile('precomp042.exe');
- #endif
- #if PrecompVer == "0.43"
- ExtractTemporaryFile('precomp043.exe');
- #endif
- #if PrecompVer == "Inside"
- ExtractTemporaryFile('CLS-precomp.dll');
- ExtractTemporaryFile('CLS-MSC.dll');
- ExtractTemporaryFile('CLS-srep.dll');
- ExtractTemporaryFile('precomp.exe');
- #endif
- #endif
- ExtractTemporaryFile('arc.ini');
- ExtractTemporaryFile('facompress.dll');
- ExtractTemporaryFile('facompress_mt.dll');
- ExtractTemporaryFile('XDelta3.dll');
- ExtractTemporaryFile('7z.dll');
- ExtractTemporaryFile('PackZIP.exe');
- ExtractTemporaryFile('english.ini');
- ExtractTemporaryFile('FreeArc-LZMA-x64.exe');
- ExtractTemporaryFile('srep.exe');
- ExtractTemporaryFile('srep64.exe');
- ExtractTemporaryFile('unarc.dll');
- ExtractTemporaryFile('packjpg_dll.dll');
- ExtractTemporaryFile('packjpg_dll1.dll');
- ExtractTemporaryFile('zlib1.dll');
- Comps1:=0; Comps2:=0; Comps3:=0;
- #ifdef Components
- TmpValue:=1;
- if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue; //component 1
- TmpValue:=TmpValue*2;
- if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue; //component 2
- TmpValue:=TmpValue*2;
- if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue; //component 3
- TmpValue:=TmpValue*2;
- if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue; //component 4
- #endif
- #ifdef precomp
- PCFVer:={#precomp};
- #else
- PCFVer:=0;
- #endif
- ISDoneError:=true;
- if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, 512, @ProgressCallback) then begin
- repeat
- ChangeLanguage('english');
- if not SrepInit('',512,0) then break;
- if not PrecompInit('',128,PCFVer) then break;
- if not FileSearchInit(true) then break;
- #include 'Archives.ini'
- ISDoneError:=false;
- until true;
- ISDoneStop;
- end;
- HideControls;
- WizardForm.CancelButton.Visible:=true;
- WizardForm.CancelButton.Enabled:=false;
- Status.Show;
- end;
- if CurStep = ssPostInstall then begin
- if NoBackgroundCheckBox.Checked then begin
- WizardForm.Caption := ' Installing Software Prerequisites';
- if DirectXCB.Checked then begin
- Status.Caption:='Installing DirectX...';
- Status.Left := 218;
- Status.Top := 200;
- Status.Width := 227;
- Status.Height := 20;
- Exec2(ExpandConstant('{src}\Redist\DirectX\DXSETUP.exe'),'/silent',false);
- end;
- if NvidiaPhysx.Checked then begin
- Status.Caption:='Installing Nvidia Physx...';
- Status.Left := 218;
- Status.Top := 200;
- Status.Width := 227;
- Status.Height := 20;
- Exec2(ExpandConstant('{src}\Redist\PhysX-9.13.1220-SystemSoftware.msi'),'/q',false);
- end;
- if VisualCCB.Checked then begin
- Status.Caption:='Installing Visual C++...';
- Status.Left := 218;
- Status.Top := 200;
- Status.Width := 227;
- Status.Height := 20;
- Exec2(ExpandConstant('{src}\Redist\vcredist_x86.exe'),'/q',false);
- end;
- if Framework.Checked then begin
- Status.Caption:='Installing .NET Framework...';
- Status.Left := 218;
- Status.Top := 200;
- Status.Width := 227;
- Status.Height := 20;
- Exec2(ExpandConstant('{src}\Redist\dotnetfx.exe'),'/q',false);
- end;
- end;
- end;
- if not NoBackgroundCheckBox.Checked then begin
- WizardForm.Caption := ' Installing Software Prerequisites';
- if CurStep = ssPostInstall then begin
- if not CompactCheckBox.Checked then begin
- Status.Caption := 'Installing Additional Components';
- Status.Left := 218;
- Status.Top := 200;
- Status.Width := 227;
- Status.Height := 30;
- if DirectXCB.Checked then begin
- Exec2(ExpandConstant('{src}\Redist\DirectX\DXSETUP.exe'),'/silent',false);
- end;
- if NvidiaPhysx.Checked then begin
- Exec2(ExpandConstant('{src}\Redist\PhysX-9.13.1220-SystemSoftware.msi'),'/q',false);
- end;
- if VisualCCB.Checked then begin
- Exec2(ExpandConstant('{src}\Redist\vcredist_x86.exe'),'/q',false);
- end;
- if Framework.Checked then begin
- Exec2(ExpandConstant('{src}\Redist\dotnetfx.exe'),'/q',false);
- end;
- end;
- end;
- end;
- end;
- //-------- First Page --------\\
- procedure CurPageChanged1(CurPageID: integer);
- begin
- if CurPageID=wpWelcome then begin
- HideComponents;
- Bevel3.Hide;
- Bevel4.Hide;
- BGLabel3.Hide;
- Bevel5.Hide;
- Bevel6.Hide;
- WizardForm.WizardBitmapImage.Show;
- WelcomeLbl.Show;
- WizardForm.Caption:=' Welcome to Grand Theft Auto IV Setup Wizard'
- WizardForm.CancelButton.show;
- end;
- //-------- Second Page --------\\
- if CurPageID=wpSelectDir then begin
- HideComponents;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- DirBevel.Show;
- BGLabel3.Hide;
- Bevel3.Show;
- Bevel4.Show;
- Bevel5.Show;
- Bevel6.Show;
- Bevel7.Show;
- Bevel8.Hide;
- Bevel9.Show;
- Bevel11.Show;
- WizardForm.Caption:= ' Select the Destination Directory';
- WizardForm.SelectDirBitmapImage.Show;
- WizardForm.SelectGroupBitmapImage.Show;
- WizardForm.DirEdit.Show;
- WizardForm.GroupEdit.Show;
- WizardForm.DirBrowseButton.Show;
- WizardForm.GroupBrowseButton.Show;
- WizardForm.NoIconsCheck.Show;
- DirLbl.Show;
- GroupLbl.Show;
- PartitionSpaceLabel.Show;
- FreeSpaceLabel.Show;
- GameSpaceLabel.Show;
- NeedSpaceLabel.Show;
- GetFreeSpaceCaption(nil);
- end;
- //-------- Third page --------\\
- if CurPageID=wpSelectTasks then begin
- HideComponents;
- WizardForm.Caption:= ' Select Additional Components';
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- BGLabel3.Hide;
- Bevel3.Hide;
- Bevel4.Hide;
- Bevel5.Hide;
- Bevel6.Hide;
- Bevel20.Show;
- Bevel21.Show;
- Bevel22.Show;
- Bevel23.Show;
- WizardForm.ComponentsList.Show;
- WizardForm.TasksList.Show;
- DirectXCB.Show;
- DirectXCB.Checked:= False;
- VisualCCB.Show;
- VisualCCB.Checked:= True;
- NvidiaPhysx.Checked:= False;
- NvidiaPhysx.Enabled:= True;
- NvidiaPhysx.Show;
- Framework.Show;
- Framework.Enabled:= True;
- Framework.Checked:= False;
- IconCB.Show;
- IconCB.Checked:= True;
- TasksBevel.Hide;
- TasksLbl.Show;
- WizardForm.NextButton.Caption:='Next >';
- TasksSeparateBevel.Show;
- end;
- //-------- Forth page --------\\
- if CurPageID=wpReady then begin
- HideComponents;
- NoBackgroundCheckBox.Visible := True;
- NoBackgroundCheckBox.Checked := True;
- BGLabel2.Show;
- BGLabel3.Show;
- BGBevel1.Show;
- BGBevel2.Show;
- BGBevel3.Show;
- BGBevel4.Show;
- // BGBevel5.Show;
- VBRadio1.Show;
- VBRadio2.Show;
- //if VBRadio2.Checked then PlayMPEGVideo;
- DirBevel.hide;
- WizardForm.NextButton.Caption:='Install';
- WizardForm.Caption:=' Select the Background Option'
- WizardForm.WizardSmallBitmapImage.Show;
- if not (FileExists(ExpandConstant('{tmp}\Video.avi')) or FileExists(ExpandConstant('{tmp}\Video.mp4')) or FileExists(ExpandConstant('{tmp}\Video.mpeg')) or FileExists(ExpandConstant('{tmp}\Video.mpg')) or FileExists(ExpandConstant('{tmp}\Video.wmv'))) and NoBackgroundCheckBox.Checked =True then
- VBRadio2.Enabled := False;
- end;
- //--------Installation Page--------\\
- if CurPageID=wpInstalling then begin
- HideComponents;
- PauseBT.Show;
- CompactCheckBox.Visible := True;
- CompactCheckBox.Checked := False;
- WizardForm.WizardSmallBitmapImage.Show;
- WizardForm.Bevel1.Show;
- WizardForm.Caption := ' Installing Grand Theft Auto IV';
- WizardForm.TasksList.CheckItem(0,IconCB.Checked);
- with WizardForm do begin
- WizardForm.ProgressGauge.show;
- if NoBackgroundCheckBox.Checked = False then begin
- Top:=GetScreenHeight-ClientHeight-45;
- Left:=GetScreenWidth-ClientWidth-20;
- end;
- if FWAdd then begin
- with WizardForm do begin
- if VBRadio1.Checked then begin
- hide;
- MakeSlideShow;
- show;
- PlayBT1 := PlayBT;
- TimerID := SetTimer(0, 0, 2000, WrapTimerProc(@OnTimer, 4));
- end;
- end;
- end else
- with wizardForm do begin
- FWAdd := False;
- Background;
- end;
- end;
- end;
- if VBRadio2.Checked then begin
- PlayMPEGVideo;
- end;
- if CompactCheckBox.Checked and (CurPageID = wpFinished) then begin
- BackgroundForm.Visible := False;
- end;
- //--------Game was successfully installed PAGE--------\\
- if (CurPageID = wpFinished) and ISDoneError then begin
- Exec2(ExpandConstant('{app}\unins000.exe'),'/VERYSILENT',false);
- end;
- if CurPageID = wpFinished then begin
- with WizardForm do begin
- HideComponents;
- WizardForm.ClientWidth:=654;
- WizardForm.ClientHeight:=402;
- SoundCtrlButton.Hide;
- WizardForm.WizardBitmapImage.Show;
- WelcomeLbl.Show;
- if NoBackgroundCheckBox.Checked = False and (CurPageID = wpFinished) then BackgroundForm.Visible := False;
- WizardForm.Position:=poScreenCenter;
- WelcomeLbl.Left:=145;
- WelcomeLbl.Caption:='Grand Theft Auto IV was successfully installed on your computer.';
- WizardForm.Caption:= ' Finish Grand Theft Auto IV Setup Wizard';
- DeinitializeSlideShow;
- KillTimer(0, TimerID);
- WizardForm.BringToFront;
- DsStopMediaPlay;
- SoundControls;
- end;
- end;
- //--------Game Fail To Install PAGE--------\\
- if (CurPageID = wpFinished) and ISDoneError then begin
- //LabelTime3.Hide;
- WizardForm.Caption:=' Grand Theft Auto IV Setup';
- WelcomeLbl.Font.Color:= clRed;
- if NoBackgroundCheckBox.Checked = False and (CurPageID = wpFinished) and ISDoneError then BackgroundForm.Visible := False;
- WelcomeLbl.Caption:= 'Setup encountered an error while installing Grand Theft Auto IV.' + #13#10#13#10 + 'Changes were not saved , please try installing again.';
- WelcomeLbl.Left:=163;
- WizardForm.ProgressGauge.Hide;
- WizardForm.Position:=poScreenCenter;
- end;
- end;
- procedure DeinitializeSetup1();
- begin
- ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
- UnloadSkin();
- end;
- procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
- procedure InitializeWizard2();
- begin
- ExtractTemporaryFile('Splash.png');
- ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10);
- end;
- function InitializeSetup(): Boolean;
- begin
- Result := InitializeSetup1(); if not Result then exit;
- end;
- procedure InitializeWizard();
- begin
- ExtractTemporaryFile('music.mp3');
- ExtractTemporaryFile('SetupCompleted.wav');
- ExtractTemporaryFile('click.wav');
- if BASS_Init(-1, 44100, 0, 0, 0) then
- begin
- SoundStream := BASS_StreamCreateFile(False,
- ExpandConstant('{tmp}\music.mp3'), 0, 0, 0, 0,
- EncodingFlag or BASS_SAMPLE_LOOP);
- BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
- BASS_ChannelPlay(SoundStream, False);
- SoundCtrlButton := TNewButton.Create(WizardForm);
- SoundCtrlButton.Parent := WizardForm;
- SoundCtrlButton.SetBounds(210,347,100,30);
- SoundCtrlButton.Caption :=
- ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
- SoundCtrlButton.OnClick := @SoundCtrlButtonClick;
- RedesignWizardForm;
- InitializeWizard1();
- InitializeWizard2();
- end;
- end;
- procedure CurStepChanged(CurStep: TSetupStep);
- begin
- CurStepChanged1(CurStep);
- end;
- procedure CurPageChanged(CurPageID: Integer);
- begin
- CurPageChanged1(CurPageID);
- end;
- function ShouldSkipPage(PageID: Integer):Boolean;
- begin
- if (PageID=wpSelectProgramGroup) or (PageID=wpSelectComponents) then Result:=true;
- //if NoBackgroundCheckBox.Checked = False then begin
- //with WizardForm do begin
- //if (CurPageID=wpFinisheded) and BackgroundForm.Visible then begin
- //BackgroundForm.hide;
- //end;
- //end;
- //end;
- end;
- procedure DeinitializeSetup();
- begin
- mciSendString('Close AVIFile','',0,0);
- mciSendString('Close MPEGVideo','',0,0);
- DeinitializeSlideShow;
- DsStopMediaPlay;
- KillTimer(0, TimerID);
- BASS_Free();
- DeinitializeSetup1();
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement