urban, универсального решения в данном случае нет. vint56, лишь показал как это сделать . Так что если тебе нужно, то придется самому дописывать нужные строки.[MOVE][/MOVE]
аа ясно,но оно мне не сильно горит так как я думаю что мало кто будет юзать ту кнопку частоurban, универсального решения в данном случае нет. vint56, лишь показал как это сделать . Так что если тебе нужно, то придется самому дописывать нужные строки.[MOVE][/MOVE]
if not ISArcExtract ( 0, OveralPct, 0, ExpandConstant('{src}\setup-1.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
if not ISArcExtract ( 0, OveralPct, 0, ExpandConstant('{src}\setup-2.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
if not ISArcExtract ( 0, OveralPct, 0, ExpandConstant('{src}\setup-3.bin'), ExpandConstant('{app}\DI\Data'), false,CallBack, '', '', '') then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_ b_PC.srep'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_ b_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_ b_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_ b_PC.rpack'), true, CallBack ) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_ PC.srep'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_ PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_ PC.pcf'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_ PC.rpack'), true, CallBack ) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.srep' ), ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.pcf') , '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.pcf') , ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.rpack '), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.sr ep'), ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.pc f'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.pc f'), ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.rp ack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_PC.srep'), ExpandConstant('{app}\DI\Data\bs_jungle_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_jungle_PC.rpack') , true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_laboratory_PC.sre p'), ExpandConstant('{app}\DI\Data\bs_laboratory_PC.pcf '), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_laboratory_PC.pcf '), ExpandConstant('{app}\DI\Data\bs_laboratory_PC.rpa ck'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_military_quarters _PC.srep'), ExpandConstant('{app}\DI\Data\bs_military_quarters _PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_military_quarters _PC.pcf'), ExpandConstant('{app}\DI\Data\bs_military_quarters _PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_quarantine_PC.sre p'), ExpandConstant('{app}\DI\Data\bs_quarantine_PC.pcf '), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_quarantine_PC.pcf '), ExpandConstant('{app}\DI\Data\bs_quarantine_PC.rpa ck'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_ship_PC.srep'), ExpandConstant('{app}\DI\Data\bs_ship_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_ship_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_ship_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_town_PC.srep'), ExpandConstant('{app}\DI\Data\bs_town_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_town_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_town_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_tunnels_PC.srep') , ExpandConstant('{app}\DI\Data\bs_tunnels_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_tunnels_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_tunnels_PC.rpack' ), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\menuback_PC.srep'), ExpandConstant('{app}\DI\Data\menuback_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\menuback_PC.pcf'), ExpandConstant('{app}\DI\Data\menuback_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\weapons_PC.srep'), ExpandConstant('{app}\DI\Data\weapons_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\weapons_PC.pcf'), ExpandConstant('{app}\DI\Data\weapons_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\music_stream.srep'), ExpandConstant('{app}\DI\Data\music_stream
ахаха те легко говоритьHoLmEs юзай новую часть и не парся
ты полностью установил игру во время тестового прогона?при закоментировании define records распаковываются все файлы, а при раскоментировании только часть
да я полностью установил, вот скриптHoLmEs дай скрипт,я тебе поменяю твой старый исдон на новый
ты полностью установил игру во время тестового прогона?
[CustomMessages]
rus.ArcTitle=Распаковка игровых архивов...
rus.ExtractedInfo=Распаковано %1 Мб из %2 Мб
rus.ArcInfo=Архив: %1 из %2
rus.AllProgress=Прогресс распаковки архивов:
rus.Extracting=Распаковывается: %1
rus.Taskbar=%1%%, ждите %2
rus.ArcRemains=Осталось ждать %1
rus.LongTime=вечно
rus.Ending=завершение
rus.ArcFail=Распаковка архивов не завершена!
rus.ArcBreak=Распаковка архивов прервана!
rus.ArcFinishedHeading=Установка игры {#AppName} не завершена
rus.ArcError=Установка игры {#MyAppName} не была завершена.
rus.ArcTrouble=Пожалуйста, устраните проблему и запустите установку снова.
rus.ArcBroken=Возможно, архив %1 повреждён или недостаточно места на диске назначения.
rus.ExtractedFile=Распаковывается файл:
rus.CancelButton=Отменить распаковку
rus.ArcTitleBack=Откат изменений...
rus.ISDoneError=Ошибка распаковки!
[Files]
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp04
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp04.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp038
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef unrar
Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
var
LabelPct, LabelCurrFileName, LabelStatusRollback, LabelStatus: TLabel;
ISDoneProgressBar: TNewProgressBar;
CancelUnpackingBtn: HWND;
OveralPct,Cancel, n:integer;
CallBack:longword;
MyError:boolean;
pr:Extended;
msgError: string;
ISDonePB: TImgPB;
type
TCallback = function (Pct: integer;CurrentFile:string): longword;
TMessage = record hWnd: HWND; msg, wParam: Word; lParam: LongWord; Time: TFileTime; pt: TPoint; end;
function PeekMessage(var lpMsg: TMessage; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external 'PeekMessageA@user32.dll stdcall';
function TranslateMessage(const lpMsg: TMessage): BOOL; external 'TranslateMessage@user32.dll stdcall';
function DispatchMessage(const lpMsg: TMessage): Longint; external 'DispatchMessageA@user32.dll stdcall';
function WrapMyCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:innocallback.dll stdcall';
function ISArcExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutPath: string; DeleteInFile:boolean; callback: longword; Password, CfgFile, WorkPath: String):BOOL; external 'ISArcExtract@files:ISDone.dll stdcall';
function IS7ZipExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutPath: string; DeleteInFile:boolean; callback: longword; Password: String):BOOL; external 'IS7zipExtract@files:ISDone.dll stdcall';
function ISRarExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutPath: string; DeleteInFile:boolean; callback: longword; Password: String):BOOL; external 'ISRarExtract@files:ISDone.dll stdcall';
function ISPrecompExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutFile: string; DeleteInFile:boolean; callback: longword):BOOL; external 'ISPrecompExtract@files:ISDone.dll stdcall';
function ISSRepExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutFile, IdxFile: string; DeleteInFile:boolean; callback: longword):BOOL; external 'ISSrepExtract@files:ISDone.dll stdcall';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:string):BOOL; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall';
function StartRecord(RecordFileName:string; AllComponents:longword):BOOL; external 'StartRecord@files:ISDone.dll stdcall';
function CheckPoint(CurComponent:Integer):BOOL; external 'CheckPoint@files:ISDone.dll stdcall';
function StopRecord:BOOL; external 'StopRecord@files:ISDone.dll stdcall';
function GetWindowLong(hWnd, nIndex: Integer): Longint; external 'GetWindowLongA@user32 stdcall delayload';
function SetWindowText(hWnd: Longint; lpString: AnsiString): Longint; external 'SetWindowTextA@user32 stdcall delayload';
function cm(Message: String): String; Begin Result:= ExpandConstant('{cm:'+ Message +'}') End;
Procedure SetTaskBarTitle(Title: AnsiString); var h: Integer;
begin
h:= GetWindowLong(MainForm.Handle, -8); if h <> 0 then SetWindowText(h, Title);
end;
procedure AppProcessMessage;
var
Msg: TMessage;
begin
while PeekMessage(Msg, 0, 0, 0, 1) do begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
function ProgressCallback(Pct: integer; CurrentFile:string): longword;
begin
ImgPBSetPosition(ISDonePB,Pct/10);
LabelPct.Caption :=ExpandConstant('{cm:AllProgress} ')+IntToStr(Pct div 10)+'.'+IntToStr(Pct mod 10)+'%';
LabelCurrFileName.Caption :=ExpandConstant('{app}\')+CurrentFile;
AppProcessMessage;
Result := Cancel;
ImgApplyChanges(WizardForm.Handle);
end;
procedure Error;
var n:integer;
begin
Cancel:= -1;
Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, n);
end;
procedure CreateISDoneComponents;
begin
LabelPct := TLabel.Create(WizardForm);
with LabelPct do begin
AutoSize:=False;
SetBounds(ScaleX(-70), ScaleY(170), ScaleX(638), ScaleY(17));
Alignment := taCenter;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsItalic];
Parent := WizardForm;
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
AutoSize:=False;
SetBounds(ScaleX(41), ScaleY(105), ScaleX(638), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsItalic];
Caption:= '';
Parent := WizardForm;
Hide;
end;
LabelStatusRollback := TLabel.Create(WizardForm);
with LabelStatusRollback do begin
Parent := WizardForm;
AutoSize := False;
SetBounds(ScaleX(41), ScaleY(80), ScaleX(400), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption := cm('ArcTitleBack');
end;
LabelStatus := TLabel.Create(WizardForm);
with LabelStatus do begin
Parent := WizardForm;
AutoSize := False;
SetBounds(ScaleX(41), ScaleY(80), ScaleX(400), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption := cm('ArcTitle');
end;
end;
procedure CancelUnpackingOnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$0001);
end;
procedure CancelUnpackingOnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);
if MsgBox( SetupMessage( msgExitSetupMessage ), mbConfirmation, MB_YESNO ) = IDYES then Cancel:= 1;
end;
Procedure UnpackingISDoneFinished(CurPageID: Integer);
begin
if (CurPageID = wpFinished) and (Cancel <> 0) then
begin
WizardForm.Caption:= ExpandConstant('{cm:ISDoneError}');
SetTaskBarTitle(SetupMessage(msgErrorTitle));
FinishedHeadingLabel.Caption:=cm('ArcFinishedHeading');
FinishedHeadingLabel.Font.Color:= $0000C0; // red (красный)
FinishedLabel.Caption:= msgError + ExpandConstant(' {cm:ArcTrouble}') + #10#13#10#13+ExpandConstant('{cm:FinishedLabel2}');
FinishedLabel.Font.Color:= $0000C0; // red (красный)
end;
CancelUnpackingBtn:=BtnCreate(WizardForm.Handle,408,297,80,80,ExpandConstant('{tmp}\button.png'),10,False);
BtnSetEvent(CancelUnpackingBtn,BtnMouseEnterEventID,WrapBtnCallback(@CancelUnpackingOnEnter,1));
BtnSetEvent(CancelUnpackingBtn,BtnClickEventID,WrapBtnCallback(@CancelUnpackingOnClick,1));
BtnSetFont(CancelUnpackingBtn,WFButtonFont.Handle);
BtnSetFontColor(CancelUnpackingBtn,$ffffff,$000000,$ffffff,$B6B6B6);
BtnSetCursor(CancelUnpackingBtn,GetSysCursorHandle(32649));
BtnSetVisibility(CancelUnpackingBtn, False);
end;
procedure UnpackingISDone(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
if MyError then Error;
if CurStep = ssInstall then begin
ISDonePB:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressImg.png'),ScaleX(41),ScaleY(130),ScaleX(330),WizardForm.ProgressGauge.Height);
NewPB:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\ProgressBackground2.png'), ExpandConstant('{tmp}\ProgressImg.png'),376,130,80,WizardForm.ProgressGauge.Height);
ImgApplyChanges(WizardForm.Handle);
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4));
LabelStatus.Show;
BtnSetText(CancelUnpackingBtn,WizardForm.CancelButton.Caption);
BtnSetVisibility(CancelUnpackingBtn, True);
BtnSetVisibility(hCancelBtn, False);
LabelPct.Show;
LabelCurrFileName.Show;
ProgressInfoLabel.Hide;
CallBack:=WrapMyCallback(@ProgressCallback,2);
Cancel:=0;
OveralPct:=0;
// Распаковка всех необходимых файлов в папку {tmp}. Это необходимо для того, чтобы
//выполнять установку в момент ssInstall, и секция [Run] выполнялась после установки.
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
#ifdef precomp04
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('RTconsole.exe');
ExtractTemporaryFile('precomp04.exe');
#endif
#ifdef precomp038
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('RTconsole.exe');
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef unrar
ExtractTemporaryFile('Unrar.dll');
#endif
StartRecord(ExpandConstant('{src}\records.inf'),0);
repeat
MyError:=true;
if not ISArcExtract ( 1, OveralPct, 0, ExpandConstant('{src}\setup-1.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
if not ISArcExtract ( 2, OveralPct, 0, ExpandConstant('{src}\setup-2.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
if not ISArcExtract ( 3, OveralPct, 0, ExpandConstant('{src}\setup-3.bin'), ExpandConstant('{app}\DI\Data'), false,CallBack, '', '', '') then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_b_PC.srep'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_b_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_b_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_b_PC.rpack'), true, CallBack ) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_PC.srep'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_buildinginterior_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_buildinginterior_PC.rpack'), true, CallBack ) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.srep'), ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_jungle_b_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.srep'), ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_jungle_high_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_PC.srep'), ExpandConstant('{app}\DI\Data\bs_jungle_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_jungle_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_jungle_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_laboratory_PC.srep'), ExpandConstant('{app}\DI\Data\bs_laboratory_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_laboratory_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_laboratory_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_military_quarters_PC.srep'), ExpandConstant('{app}\DI\Data\bs_military_quarters_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_military_quarters_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_military_quarters_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_quarantine_PC.srep'), ExpandConstant('{app}\DI\Data\bs_quarantine_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_quarantine_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_quarantine_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_ship_PC.srep'), ExpandConstant('{app}\DI\Data\bs_ship_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_ship_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_ship_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_town_PC.srep'), ExpandConstant('{app}\DI\Data\bs_town_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_town_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_town_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_tunnels_PC.srep'), ExpandConstant('{app}\DI\Data\bs_tunnels_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\bs_tunnels_PC.pcf'), ExpandConstant('{app}\DI\Data\bs_tunnels_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\menuback_PC.srep'), ExpandConstant('{app}\DI\Data\menuback_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\menuback_PC.pcf'), ExpandConstant('{app}\DI\Data\menuback_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\weapons_PC.srep'), ExpandConstant('{app}\DI\Data\weapons_PC.pcf'), '', true, CallBack ) then break;
if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\weapons_PC.pcf'), ExpandConstant('{app}\DI\Data\weapons_PC.rpack'), true, CallBack) then break;
if not ISSRepExtract ( 0, OveralPct, 0, ExpandConstant('{app}\DI\Data\music_stream.srep'), ExpandConstant('{app}\DI\Data\music_stream.xwb'), '', true, CallBack ) then break;
//if not ISRarExtract ( 0, OveralPct, 0, ExpandConstant('{src}\aaa.rar'), ExpandConstant('{app}'), false,CallBack, '' ) then break;
//if not ISArcExtract ( 0, OveralPct, 0, ExpandConstant('{src}\setup-1.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
//if not ISArcExtract ( 0, OveralPct, 0, ExpandConstant('{src}\setup-2.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
//if not ISArcExtract ( 0, OveralPct, 0, ExpandConstant('{src}\setup-3.bin'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
//if not ISPrecompExtract( 0, OveralPct, 0, ExpandConstant('{app}\bs_buildinginterior_b_PC.pcf'), ExpandConstant('{app}\bs_buildinginterior_b_PC.rpack'), true, CallBack ) then break;
//if not IS7ZipExtract ( 0, OveralPct, 0, ExpandConstant('{app}\data1\CODMW2.7z'), ExpandConstant('{app}\data1'), true, CallBack, '' ) then break;
//if not ShowChangeDiskWindow('Пожалуйста, вставьте диск 2 и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW2_Disk2.arc' ) then break;
//if not ISArcExtract ( 1, OveralPct, 0, ExpandConstant('{src}\rustext.arc'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
//if not ISArcExtract ( 2, OveralPct, 0, ExpandConstant('{src}\engtext.arc'), ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
//if not ISArcExtract ( 3, OveralPct, 0, ExpandConstant('{src}\rusvoice.arc'),ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
//if not ISArcExtract ( 4, OveralPct, 0, ExpandConstant('{src}\engvoice.arc'),ExpandConstant('{app}'), false,CallBack, '', '', '') then break;
MyError:=false;
until true;
StopRecord;
BtnSetVisibility(CancelUnpackingBtn, False);
BtnSetVisibility(hCancelBtn, True);
BtnSetEnabled(hCancelBtn, False);
LabelStatus.Hide;
LabelPct.Hide;
LabelCurrFileName.Hide;
ProgressInfoLabel.Show;
end;
end;
//===== [Начало-Подключение модулей] =====\\
#include "Modules\Messages.iss"
#include "Modules\Botva2.iss"
#include "Modules\PB.iss"
#include "Modules\Head.iss"
#include "Modules\IsDone.iss"
//===== [Конец-Подключение модулей] =====\\
function CheckError: Boolean;
begin
Result:= not ISDoneError;
end;
//=================================== [Начало-Создание Формы] ===================================\\
procedure CreateWizardForm;
var
n: Integer;
begin
with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
ClientWidth:=ScaleX(700);
ClientHeight:=ScaleY(400);
DirEdit.OnChange:=@ObjectFunc;
GroupEdit.OnChange:= @ObjectFunc
OnMouseDown:=@LabelOnMouseDown;
Center;
end;
WFButtonFont:=TFont.Create;
with WFButtonFont do begin
Style:=[fsBold];
Size:=10;
Name:='Tahoma';
end;
BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BGImage.bmp', BGImageStream);
BGImageStream.Position := 0;
BTNImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('btnimage.bmp', BTNImageStream);
BTNImageStream.Position := 0;
BGImage := TBitmapImage.Create(WizardForm);
BGImage.Bitmap.LoadFromStream(BGImageStream);
BTNImage := TBitmapImage.Create(WizardForm);
BTNImage.Bitmap.LoadFromStream(BTNImageStream);
ImgLoad(WizardForm.Handle,ExpandConstant('Image.png'),0,0,0,0,False,True);
DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('DirFolder.png'),ScaleX(15),ScaleY(220),ScaleX(55),ScaleY(50),True,True);
DirEditImg:=ImgLoad(WizardForm.Handle,ExpandConstant('DirEditImg.png'),ScaleX(15),ScaleY(270),ScaleX(0),ScaleY(0),False,True);
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('HDD.png'),ScaleX(15),ScaleY(310),ScaleX(65),ScaleY(65),True,True);
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('GroupFolder.png'),ScaleX(15),ScaleY(225),ScaleX(55),ScaleY(40),True,True);
//=============================== [Начало-Лейблы] ===============================\\
//===== [Начало - WelcomePage] =====\\
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(10), ScaleY(125), ScaleX(360), ScaleY(150));
Font.Name:='Tahoma';
Font.Size:=16;
Font.Color:={#ColorGameName};
Font.Style:=[fsBold];
Alignment :=taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:WelcomeLabel1}');
end;
WelcomeLabel2:= TLabel.Create(WizardForm);
with WelcomeLabel2 do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(10), ScaleY(260), ScaleX(360), ScaleY(150));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:WelcomeLabel2}');
end;
//===== [Конец - WelcomePage] =====\\
//===== [Начало - SelectDirPage] =====\\
SelectDirBrowseLabel:= TLabel.Create(WizardForm);
with SelectDirBrowseLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(72), ScaleY(220), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectDirBrowseLabel}');
end;
DirEditLabel:=Tlabel.Create(wizardform);
with DirEditLabel do begin
Parent := WizardForm;
AutoSize:=False;
Transparent := True;
SetBounds(ScaleX(20), ScaleY(272), ScaleX(305), ScaleY(20));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
end;
TotalSpaceLabel:= TLabel.Create(WizardForm);
with TotalSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(299), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:TotalSpaceLabel}');
end;
FreeSpaceLabel:= TLabel.Create(WizardForm);
with FreeSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(315), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FreeSpaceLabel}');
end;
InstallSpacelabel:= TLabel.Create(WizardForm);
with InstallSpacelabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(330), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:InstallSpacelabel}');
end;
NeedSpaceLabel:= TLabel.Create(WizardForm);
with NeedSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(345), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:NeedSpaceLabel}');
end;
TotalSpaceLabel2:= TLabel.Create(WizardForm);
with TotalSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(299), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
FreeSpaceLabel2:= TLabel.Create(WizardForm);
with FreeSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(315), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
InstallSpacelabel2:= TLabel.Create(WizardForm);
with InstallSpacelabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(330), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
NeedSpaceLabel2:= TLabel.Create(WizardForm);
with NeedSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(345), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
//===== [Конец - SelectDirPage] =====\\
#ifdef Components
//===== [Начало - SelectComponentsPage] =====\\
SelectComponentsLabel:= TLabel.Create(WizardForm);
with SelectComponentsLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectComponentsLabel}');
end;
with WizardForm.ComponentsList do begin
Parent:= WizardForm;
SetBounds(ScaleX(15), ScaleY(270), ScaleX(325), ScaleY(95));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
for n:=0 to ItemCount-1 do begin
ItemFontStyle[n]:= [fsBold];
SubItemFontStyle[n]:= [fsBold];
end;
BorderWidth := (WizardForm.ComponentsList.Width-WizardForm.ComponentsList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.ComponentsList.Left+BorderWidth, WizardForm.ComponentsList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
//===== [Конец - SelectComponentsPage] =====\\
#endif
//===== [Начало - SelectProgramGroupPage] =====\\
SelectStartMenuFolderLabel:= TLabel.Create(WizardForm);
with SelectStartMenuFolderLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(75), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectStartMenuFolderLabel}');
end;
SelectStartMenuFolderBrowseLabel:= TLabel.Create(WizardForm);
with SelectStartMenuFolderBrowseLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(295), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectDirBrowseLabel}');
end;
GroupEditLabel:=Tlabel.Create(WizardForm);
with GroupEditLabel do begin
Parent := WizardForm;
AutoSize:=False;
Transparent := True;
SetBounds(ScaleX(20), ScaleY(272), ScaleX(305), ScaleY(20));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption := WizardForm.GroupEdit.Text;
end;
NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(15),ScaleY(350),ScaleX(13),ScaleY(13),ExpandConstant('CheckBox.png'),1,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649));
NoIconsLabel := TLabel.Create(WizardForm);
with NoIconsLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(35), ScaleY(350), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma'
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:NoIconsCheck}');
Cursor := crHand;
OnClick:= @ObjectFunc;
end;
//===== [Конец - SelectProgramGroupPage] =====\\
#ifdef Tasks
//===== [Начало - SelectTasksPage] =====\\
SelectTasksLabel:= TLabel.Create(WizardForm);
with SelectTasksLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectTasksLabel}');
end;
with WizardForm.TasksList do begin
Parent:= WizardForm;
SetBounds(ScaleX(15), ScaleY(259), ScaleX(350), ScaleY(140));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
BorderStyle := bsNone;
Font.Style:=[fsBold];
BorderWidth := (WizardForm.TasksList.Width-WizardForm.TasksList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.TasksList.Left+BorderWidth, WizardForm.TasksList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
//===== [Конец - SelectTasksPage] =====\\
#endif
//===== [Начало - ReadyPage] =====\\
BGImageStream.position:=0;
ReadyLabel:= TLabel.Create(WizardForm);
with ReadyLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:ReadyLabel}');
end;
ReadyPanel := TPanel.Create(WizardForm);
with ReadyPanel do begin
Parent := WizardForm;
SetBounds(ScaleX(15), ScaleY(259), ScaleX(350), ScaleY(100));
BorderStyle := bsSingle;
end;
ReadyBitmap := TBitmapImage.Create(WizardForm);
with ReadyBitmap do begin
Parent := ReadyPanel;
SetBounds(ScaleX(-15), ScaleY(-259), ScaleX(700), ScaleY(400));
Bitmap.LoadFromStream(BGImageStream);
end;
ReadyScrollBar := TScrollBar.Create(WizardForm);
with ReadyScrollBar do begin
Parent := ReadyPanel;
SetBounds(ScaleX(330), ScaleY(0), ScaleX(98), ScaleY(15));
Kind := sbVertical;
OnScroll:=@ScrollText3Scroll;
end;
ReadyPanelLabel := TLabel.Create(WizardForm);
with ReadyPanelLabel do begin
Parent := ReadyPanel;
WordWrap := true;
Transparent:=true;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
SetBounds(ScaleX(5), ScaleY(5), ScaleX(325), ScaleY(95));
Caption := WizardForm.ReadyMemo.Lines.Text;
end;
//===== [Конец - ReadyPage] =====\\
//===== [Начало - InstallingPage] =====\\
IsDoneAddComponents
InstallingLabel:= TLabel.Create(WizardForm);
with InstallingLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:InstallingLabel}');
end;
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(250), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:Extracted}');
end;
//===== [Конец - InstallingPage] =====\\
//===== [Начало - FinishedPage] =====\\
FinishedHeadingLabel:= TLabel.Create(WizardForm);
with FinishedHeadingLabel do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(670), ScaleY(80));
Font.Name:= 'Tahoma';
Font.Size:= 12;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FinishedHeadingLabel}');
end;
FinishedLabel:= TLabel.Create(WizardForm);
with FinishedLabel do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(270), ScaleX(670), ScaleY(150));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FinishedLabel}');
end;
//===== [Конец - FinishedPage] =====\\
//=============================== [Конец-Лейблы] ===============================\\
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;
#ifdef BASS
procedure BtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);
case hBtn of
MusBtn: if not BtnGetChecked(MusBtn) then BASS_Stop
else if BASS_Start then BASS_ChannelPlay(mp3Handle, False);
end;
end;
#endif
procedure WFBtnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$0001);
end;
procedure ButtonsTextures;
begin
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,382,362,88,34,ExpandConstant('Btn.png'),0,False);
BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,WFButtonFont.Handle);
BtnSetFontColor(hBackBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,575,362,88,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,478,362,88,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,340,253,45,45,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,340,253,45,45,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
#ifdef BASS
MusBtn:=BtnCreate(WizardForm.Handle,ScaleX(50),ScaleY(30),ScaleX(80),ScaleY(80),ExpandConstant('MusicButton.png'),1,True);
BtnSetCursor(MusBtn,GetSysCursorHandle(32649));
BtnSetChecked(MusBtn, True);
BtnSetEvent(MusBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(MusBtn,BtnClickEventID,WrapBtnCallback(@BtnClick,1));
#endif
(*
hLogoBtn:=BtnCreate(WizardForm.Handle,35,10,245,81,ExpandConstant('logo.png'),15,False);
BtnSetEvent(hLogoBtn,BtnClickEventID,WrapBtnCallback(@LogoBtnClick,1));
BtnSetCursor(hLogoBtn,GetSysCursorHandle(32649));
*)
#ifdef InfBtn
InfBtn:=BtnCreate(WizardForm.Handle,15,362,88,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(InfBtn,BtnClickEventID,WrapBtnCallback(@InfBtnClick,1));
BtnSetEvent(InfBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetText(InfBtn, '{#InfoText}');
BtnSetFont(InfBtn,WFButtonFont.Handle);
BtnSetFontColor(InfBtn,{#ColorText},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(InfBtn,GetSysCursorHandle(32649));
#endif
end;
//===== [Конец-Текстуры Кнопок] =====\\
//===== [Начало-Прячем Компоненты] =====\\
procedure HideComponents;
begin;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
SelectDirBrowseLabel.Hide;
#ifdef Components
SelectComponentsLabel.Hide;
WizardForm.ComponentsList.Hide;
#endif
#ifdef Tasks
SelectTasksLabel.Hide;
WizardForm.TasksList.Hide;
#endif
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
DirEditLabel.Hide;
TotalSpaceLabel.Hide;
FreeSpaceLabel.Hide;
InstallSpacelabel.Hide;
NeedSpaceLabel.Hide;
TotalSpaceLabel2.Hide;
FreeSpaceLabel2.Hide;
InstallSpacelabel2.Hide;
NeedSpaceLabel2.Hide;
GroupEditLabel.Hide;
NoIconsLabel.Hide;
InstallingLabel.Hide;
StatusLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
IMGSetVisibility(DirEditImg,False);
IMGSetVisibility(DirFolder,False);
IMGSetVisibility(HDD,False);
IMGSetVisibility(GroupFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
ReadyPanel.Hide;
ReadyBitmap.Hide;
ReadyScrollBar.Hide;
ReadyPanelLabel.Hide;
ReadyLabel.Hide;
IsDoneHide;
end;
//===== [Конец-Прячем Компоненты] =====\\
//===== [Начало-Показываем Компоненты] =====\\
procedure ShowComponents(CurPageID: Integer);
begin
case CurPageID of
wpWelcome: begin
WelcomeLabel1.Show;
WelcomeLabel2.Show;
end;
wpSelectDir: begin
SelectDirBrowseLabel.Show;
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
InstallSpacelabel.Show;
NeedSpaceLabel.Show
TotalSpaceLabel2.Show;
FreeSpaceLabel2.Show;
InstallSpacelabel2.Show;
NeedSpaceLabel2.Show;
IMGSetVisibility(DirFolder,True);
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(HDD,True);
BtnSetVisibility(hDirBrowseBtn,True);
end;
#ifdef Components
wpSelectComponents: begin
SelectComponentsLabel.Show;
WizardForm.ComponentsList.Show;
end;
#endif
wpSelectProgramGroup: begin
SelectStartMenuFolderLabel.Show;
SelectStartMenuFolderBrowseLabel.Show;
GroupEditLabel.Show;
NoIconsLabel.Show;
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(GroupFolder,True);
BtnSetVisibility(NoIconsCheck,True);
BtnSetVisibility(hGroupBrowseBtn,True);
end;
#ifdef Tasks
wpSelectTasks: begin
SelectTasksLabel.Show;
WizardForm.TasksList.Show;
end;
#endif
wpReady: begin
ReadyBitmap.Show;
ReadyScrollBar.Show;
ReadyPanelLabel.Show;
ReadyPanel.Show;
ReadyLabel.Show;
ReadyPanelLabel.Caption := WizardForm.ReadyMemo.Lines.Text;
end;
wpInstalling: begin
InstallingLabel.Show;
StatusLabel.Show;
IsDoneShow();
end;
wpFinished: begin
FinishedHeadingLabel.Show;
FinishedLabel.Show;
LabelTime3.Show;
end;
end;
end;
//===== [Конец-Показываем Компоненты] =====\\
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('b2p.dll');
ExtractTemporaryFile('Click.wav');
ExtractTemporaryFile('WFEnter.wav');
ExtractTemporaryFile('Check.wav');
ExtractTemporaryFile('skin.cjstyles');
LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');
Result:=True;
end;
procedure InitializeWizard;
begin
ExtractTemporaryFile('Splash.png');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10);
begin
CreateWizardForm;
OldProc:=SetWindowLong(WizardForm.Handle,-4,WrapWFProc(@WFWndProc,4));
ButtonsTextures;
#ifdef BASS
ExtractTemporaryFile('cash.dll');
ExtractTemporaryFile('BASS.dll');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(ExpandConstant('{tmp}\cash.dll')), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start;
BASS_ChannelPlay(mp3Handle,False);
#endif
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons;
HideComponents;
ShowComponents(CurPageID);
ObjectFunc(WizardForm.DirEdit);
if (CurPageID = wpFinished) and ISDoneError then begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
FinishedLabel.Font.Color:= $0000FF;
FinishedHeadingLabel.Caption:= ExpandConstant('{cm:ErrorFinishedHeadingLabel}');
FinishedLabel.Caption:= ExpandConstant('{cm:ErrorFinishedLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
end;
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
IsDoneUnpack(CurStep);
end;
procedure DeinitializeSetup;
begin
BGImageStream.Free;
BTNImageStream.Free;
WFButtonFont.Free;
gdipShutdown;
UnloadSkin();
#ifdef BASS
BASS_Stop();
BASS_Free();
#endif
end;[/SPOILER]
Пытался делать так: StatusMsg: Обновление DirectX...; Не помогает...
[SPOILER="Task and Run"]
[Tasks]
Name: Soft; Description: {cm:Soft}
Name: Soft\DirectX; Description: {cm:DirectX}
Name: Soft\VCRedist; Description: {cm:VCRedist}
Name: Soft\VCRedist64; Description: {cm:VCRedist64}
Name: Icons; Description: {cm:Icons}; Flags: unchecked
Name: Icons\DesktopIcon; Description: {cm:CreateDesktopIcon}
[Run]
Filename: {src}\Redist\DirectX\dxwebsetup.exe; WorkingDir: {src}\Redist\; Tasks: Soft\DirectX; Check: CheckError
Filename: {src}\Redist\VCRedist\vcredist_x86.exe; WorkingDir: {src}\Redist\; Tasks: Soft\VCRedist; Check: not IsWin64 and CheckError
Filename: {src}\Redist\VCRedist\vcredist_x64.exe; WorkingDir: {src}\Redist\; Tasks: Soft\VCRedist64; Check: IsWin64 and CheckError
[/SPOILER]
[SPOILER="Messages"]
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Messages]
ButtonBack=Назад
ButtonNext=Далее
ButtonCancel=Выход
ButtonInstall=Установить
ButtonFinish=Завершить
ButtonWizardBrowse=
[CustomMessages]
Uninstall=Удалить {#GameName}
Run=Запустить {#GameName}
Run2=Запустить {#GameName2}
WelcomeLabel1=Вас приветствует мастер установки игры "{#GameName}"
WelcomeLabel2=Программа установит "{#GameName}" на Ваш компьютер. Рекомендуется закрыть антивирусные пакеты и все прочие приложения перед тем, как продолжить. Нажмите «Далее», что бы продолжить установку, или «Выход», чтобы выйти из программы установки
TotalSpaceLabel=Всего места на диске:
FreeSpaceLabel=Доступно места на диске:
InstallSpacelabel=Требуется места для установки:
NeedSpaceLabel=Требуется места на диске:
SelectDirBrowseLabel=Нажмите «Далее», чтобы продолжить. Если вы %nхотите выбрать другую папку, нажмите «Обзор»
;Repacks=Ничего не вырезано/ не перекодированно %nТаблетка вшита
SelectComponentsLabel=Выберите компоненты, которые Вы хотите установить, снимите %nфлажки с компонентов, устанавливать которые не требуется. %nНажмите «Далее», когда Вы будете готовы продолжить
;Text=Выберете озвучку:
;Text2={#CompName}.
;Voice=Язык озвучки:
;Russian=Русский.
;English=Английский.
Tabl={#CompTextOdin}.
NoTabl={#CompTextDVA}.
SelectStartMenuFolderLabel=Программа создаст ярлыки %nв следующей папке меню «Пуск»
SelectStartMenuFolderBrowseLabel=Нажмите «Далее», чтобы продолжить. Если вы хотите выбрать другую папку, нажмите «Обзор»
NoIconsCheck=Не создавать папку в меню «Пуск»
SelectTasksLabel=Выберите дополнительные задачи, которые должны выполниться %nпри установке игры, после этого нажмите «Далее»
Icons=Дополнительные ярлыки:
CreateDesktopIcon=Создать ярлык на Рабочем столе
CreateQuickLaunchIcon=Создать ярлык в Панеле быстрого запуска
Soft=Дополнительное программное обеспечение:
;PhysX=Обновить | Установить Nvidia PhysX
DirectX=Обновить | Установить DirectX
VCRedist=Обновить | Установить Microsoft Visual 2010 х86
VCRedist64=Обновить | Установить Microsoft Visual 2010 х64
;DotNet=Обновить | Установить DotNetFx4.0.
;GFWL=Установить GFWL | Рекомендуется
ReadyLabel=Нажмите «Установить», чтобы начать установку, или «Назад», %nесли Вы хотите просмотреть или изменить опции установки.
InstallingLabel=Пожалуйста, подождите, пока игра установится на Ваш компьютер
Extracted=Распаковка архивов...
ElapsedTime=Прошло:
RemainingTime=Осталось времени:
EstimatedTime=Всего:
AllElapsedTime=Время установки:
Error=Ошибка распаковки!
StatusRollback=Откат изменений...
FinishedHeadingLabel=Установка игры "{#GameName}" успешно завершена
FinishedLabel=Игра "{#GameName}" была успешно установлена на Ваш компьютер. Для ее запуска выберите соответствующий ярлык в меню "Пуск" или на Рабочем столе. Нажмите "Завершить", чтобы выйти из программы установки
ErrorFinishedHeadingLabel=Установка игры "{#GameName}" не завершена
ErrorFinishedLabel=Установка не была завершена.Пожалуйста, устраните проблему и запустите установку снова
[/SPOILER]
Как мне сказали, у меня скрыты стандартные компоненты, пробовал менять WizardForm.StatusLabel.Hide на Show, то тогда надпись "Распаковка архивов" висит на всех страницах.
procedure CurPageChanged(CurPageID: Integer);
begin
WizardForm.StatusLabel.Hide
Case CurPageID of
wpInstalling:
begin
WizardForm.StatusLabel.Show
end;
[/SPOILER]
//===== [Начало-Подключение модулей] =====\\
#include "Modules\Messages.iss"
#include "Modules\Botva2.iss"
#include "Modules\PB.iss"
#include "Modules\Head.iss"
#include "Modules\IsDone.iss"
//===== [Конец-Подключение модулей] =====\\
function CheckError: Boolean;
begin
Result:= not ISDoneError;
end;
//=================================== [Начало-Создание Формы] ===================================\\
procedure CreateWizardForm;
var
n: Integer;
begin
with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
ClientWidth:=ScaleX(700);
ClientHeight:=ScaleY(400);
DirEdit.OnChange:=@ObjectFunc;
GroupEdit.OnChange:= @ObjectFunc
OnMouseDown:=@LabelOnMouseDown;
Center;
end;
WFButtonFont:=TFont.Create;
with WFButtonFont do begin
Style:=[fsBold];
Size:=10;
Name:='Tahoma';
end;
BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BGImage.bmp', BGImageStream);
BGImageStream.Position := 0;
BTNImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('btnimage.bmp', BTNImageStream);
BTNImageStream.Position := 0;
BGImage := TBitmapImage.Create(WizardForm);
BGImage.Bitmap.LoadFromStream(BGImageStream);
BTNImage := TBitmapImage.Create(WizardForm);
BTNImage.Bitmap.LoadFromStream(BTNImageStream);
ImgLoad(WizardForm.Handle,ExpandConstant('Image.png'),0,0,0,0,False,True);
DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('DirFolder.png'),ScaleX(15),ScaleY(220),ScaleX(55),ScaleY(50),True,True);
DirEditImg:=ImgLoad(WizardForm.Handle,ExpandConstant('DirEditImg.png'),ScaleX(15),ScaleY(270),ScaleX(0),ScaleY(0),False,True);
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('HDD.png'),ScaleX(15),ScaleY(310),ScaleX(65),ScaleY(65),True,True);
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('GroupFolder.png'),ScaleX(15),ScaleY(225),ScaleX(55),ScaleY(40),True,True);
//=============================== [Начало-Лейблы] ===============================\\
//===== [Начало - WelcomePage] =====\\
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(10), ScaleY(125), ScaleX(360), ScaleY(150));
Font.Name:='Tahoma';
Font.Size:=16;
Font.Color:={#ColorGameName};
Font.Style:=[fsBold];
Alignment :=taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:WelcomeLabel1}');
end;
WelcomeLabel2:= TLabel.Create(WizardForm);
with WelcomeLabel2 do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(10), ScaleY(260), ScaleX(360), ScaleY(150));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:WelcomeLabel2}');
end;
//===== [Конец - WelcomePage] =====\\
//===== [Начало - SelectDirPage] =====\\
SelectDirBrowseLabel:= TLabel.Create(WizardForm);
with SelectDirBrowseLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(72), ScaleY(220), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectDirBrowseLabel}');
end;
DirEditLabel:=Tlabel.Create(wizardform);
with DirEditLabel do begin
Parent := WizardForm;
AutoSize:=False;
Transparent := True;
SetBounds(ScaleX(20), ScaleY(272), ScaleX(305), ScaleY(20));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
end;
TotalSpaceLabel:= TLabel.Create(WizardForm);
with TotalSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(299), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:TotalSpaceLabel}');
end;
FreeSpaceLabel:= TLabel.Create(WizardForm);
with FreeSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(315), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FreeSpaceLabel}');
end;
InstallSpacelabel:= TLabel.Create(WizardForm);
with InstallSpacelabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(330), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:InstallSpacelabel}');
end;
NeedSpaceLabel:= TLabel.Create(WizardForm);
with NeedSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(345), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:NeedSpaceLabel}');
end;
TotalSpaceLabel2:= TLabel.Create(WizardForm);
with TotalSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(299), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
FreeSpaceLabel2:= TLabel.Create(WizardForm);
with FreeSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(315), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
InstallSpacelabel2:= TLabel.Create(WizardForm);
with InstallSpacelabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(330), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
NeedSpaceLabel2:= TLabel.Create(WizardForm);
with NeedSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(345), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
//===== [Конец - SelectDirPage] =====\\
#ifdef Components
//===== [Начало - SelectComponentsPage] =====\\
SelectComponentsLabel:= TLabel.Create(WizardForm);
with SelectComponentsLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectComponentsLabel}');
end;
with WizardForm.ComponentsList do begin
Parent:= WizardForm;
SetBounds(ScaleX(15), ScaleY(270), ScaleX(325), ScaleY(95));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
for n:=0 to ItemCount-1 do begin
ItemFontStyle[n]:= [fsBold];
SubItemFontStyle[n]:= [fsBold];
end;
BorderWidth := (WizardForm.ComponentsList.Width-WizardForm.ComponentsList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.ComponentsList.Left+BorderWidth, WizardForm.ComponentsList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
//===== [Конец - SelectComponentsPage] =====\\
#endif
//===== [Начало - SelectProgramGroupPage] =====\\
SelectStartMenuFolderLabel:= TLabel.Create(WizardForm);
with SelectStartMenuFolderLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(75), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectStartMenuFolderLabel}');
end;
SelectStartMenuFolderBrowseLabel:= TLabel.Create(WizardForm);
with SelectStartMenuFolderBrowseLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(295), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectDirBrowseLabel}');
end;
GroupEditLabel:=Tlabel.Create(WizardForm);
with GroupEditLabel do begin
Parent := WizardForm;
AutoSize:=False;
Transparent := True;
SetBounds(ScaleX(20), ScaleY(272), ScaleX(305), ScaleY(20));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption := WizardForm.GroupEdit.Text;
end;
NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(15),ScaleY(350),ScaleX(13),ScaleY(13),ExpandConstant('CheckBox.png'),1,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649));
NoIconsLabel := TLabel.Create(WizardForm);
with NoIconsLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(35), ScaleY(350), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma'
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:NoIconsCheck}');
Cursor := crHand;
OnClick:= @ObjectFunc;
end;
//===== [Конец - SelectProgramGroupPage] =====\\
#ifdef Tasks
//===== [Начало - SelectTasksPage] =====\\
SelectTasksLabel:= TLabel.Create(WizardForm);
with SelectTasksLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectTasksLabel}');
end;
with WizardForm.TasksList do begin
Parent:= WizardForm;
SetBounds(ScaleX(15), ScaleY(259), ScaleX(350), ScaleY(140));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
BorderStyle := bsNone;
Font.Style:=[fsBold];
BorderWidth := (WizardForm.TasksList.Width-WizardForm.TasksList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.TasksList.Left+BorderWidth, WizardForm.TasksList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
//===== [Конец - SelectTasksPage] =====\\
#endif
//===== [Начало - ReadyPage] =====\\
BGImageStream.position:=0;
ReadyLabel:= TLabel.Create(WizardForm);
with ReadyLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:ReadyLabel}');
end;
ReadyPanel := TPanel.Create(WizardForm);
with ReadyPanel do begin
Parent := WizardForm;
SetBounds(ScaleX(15), ScaleY(259), ScaleX(350), ScaleY(100));
BorderStyle := bsSingle;
end;
ReadyBitmap := TBitmapImage.Create(WizardForm);
with ReadyBitmap do begin
Parent := ReadyPanel;
SetBounds(ScaleX(-15), ScaleY(-259), ScaleX(700), ScaleY(400));
Bitmap.LoadFromStream(BGImageStream);
end;
ReadyScrollBar := TScrollBar.Create(WizardForm);
with ReadyScrollBar do begin
Parent := ReadyPanel;
SetBounds(ScaleX(330), ScaleY(0), ScaleX(98), ScaleY(15));
Kind := sbVertical;
OnScroll:=@ScrollText3Scroll;
end;
ReadyPanelLabel := TLabel.Create(WizardForm);
with ReadyPanelLabel do begin
Parent := ReadyPanel;
WordWrap := true;
Transparent:=true;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
SetBounds(ScaleX(5), ScaleY(5), ScaleX(325), ScaleY(95));
Caption := WizardForm.ReadyMemo.Lines.Text;
end;
//===== [Конец - ReadyPage] =====\\
//===== [Начало - InstallingPage] =====\\
IsDoneAddComponents
InstallingLabel:= TLabel.Create(WizardForm);
with InstallingLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:InstallingLabel}');
end;
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(250), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:Extracted}');
end;
//===== [Конец - InstallingPage] =====\\
//===== [Начало - FinishedPage] =====\\
FinishedHeadingLabel:= TLabel.Create(WizardForm);
with FinishedHeadingLabel do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(670), ScaleY(80));
Font.Name:= 'Tahoma';
Font.Size:= 12;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FinishedHeadingLabel}');
end;
FinishedLabel:= TLabel.Create(WizardForm);
with FinishedLabel do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(270), ScaleX(670), ScaleY(150));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FinishedLabel}');
end;
//===== [Конец - FinishedPage] =====\\
//=============================== [Конец-Лейблы] ===============================\\
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;
#ifdef BASS
procedure BtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);
case hBtn of
MusBtn: if not BtnGetChecked(MusBtn) then BASS_Stop
else if BASS_Start then BASS_ChannelPlay(mp3Handle, False);
end;
end;
#endif
procedure WFBtnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$0001);
end;
procedure ButtonsTextures;
begin
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,382,362,88,34,ExpandConstant('Btn.png'),0,False);
BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,WFButtonFont.Handle);
BtnSetFontColor(hBackBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,575,362,88,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,478,362,88,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,340,253,45,45,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,340,253,45,45,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,{#ColorButonOn},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
#ifdef BASS
MusBtn:=BtnCreate(WizardForm.Handle,ScaleX(50),ScaleY(30),ScaleX(80),ScaleY(80),ExpandConstant('MusicButton.png'),1,True);
BtnSetCursor(MusBtn,GetSysCursorHandle(32649));
BtnSetChecked(MusBtn, True);
BtnSetEvent(MusBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(MusBtn,BtnClickEventID,WrapBtnCallback(@BtnClick,1));
#endif
(*
hLogoBtn:=BtnCreate(WizardForm.Handle,35,10,245,81,ExpandConstant('logo.png'),15,False);
BtnSetEvent(hLogoBtn,BtnClickEventID,WrapBtnCallback(@LogoBtnClick,1));
BtnSetCursor(hLogoBtn,GetSysCursorHandle(32649));
*)
#ifdef InfBtn
InfBtn:=BtnCreate(WizardForm.Handle,15,362,88,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(InfBtn,BtnClickEventID,WrapBtnCallback(@InfBtnClick,1));
BtnSetEvent(InfBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetText(InfBtn, '{#InfoText}');
BtnSetFont(InfBtn,WFButtonFont.Handle);
BtnSetFontColor(InfBtn,{#ColorText},{#ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(InfBtn,GetSysCursorHandle(32649));
#endif
end;
//===== [Конец-Текстуры Кнопок] =====\\
//===== [Начало-Прячем Компоненты] =====\\
procedure HideComponents;
begin;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
SelectDirBrowseLabel.Hide;
#ifdef Components
SelectComponentsLabel.Hide;
WizardForm.ComponentsList.Hide;
#endif
#ifdef Tasks
SelectTasksLabel.Hide;
WizardForm.TasksList.Hide;
#endif
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
DirEditLabel.Hide;
TotalSpaceLabel.Hide;
FreeSpaceLabel.Hide;
InstallSpacelabel.Hide;
NeedSpaceLabel.Hide;
TotalSpaceLabel2.Hide;
FreeSpaceLabel2.Hide;
InstallSpacelabel2.Hide;
NeedSpaceLabel2.Hide;
GroupEditLabel.Hide;
NoIconsLabel.Hide;
InstallingLabel.Hide;
StatusLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
IMGSetVisibility(DirEditImg,False);
IMGSetVisibility(DirFolder,False);
IMGSetVisibility(HDD,False);
IMGSetVisibility(GroupFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
ReadyPanel.Hide;
ReadyBitmap.Hide;
ReadyScrollBar.Hide;
ReadyPanelLabel.Hide;
ReadyLabel.Hide;
IsDoneHide;
end;
//===== [Конец-Прячем Компоненты] =====\\
//===== [Начало-Показываем Компоненты] =====\\
procedure ShowComponents(CurPageID: Integer);
begin
case CurPageID of
wpWelcome: begin
WelcomeLabel1.Show;
WelcomeLabel2.Show;
end;
wpSelectDir: begin
SelectDirBrowseLabel.Show;
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
InstallSpacelabel.Show;
NeedSpaceLabel.Show
TotalSpaceLabel2.Show;
FreeSpaceLabel2.Show;
InstallSpacelabel2.Show;
NeedSpaceLabel2.Show;
IMGSetVisibility(DirFolder,True);
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(HDD,True);
BtnSetVisibility(hDirBrowseBtn,True);
end;
#ifdef Components
wpSelectComponents: begin
SelectComponentsLabel.Show;
WizardForm.ComponentsList.Show;
end;
#endif
wpSelectProgramGroup: begin
SelectStartMenuFolderLabel.Show;
SelectStartMenuFolderBrowseLabel.Show;
GroupEditLabel.Show;
NoIconsLabel.Show;
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(GroupFolder,True);
BtnSetVisibility(NoIconsCheck,True);
BtnSetVisibility(hGroupBrowseBtn,True);
end;
#ifdef Tasks
wpSelectTasks: begin
SelectTasksLabel.Show;
WizardForm.TasksList.Show;
end;
#endif
wpReady: begin
ReadyBitmap.Show;
ReadyScrollBar.Show;
ReadyPanelLabel.Show;
ReadyPanel.Show;
ReadyLabel.Show;
ReadyPanelLabel.Caption := WizardForm.ReadyMemo.Lines.Text;
end;
wpInstalling: begin
InstallingLabel.Show;
StatusLabel.Show;
IsDoneShow();
end;
wpFinished: begin
FinishedHeadingLabel.Show;
FinishedLabel.Show;
LabelTime3.Show;
end;
end;
end;
//===== [Конец-Показываем Компоненты] =====\\
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('b2p.dll');
ExtractTemporaryFile('Click.wav');
ExtractTemporaryFile('WFEnter.wav');
ExtractTemporaryFile('Check.wav');
ExtractTemporaryFile('skin.cjstyles');
LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');
Result:=True;
end;
procedure InitializeWizard;
begin
ExtractTemporaryFile('Splash.png');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10);
begin
CreateWizardForm;
OldProc:=SetWindowLong(WizardForm.Handle,-4,WrapWFProc(@WFWndProc,4));
ButtonsTextures;
#ifdef BASS
ExtractTemporaryFile('cash.dll');
ExtractTemporaryFile('BASS.dll');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(ExpandConstant('{tmp}\cash.dll')), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start;
BASS_ChannelPlay(mp3Handle,False);
#endif
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons;
HideComponents;
ShowComponents(CurPageID);
ObjectFunc(WizardForm.DirEdit);
if (CurPageID = wpFinished) and ISDoneError then begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
FinishedLabel.Font.Color:= $0000FF;
FinishedHeadingLabel.Caption:= ExpandConstant('{cm:ErrorFinishedHeadingLabel}');
FinishedLabel.Caption:= ExpandConstant('{cm:ErrorFinishedLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
end;
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
IsDoneUnpack(CurStep);
end;
procedure DeinitializeSetup;
begin
BGImageStream.Free;
BTNImageStream.Free;
WFButtonFont.Free;
gdipShutdown;
UnloadSkin();
#ifdef BASS
BASS_Stop();
BASS_Free();
#endif
end;
[/SPOILER]
//===== [Начало-Подключение модулей] =====\\
#include "Modules\Messages.iss"
#include "Modules\Botva2.iss"
#include "Modules\PB.iss"
#include "Modules\Head.iss"
#include "Modules\IsDone.iss"
//===== [Конец-Подключение модулей] =====\\
function CheckError: Boolean;
begin
Result:= not ISDoneError;
end;
//=================================== [Начало-Создание Формы] ===================================\\
procedure CreateWizardForm;
var
n: Integer;
begin
with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
ClientWidth:=ScaleX(700);
ClientHeight:=ScaleY(400);
DirEdit.OnChange:=@ObjectFunc;
GroupEdit.OnChange:= @ObjectFunc
OnMouseDown:=@LabelOnMouseDown;
Center;
end;
WFButtonFont:=TFont.Create;
with WFButtonFont do begin
Style:=[fsBold];
Size:=10;
Name:='Tahoma';
end;
BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BGImage.bmp', BGImageStream);
BGImageStream.Position := 0;
BTNImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('btnimage.bmp', BTNImageStream);
BTNImageStream.Position := 0;
BGImage := TBitmapImage.Create(WizardForm);
BGImage.Bitmap.LoadFromStream(BGImageStream);
BTNImage := TBitmapImage.Create(WizardForm);
BTNImage.Bitmap.LoadFromStream(BTNImageStream);
ImgLoad(WizardForm.Handle,ExpandConstant('Image.pn g'),0,0,0,0,False,True);
DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstan t('DirFolder.png'),ScaleX(15),ScaleY(220),ScaleX(5 5),ScaleY(50),True,True);
DirEditImg:=ImgLoad(WizardForm.Handle,ExpandConsta nt('DirEditImg.png'),ScaleX(15),ScaleY(270),ScaleX (0),ScaleY(0),False,True);
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('HDD .png'),ScaleX(15),ScaleY(310),ScaleX(65),ScaleY(65 ),True,True);
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConst ant('GroupFolder.png'),ScaleX(15),ScaleY(225),Scal eX(55),ScaleY(40),True,True);
//=============================== [Начало-Лейблы] ===============================\\
//===== [Начало - WelcomePage] =====\\
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(10), ScaleY(125), ScaleX(360), ScaleY(150));
Font.Name:='Tahoma';
Font.Size:=16;
Font.Color:={#ColorGameName};
Font.Style:=[fsBold];
Alignment :=taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:WelcomeLabel1}');
end;
WelcomeLabel2:= TLabel.Create(WizardForm);
with WelcomeLabel2 do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(10), ScaleY(260), ScaleX(360), ScaleY(150));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:WelcomeLabel2}');
end;
//===== [Конец - WelcomePage] =====\\
//===== [Начало - SelectDirPage] =====\\
SelectDirBrowseLabel:= TLabel.Create(WizardForm);
with SelectDirBrowseLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(72), ScaleY(220), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectDirBrowseLabel} ');
end;
DirEditLabel:=Tlabel.Create(wizardform);
with DirEditLabel do begin
Parent := WizardForm;
AutoSize:=False;
Transparent := True;
SetBounds(ScaleX(20), ScaleY(272), ScaleX(305), ScaleY(20));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
end;
TotalSpaceLabel:= TLabel.Create(WizardForm);
with TotalSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(299), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:TotalSpaceLabel}');
end;
FreeSpaceLabel:= TLabel.Create(WizardForm);
with FreeSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(315), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FreeSpaceLabel}');
end;
InstallSpacelabel:= TLabel.Create(WizardForm);
with InstallSpacelabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(330), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:InstallSpacelabel}');
end;
NeedSpaceLabel:= TLabel.Create(WizardForm);
with NeedSpaceLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(100), ScaleY(345), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:NeedSpaceLabel}');
end;
TotalSpaceLabel2:= TLabel.Create(WizardForm);
with TotalSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(299), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
FreeSpaceLabel2:= TLabel.Create(WizardForm);
with FreeSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(315), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
InstallSpacelabel2:= TLabel.Create(WizardForm);
with InstallSpacelabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(330), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
NeedSpaceLabel2:= TLabel.Create(WizardForm);
with NeedSpaceLabel2 do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(370), ScaleY(345), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Alignment := taRightJustify;
end;
//===== [Конец - SelectDirPage] =====\\
#ifdef Components
//===== [Начало - SelectComponentsPage] =====\\
SelectComponentsLabel:= TLabel.Create(WizardForm);
with SelectComponentsLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectComponentsLabel }');
end;
with WizardForm.ComponentsList do begin
Parent:= WizardForm;
SetBounds(ScaleX(15), ScaleY(270), ScaleX(325), ScaleY(95));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
for n:=0 to ItemCount-1 do begin
ItemFontStyle[n]:= [fsBold];
SubItemFontStyle[n]:= [fsBold];
end;
BorderWidth := (WizardForm.ComponentsList.Width-WizardForm.ComponentsList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.ComponentsList.Left+BorderWidth, WizardForm.ComponentsList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
//===== [Конец - SelectComponentsPage] =====\\
#endif
//===== [Начало - SelectProgramGroupPage] =====\\
SelectStartMenuFolderLabel:= TLabel.Create(WizardForm);
with SelectStartMenuFolderLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(75), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectStartMenuFolder Label}');
end;
SelectStartMenuFolderBrowseLabel:= TLabel.Create(WizardForm);
with SelectStartMenuFolderBrowseLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(295), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectDirBrowseLabel} ');
end;
GroupEditLabel:=Tlabel.Create(WizardForm);
with GroupEditLabel do begin
Parent := WizardForm;
AutoSize:=False;
Transparent := True;
SetBounds(ScaleX(20), ScaleY(272), ScaleX(305), ScaleY(20));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption := WizardForm.GroupEdit.Text;
end;
NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(1 5),ScaleY(350),ScaleX(13),ScaleY(13),ExpandConstan t('CheckBox.png'),1,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCa llback(@NoIconsClick,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649 ));
NoIconsLabel := TLabel.Create(WizardForm);
with NoIconsLabel do begin
Parent:=WizardForm;
AutoSize:=true;
Transparent:=True;
SetBounds(ScaleX(35), ScaleY(350), ScaleX(0), ScaleY(0));
Font.Name:= 'Tahoma'
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:NoIconsCheck}');
Cursor := crHand;
OnClick:= @ObjectFunc;
end;
//===== [Конец - SelectProgramGroupPage] =====\\
#ifdef Tasks
//===== [Начало - SelectTasksPage] =====\\
SelectTasksLabel:= TLabel.Create(WizardForm);
with SelectTasksLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:SelectTasksLabel}');
end;
with WizardForm.TasksList do begin
Parent:= WizardForm;
SetBounds(ScaleX(15), ScaleY(259), ScaleX(350), ScaleY(140));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
BorderStyle := bsNone;
Font.Style:=[fsBold];
BorderWidth := (WizardForm.TasksList.Width-WizardForm.TasksList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.TasksList.Left+BorderWidth, WizardForm.TasksList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
//===== [Конец - SelectTasksPage] =====\\
#endif
//===== [Начало - ReadyPage] =====\\
BGImageStream.position:=0;
ReadyLabel:= TLabel.Create(WizardForm);
with ReadyLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 9;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:ReadyLabel}');
end;
ReadyPanel := TPanel.Create(WizardForm);
with ReadyPanel do begin
Parent := WizardForm;
SetBounds(ScaleX(15), ScaleY(259), ScaleX(350), ScaleY(100));
BorderStyle := bsSingle;
end;
ReadyBitmap := TBitmapImage.Create(WizardForm);
with ReadyBitmap do begin
Parent := ReadyPanel;
SetBounds(ScaleX(-15), ScaleY(-259), ScaleX(700), ScaleY(400));
Bitmap.LoadFromStream(BGImageStream);
end;
ReadyScrollBar := TScrollBar.Create(WizardForm);
with ReadyScrollBar do begin
Parent := ReadyPanel;
SetBounds(ScaleX(330), ScaleY(0), ScaleX(98), ScaleY(15));
Kind := sbVertical;
OnScroll:=@ScrollText3Scroll;
end;
ReadyPanelLabel := TLabel.Create(WizardForm);
with ReadyPanelLabel do begin
Parent := ReadyPanel;
WordWrap := true;
Transparent:=true;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
SetBounds(ScaleX(5), ScaleY(5), ScaleX(325), ScaleY(95));
Caption := WizardForm.ReadyMemo.Lines.Text;
end;
//===== [Конец - ReadyPage] =====\\
//===== [Начало - InstallingPage] =====\\
IsDoneAddComponents
InstallingLabel:= TLabel.Create(WizardForm);
with InstallingLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:InstallingLabel}');
end;
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do begin
Parent := WizardForm;
AutoSize:=True;
Transparent := True;
SetBounds(ScaleX(15), ScaleY(250), ScaleX(0), ScaleY(0));
Font.Name:='Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:Extracted}');
end;
//===== [Конец - InstallingPage] =====\\
//===== [Начало - FinishedPage] =====\\
FinishedHeadingLabel:= TLabel.Create(WizardForm);
with FinishedHeadingLabel do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(225), ScaleX(670), ScaleY(80));
Font.Name:= 'Tahoma';
Font.Size:= 12;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FinishedHeadingLabel} ');
end;
FinishedLabel:= TLabel.Create(WizardForm);
with FinishedLabel do begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:=True;
SetBounds(ScaleX(15), ScaleY(270), ScaleX(670), ScaleY(150));
Font.Name:= 'Tahoma';
Font.Size:= 10;
Font.Color:={#ColorText};
Font.Style:=[fsBold];
Alignment := taCenter;
WordWrap:=True;
OnMouseDown:=@LabelOnMouseDown;
Caption:=ExpandConstant('{cm:FinishedLabel}');
end;
//===== [Конец - FinishedPage] =====\\
//=============================== [Конец-Лейблы] ===============================\\
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.DirB rowseButton.Caption));
BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.Gr oupBrowseButton.Caption));
end;
procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$00 01);
case hBtn of
hCancelBtn: Btn:=WizardForm.CancelButton;
hNextBtn: Btn:=WizardForm.NextButton;
hBackBtn: Btn:=WizardForm.BackButton;
hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;
hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;
#ifdef BASS
procedure BtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$00 01);
case hBtn of
MusBtn: if not BtnGetChecked(MusBtn) then BASS_Stop
else if BASS_Start then BASS_ChannelPlay(mp3Handle, False);
end;
end;
#endif
procedure WFBtnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$ 0001);
end;
procedure ButtonsTextures;
begin
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,382,362,88,3 4,ExpandConstant('Btn.png'),0,False);
BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnC allback(@WFBtnEnter,1));
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallba ck(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,WFButtonFont.Handle);
BtnSetFontColor(hBackBtn,{#ColorButonOn},{#ColorBu tonOff},$000000,$B6B6B6);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,575,362,88,3 4,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnC allback(@WFBtnEnter,1));
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallba ck(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,{#ColorButonOn},{#ColorBu tonOff},$000000,$B6B6B6);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,478,362,88 ,34,ExpandConstant('Btn.png'),1,False);
BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBt nCallback(@WFBtnEnter,1));
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCall back(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn,{#ColorButonOn},{#Color ButonOff},$000000,$B6B6B6);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649)) ;
Width:=0;
Height:=0;
end;
with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,340,253 ,45,45,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,Wra pBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnC allback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,{#ColorButonOn},{#Co lorButonOff},$000000,$B6B6B6);
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(3264 9));
Width:=0;
Height:=0;
end;
with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,340,2 53,45,45,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,W rapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBt nCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,{#ColorButonOn},{# ColorButonOff},$000000,$B6B6B6);
BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32 649));
Width:=0;
Height:=0;
end;
#ifdef BASS
MusBtn:=BtnCreate(WizardForm.Handle,ScaleX(50),Sca leY(30),ScaleX(80),ScaleY(80),ExpandConstant('Musi cButton.png'),1,True);
BtnSetCursor(MusBtn,GetSysCursorHandle(32649));
BtnSetChecked(MusBtn, True);
BtnSetEvent(MusBtn,BtnMouseEnterEventID,WrapBtnCal lback(@WFBtnEnter,1));
BtnSetEvent(MusBtn,BtnClickEventID,WrapBtnCallback (@BtnClick,1));
#endif
(*
hLogoBtn:=BtnCreate(WizardForm.Handle,35,10,245,81 ,ExpandConstant('logo.png'),15,False);
BtnSetEvent(hLogoBtn,BtnClickEventID,WrapBtnCallba ck(@LogoBtnClick,1));
BtnSetCursor(hLogoBtn,GetSysCursorHandle(32649));
*)
#ifdef InfBtn
InfBtn:=BtnCreate(WizardForm.Handle,15,362,88,34,E xpandConstant('Btn.png'),1,False);
BtnSetEvent(InfBtn,BtnClickEventID,WrapBtnCallback (@InfBtnClick,1));
BtnSetEvent(InfBtn,BtnMouseEnterEventID,WrapBtnCal lback(@WFBtnEnter,1));
BtnSetText(InfBtn, '{#InfoText}');
BtnSetFont(InfBtn,WFButtonFont.Handle);
BtnSetFontColor(InfBtn,{#ColorText},{#ColorButonOf f},$000000,$B6B6B6);
BtnSetCursor(InfBtn,GetSysCursorHandle(32649));
#endif
end;
//===== [Конец-Текстуры Кнопок] =====\\
//===== [Начало-Прячем Компоненты] =====\\
[B][COLOR="Red"]procedure HideComponents;я же написал что это у тебя есть [/COLOR][/B]
begin;
[B][COLOR="Red"]WizardForm.StatusLabel.Hide добавь это[/COLOR][/B]
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
SelectDirBrowseLabel.Hide;
#ifdef Components
SelectComponentsLabel.Hide;
WizardForm.ComponentsList.Hide;
#endif
#ifdef Tasks
SelectTasksLabel.Hide;
WizardForm.TasksList.Hide;
#endif
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
DirEditLabel.Hide;
TotalSpaceLabel.Hide;
FreeSpaceLabel.Hide;
InstallSpacelabel.Hide;
NeedSpaceLabel.Hide;
TotalSpaceLabel2.Hide;
FreeSpaceLabel2.Hide;
InstallSpacelabel2.Hide;
NeedSpaceLabel2.Hide;
GroupEditLabel.Hide;
NoIconsLabel.Hide;
InstallingLabel.Hide;
StatusLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
IMGSetVisibility(DirEditImg,False);
IMGSetVisibility(DirFolder,False);
IMGSetVisibility(HDD,False);
IMGSetVisibility(GroupFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
ReadyPanel.Hide;
ReadyBitmap.Hide;
ReadyScrollBar.Hide;
ReadyPanelLabel.Hide;
ReadyLabel.Hide;
IsDoneHide;
end;
//===== [Конец-Прячем Компоненты] =====\\
//===== [Начало-Показываем Компоненты] =====\\
[B][COLOR="Red"] procedure ShowComponents(CurPageID: Integer);[/COLOR][/B] про это я тоже написал что есть
begin
case CurPageID of
wpWelcome: begin
WelcomeLabel1.Show;
WelcomeLabel2.Show;
end;
wpSelectDir: begin
SelectDirBrowseLabel.Show;
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
InstallSpacelabel.Show;
NeedSpaceLabel.Show
TotalSpaceLabel2.Show;
FreeSpaceLabel2.Show;
InstallSpacelabel2.Show;
NeedSpaceLabel2.Show;
IMGSetVisibility(DirFolder,True);
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(HDD,True);
BtnSetVisibility(hDirBrowseBtn,True);
end;
#ifdef Components
wpSelectComponents: begin
SelectComponentsLabel.Show;
WizardForm.ComponentsList.Show;
end;
#endif
wpSelectProgramGroup: begin
SelectStartMenuFolderLabel.Show;
SelectStartMenuFolderBrowseLabel.Show;
GroupEditLabel.Show;
NoIconsLabel.Show;
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(GroupFolder,True);
BtnSetVisibility(NoIconsCheck,True);
BtnSetVisibility(hGroupBrowseBtn,True);
end;
#ifdef Tasks
wpSelectTasks: begin
SelectTasksLabel.Show;
WizardForm.TasksList.Show;
end;
#endif
wpReady: begin
ReadyBitmap.Show;
ReadyScrollBar.Show;
ReadyPanelLabel.Show;
ReadyPanel.Show;
ReadyLabel.Show;
ReadyPanelLabel.Caption := WizardForm.ReadyMemo.Lines.Text;
end;
[B][COLOR="Red"]wpInstalling: begin также написал куда это добавить[/COLOR][/B]
InstallingLabel.Show;
StatusLabel.Show;
IsDoneShow();
[B][COLOR="Red"]WizardForm.StatusLabel.Show добавь это[/COLOR][/B]
end;
wpFinished: begin
FinishedHeadingLabel.Show;
FinishedLabel.Show;
LabelTime3.Show;
end;
end;
end;
//===== [Конец-Показываем Компоненты] =====\\
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('b2p.dll');
ExtractTemporaryFile('Click.wav');
ExtractTemporaryFile('WFEnter.wav');
ExtractTemporaryFile('Check.wav');
ExtractTemporaryFile('skin.cjstyles');
LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');
Result:=True;
end;
procedure InitializeWizard;
begin
ExtractTemporaryFile('Splash.png');
ShowSplashScreen(WizardForm.Handle,ExpandConstant( '{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFF FFF,10);
begin
CreateWizardForm;
OldProc:=SetWindowLong(WizardForm.Handle,-4,WrapWFProc(@WFWndProc,4));
ButtonsTextures;
#ifdef BASS
ExtractTemporaryFile('cash.dll');
ExtractTemporaryFile('BASS.dll');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(ExpandConstant('{tmp}\cash.dll')), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start;
BASS_ChannelPlay(mp3Handle,False);
#endif
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons;
HideComponents;
ShowComponents(CurPageID);
ObjectFunc(WizardForm.DirEdit);
if (CurPageID = wpFinished) and ISDoneError then begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
FinishedLabel.Font.Color:= $0000FF;
FinishedHeadingLabel.Caption:= ExpandConstant('{cm:ErrorFinishedHeadingLabel}');
FinishedLabel.Caption:= ExpandConstant('{cm:ErrorFinishedLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
end;
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
IsDoneUnpack(CurStep);
end;
procedure DeinitializeSetup;
begin
BGImageStream.Free;
BTNImageStream.Free;
WFButtonFont.Free;
gdipShutdown;
UnloadSkin();
#ifdef BASS
BASS_Stop();
BASS_Free();
#endif
end;[/SPOILER]