Автор: Gr0z
Дата сообщения: 03.08.2010 10:29
Alexander61434
Я пока не очень разобрался в коде, но где это?
[more]
Код: #define MyAppName "Left 4 Dead 2 + The Passing [v 2.0.3.1]"
#define AppName "Left 4 Dead 2 + The Passing"
;********** системные требования ************
;необходимое место на диске (МБ)
#define NeedSize = 8192;
;необходимое место для распаковки
#define TNeedSize = 10240;
;необходимая частота процессора (МГц)
#define Processor = 2300;
;необходимый объем оперативной памяти (МБ)
#define RAM = 1024;
;необходимый объем памяти видеокарты (МБ)
#define VideoCard = 512;
;минимальная версия винды - в примере WinXP SP2
#define WinVerMajor = 5;
#define WinVerMinor = 1;
#define ServicePack = 2;
; Только если используется модуль FreeArc. Для ISDone прописывать файлы в одноимённом модуле.
#define ArcLocation "{src}\*.bin"
#include "botva2.iss"
#include "PB.iss"
//#define FreeArc
#define ISDone
//#define records
//#define precomp04
//#define precomp038
//#define unrar
[Setup]
AppId={{DDA55E82-39A4-4692-999D-4B2A363241CE}
AppName={#AppName}
AppVerName={#MyAppName}
DefaultDirName={pf}\Left 4 Dead 2
DefaultGroupName=Left 4 Dead 2
DirExistsWarning=no
ShowLanguageDialog=auto
OutputBaseFilename=setup
SetupIconFile=InstallFiles\left4dead2.ico
VersionInfoCopyright=Gr0z
InternalCompressLevel=ultra64
Compression=lzma/ultra64
ShowTasksTreeLines=true
SolidCompression=true
DisableReadyPage=True
DiskSpanning=true
DiskSliceSize=1063004405
SlicesPerDisk=3
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
[CustomMessages]
rus.DeleteSave=Удалить сохраненные игры и профили?
rus.Welcome1=Вас приветствует %nМастер установки игры
rus.Welcome2=Программа установит игру {#AppName} %nна Ваш компьютер.%nРекомендуется закрыть антивирусные пакеты, %nа также все прочие приложения перед тем, %nкак продолжить.%n%nНажмите «Далее», чтобы продолжить, или %n«Отмена», чтобы выйти из программы установки.
rus.TotalSpace=Размер жесткого диска:
rus.FreeSpace=Доступно места на диске:
rus.NeedSpace=Игра займет на диске:
rus.TNeedSpace=Для распаковки требуется:
;rus.DirectXInstall=Идет обновление DirectX...
rus.Requirements1=Проверка системных требований
rus.Requirements2=Программа установки обнаружила следующие необходимые компоненты
rus.Requirements3=Все компоненты удовлетворяют требованиям игры.
rus.Requirements4=Компоненты, выделенные красным, %nне удовлетворяют требованиям игры.
rus.DeviceDriver=Драйвер устройства не обнаружен
rus.Processor=Процессор
rus.VideoCard=Видеоакарта
rus.SoundCard=Звуковая карта
rus.RAM=Память (ОЗУ)
rus.OperationSystem=Cистема
rus.NextLbl=Нажмите «Далее», чтобы продолжить.
rus.TasksName=Выберите дополнительные задачи
rus.TasksDescription=Какие дополнительные задачи необходимо выполнить?
rus.DirectXInstall=Идет обновление DirectX... Пожалуйста, подождите.
rus.DirectX=Обновить DirectX
rus.CrackInstall=Идет установка Standalone Patch... Пожалуйста, подождите.
rus.Crack=Установить Standalone Patch (Crack)
rus.VisualCInstall=Идет установка Microsoft VisualC++... Пожалуйста, подождите.
rus.VisualC=Установить Microsoft VisualC++
rus.Desktop=Создать ярлык на Рабочем столе
rus.SelectTasksLabel=Выберите дополнительные задачи, которые должны выполниться %nпри установке Left 4 Dead 2, после этого нажмите «Установить».
rus.Redist=Дополнительные задачи:
rus.FinishedHeading=Установка игры {#AppName} успешно завершена.
rus.FinishedLabel=Игра {#MyAppName} была успешно установлена на Ваш компьютер. Для ее запуска выберите соответствующий ярлык в меню «Пуск» или на Рабочем столе.
rus.FinishedLabel2=Нажмите «Завершить», чтобы выйти из программы установки.
rus.AllProgress=Прогресс распаковки файлов:
rus.Remains=%nОсталось ждать:
rus.Hour=час
rus.Min=мин
rus.Sec=сек
[Files]
Source: InstallFiles\*; Flags: dontcopy;
Source: InstallFiles\left4dead2.ico; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\ISSkin.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\botva2.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\InnoCallback.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
Source: InstallFiles\Grey&Black.cjstyles; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
[Run]
Filename: {src}\Redist\DirectX\DXSETUP.exe; WorkingDir: {src}\Redist\DirectX\; Flags: waituntilterminated; Check: DirectX and not InstallRedist; BeforeInstall: DirectXProgress;
Filename: {src}\Crack\L4D2SP_T2.4.exe; WorkingDir: {src}\Crack\; Flags: waituntilterminated; Check: Crack and not InstallRedist; BeforeInstall: CrackProgress;
Filename: {src}\Redist\VisualC++\vcredist_x86.exe; WorkingDir: {src}\Redist\VisualC++\; Parameters: /q; Flags: waituntilterminated; Check: visualc and not IsWin64 and not InstallRedist; BeforeInstall: visualcProgress;
Filename: {src}\Redist\VisualC++\vcredist_x64.exe; WorkingDir: {src}\Redist\VisualC++\; Parameters: /q; Flags: waituntilterminated; Check: visualc and IsWin64 and not InstallRedist; BeforeInstall: visualcProgress;
[Icons]
Name: {userdesktop}\Left 4 Dead 2; Filename: {app}\left4dead2.exe; IconFilename: {app}\left4dead2.ico; WorkingDir: {app}; Check: Desktop;
Name: {userdesktop}\Left 4 Dead 2 Launcher; Filename: {app}\Left 4 Dead 2 Launcher.exe; IconFilename: {app}\left4dead2.ico; WorkingDir: {app}; Check: Desktop;
Name: {group}\{cm:UninstallProgram,Left 4 Dead 2}; Filename: {uninstallexe}; IconFilename: {app}\left4dead2.ico; Comment: Удалить игру; Check: NoIcons;
Name: {group}\Left 4 Dead 2; Filename: {app}\left4dead2.exe; IconFilename: {app}\left4dead2.ico; WorkingDir: {app}; Comment: Запустить игру; Check: NoIcons;
Name: {group}\Left 4 Dead 2 Launcher; Filename: {app}\Left 4 Dead 2 Launcher.exe; IconFilename: {app}\left4dead2.ico; WorkingDir: {app}; Comment: Запустить лаунчер; Check: NoIcons;
[UninstallDelete]
Type: filesandordirs; Name: {app};
[Code]
const
WFDiskTimerID = 1;
WFSysReqTimerID = 2;
ARTitleTimerID = 2;
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: 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, CrackCheck, NoIconsCheck, visualcCheck: HWND;
WelcomeLabel1, WelcomeLabel2, RequirementsLbl, ProcessorLbl, VideoCardLbl, SoundCardLbl, RAMLbl, SystemLbl, FinishedLabel,
ProcessorNameLbl, VideoCardNameLbl, SoundCardNameLbl, RAMTotalLbl, SystemNameLbl, NextLbl, FinishedHeadingLabel,
PageNameLabel,PageDescriptionLabel, WelcomeLabel1, WelcomeLabel2, SelectDirBrowseLabel, DirEditLabel, TotalSpaceLabel,
NeedSpaceLabel, FreeSpaceLabel, SelectTasksLabel, SelectStartMenuFolderBrowseLabel, GroupEditLabel, NoIconsLabel, SelectDirLabel,
NeedSpaceTLabel, SelectStartMenuFolderLabel, DesktopLabel, DirectXLabel, CrackLabel, visualcLabel, RedistLabel, LogoLabel: TLabel;
WFButtonFont, UPFButtonFont: TFont;
LogoPanel: TPanel;
LogoImage: TBitmapImage;
FreeMB, TotalMB: Cardinal;
ASysReq, ADisk: TALabel;
Keys: TArrayOfString;
#ifndef ISDone
Cancel: Integer;
#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 InitCircularProgressBar(hwnd:thandle; l,t,w,h,speed: integer;bgCol, actCol, inActCol, TransCol:TColor); external 'InitCircularProgressBar@files:IsProgressBar.dll stdcall';
procedure DeinitCircularProgressBar; external 'DeinitCircularProgressBar@files:IsProgressBar.dll stdcall';
//************************************************ [Начало - Вставка изображений] ***************************************************//
//================== Подключение модулей ==================//
#ifdef FreeArc
#include "FreeArc.iss"
#endif
#ifdef ISDone
#include "ISDone.iss"
#endif
//================== Подключение модулей ==================//
procedure CreateWizardImage;
var
i: integer;
begin
with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
Center;
Color:= $282828; // Общий цвет инсталлятора $282828 - серый
end;
ExtractTemporaryFile('Workspace.png');
ExtractTemporaryFile('WizardImg.png');
ExtractTemporaryFile('WizardSmallImage.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('ProgressBackground.png');
ExtractTemporaryFile('ProgressBackground2.png');
ExtractTemporaryFile('ProgressImg.png');
WizardImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\WizardImg.png'),ScaleX(0), ScaleY(0),ScaleX(497),ScaleY(313),True,True);
WizardFinishImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\1.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}\WizardSmallImage.png'),ScaleX(20), ScaleY(0),ScaleX(73),ScaleY(55),True,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(40), ScaleY(70),ScaleX(30),ScaleY(40),True,True);
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\GroupFolder.png'),ScaleX(40), ScaleY(70),ScaleX(30),ScaleY(40),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;
//************************************************ [Конец - Текстуры кнопок] ***************************************************//
//******************************************* [Начало - Тема] ***************************************************//
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';
//******************************************* [Конец - Тема] ***************************************************//
//************************************************ [Начало - Компоненты страниц] ***************************************************//
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 InstallRedist: Boolean;
begin
if (Cancel <> 0) 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 Crack: Boolean;
begin
ProgressInfoLabel.Visible:=False;
Result:= BtnGetChecked(CrackCheck);
end;
function visualc: Boolean;
begin
ProgressInfoLabel.Visible:=False;
Result:= BtnGetChecked(visualcCheck);
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(CrackCheck, True) else BtnSetChecked(CrackCheck, 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 CrackLabel.Font.Color:=$00FFFF else CrackLabel.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) then BtnSetChecked(RedistCheck, True) else BtnSetChecked(RedistCheck, False);
if 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 DirectXLabel.Font.Color:=$00FFFF else DirectXLabel.Font.Color:=$FFFFFF;
end;
procedure CrackClick(hBtn:HWND);
begin
if BtnGetChecked(CrackCheck) or BtnGetChecked(DirectXCheck) then BtnSetChecked(RedistCheck, True) else BtnSetChecked(RedistCheck, False);
if BtnGetChecked(CrackCheck) or BtnGetChecked(DirectXCheck) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF;
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then CrackLabel.Font.Color:=$00FFFF else CrackLabel.Font.Color:=$FFFFFF;
end;
procedure DirectXLabelClick(Sender:TObject);
begin
BtnSetChecked(DirectXCheck, not BtnGetChecked(DirectXCheck));
DirectXClick(DirectXCheck);
end;
procedure CrackLabelClick(Sender:TObject);
begin
BtnSetChecked(CrackCheck, not BtnGetChecked(CrackCheck));
CrackClick(CrackCheck);
end;
procedure DirectXProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:DirectX}');
FilenameLabel.Caption:=ExpandConstant('{cm:DirectXInstall}');
InitCircularProgressBar(WizardForm.Handle, 220, 194, 70, 65, 100, clNone, clLime, clSilver, clNavy);
end;
procedure CrackProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:Crack}');
FilenameLabel.Caption:=ExpandConstant('{cm:CrackInstall}');
InitCircularProgressBar(WizardForm.Handle, 220, 194, 70, 65, 100, clNone, clLime, clSilver, clNavy);
end;
procedure visualcClick(hBtn:HWND);
begin
if BtnGetChecked(visualcCheck) or BtnGetChecked(DirectXCheck) or BtnGetChecked(CrackCheck) then BtnSetChecked(RedistCheck, True) else BtnSetChecked(RedistCheck, False);
if BtnGetChecked(visualcCheck) or BtnGetChecked(DirectXCheck) or BtnGetChecked(CrackCheck) 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}')
DeinitCircularProgressBar;
InitCircularProgressBar(WizardForm.Handle, 220, 194, 70, 65, 100, clNone, clLime, clSilver, clNavy);
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;
//************************************************ [Конец - Компоненты страниц] ***************************************************//
////////////////////// begin WelcomePage //////////////////////
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;
////////////////////// end WelcomePage //////////////////////
////////////////////// SystemPage //////////////////////
SystemPage:=CreateCustomPage(wpLicense, ExpandConstant('{cm:Requirements1}'), ExpandConstant('{cm:Requirements2}'));
RequirementsLbl := TLabel.Create(WizardForm);
with RequirementsLbl do begin
AutoSize:=False;
SetBounds(ScaleX(65), ScaleY(75), ScaleX(605), ScaleY(50));
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(100), ScaleY(280), ScaleX(605), ScaleY(50));
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;
//================= Конец - Операционная система =================//
////////////////////// SystemPage //////////////////////
////////////////////// begin SelectDirPage //////////////////////
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;
////////////////////// end SelectDirPage //////////////////////
////////////////////// begin SelectProgramGroupPage //////////////////////
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;
//end;
////////////////////// end SelectProgramGroupPage //////////////////////
////////////////////// begin SelectTasksPade //////////////////////
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(600), 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;
CrackCheck:=BtnCreate(WizardForm.Handle,ScaleX(70),ScaleY(210),ScaleX(25),ScaleY(25),ExpandConstant('{tmp}\CheckBox.png'),8,True);
BtnSetEvent(CrackCheck,BtnClickEventID,WrapBtnCallback(@CrackClick,1));
BtnSetEvent(CrackCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(CrackCheck,GetSysCursorHandle(32649));
BtnSetChecked(CrackCheck, False);
CrackLabel := TLabel.Create(WizardForm);
with CrackLabel do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(216), ScaleX(195), ScaleY(17));
OnClick:= @CrackLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsItalic];
Caption := ExpandConstant('{cm:Crack}');
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;
////////////////////// end SelectTasksPade //////////////////////
////////////////////// begin InstallingPage //////////////////////
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;
SetBounds(ScaleX(-70), ScaleY(170), ScaleX(638), ScaleY(50));
Alignment := taCenter;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsItalic];
Parent := WizardForm;
end;
////////////////////// end InstallingPage //////////////////////
////////////////////// begin FinishedPage //////////////////////
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;
////////////////////// end FinishedPage //////////////////////
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}')+'\White Gold') then
if MsgBox(ExpandConstant('{cm:DeleteSave}'), mbInformation, MB_YESNO) = idYes then
DelTree(ExpandConstant('{commondocs}')+'\White Gold', 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;
CrackLabel.Hide;
VisualCLabel.Hide;
StatusLabel.Hide;
FilenameLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
ProgressInfoLabel.Hide;
#ifdef FreeArc
LabelStatusRollback.Hide;
LabelStatus.Hide;
#endif
#ifdef ISDone
LabelStatusRollback.Hide;
LabelStatus.Hide;
#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);
ImgSetVisibility(HDD,True);
SelectDirLabel.Show
SelectDirBrowseLabel.Show
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
NeedSpaceLabel.Show;
NeedSpaceTLabel.Show;
BtnSetVisibility(hDirBrowseBtn,True);
end;
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(CrackCheck,True);
BtnSetVisibility(VisualCCheck,True);
SelectTasksLabel.Show;
DesktopLabel.Show;
RedistLabel.Show;
DirectXLabel.Show;
CrackLabel.Show;
VisualCLabel.Show;
BtnSetVisibility(MusicButton,True);
ImgSetVisibility(WizardSmallImage,True);
ImgSetVisibility(Line,True);
WizardForm.NextButton.Caption:=SetupMessage(msgButtonInstall);
end;
wpInstalling: begin
StatusLabel.Show;
FilenameLabel.Show;
ProgressInfoLabel.Show;
end;
wpFinished: begin
ImgSetVisibility(WizardFinishImage,True);
ImgSetVisibility(Workspace,True);
FinishedHeadingLabel.Show;
FinishedLabel.Show;
end;
end;
end;
//************************************************ [Конец - Компоненты страниц] ***************************************************//
//************************************************ [Начало - ПрогрессБары] ***************************************************//
procedure AllCancel;
begin
SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
ImgPBDelete(NewPB);
#ifdef ISDone
ImgPBDelete(ISDonePB);
#endif
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 = true or (Cancel <> 0) then
begin
WizardForm.StatusLabel.Hide;
LabelStatusRollback.Show;
FilenameLabel.Hide;
LabelPct.Hide;
ProgressInfoLabel.Hide;
LabelCurrFileName.Hide;
LabelStatus.Hide;
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
BtnSetEnabled(CancelUnpackingBtn, False);
BtnSetEnabled(hCancelBtn, False);
SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
ImgPBDelete(NewPB);
ImgPBDelete(ISDonePB);
ImgApplyChanges(WizardForm.Handle);
end;
#endif
#ifdef FreeArc
if (UnPackError <> 0) then
begin
WizardForm.StatusLabel.Hide;
LabelStatusRollback.Show;
FilenameLabel.Hide;
LabelStatus.Hide;
ProgressInfoLabel.Hide;
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
BtnSetEnabled(CancelUnpackingBtn, False);
BtnSetEnabled(hCancelBtn, False);
SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
ImgPBDelete(NewPB);
ImgApplyChanges(WizardForm.Handle);
end;
#endif
WizardForm.ProgressGauge.Visible:=False;
#ifndef ISDone
#ifndef FreeArc
//Прогрессбары создаются в скрипте
NewPB:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressImg.png'),41,130,WizardForm.ProgressGauge.Width,WizardForm.ProgressGauge.Height);
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4));
ImgApplyChanges(WizardForm.Handle);
#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;
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WizardForm.CancelButton.Enabled:=False;
end;
end;
end;
//************************************************ [Конец - ПрогрессБары] ***************************************************//
//******************************************* [ logo - Лого как ссылка внизу слева ] ***************************************************//
procedure LogoLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://torrents.vfose.ru', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;
procedure InitializeWizard;
begin
CreateWizardImage;
ButtonsTextures;
CreatePageComponents;
LogoPanel := TPanel.Create(WizardForm);
with LogoPanel do
begin
Parent := WizardForm;
Left := ScaleX(7);
Top := ScaleY(319);
Width := ScaleX(170);
Height := ScaleY(35);
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;
#ifdef FreeArc
CreateArcComponents;
#endif
#ifdef ISDone
CreateISDoneComponents;
#endif
end;
end;
end;
end;
//******************************************* [ конец logo - Лого как ссылка внизу слева ] ***************************************************//
procedure ReadEntries(); // читаем реестр
begin
RegQueryStringValue(HKCU, 'Software\Russobit\start\Xenus. White Gold', 'path', AppDir); // данные реестра
end;
function InitializeSetup: Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.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'), '');
Result := True;
unins:='unins000.exe'; // исполняемый файл деинсталляции
if (RegValueExists(HKCU, 'Software\Russobit\start\Xenus. White Gold', 'path')) then // если находим в реестре нужное значение
begin
ReadEntries;
if (FileExists(AddBackslash(AppDir) + unins)) then
begin
Exec(AddBackslash(AppDir) + unins, '', ExtractFilePath(AddBackslash(AppDir) + unins), SW_SHOW, ewNoWait, ResultCode);
end else begin
MsgBox('Невозможно запустить деинсталляцию' + ExpandConstant('{#MyAppName}') + ', т.к. исполняемый файл программы не найден.', mbCriticalError, MB_OK or MB_DEFBUTTON1);
end;
Result:=False;
end;
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);
BtnSetVisibility(NoIconsCheck,False);
ImgSetVisibility(RequirementsPanel,False);
BtnSetVisibility(DesktopCheck,False);
BtnSetVisibility(RedistCheck,False);
BtnSetVisibility(DirectXCheck,False);
BtnSetVisibility(CrackCheck,False);
BtnSetVisibility(VisualCCheck,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
DeinitCircularProgressBar;
end;
end;
procedure DeInitializeSetup();
begin
gdipShutdown;
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin;
end;
procedure DeinitializeUninstall();
begin
UnloadSkinUninst();
end;