Nukloud
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору #define MyAppVerName "Duke Nukem Forever(Ukr)" #define MyAppName "Duke Nukem Forever(Ukr)" #define DefaultDirName "{pf}\Duke Nukem Forever" #define DefaultGroupName "Duke Nukem Forever" #define MyAppExeName "RUN_DNF.exe" #define NeedSize = 6754; #define TNeedSize = 6754; #define Processor = 4000; #define RAM = 1024; #define VideoCard = 256; #define WinVerMajor = 5; #define WinVerMinor = 1; #define ServicePack = 2; ;#define ISDone ;#ifdef ISDone ;#define NeedMem 512 #define records ;#define Components ;#ifdef Components ;[Components] ;Name: Localization; Description: {cm:Localization}; Types: full custom; Flags: fixed; ;Name: Localization\English; Description: {cm:English}; Types: full; Flags: exclusive; ;Name: Localization\Russian; Description: {cm:Russian}; Types: custom; Flags: exclusive; ;#endif ;[Files] ;Source: "Localization\English\-"; DestDir: "{app}\"; Components: Localization\English; ;Source: "Localization\Russian\-"; DestDir: "{app}\"; Components: Localization\Russian; #ifdef records [Files] Source: Other\records.inf; DestDir: {tmp}; Flags: dontcopy #endif [Setup] AppId={{2CA04E92-B824-4A1B-87F8-5F6B8BECAA01} AppName={#MyAppName} AppVerName={#MyAppVerName} DefaultDirName={#DefaultDirName} DefaultGroupName={#DefaultGroupName} DirExistsWarning=No OutputBaseFilename=Setup SetupIconFile=Image\Icon.ico VersionInfoCopyright=Localized Team DisableReadyPage=True AllowNoIcons=yes #include "Modules\Messages.iss" [Files] Source: Image\*.*; Flags: dontcopy; Source: Other\*.*; Flags: dontcopy; Source: Image\Icon.ico; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system; Source: Other\ISSkin.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system; Source: Other\InnoCallback.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system; Source: Other\Grey&Black.cjstyles; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system; [Run] ;Filename: {src}\Soft\DirectX.exe; WorkingDir: {src}\Soft\; Flags: waituntilterminated; Check: DirectX and not Install; BeforeInstall: DirectXProgress; ;Filename: {src}\Soft\PhysX.exe; WorkingDir: {src}\Soft\; Flags: waituntilterminated; Check: PhysX and not Install; BeforeInstall: PhysXProgress; ;Filename: {src}\Soft\Visual C++ Redist.exe; WorkingDir: {src}\Soft\; Parameters: /Q; Flags: waituntilterminated; Check: visualc and not IsWin64 and not Install; BeforeInstall: visualcProgress; ;Filename: {src}\Soft\Visual C++ Redist.exe; WorkingDir: {src}\Soft\; Parameters: /Q; Flags: waituntilterminated; Check: visualc and IsWin64 and not Install; BeforeInstall: visualcProgress; [Icons] Name: {userdesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Check: Desktop and not Install; Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}; Check: NoIcons and not Install; Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Check: NoIcons and not Install; [Registry] Root: HKCU; Subkey: Software\Duke Nukem Forever(Ukr); ValueName: path; ValueType: string; ValueData: {app}; Flags: uninsdeletekey; Check: not Install; [UninstallDelete] Type: filesandordirs; Name: {app}; [Code] const WFDiskTimerID = 1; WFSysReqTimerID = 2; ARTitleTimerID = 2; BASS_ACTIVE_PAUSED = 3; BASS_SAMPLE_LOOP = 4; type TTimerProc = procedure (h: Longword; msg: Longword; idevent: Longword; dwTime: Longword); TPBProc = function (h:hWnd;Msg,wParam,lParam:Longint):Longint; TALabel = array of TLabel; var SystemPage, SelectTasksPage, SelectComponentsPage: TWizardPage; WizardImg, Workspace, WizardSmallImage, WizardFinishImage, RedistCheck, logo, Line, Edit, DirFolder, GroupFolder, HardDrivePanel, HDD, RequirementsPanel: Longint; AppDir, unins, mp3Name, OldDisk: string; ResultCode, ErrorCode: integer; MusicButton,mp3Handle, hCancelBtn, hNextBtn, hBackBtn, hDirBrowseBtn, hGroupBrowseBtn, hCancelUninstBtn, DesktopCheck, QuickLaunchCheck, DirectXCheck, PhysXCheck, NoIconsCheck, visualcCheck: HWND; WelcomeLabel1, WelcomeLabel2, RequirementsLbl, ProcessorLbl, VideoCardLbl, SoundCardLbl, RAMLbl, SystemLbl, FinishedLabel, ProcessorNameLbl, VideoCardNameLbl, SoundCardNameLbl, RAMTotalLbl, SystemNameLbl, NextLbl, FinishedHeadingLabel, PhysXLabel, PageNameLabel,PageDescriptionLabel, WelcomeLabel1, WelcomeLabel2, SelectDirBrowseLabel, DirEditLabel, TotalSpaceLabel, NeedSpaceLabel, FreeSpaceLabel, SelectTasksLabel, SelectStartMenuFolderBrowseLabel, GroupEditLabel, NoIconsLabel, SelectDirLabel, NeedSpaceTLabel, SelectStartMenuFolderLabel, DesktopLabel, DirectXLabel, visualcLabel, RedistLabel, LogoLabel, SelectComponentsLabel: TLabel; WFButtonFont, UPFButtonFont: TFont; LogoPanel: TPanel; LogoImage: TBitmapImage; FreeMB, TotalMB: Cardinal; ASysReq, ADisk: TALabel; Keys: TArrayOfString; Components, ComponentsList, ProgressInfoLabel2: TLabel; #ifndef ISDone MyError: boolean; PB2Img, PBBkg1Img: Longint; #endif #ifndef FreeArc UnPackError: Integer; #endif function sndPlaySound(lpszSoundName: AnsiString; uFlags: cardinal):integer; external 'sndPlaySoundA@winmm.dll stdcall'; function WrapTimerProc(callback:TTimerProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall'; function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall'; function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall'; function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall'; function CallBackProc(P:TPBProc;ParamCount:integer):LongWord; external 'wrapcallback@{tmp}\innocallback.dll stdcall delayload'; procedure InitProgressBar(hwnd:thandle; l,t,w,h,speed:integer; clFore, clBack: integer); external 'InitProgressBar@files:IsProgressBar.dll stdcall'; procedure DeinitProgressBar; external 'DeinitProgressBar@files:IsProgressBar.dll stdcall'; procedure FinishFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword); begin if FinishedLabel.Font.Color=$FFFFFF then FinishedLabel.Font.Color:=$0030ff else FinishedLabel.Font.Color:=$FFFFFF; if FinishedHeadingLabel.Font.Color=$FFFFFF then FinishedHeadingLabel.Font.Color:=$0030ff else FinishedHeadingLabel.Font.Color:=$FFFFFF; end; procedure LoadSkin(lpszPath: string; lpszIniFileName: string ); external 'LoadSkin@files:isskin.dll stdcall delayload setuponly'; procedure LoadSkinUninst(lpszPath: string; lpszIniFileName: string ); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload uninstallonly'; procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall delayload setuponly'; procedure UnloadSkinUninst(); external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload uninstallonly'; function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall'; procedure ReadEntries(); begin RegQueryStringValue(HKCU, 'Software\Duke Nukem Forever(Ukr)', 'path', AppDir); end; function InitializeSetup: Boolean; begin if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll'); if not FileExists(ExpandConstant('{tmp}\innocallback.dll')) then ExtractTemporaryFile('innocallback.dll'); if not FileExists(ExpandConstant('{tmp}\BASS.dll')) then ExtractTemporaryFile('BASS.dll'); if not FileExists(ExpandConstant('{tmp}\MusicButton.png')) then ExtractTemporaryFile('MusicButton.png'); if not FileExists(ExpandConstant('{tmp}\Music.mp3')) then ExtractTemporaryFile('Music.mp3'); if not FileExists(ExpandConstant('{tmp}\Grey&Black.cjstyles')) then ExtractTemporaryFile('Grey&Black.cjstyles'); LoadSkin(ExpandConstant('{tmp}\Grey&Black.cjstyles'), ''); begin unins:='unins000.exe'; ReadEntries; if not (RegValueExists(HKCU, 'Software\Duke Nukem Forever', 'path')) then Result:=True else case MsgBox(ExpandConstant('{cm:Game} ') + ExpandConstant('{#MyAppName} ') + ExpandConstant('{cm:MsgBox1}'), mbInformation, MB_YESNOCANCEL or MB_DEFBUTTON3) of idYes: Result:=True; idNo: if (FileExists(AddBackslash(AppDir) + unins)) then begin Exec(AddBackslash(AppDir) + unins, '', ExtractFilePath(AddBackslash(AppDir) + unins), SW_SHOW, ewNoWait, ResultCode); end else begin MsgBox(ExpandConstant('{cm:MsgBox2} ') + ExpandConstant('{#MyAppName}, ') +#13#10+ ExpandConstant('{cm:MsgBox3}'), mbCriticalError, MB_OK or MB_DEFBUTTON1); Result:=False; end; end; end; end; #include "Modules\botva2.iss" #include "Modules\Progress Bar.iss" #ifdef FreeArc #include "Modules\FreeArc.iss" #endif #ifdef ISDone #include "Modules\ISDone.iss" #endif procedure CreateWizardImage; var i: integer; begin with WizardForm do begin InnerNotebook.Hide; OuterNotebook.Hide; Center; Color:= $282828; end; ExtractTemporaryFile('Workspace.png'); ExtractTemporaryFile('StartImage.png'); ExtractTemporaryFile('EndImage.png'); ExtractTemporaryFile('SmallImage.png'); ExtractTemporaryFile('Line.png'); ExtractTemporaryFile('Edit.png'); ExtractTemporaryFile('button.png'); ExtractTemporaryFile('WFEnter.wav'); ExtractTemporaryFile('Check.wav'); ExtractTemporaryFile('Click.wav'); ExtractTemporaryFile('DirFolder.png'); ExtractTemporaryFile('GroupFolder.png'); ExtractTemporaryFile('CheckBox.png'); ExtractTemporaryFile('HardDrivePanel.png'); ExtractTemporaryFile('HDD.png'); ExtractTemporaryFile('RequirementsPanel.png'); ExtractTemporaryFile('OneProgressImage.png'); ExtractTemporaryFile('TwoProgressImage.png'); ExtractTemporaryFile('ProgressImage.png'); WizardImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\StartImage.png'),ScaleX(0), ScaleY(0),ScaleX(497),ScaleY(313),True,True); WizardFinishImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\EndImage.png'),ScaleX(0), ScaleY(0),ScaleX(497),ScaleY(313),True,True); Workspace:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Workspace.png'),ScaleX(30), ScaleY(30),ScaleX(437),ScaleY(253),True,True); WizardSmallImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\SmallImage.png'),ScaleX(0), ScaleY(0),ScaleX(73),ScaleY(55),False,True); Line:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Line.png'),ScaleX(0), ScaleY(58),ScaleX(497),ScaleY(5),True,True); Edit:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Edit.png'),ScaleX(40), ScaleY(157),ScaleX(330),ScaleY(20),True,True); DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\DirFolder.png'),ScaleX(30), ScaleY(70),ScaleX(50),ScaleY(50),True,True); GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\GroupFolder.png'),ScaleX(30), ScaleY(70),ScaleX(50),ScaleY(50),True,True); HardDrivePanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\HardDrivePanel.png'),ScaleX(90), ScaleY(203),ScaleX(280),ScaleY(90),True,True); HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\HDD.png'),ScaleX(30), ScaleY(223),ScaleX(50),ScaleY(50),True,True); RequirementsPanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\RequirementsPanel.png'),ScaleX(10), ScaleY(110),ScaleX(477),ScaleY(146),True,True); ImgApplyChanges(WizardForm.Handle); end; 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.DirBrowseButton.Caption)); BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.GroupBrowseButton.Caption)); end; procedure WizardFormBtnClick(hBtn:HWND); var Btn:TButton; begin sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001); 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 WFButtonFont:=TFont.Create; WFButtonFont.Style:=[fsBold]; with WizardForm.BackButton do begin hBackBtn:=BtnCreate(WizardForm.Handle,237,297,80,80,ExpandConstant('{tmp}\button.png'),10,False); BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1)); BtnSetFont(hBackBtn,WFButtonFont.Handle); BtnSetFontColor(hBackBtn,$ffffff,$000000,$ffffff,$B6B6B6); BtnSetCursor(hBackBtn,GetSysCursorHandle(32649)); Width:=0; Height:=0; end; with WizardForm.NextButton do begin hNextBtn:=BtnCreate(WizardForm.Handle,317,297,80,80,ExpandConstant('{tmp}\button.png'),3,False); BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1)); BtnSetFont(hNextBtn,WFButtonFont.Handle); BtnSetFontColor(hNextBtn,$ffffff,$000000,$ffffff,$B6B6B6); BtnSetCursor(hNextBtn,GetSysCursorHandle(32649)); Width:=0; Height:=0; end; with WizardForm.CancelButton do begin hCancelBtn:=BtnCreate(WizardForm.Handle,408,297,80,80,ExpandConstant('{tmp}\button.png'),10,False); BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1)); BtnSetFont(hCancelBtn,WFButtonFont.Handle); BtnSetFontColor(hCancelBtn,$ffffff,$000000,$ffffff,$B6B6B6); BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649)); Width:=0; Height:=0; end; with WizardForm.DirBrowseButton do begin hDirBrowseBtn:=BtnCreate(WizardForm.Handle,380,126,76,80,ExpandConstant('{tmp}\button.png'),10,False); BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1)); BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle); BtnSetFontColor(hDirBrowseBtn,$ffffff,$000000,$ffffff,$B6B6B6); BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649)); Width:=0; Height:=0; end; with WizardForm.GroupBrowseButton do begin hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,380,126,76,80,ExpandConstant('{tmp}\button.png'),10,False); BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1)); BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle); BtnSetFontColor(hGroupBrowseBtn,$ffffff,$000000,$ffffff,$B6B6B6); BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32649)); Width:=0; Height:=0; end; end; function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload'; function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload'; function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload'; function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload'; function BASS_ChannelIsActive(handle: DWORD): Integer; external 'BASS_ChannelIsActive@files:BASS.dll stdcall delayload'; function BASS_ChannelPause(handle: DWORD): Boolean; external 'BASS_ChannelPause@files:BASS.dll stdcall delayload'; function BASS_Pause: Boolean; external 'BASS_Pause@files:BASS.dll stdcall delayload'; function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload'; function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload'; procedure MusicButtonClick(hBtn:HWND); begin sndPlaySound(ExpandConstant('{tmp}\Click.wav'), $0001); if BtnGetChecked(MusicButton) then BASS_ChannelPause(mp3Handle) else if BASS_ChannelIsActive(mp3Handle)=BASS_ACTIVE_PAUSED then BASS_ChannelPlay(mp3Handle, False); end; procedure InsertMusic; begin MusicButton:=BtnCreate(WizardForm.Handle,ScaleX(470),ScaleY(70),ScaleX(20),ScaleY(20),ExpandConstant('{tmp}\MusicButton.png'),0,True); BtnSetEvent(MusicButton,BtnClickEventID,WrapBtnCallback(@MusicButtonClick,1)); BtnSetEvent(MusicButton,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(MusicButton,GetSysCursorHandle(32649)); mp3Name:=ExpandConstant('{tmp}\Music.mp3'); BASS_Init(-1,44100,0,0,0); mp3Handle:=BASS_StreamCreateFile(FALSE,PAnsiChar(mp3Name),0,0,BASS_SAMPLE_LOOP); BASS_Start; BASS_ChannelPlay(mp3Handle,False); end; function DetectHardware: Integer; external 'hwc_DetectHardware@files:get_hw_caps.dll stdcall'; function GetProcessorName: PAnsiChar; external 'hwc_GetProcessorName@files:get_hw_caps.dll stdcall'; function GetProcessorFreq: Integer; external 'hwc_GetProcessorFreq@files:get_hw_caps.dll stdcall'; function GetVideoCardName: PAnsiChar; external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall'; function GetVidMemLocal: Integer; external 'hwc_GetVidMemLocal@files:get_hw_caps.dll stdcall'; function GetPdmWidth: Integer; external 'hwc_GetPdmWidth@files:get_hw_caps.dll stdcall'; function GetPdmHeight: Integer; external 'hwc_GetPdmHeight@files:get_hw_caps.dll stdcall'; function GetSoundCards: Integer; external 'hwc_GetSoundCards@files:get_hw_caps.dll stdcall'; function GetSoundCardName: PAnsiChar; external 'hwc_GetSoundCardName@files:get_hw_caps.dll stdcall'; function GetSystemPhys: Integer; external 'hwc_GetSystemPhys@files:get_hw_caps.dll stdcall'; function GetWindowsName: PAnsiChar; external 'hwc_GetWindowsName@files:get_hw_caps.dll stdcall'; function DelSp(s: string): string; begin while Pos(' ',s)>0 do StringChange(s,' ',' '); Result:=Trim(s); end; procedure GroupChange(Sender: TObject); begin GroupEditLabel.Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width); 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(Float: Extended): string; begin if Float<1024 then Result:=NumToStr(Float)+' MB' else if (Float/1024)<1024 then Result:=NumToStr(Float/1024)+' GB' else if (Float/(1024*1024))<1024 then Result:=NumToStr(Float/(1024*1024))+' TB'; end; procedure SysReqFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword); var i:integer; begin for i:= 0 to GetArrayLength(ASysReq)-1 do if ASysReq[i].Font.Color=clLime then ASysReq[i].Font.Color:=$0000FF else ASysReq[i].Font.Color:=clLime; end; procedure DiskFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword); var i:integer; begin for i:= 0 to GetArrayLength(ADisk)-1 do if ADisk[i].Font.Color=$FFFFFF then ADisk[i].Font.Color:=$0000FF else ADisk[i].Font.Color:=$FFFFFF; end; function GetElementIndex(a:TALabel; lbl:TLabel):integer; var i:integer; f:boolean; begin Result:=-1; f:=False; for i:=0 to GetArrayLength(a)-1 do if a[i]=lbl then begin f:=True; Break; end; if f then Result:=i; end; procedure AddLabelToArray(var a:TALabel; lbl:TLabel); begin if GetElementIndex(a,lbl)=-1 then begin SetArrayLength(a,GetArrayLength(a)+1); a[GetArrayLength(a)-1]:=lbl; end; end; procedure DeleteLabelFromArray(var a:TALabel; lbl:integer); var Last,i:integer; begin if lbl<>-1 then begin Last:=GetArrayLength(a)-1; if lbl<Last then for i:=lbl to Last-1 do a[i]:=a[i+1]; SetArrayLength(a,Last); end; end; procedure GetFreeSpaceCaption(Sender: TObject); var CurrentDisk: String; i:integer; begin CurrentDisk:=ExtractFileDrive(WizardForm.DirEdit.Text); DirEditLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width); if not GetSpaceOnDisk(CurrentDisk,True,FreeMB,TotalMB) then begin KillTimer(WizardForm.Handle,WFDiskTimerID); SetArrayLength(ADisk,0); TotalSpaceLabel.Visible:=False; FreeSpaceLabel.Visible:=False; BtnSetEnabled(hNextBtn,False); WizardForm.NextButton.Enabled:=False; OldDisk:=CurrentDisk; Exit; end; TotalSpaceLabel.Visible:=True; FreeSpaceLabel.Visible:=True; if CurrentDisk<>OldDisk then begin OldDisk:=CurrentDisk; TotalSpaceLabel.Caption := ExpandConstant('{cm:TotalSpace} ') + MbOrTB(TotalMb); FreeSpaceLabel.Caption := ExpandConstant('{cm:FreeSpace} ') + MbOrTB(FreeMb) + ' (' + IntToStr((FreeMb*100) div TotalMB) + ' %)'; if WizardForm.CurPageID = wpSelectDir then begin if FreeMB>={#TNeedSize} then begin i:=GetElementIndex(ADisk,FreeSpaceLabel); if i<>-1 then begin DeleteLabelFromArray(ADisk,i); FreeSpaceLabel.Font.Color:=$FFFFFF; if GetArrayLength(ADisk)=0 then KillTimer(WizardForm.Handle,WFDiskTimerID); end; end else AddLabelToArray(ADisk,FreeSpaceLabel); if TotalMb>={#TNeedSize} then begin i:=GetElementIndex(ADisk,TotalSpaceLabel); if i<>-1 then begin DeleteLabelFromArray(ADisk,i); TotalSpaceLabel.Font.Color:=$FFFFFF; if GetArrayLength(ADisk)=0 then KillTimer(WizardForm.Handle,WFDiskTimerID); end; end else AddLabelToArray(ADisk,TotalSpaceLabel); if GetArrayLength(ADisk)>0 then SetTimer(WizardForm.Handle,WFDiskTimerID,1000,WrapTimerProc(@DiskFlashing,4)); BtnSetEnabled(hNextBtn,not (GetArrayLength(ADisk)>0)); WizardForm.NextButton.Enabled:=not (GetArrayLength(ADisk)>0); end; end; end; function Install: Boolean; begin if MyError or (UnPackError <> 0) then Result:= True; end; function NoIcons: Boolean; begin Result:= BtnGetEnabled(hGroupBrowseBtn); end; function Desktop: Boolean; begin Result:= BtnGetChecked(DesktopCheck); end; function Redist: Boolean; begin Result:= BtnGetChecked(RedistCheck); end; function DirectX: Boolean; begin ProgressInfoLabel.Visible:=False; Result:= BtnGetChecked(DirectXCheck); end; function visualc: Boolean; begin ProgressInfoLabel.Visible:=False; Result:= BtnGetChecked(visualcCheck); end; function PhysX: Boolean; begin ProgressInfoLabel.Visible:=False; Result:= BtnGetChecked(PhysXCheck); end; procedure NoIconsClick(hBtn:HWND); var Check:boolean; begin sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001); Check:=BtnGetChecked(hBtn); BtnSetEnabled(hGroupBrowseBtn, not Check); GroupEditLabel.Enabled:=not Check; if Check then NoIconsLabel.Font.Color:=$00FFFF else NoIconsLabel.Font.Color:=$FFFFFF; end; procedure NoIconsLabelClick(Sender:TObject); begin BtnSetChecked(NoIconsCheck, not BtnGetChecked(NoIconsCheck)); NoIconsClick(NoIconsCheck); end; procedure DesktopClick(hBtn:HWND); begin sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001); if BtnGetChecked(hBtn) then DesktopLabel.Font.Color:=$00FFFF else DesktopLabel.Font.Color:=$FFFFFF; end; procedure DesktopLabelClick(Sender:TObject); begin BtnSetChecked(DesktopCheck, not BtnGetChecked(DesktopCheck)); DesktopClick(DesktopCheck); end; procedure RedistClick(hBtn:HWND); begin if BtnGetChecked(RedistCheck) then BtnSetChecked(DirectXCheck, True) else BtnSetChecked(DirectXCheck, False); if BtnGetChecked(RedistCheck) then BtnSetChecked(visualcCheck, True) else BtnSetChecked(visualcCheck, False); if BtnGetChecked(RedistCheck) then BtnSetChecked(PhysXCheck, True) else BtnSetChecked(PhysXCheck, False); if BtnGetChecked(RedistCheck) then DirectXLabel.Font.Color:=$00FFFF else DirectXLabel.Font.Color:=$FFFFFF; if BtnGetChecked(RedistCheck) then visualcLabel.Font.Color:=$00FFFF else visualcLabel.Font.Color:=$FFFFFF; if BtnGetChecked(RedistCheck) then PhysXLabel.Font.Color:=$00FFFF else PhysXLabel.Font.Color:=$FFFFFF; sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001); if BtnGetChecked(hBtn) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF; end; procedure RedistLabelClick(Sender:TObject); begin BtnSetChecked(RedistCheck, not BtnGetChecked(RedistCheck)); RedistClick(RedistCheck); end; procedure DirectXClick(hBtn:HWND); begin if BtnGetChecked(DirectXCheck) or BtnGetChecked(visualcCheck) or BtnGetChecked(PhysXCheck) then BtnSetChecked(RedistCheck, True) else BtnSetChecked(RedistCheck, False); if BtnGetChecked(DirectXCheck) or BtnGetChecked(visualcCheck) or BtnGetChecked(PhysXCheck) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF; sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001); if BtnGetChecked(hBtn) then DirectXLabel.Font.Color:=$00FFFF else DirectXLabel.Font.Color:=$FFFFFF; end; procedure DirectXLabelClick(Sender:TObject); begin BtnSetChecked(DirectXCheck, not BtnGetChecked(DirectXCheck)); DirectXClick(DirectXCheck); end; procedure DirectXProgress; begin StatusLabel.Caption:=ExpandConstant('{cm:DirectX}'); FilenameLabel.Caption:=ExpandConstant('{cm:DirectXInstall}'); ImgSetVisibility(PBImg,False); ImgSetVisibility(PBBkgImg,False); ImgSetVisibility(PB2Img,False); ImgSetVisibility(PBBkg1Img,False); ImgApplyChanges(WizardForm.Handle); ProgressInfoLabel2.Hide; InitProgressBar(WizardForm.Handle, 41, 130, 413, 20, 210, $82FE7A, $282828); end; procedure visualcClick(hBtn:HWND); begin if BtnGetChecked(visualcCheck) or BtnGetChecked(DirectXCheck) or BtnGetChecked(PhysXCheck) then BtnSetChecked(RedistCheck, True) else BtnSetChecked(RedistCheck, False); if BtnGetChecked(visualcCheck) or BtnGetChecked(DirectXCheck) or BtnGetChecked(PhysXCheck) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF; sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001); if BtnGetChecked(hBtn) then visualcLabel.Font.Color:=$00FFFF else visualcLabel.Font.Color:=$FFFFFF; end; procedure visualcLabelClick(Sender:TObject); begin BtnSetChecked(visualcCheck, not BtnGetChecked(visualcCheck)); visualcClick(visualcCheck); end; procedure visualcProgress; begin StatusLabel.Caption:=ExpandConstant('{cm:visualc}'); FilenameLabel.Caption:=ExpandConstant('{cm:visualcInstall}'); ImgSetVisibility(PBImg,False); ImgSetVisibility(PBBkgImg,False); ImgSetVisibility(PB2Img,False); ImgSetVisibility(PBBkg1Img,False); ProgressInfoLabel2.Hide; ImgApplyChanges(WizardForm.Handle); DeinitProgressBar; InitProgressBar(WizardForm.Handle, 41, 130, 413, 20, 70, $82FE7A, $282828); end; procedure PhysXClick(hBtn:HWND); begin if BtnGetChecked(PhysXCheck) or BtnGetChecked(DirectXCheck) or BtnGetChecked(visualcCheck) then BtnSetChecked(RedistCheck, True) else BtnSetChecked(RedistCheck, False); if BtnGetChecked(PhysXCheck) or BtnGetChecked(DirectXCheck) or BtnGetChecked(visualcCheck) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF; sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001); if BtnGetChecked(hBtn) then PhysXLabel.Font.Color:=$00FFFF else PhysXLabel.Font.Color:=$FFFFFF; end; procedure PhysXLabelClick(Sender:TObject); begin BtnSetChecked(PhysXCheck, not BtnGetChecked(PhysXCheck)); PhysXClick(PhysXCheck); end; procedure PhysXProgress; begin StatusLabel.Caption:=ExpandConstant('{cm:PhysX}'); FilenameLabel.Caption:=ExpandConstant('{cm:PhysXInstall}'); ImgSetVisibility(PBImg,False); ImgSetVisibility(PBBkgImg,False); ImgSetVisibility(PB2Img,False); ImgSetVisibility(PBBkg1Img,False); ImgApplyChanges(WizardForm.Handle); ProgressInfoLabel2.Hide; DeinitProgressBar; InitProgressBar(WizardForm.Handle, 41, 130, 413, 20, 30, $82FE7A, $282828); end; procedure CreatePageComponents; var Pdm : string; vr,VidRam : Longint; Version : TWindowsVersion; begin PageNameLabel:=TLabel.Create(WizardForm); with PageNameLabel do begin AutoSize:= False; WordWrap:= True; SetBounds(ScaleX(110), ScaleY(10), ScaleX(370), ScaleY(14)); Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold, fsItalic]; Parent:=WizardForm; end; PageDescriptionLabel:=TLabel.Create(WizardForm); with PageDescriptionLabel do begin AutoSize:= False; SetBounds(ScaleX(130), ScaleY(25), ScaleX(330), ScaleY(30)); Wordwrap:= True; Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Parent:=WizardForm; end; WelcomeLabel1:= TLabel.Create(WizardForm); with WelcomeLabel1 do begin AutoSize:=False SetBounds(ScaleX(75), ScaleY(50), ScaleX(350), ScaleY(65)); WordWrap:=True Alignment := taCenter; Transparent:=True Font.Name:='Georgia'; Font.Size:= 13; Font.Color:=$FFFFFF; Font.Style:=[fsBold] Caption:= ExpandConstant('{cm:Welcome1}')+#13#10+('{#MyAppName}'); Parent:=WizardForm; end; WelcomeLabel2:=TLabel.Create(WizardForm); with WelcomeLabel2 do begin AutoSize:=False SetBounds(ScaleX(25), ScaleY(130), ScaleX(450), ScaleY(200)); WordWrap:=True Alignment := taCenter; Transparent:=True Font.Name:='Georgia'; Font.Size:= 10; Font.Color:=$FFFFFF; Font.Style := [fsBold, fsItalic]; Caption:= ExpandConstant('{cm:Welcome2}'); Parent:=WizardForm; end; SystemPage:=CreateCustomPage(wpLicense, ExpandConstant('{cm:Requirements1}'), ExpandConstant('{cm:Requirements2}')); RequirementsLbl := TLabel.Create(WizardForm); with RequirementsLbl do begin AutoSize:=False; SetBounds(ScaleX(-50), ScaleY(75), ScaleX(605), ScaleY(50)); Alignment:= taCenter; Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=clLime; Font.Style:=[fsBold, fsItalic]; Caption := ExpandConstant('{cm:Requirements3}'); Parent:=WizardForm; end; NextLbl := TLabel.Create(WizardForm); with NextLbl do begin AutoSize:=False; SetBounds(ScaleX(-50), ScaleY(280), ScaleX(605), ScaleY(50)); Alignment:= taCenter; Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$ffffff; Font.Style:=[fsBold, fsItalic]; Caption := ExpandConstant('{cm:NextLbl}'); Parent:=WizardForm; end; ProcessorLbl := TLabel.Create(WizardForm); with ProcessorLbl do begin AutoSize:=False; SetBounds(ScaleX(15), ScaleY(113), ScaleX(150), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=$ffffff; Font.Style:=[fsBold]; Caption := ExpandConstant('{cm:Processor}'); Parent := WizardForm; end; ProcessorNameLbl := TLabel.Create(WizardForm); with ProcessorNameLbl do begin AutoSize:=False; SetBounds(ScaleX(150), ScaleY(113), ScaleX(350), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=clLime; Font.Style:=[fsBold]; Caption := DelSP(GetProcessorName) + ' @' + IntToStr(GetProcessorFreq) + ' MHz'; Parent := WizardForm; end; RegGetSubkeyNames(HKLM, 'Hardware\Description\System\CentralProcessor', Keys) if (GetProcessorFreq*GetArrayLength(Keys)) < {#Processor} then begin RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}'); RequirementsLbl.Font.Color := clRed; AddLabelToArray(AsysReq,ProcessorNameLbl); end; VideoCardLbl := TLabel.Create(WizardForm); with VideoCardLbl do begin AutoSize:=False; SetBounds(ScaleX(15), ScaleY(144), ScaleX(150), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption := ExpandConstant('{cm:VideoCard}'); Parent := WizardForm; end; VideoCardNameLbl := TLabel.Create(WizardForm); with VideoCardNameLbl do begin AutoSize:=False; SetBounds(ScaleX(150), ScaleY(144), ScaleX(350), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=clLime; Font.Style:=[fsBold]; Caption := GetVideoCardName; Parent := WizardForm; end; Pdm:=' ['+IntToStr(GetPdmWidth)+'x'+IntToStr(GetPdmHeight)+']'; VidRam:=GetVidMemLocal/1000000; if (VidRam<63) or (VidRam>1100) then vr:=VidRam else if VidRam<100 then vr:=64 else if VidRam<200 then vr:=128 else if VidRam<300 then vr:=256 else if VidRam<400 then vr:=384 else if VidRam<600 then vr:=512 else if VidRam<800 then vr:=792 else if VidRam>800 then vr:=1024; if VidRam=0 then VideoCardNameLbl.Caption:=ExpandConstant('{cm:DeviceDriver}') else VideoCardNameLbl.Caption:=DelSp(VideoCardNameLbl.Caption)+' ~'+IntToStr(vr)+' MB'+Pdm; if vr<{#VideoCard} then begin RequirementsLbl.Caption:=ExpandConstant('{cm:Requirements4}'); RequirementsLbl.Font.Color := clRed; AddLabelToArray(ASysReq,VideoCardNameLbl); end; SoundCardLbl := TLabel.Create(WizardForm); with SoundCardLbl do begin AutoSize:=False; SetBounds(ScaleX(15), ScaleY(175), ScaleX(150), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption := ExpandConstant('{cm:SoundCard}'); Parent := WizardForm; end; SoundCardNameLbl := TLabel.Create(WizardForm); with SoundCardNameLbl do begin AutoSize:=False; SetBounds(ScaleX(150), ScaleY(175), ScaleX(350), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=clLime; Font.Style:=[fsBold]; Caption := GetSoundCardName; Parent := WizardForm; end; if GetSoundCards = 0 then begin RequirementsLbl.Caption:= ExpandConstant('{cm:Requirements4}'); RequirementsLbl.Font.Color := clRed; SoundCardNameLbl.Caption:= ExpandConstant('{cm:DeviceDriver}'); AddLabelToArray(ASysReq,SoundCardNameLbl); end; RAMLbl := TLabel.Create(WizardForm); with RAMLbl do begin AutoSize:=False; SetBounds(ScaleX(15), ScaleY(206), ScaleX(150), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption := ExpandConstant('{cm:RAM}'); Parent := WizardForm; end; RAMTotalLbl := TLabel.Create(WizardForm); with RAMTotalLbl do begin AutoSize:=False; SetBounds(ScaleX(150), ScaleY(206), ScaleX(350), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=clLime; Font.Style:=[fsBold]; Caption := IntToStr(GetSystemPhys + 1) + ' MB'; Parent := WizardForm; end; if (GetSystemPhys+1)<{#RAM} then begin RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}'); RequirementsLbl.Font.Color := clRed; AddLabelToArray(ASysReq,RAMTotalLbl); end; SystemLbl := TLabel.Create(WizardForm); with SystemLbl do begin AutoSize:=False; SetBounds(ScaleX(15), ScaleY(237), ScaleX(150), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption := ExpandConstant('{cm:OperationSystem}'); Parent := WizardForm; end; SystemNameLbl := TLabel.Create(WizardForm); with SystemNameLbl do begin AutoSize:=False; SetBounds(ScaleX(150), ScaleY(237), ScaleX(350), ScaleY(22)); Transparent:=True; Font.Name:= 'Arial'; Font.Size:= 8; Font.Color:=clLime; Font.Style:=[fsBold]; Caption := GetWindowsName; Parent := WizardForm; end; GetWindowsVersionEx(Version); if not Version.NTPlatform or (Version.NTPlatform and (Version.Major<{#WinVerMajor})) or (Version.NTPlatform and (Version.Major={#WinVerMajor}) and (Version.Minor<{#WinVerMinor})) or (Version.NTPlatform and (Version.Major={#WinVerMajor}) and (Version.Minor={#WinVerMinor}) and (Version.ServicePackMajor<{#ServicePack})) then begin RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}'); RequirementsLbl.Font.Color := clRed; AddLabelToArray(ASysReq,SystemNameLbl); end; SelectDirLabel := TLabel.Create(WizardForm); with SelectDirLabel do begin AutoSize:=False; SetBounds(ScaleX(85), ScaleY(85), ScaleX(400), ScaleY(50)); WordWrap:= True; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption:= WizardForm.SelectDirLabel.Caption; Parent := WizardForm; end; SelectDirBrowseLabel := TLabel.Create(WizardForm); with SelectDirBrowseLabel do begin AutoSize:=False; SetBounds(ScaleX(40), ScaleY(120), ScaleX(400), ScaleY(50)); WordWrap:= True; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption:= WizardForm.SelectDirBrowseLabel.Caption; Parent := WizardForm; end; DirEditLabel := TLabel.Create(WizardForm); with DirEditLabel do begin AutoSize:=False; SetBounds(ScaleX(50), ScaleY(160), ScaleX(446), ScaleY(15)); WordWrap:= True; ShowAccelChar := False; Transparent:=True; Font.Name:= 'Arial' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width); Parent := WizardForm; end; TotalSpaceLabel := TLabel.Create(WizardForm); with TotalSpaceLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(210), ScaleX(446), ScaleY(17)); Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Parent := WizardForm; end; FreeSpaceLabel := TLabel.Create(WizardForm); with FreeSpaceLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(230), ScaleX(500), ScaleY(17)); Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Parent := WizardForm; end; NeedSpaceLabel := TLabel.Create(WizardForm); with NeedSpaceLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(250), ScaleX(500), ScaleY(17)); Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:NeedSpace} ') + MbOrTB({#NeedSize}); Parent := WizardForm; end; NeedSpaceTLabel := TLabel.Create(WizardForm); with NeedSpaceTLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(270), ScaleX(500), ScaleY(17)); Transparent:=True; Font.Name:= 'Georgia'; Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:TNeedSpace} ') + MbOrTB({#TNeedSize}); Parent := WizardForm; end; SelectStartMenuFolderLabel := TLabel.Create(WizardForm); with SelectStartMenuFolderLabel do begin AutoSize:=False; SetBounds(ScaleX(85), ScaleY(85), ScaleX(400), ScaleY(50)); WordWrap:= True; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption:= WizardForm.SelectStartMenuFolderLabel.Caption; Parent := WizardForm; end; SelectStartMenuFolderBrowseLabel := TLabel.Create(WizardForm); with SelectStartMenuFolderBrowseLabel do begin AutoSize:=False; SetBounds(ScaleX(40), ScaleY(120), ScaleX(400), ScaleY(50)); WordWrap:= True; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption:= WizardForm.SelectStartMenuFolderBrowseLabel.Caption; Parent := WizardForm; end; GroupEditLabel := TLabel.Create(WizardForm); with GroupEditLabel do begin AutoSize:=False; SetBounds(ScaleX(50), ScaleY(160), ScaleX(446), ScaleY(15)); WordWrap:= True; ShowAccelChar := False; Transparent:=True; Font.Name:= 'Arial' Font.Size:= 9; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width); Parent := WizardForm; end; NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(40),ScaleY(280),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True); BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1)); BtnSetEvent(NoIconsCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649)); NoIconsLabel := TLabel.Create(WizardForm); with NoIconsLabel do begin AutoSize:=False; SetBounds(ScaleX(75), ScaleY(285), ScaleX(275), ScaleY(17)); OnClick:= @NoIconsLabelClick; Cursor:= CrHand; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := WizardForm.NoIconsCheck.Caption; Parent := WizardForm; end; WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption; WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text; WizardForm.GroupEdit.OnChange := @GroupChange; #ifdef Components ComponentsList := TLabel.Create(WizardForm); with ComponentsList do begin WizardForm.ComponentsList.Left:= ScaleX(50) WizardForm.ComponentsList.Top:= ScaleY(150); WizardForm.ComponentsList.Width:= ScaleX(400) WizardForm.ComponentsList.Height:= ScaleY(120) WizardForm.ComponentsList.Color:= $272727; WizardForm.ComponentsList.Font.Color:= ClWhite; WizardForm.ComponentsList.Font.Style:= [fsBold]; WizardForm.ComponentsList.Font.Size:= 8; WizardForm.ComponentsList.Font.Name:= 'Arial' WizardForm.ComponentsList.Parent:= WizardForm; WizardForm.SelectComponentsPage; end; SelectComponentsLabel := TLabel.Create(WizardForm); with SelectComponentsLabel do begin AutoSize:=False; SetBounds(ScaleX(50), ScaleY(75), ScaleX(400), ScaleY(70)); WordWrap:= True; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption:= ExpandConstant('{cm:SelectComponentsLabel}'); Parent := WizardForm; end; #endif SelectTasksPage := CreateCustomPage(wpSelectProgramGroup, ExpandConstant('{cm:TasksName}'), ExpandConstant('{cm:TasksDescription}')); SelectTasksLabel := TLabel.Create(WizardForm); with SelectTasksLabel do begin AutoSize:=False; SetBounds(ScaleX(40), ScaleY(75), ScaleX(440), ScaleY(50)); WordWrap:= True; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption:= ExpandConstant('{cm:SelectTasksLabel}'); Parent := WizardForm; end; DesktopCheck:=BtnCreate(WizardForm.Handle,ScaleX(40),ScaleY(110),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True); BtnSetEvent(DesktopCheck,BtnClickEventID,WrapBtnCallback(@DesktopClick,1)); BtnSetEvent(DesktopCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(DesktopCheck,GetSysCursorHandle(32649)); BtnSetChecked(DesktopCheck,True); DesktopLabel := TLabel.Create(WizardForm); with DesktopLabel do begin AutoSize:=False; SetBounds(ScaleX(75), ScaleY(116), ScaleX(265), ScaleY(17)); OnClick:= @DesktopLabelClick; Cursor:= CrHand; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$00FFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:Desktop}'); Parent := WizardForm; end; RedistCheck:=BtnCreate(WizardForm.Handle,ScaleX(40),ScaleY(135),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True); BtnSetEvent(RedistCheck,BtnClickEventID,WrapBtnCallback(@RedistClick,1)); BtnSetEvent(RedistCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(RedistCheck,GetSysCursorHandle(32649)); BtnSetChecked(RedistCheck, False); RedistLabel := TLabel.Create(WizardForm); with RedistLabel do begin AutoSize:=False; SetBounds(ScaleX(75), ScaleY(141), ScaleX(265), ScaleY(17)); OnClick:= @RedistLabelClick; Cursor:= CrHand; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:Redist}'); Parent := WizardForm; end; DirectXCheck:=BtnCreate(WizardForm.Handle,ScaleX(70),ScaleY(160),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True); BtnSetEvent(DirectXCheck,BtnClickEventID,WrapBtnCallback(@DirectXClick,1)); BtnSetEvent(DirectXCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(DirectXCheck,GetSysCursorHandle(32649)); BtnSetChecked(DirectXCheck, False); DirectXLabel := TLabel.Create(WizardForm); with DirectXLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(166), ScaleX(195), ScaleY(17)); OnClick:= @DirectXLabelClick; Cursor:= CrHand; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:DirectX}'); Parent := WizardForm; end; VisualCCheck:=BtnCreate(WizardForm.Handle,ScaleX(70),ScaleY(185),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True); BtnSetEvent(VisualCCheck,BtnClickEventID,WrapBtnCallback(@VisualCClick,1)); BtnSetEvent(VisualCCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(VisualCCheck,GetSysCursorHandle(32649)); BtnSetChecked(VisualCCheck, False); VisualCLabel := TLabel.Create(WizardForm); with VisualCLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(191), ScaleX(195), ScaleY(17)); OnClick:= @VisualCLabelClick; Cursor:= CrHand; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:VisualC}'); Parent := WizardForm; end; PhysXCheck:=BtnCreate(WizardForm.Handle,ScaleX(70),ScaleY(210),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True); BtnSetEvent(PhysXCheck,BtnClickEventID,WrapBtnCallback(@PhysXClick,1)); BtnSetEvent(PhysXCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1)); BtnSetCursor(PhysXCheck,GetSysCursorHandle(32649)); BtnSetChecked(PhysXCheck, False); PhysXLabel := TLabel.Create(WizardForm); with PhysXLabel do begin AutoSize:=False; SetBounds(ScaleX(100), ScaleY(216), ScaleX(195), ScaleY(17)); OnClick:= @PhysXLabelClick; Cursor:= CrHand; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Caption := ExpandConstant('{cm:PhysX}'); Parent := WizardForm; end; StatusLabel := TLabel.Create(WizardForm); with StatusLabel do begin AutoSize:=False; SetBounds(ScaleX(40), ScaleY(80), ScaleX(400), ScaleY(17)); Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsBold,fsItalic]; Parent := WizardForm; end; FilenameLabel := TLabel.Create(WizardForm); with FilenameLabel do begin AutoSize:=False; SetBounds(ScaleX(40), ScaleY(100), ScaleX(417), ScaleY(17)); Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Parent := WizardForm; end; ProgressInfoLabel := TLabel.Create(WizardForm); with ProgressInfoLabel do begin AutoSize:=False; #ifdef ISDone SetBounds (420, 132, ScaleX(638), ScaleY(50)); #else SetBounds (-70, 165, ScaleX(638), ScaleY(50)); Alignment := taCenter; #endif Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Parent := WizardForm; end; ProgressInfoLabel2 := TLabel.Create(WizardForm); with ProgressInfoLabel2 do begin AutoSize:=False; #ifdef ISDone SetBounds (-70, 200, ScaleX(638), ScaleY(50)); #else SetBounds (-70, 190, ScaleX(638), ScaleY(50)); #endif Alignment := taCenter; Transparent:=True; Font.Name:= 'Georgia' Font.Size:= 8; Font.Color:=$FFFFFF; Font.Style:=[fsItalic]; Parent := WizardForm; end; FinishedHeadingLabel:= TLabel.Create(WizardForm); with FinishedHeadingLabel do begin AutoSize:=False SetBounds(ScaleX(75), ScaleY(60), ScaleX(350), ScaleY(65)); WordWrap:=True Alignment := taCenter; Transparent:=True Font.Name:='Georgia'; Font.Size:= 13; Font.Color:=$FFFFFF; Font.Style:=[fsBold] Caption:= ExpandConstant('{cm:FinishedHeading}'); Parent:=WizardForm; end; FinishedLabel:=TLabel.Create(WizardForm); with FinishedLabel do begin AutoSize:=False SetBounds(ScaleX(75), ScaleY(125), ScaleX(348), ScaleY(200)); WordWrap:=True Transparent:=True Font.Name:='Georgia'; Font.Size:= 10; Font.Color:=$FFFFFF; Font.Style := [fsBold, fsItalic]; Caption:= ExpandConstant('{cm:FinishedLabel}')+#13#13+ExpandConstant('{cm:FinishedLabel2}'); Parent:=WizardForm; end; end; function InitializeUninstall(): Boolean; begin FileCopy(ExpandConstant('{app}\isskin.dll'), ExpandConstant('{tmp}\isskin.dll'), False); FileCopy(ExpandConstant('{app}\Grey&Black.cjstyles'), ExpandConstant('{tmp}\Grey&Black.cjstyles'), False); FileCopy(ExpandConstant('{app}\InnoCallback.dll'), ExpandConstant('{tmp}\InnoCallback.dll'), False); LoadSkinUninst(ExpandConstant('{tmp}\Grey&Black.cjstyles'), ''); Result := True; end; procedure DeleteSavedGames(CurUninstallStep: TUninstallStep); begin if CurUninstallStep=usUninstall then if DirExists(ExpandConstant('{commondocs}')+'\-') then if MsgBox(ExpandConstant('{cm:DeleteSave}'), mbInformation, MB_YESNO) = idYes then DelTree(ExpandConstant('{commondocs}')+'\-', True, True, True); end; procedure HideComponents; begin WelcomeLabel1.Hide; WelcomeLabel2.Hide; SelectDirLabel.Hide; SelectDirBrowseLabel.Hide; DirEditLabel.Hide; TotalSpaceLabel.Hide; FreeSpaceLabel.Hide; NeedSpaceLabel.Hide; NeedSpaceTLabel.Hide; NoIconsLabel.Hide; SelectStartMenuFolderLabel.Hide; SelectStartMenuFolderBrowseLabel.Hide; GroupEditLabel.Hide; RequirementsLbl.Hide; NextLbl.Hide; ProcessorLbl.Hide; ProcessorNameLbl.Hide; VideoCardLbl.Hide; VideoCardNameLbl.Hide; SoundCardLbl.Hide; SoundCardNameLbl.Hide; RAMLbl.Hide; RAMTotalLbl.Hide; SystemLbl.Hide; SystemNameLbl.Hide; SelectTasksLabel.Hide; DesktopLabel.Hide; RedistLabel.Hide; DirectXLabel.Hide; VisualCLabel.Hide; PhysXLabel.Hide; StatusLabel.Hide; FilenameLabel.Hide; FinishedHeadingLabel.Hide; FinishedLabel.Hide; ProgressInfoLabel.Hide; ProgressInfoLabel2.Hide; #ifdef Components WizardForm.ComponentsList.Hide; SelectComponentsLabel.Hide; #endif #ifdef FreeArc LabelStatusRollback.Hide; LabelStatus.Hide; #endif #ifdef ISDone LabelStatusRollback.Hide; LabelStatus.Hide; LabelTime1.Hide; LabelTime2.Hide; LabelTime3.Hide; ImgSetVisibility(PBBkg1Img,False); ImgSetVisibility(PB2Img,False); #endif end; procedure ShowComponents(CurPageID: Integer); begin PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption if CurPageID > wpWelcome then if CurPageID < wpFinished then ImgSetVisibility(WizardSmallImage,True); if CurPageID > wpWelcome then if CurPageID < wpFinished then ImgSetVisibility(Line,True); if CurPageID > wpWelcome then if CurPageID < wpFinished then BtnSetVisibility(MusicButton,True); case CurPageID of wpWelcome: begin ImgSetVisibility(WizardImg,True); ImgSetVisibility(Workspace,True); WelcomeLabel1.Show WelcomeLabel2.Show end; SystemPage.ID: begin ImgSetVisibility(RequirementsPanel,True); RequirementsLbl.Show; NextLbl.Show; ProcessorLbl.Show; ProcessorNameLbl.Show; VideoCardLbl.Show; VideoCardNameLbl.Show; SoundCardLbl.Show; SoundCardNameLbl.Show; RAMLbl.Show; RAMTotalLbl.Show; SystemLbl.Show; SystemNameLbl.Show; BtnSetVisibility(MusicButton,True); ImgSetVisibility(WizardSmallImage,True); ImgSetVisibility(Line,True); end; wpSelectDir: begin ImgSetVisibility(Edit,True); ImgSetVisibility(DirFolder,True); ImgSetVisibility(HardDrivePanel,True) ImgSetPosition(HardDrivePanel, 90, 203, 280, 90); ImgSetVisibility(HDD,True); SelectDirLabel.Show SelectDirBrowseLabel.Show DirEditLabel.Show; TotalSpaceLabel.Show; FreeSpaceLabel.Show; NeedSpaceLabel.Show; NeedSpaceTLabel.Show; BtnSetVisibility(hDirBrowseBtn,True); end; #ifdef Components wpSelectComponents: begin WizardForm.ComponentsList.Show; ImgSetVisibility(HardDrivePanel,True); ImgSetPosition(HardDrivePanel, 49, 149, 402, 122); SelectComponentsLabel.Show; end; #endif wpSelectProgramGroup: begin ImgSetVisibility(GroupFolder,True); ImgSetVisibility(Edit,True); BtnSetVisibility(hGroupBrowseBtn,True); BtnSetVisibility(NoIconsCheck,True); SelectStartMenuFolderLabel.Show; SelectStartMenuFolderBrowseLabel.Show; WizardForm.GroupBrowseButton.Show; GroupEditLabel.Show; NoIconsLabel.Show; end; SelectTasksPage.ID: begin BtnSetVisibility(DesktopCheck,True); BtnSetVisibility(RedistCheck,True); BtnSetVisibility(DirectXCheck,True); BtnSetVisibility(VisualCCheck,True); BtnSetVisibility(PhysXCheck,True); SelectTasksLabel.Show; DesktopLabel.Show; RedistLabel.Show; DirectXLabel.Show; VisualCLabel.Show; PhysXLabel.Show; BtnSetVisibility(MusicButton,True); ImgSetVisibility(WizardSmallImage,True); ImgSetVisibility(Line,True); WizardForm.NextButton.Caption:=SetupMessage(msgButtonInstall); end; wpInstalling: begin StatusLabel.Show; FilenameLabel.Show; ProgressInfoLabel.Show; ProgressInfoLabel2.Show; #ifdef ISDone LabelTime1.Show; LabelTime2.Show; #endif end; wpFinished: begin ImgSetVisibility(WizardFinishImage,True); ImgSetVisibility(Workspace,True); FinishedHeadingLabel.Show; FinishedLabel.Show; #ifdef ISDone LabelTime3.Show; #endif end; end; end; procedure AllCancel; begin SetWindowLong(WizardForm.ProgressGauge.Handle, -4, PBOldProc); ImgSetVisibility(PBImg,False); ImgSetVisibility(PBBkgImg,False); ImgApplyChanges(WizardForm.Handle); end; procedure CurStepChanged(CurStep: TSetupStep); begin #ifdef FreeArc UnpackingArc(CurStep); #endif #ifdef ISDone UnpackingISDone(CurStep); #endif case CurStep of ssInstall: begin if GetArrayLength(ADisk)>0 then begin KillTimer(WizardForm.Handle,WFDiskTimerID); SetArrayLength(ADisk,0); end; if GetArrayLength(ASysReq)>0 then begin KillTimer(WizardForm.Handle,WFSysReqTimerID); SetArrayLength(ASysReq,0); end; #ifdef ISDone if MyError or (Cancel <> 0) then begin WizardForm.StatusLabel.Hide; LabelStatusRollback.Show; FilenameLabel.Hide; LabelPct.Hide; #ifdef SecondProgressBar Label2Pct.Hide; #endif ProgressInfoLabel.Hide; ProgressInfoLabel2.Hide; LabelCurrFileName.Hide; LabelStatus.Hide; PageNameLabel.Hide; PageDescriptionLabel.Hide; LabelTime1.Hide; LabelTime2.Hide; LabelTime3.Hide; BtnSetEnabled(CancelUnpackingBtn, False); BtnSetEnabled(hCancelBtn, False); SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc); ImgSetVisibility(PBImg,False); ImgSetVisibility(PB1Img,False); ImgSetVisibility(PB2Img,False); ImgSetVisibility(PBBkgImg,False); ImgSetVisibility(PBBkg1Img,False); ImgApplyChanges(WizardForm.Handle); end; #endif #ifdef FreeArc if (UnPackError <> 0) then begin WizardForm.StatusLabel.Hide; LabelStatusRollback.Show; FilenameLabel.Hide; LabelStatus.Hide; ProgressInfoLabel.Hide; ProgressInfoLabel2.Hide; PageNameLabel.Hide; PageDescriptionLabel.Hide; BtnSetEnabled(CancelUnpackingBtn, False); BtnSetEnabled(hCancelBtn, False); SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc); ImgSetVisibility(PBImg,False); ImgSetVisibility(PB1Img,False); ImgSetVisibility(PBBkgImg,False); ImgApplyChanges(WizardForm.Handle); end; #endif WizardForm.ProgressGauge.Visible:=False; #ifndef ISDone #ifndef FreeArc PBBkgImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressBackground.png'),41,130,413,20,True,True); PBImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),43,132,0,16,True,True); ImgApplyChanges(WizardForm.Handle); PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,WndProcCallBack(@PBProc,4)); #endif #endif sTime:=GetTickCount; eTime:=sTime; end; ssPostInstall: AllCancel; end; end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin DeleteSavedGames(CurUninstallStep); end; procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean); begin if CurPageID=wpInstalling then begin Confirm:=False; Cancel:=ExitSetupMsgBox; if Cancel then begin AllCancel; StatusLabel.Caption:=SetupMessage(msgStatusRollback); FilenameLabel.Hide; ProgressInfoLabel.Hide; ProgressInfoLabel2.Hide; PageNameLabel.Hide; PageDescriptionLabel.Hide; WizardForm.CancelButton.Enabled:=False; end; end; end; procedure LogoLabelOnClick(Sender: TObject); var ErrorCode: Integer; begin ShellExec('open', 'http://hurtom.com/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode) end; procedure LogoCreate; begin LogoPanel := TPanel.Create(WizardForm); with LogoPanel do begin Parent := WizardForm; Left := ScaleX(0); Top := ScaleY(315); Width := ScaleX(190); Height := ScaleY(50); BevelOuter := bvNone; LogoImage := TBitmapImage.Create(WizardForm); with LogoImage do begin Parent := LogoPanel; Left := ScaleX(0); Top := ScaleY(0); AutoSize:=true; ReplaceColor:=clFuchsia; ReplaceWithColor:=clBtnFace; ExtractTemporaryFile('logo.bmp'); Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp')); LogoLabel := TLabel.Create(WizardForm); with LogoLabel do begin Parent := LogoPanel; Width := LogoPanel.Width; Height := LogoPanel.Height; Transparent:=True; Cursor := crHand; OnClick:=@LogoLabelOnClick; end; end; end end; procedure InitializeWizard2; begin InsertMusic; CreateWizardImage; ButtonsTextures; CreatePageComponents; LogoCreate; #ifdef FreeArc CreateArcComponents; #endif #ifdef ISDone CreateISDoneComponents; #endif end; procedure CurPageChanged(CurPageID: Integer); begin SetStateNewButtons; HideComponents; BtnSetVisibility(MusicButton,False); BtnSetVisibility(hDirBrowseBtn,False); BtnSetVisibility(hGroupBrowseBtn,False); ImgSetVisibility(WizardImg,False); ImgSetVisibility(Workspace,False); ImgSetVisibility(WizardSmallImage,False); ImgSetVisibility(Line,False); ImgSetVisibility(WizardFinishImage,False); ImgSetVisibility(Edit,False); ImgSetVisibility(DirFolder,False); ImgSetVisibility(GroupFolder,False); ImgSetVisibility(HardDrivePanel,False); ImgSetVisibility(HDD,False); ImgSetVisibility(PBImg,False); ImgSetVisibility(PBBkgImg,False); BtnSetVisibility(NoIconsCheck,False); ImgSetVisibility(RequirementsPanel,False); BtnSetVisibility(DesktopCheck,False); BtnSetVisibility(RedistCheck,False); BtnSetVisibility(DirectXCheck,False); BtnSetVisibility(VisualCCheck,False); BtnSetVisibility(PhysXCheck,False); ShowComponents(CurPageID); #ifdef FreeArc UnpackingArcFinished(CurPageID); #endif #ifdef ISDone UnpackingISDoneFinished(CurPageID); #endif ImgApplyChanges(WizardForm.Handle); if GetArrayLength(ASysReq)>0 then if CurPageID=SystemPage.ID then SetTimer(WizardForm.Handle,WFSysReqTimerID,1000,WrapTimerProc(@SysReqFlashing,4)) else KillTimer(WizardForm.Handle,WFSysReqTimerID); if CurPageID=wpSelectDir then begin OldDisk:=''; GetFreeSpaceCaption(nil); end else if GetArrayLength(ADisk)>0 then KillTimer(WizardForm.Handle,WFDiskTimerID); if CurPageID=wpFinished then begin #ifdef FreeArc BtnSetVisibility(CancelUnpackingBtn, False); #endif DeinitProgressBar; end; end; procedure DeInitializeSetup(); begin gdipShutdown; ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0); UnloadSkin; BASS_Stop; BASS_Free; end; procedure DeinitializeUninstall(); begin UnloadSkinUninst(); end; [code] procedure InitializeWizard1(); begin WizardForm.Position:=poScreenCenter; end; [Code] procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); end; |