#ifdef UNICODE
#define A "W"
#else
#define A "A"
#endif
const
FR_PRIVATE = $10;
#include "Modules/botva2.iss"
#include "Modules/ProgressBar.iss"
#include "Modules/TaskBar.iss"
#include "Modules/ISDone.iss"
var
Frame: TForm;
WFOldProc, Wizard1, Wizard2, Wizard3, fon, hdd, Folder, Edit, Start, Tasks, Components: Longint;
OldMinimizeAnimation: boolean;
hCancelBtn, hNextBtn, hBackBtn, hDirBrowseBtn,CancelBtn, MinBtn, hGroupBrowseBtn, NoIconsCheck, DPOCheck, DesktopCheck, MusicCheck, SoundCheck, AboutBtn, Font1:HWND;
ButtonFont: TFont;
DirEditLabel, MainLabel, GroupEditLabel, WelcomeLabel, WelcomeLabel2, SelectDir, SelectDir2, DesktopLabel, NoIconsLabel, MusicLabel, SoundLabel, DPOLabel, ComponentsText, ComponentsVoice: TLabel;
type
TCallbackProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint;
function mciSendString(lpstrCommand, lpstrReturnString: PAnsiChar; uReturnLength, hWndCallback: Integer): Integer; external 'mciSendString{#A}@winmm stdcall delayload';
function LoadImage(hInst: THandle; ImageName: PAnsiChar; ImageType: UINT; X, Y: Integer; Flags: UINT): THandle; external 'LoadImage{#A}@user32.dll stdcall';
function SetWindowRgn(hWnd: HWND; hRgn: LongWord; bRedraw: BOOL): Integer; external 'SetWindowRgn@user32.dll stdcall';
function ReleaseDC(hWnd: HWND; hDC: LongWord): Integer; external 'ReleaseDC@user32.dll stdcall';
function DeleteObject(p1: LongWord): BOOL; external 'DeleteObject@gdi32.dll stdcall';
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall';
function WndProcCallBack(P:TCallbackProc;ParamCount:integer):LongWord; external 'wrapcallback@files:ISDone.dll stdcall delayload';
function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam, lParam: Longint): Longint; external 'CallWindowProc{#A}@user32.dll stdcall';
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND; X, Y, cx, cy: Integer; uFlags: UINT): BOOL; external 'SetWindowPos@user32.dll stdcall';
function ReleaseCapture: Longint; external 'ReleaseCapture@user32.dll stdcall';
function AddFontResource(lpszFilename: String; fl, pdv: DWORD): Integer; external 'AddFontResourceEx{#A}@gdi32.dll stdcall';
function RemoveFontResource(lpFileName: String; fl, pdv: DWORD): BOOL; external 'RemoveFontResourceEx{#A}@gdi32.dll stdcall';
function SetWindowLong2(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function SetLayeredWindowAttributes(hwnd: hWnd; crKey: TColor; bAlpha: byte; dwFlags: DWORD): Boolean; external 'SetLayeredWindowAttributes@user32.dll stdcall';
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall';
procedure SetRgn(h:HWND;FileName:String;Width,Height:integer);
var
dc:LongWord;
FRgn:LongWord;
bmp:HBITMAP;
begin
BMP:=LoadImage(0,PAnsiChar(ExpandConstant('{tmp}')+'\'+FileName),0,Width,Height,$10);
dc:=GetDC(h);
FRgn:=CreateBitmapRgn(dc,bmp,$ffffff,0,0);
SetWindowRgn(h,FRgn,True);
ReleaseDC(h,dc);
DeleteObject(BMP);
end;
function WFProc(h:hWnd;Msg,wParam,lParam:Longint):Longint;
begin
if Msg=$3 then SetWindowPos(Frame.Handle,0,WizardForm.Left,WizardForm.Top,0,0,$515);
Result:=CallWindowProc(WFOldProc,h,Msg,wParam,lParam);
end;
procedure FrameMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
WizardForm.SetFocus;
ReleaseCapture;
SendMessage(WizardForm.Handle,$0112,$F012,0);
end;
procedure CreateWizardForm;
begin
with WizardForm do begin
WizardForm.BorderStyle:=bsNone;
WizardForm.ClientWidth:=465;
WizardForm.ClientHeight:=350;
WizardForm.InnerNotebook.Hide;
WizardForm.OuterNotebook.Hide;
WizardForm.Bevel.Hide;
WizardForm.NextButton.Width:=0;
WizardForm.CancelButton.Width:=0;
end;
Wizard1:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}')+'\fon.png',0,0,WizardForm.ClientWidth, WizardForm.ClientHeight,True,True);
Wizard2:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}')+'\fon2.png',0,0,WizardForm.ClientWidth, WizardForm.ClientHeight,True,True);
Wizard3:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}')+'\fon3.png',0,0,WizardForm.ClientWidth, WizardForm.ClientHeight,True,True);
OldMinimizeAnimation:=GetMinimizeAnimation;
SetMinimizeAnimation(True);
ImgApplyChanges(WizardForm.Handle);
SetWindowLong2(WizardForm.Handle,-20,GetWindowLong(WizardForm.Handle,-20) or $80000);
SetLayeredWindowAttributes(WizardForm.Handle,$00FF00,0,1);
end;
procedure CreateFrame;
begin
Frame:=TForm.Create(nil);
Frame.BorderStyle:=bsNone;
CreateFormFromImage(Frame.Handle,ExpandConstant('{tmp}\frame.png'));
with TLabel.Create(Frame) do begin
Parent:=Frame;
AutoSize:=False;
Left:=0;
Top:=0;
Width:=Frame.CLientWidth;
Height:=Frame.ClientHeight;
OnMouseDown:=@FrameMouseDown;
end;
WizardForm.Left:=Frame.Left;
WizardForm.Top:=Frame.Top;
WFOldProc:=SetWindowLong(WizardForm.Handle,-4,WndProcCallBack(@WFProc,4));
Frame.Show;
with TLabel.Create(WizardForm) do begin
Parent:=WizardForm;
AutoSize:=False;
Left:=0;
Top:=0;
Transparent:= true;
WordWrap:= true;
Width:=WizardForm.CLientWidth;
Height:=WizardForm.ClientHeight;
OnMouseDown:=@FrameMouseDown;
end;
end;
procedure WFDeInit;
begin
Frame.Visible:=False;
WizardForm.Visible:=False;
SetWindowLong(WizardForm.Handle,-4,WFOldProc);
Frame.Free;
end;
procedure MinimizeBtnClick(h:HWND);
begin
GetMinimizeAnimation;
SetMinimizeAnimation(true);
SendMessage(WizardForm.Handle,$112,61472,0);
end;
procedure CancelBtnClick(h:HWND);
begin
WizardForm.CancelButton.OnClick(WizardForm.CancelButton);
end;
procedure SetStateNewButtons;
begin
with WizardForm.BackButton do begin
BtnSetText(hBackBtn,PAnsiChar(Caption));
BtnSetVisibility(hBackBtn,Visible);
end;
with WizardForm.NextButton do begin
BtnSetText(hNextBtn,PAnsiChar(Caption));
BtnSetVisibility(hNextBtn,Visible);
end;
with WizardForm.CancelButton do begin
BtnSetText(hCancelBtn,PAnsiChar(Caption));
BtnSetVisibility(hCancelBtn,Visible);
end;
BtnSetText(hDirBrowseBtn,PAnsiChar(WizardForm.DirBrowseButton.Caption));
BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.GroupBrowseButton.Caption));
end;
procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
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;
function NoIcons: Boolean;
begin
Result:= BtnGetEnabled(hGroupBrowseBtn);
end;
function Desktop: Boolean;
begin
Result:= BtnGetChecked(DesktopCheck);
end;
function Music: Boolean;
begin
Result:= BtnGetChecked(MusicCheck);
end;
function Sound: Boolean;
begin
Result:= BtnGetChecked(SoundCheck);
end;
procedure NoIconsClick(hBtn:HWND);
var
Check:boolean;
begin
Check:=BtnGetChecked(hBtn);
BtnSetEnabled(hGroupBrowseBtn, Check);
WizardForm.GroupEdit.Enabled:=Check;
if Check then NoIconsLabel.Font.Color:={#FontColor} else NoIconsLabel.Font.Color:=-16777199;
end;
procedure NoIconsLabelClick(Sender:TObject);
begin
BtnSetChecked(NoIconsCheck, not BtnGetChecked(NoIconsCheck));
NoIconsClick(NoIconsCheck);
end;
procedure DesktopClick(hBtn:HWND);
var
Check:boolean;
begin
Check:=BtnGetChecked(hBtn);
if Check then DesktopLabel.Font.Color:={#FontColor} else DesktopLabel.Font.Color:=-16777199;
end;
procedure DesktopLabelClick(Sender:TObject);
begin
BtnSetChecked(DesktopCheck, not BtnGetChecked(DesktopCheck));
DesktopClick(DesktopCheck);
end;
function CheckMusik(): boolean;
begin
Result := Чекбокс Musik.cheked;
end;
function CheckAudio(): boolean;
begin
Result := Чекбокс Audio.cheked;
end;
procedure Buttons;
begin
ButtonFont:=TFont.Create;
with ButtonFont do begin
// Style:=[fsBold];
Name:='Tahoma';
Size:={#FontSize};
end;
with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,ScaleX(382),ScaleY(320),ScaleX(70),ScaleY(20),ExpandConstant('{tmp}\Button1.png'),1,False);
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,ButtonFont.Handle);
BtnSetText(hCancelBtn,'Отмена');
BtnSetFontColor(hCancelBtn,$ffffff,$ffffff,$ffffff,$333333);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,ScaleX(306),ScaleY(320),ScaleX(70),ScaleY(20),ExpandConstant('{tmp}\Button1.png'),1,False);
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,ButtonFont.Handle);
BtnSetText(hNextBtn,'Далее >');
BtnSetFontColor(hNextBtn,$ffffff,$ffffff,$ffffff,$333333);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,ScaleX(230),ScaleY(320),ScaleX(70),ScaleY(20),ExpandConstant('{tmp}\Button1.png'),1,False);
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,ButtonFont.Handle);
BtnSetText(hBackBtn,'< Назад');
BtnSetFontColor(hBackBtn,$ffffff,$ffffff,$ffffff,$333333);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,ScaleX(375),ScaleY(101),ScaleX(63),ScaleY(31),ExpandConstant('{tmp}\Button2.png'),7,False);
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649));
BtnSetText(hDirBrowseBtn,'Обзор...');
BtnSetFontColor(hDirBrowseBtn,$ffffff,$ffffff,$ffffff,$ffffff);
BtnSetFont(hDirBrowseBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,ScaleX(375),ScaleY(171),ScaleX(63),ScaleY(31),ExpandConstant('{tmp}\Button2.png'),7,False);
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetText(hGroupBrowseBtn,'Обзор...');
BtnSetFontColor(hGroupBrowseBtn,$ffffff,$ffffff,$ffffff,$ffffff);
BtnSetFont(hGroupBrowseBtn,ButtonFont.Handle);
Width:=0;
Height:=0;
end;
CancelBtn:=BtnCreate(WizardForm.Handle, ScaleX(432), ScaleY(12), ScaleX(18), ScaleY(20), ExpandConstant('{tmp}\CloseBtn.png'), 1, False);
BtnSetEvent(CancelBtn, BtnClickEventID,WrapBtnCallback(@CancelBtnClick,1));
MinBtn:=BtnCreate(WizardForm.Handle, ScaleX(407), ScaleY(12), ScaleX(18), ScaleY(20), ExpandConstant('{tmp}\MinBtn.png'), 1, false);
BtnSetEvent(MinBtn, BtnClickEventID, WrapBtnCallback(@MinimizeBtnClick, 1));
DesktopCheck:=BtnCreate(WizardForm.Handle, ScaleX(220), ScaleY(230), ScaleX(236), ScaleY(16), ExpandConstant('CheckBox.png'), 1, True);
BtnSetChecked(DesktopCheck, True);
BtnSetEvent(DesktopCheck,BtnClickEventID,WrapBtnCallback(@DesktopClick,1));
NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(220),ScaleY(270),ScaleX(236), ScaleY(16), ExpandConstant('CheckBox.png'),1,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));
BtnSetChecked(NoIconsCheck, true);
MusicCheck:=BtnCreate(WizardForm.Handle, ScaleX(26), ScaleY(230), ScaleX(236), ScaleY(16), ExpandConstant('CheckBox.png'), 1, True);
BtnSetChecked(MusicCheck, False);
BtnSetEvent(MusicCheck,BtnClickEventID,WrapBtnCallback(@MusicClick,1));
SoundCheck:=BtnCreate(WizardForm.Handle, ScaleX(26), ScaleY(270), ScaleX(236), ScaleY(16), ExpandConstant('CheckBox.png'), 1, True);
BtnSetChecked(SoundCheck, False);
BtnSetEvent(SoundCheck,BtnClickEventID,WrapBtnCallback(@SoundClick,1));
////////////
ImgApplyChanges(WizardForm.Handle);
end;
procedure DirEditOnChange(Sender: TObject);
var Drive: String;
begin
DirEditLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Drive:= ExtractFileDrive(WizardForm.DirEdit.Text);
if WizardForm.CurPageID = wpSelectDir then begin
BtnSetEnabled(hNextBtn, True);
end
end;
procedure GroupEditOnChange(Sender: TObject);
var Drive: String;
begin
GroupEditLabel.Caption:=MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
Drive:= ExtractFileDrive(WizardForm.GroupEdit.Text);
if WizardForm.CurPageID = wpSelectDir then begin
BtnSetEnabled(hNextBtn, True);
end
end;
procedure Wzf;
begin
ImgApplyChanges(WizardForm.Handle);
MainLabel:= TLabel.Create(WizardForm);
with MainLabel do
begin
Left:= ScaleX(10);
Top:= ScaleY(15);
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
Font.Size:=7;
Font.Color:=$999999;
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:Main}');
end;
WelcomeLabel:= TLabel.Create(WizardForm);
with WelcomeLabel do
begin
Left:= ScaleX(10);
Top:= ScaleY(215);;
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:Welcome1}');
end;
WelcomeLabel2:=TLabel.Create(WizardForm);
with WelcomeLabel2 do
begin
Left:= ScaleX(10);
Top:= ScaleY(215);;
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:Welcome2}');
end;
SelectDir:=TLabel.Create(WizardForm);
with SelectDir do
begin
Top:= ScaleY(65);
Left:= ScaleX(27);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:SelectDir1}');
end;
SelectDir2:=TLabel.Create(WizardForm);
with SelectDir2 do
begin
Top:= ScaleY(150);
Left:= ScaleX(27);
Width:= ScaleX(450);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:SelectDir2}');
end;
DirEditLabel := TLabel.Create(WizardForm);
with DirEditLabel do
begin
AutoSize:=False;
SetBounds(ScaleX(37), ScaleY(110), ScaleX(290), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Size:={#FontSize};
Font.Color:=$666666;
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Parent := WizardForm;
end;
WizardForm.DirEdit.OnChange:=@DirEditOnChange;
GroupEditLabel := TLabel.Create(WizardForm);
with GroupEditLabel do
begin
AutoSize:=False;
SetBounds(ScaleX(37), ScaleY(180), ScaleX(290), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Size:={#FontSize};
Font.Color:=$666666;
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
Parent := WizardForm;
end;
WizardForm.GroupEdit.OnChange:=@GroupEditOnChange;
DesktopLabel:=TLabel.Create(WizardForm);
with DesktopLabel do
begin
Top:= ScaleY(230);
Left:= ScaleX(240);
Width:= ScaleX(220);
Height:= ScaleY(25);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:DesktopTasks}');
end;
NoIconsLabel:=TLabel.Create(WizardForm);
with NoIconsLabel do
begin
Top:= ScaleY(270);
Left:= ScaleX(240);
Width:= ScaleX(220);
Height:= ScaleY(25);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
OnClick:=@NoIconsLabelClick;
Caption:= ExpandConstant('{cm:IconsCheck}');
end;
MusicLabel:=TLabel.Create(WizardForm);
with MusicLabel do
begin
Top:= ScaleY(230);
Left:= ScaleX(42);
Width:= ScaleX(220);
Height:= ScaleY(25);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:Music}');
end;
SoundLabel:=TLabel.Create(WizardForm);
with SoundLabel do
begin
Top:= ScaleY(270);
Left:= ScaleX(42);
Width:= ScaleX(220);
Height:= ScaleY(25);
AutoSize:= false;
WordWrap:= true;
Font.Size:={#FontSize};
Font.Color:={#FontColor};
Font.Style:=[fsBold];
Font.Name:='Tahoma';
Transparent:= true;
Parent:= WizardForm;
Caption:= ExpandConstant('{cm:Sound}');
end;
end;
function InitializeSetup:boolean;
begin
if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
Result:=True;
end;
procedure InitializeWizard();
begin
CreateWizardForm;
Wzf;
Buttons;
CreateFrame;
init_taskbar;
end;
procedure HideComponents;
begin
ImgSetVisibility(Wizard1,False);
ImgSetVisibility(Wizard2,False);
ImgSetVisibility(Wizard3,False);
WelcomeLabel.Hide;
WelcomeLabel2.Hide;
DesktopLabel.Hide;
SelectDir.Hide;
SelectDir2.Hide;
ImgSetVisibility(hdd,False);
ImgSetVisibility(Start,False);
ImgSetVisibility(Tasks,False);
ImgSetVisibility(Components,False);
BtnSetVisibility(hDirBrowseBtn, false);
BtnSetVisibility(hGroupBrowseBtn, false);
ImgSetVisibility(Folder,False);
ImgSetVisibility(fon,False);
ImgSetVisibility(Edit,False);
WizardForm.DirEdit.Hide;
WizardForm.GroupEdit.Hide;
WizardForm.ComponentsList.Hide
BtnSetVisibility(NoIconsCheck, false);
NoIconsLabel.Hide;
BtnSetVisibility(DPOCheck, false);
BtnSetVisibility(DesktopCheck, false);
DirEditLabel.Hide;
GroupEditLabel.Hide;
BtnSetVisibility(MusicCheck, false);
BtnSetVisibility(SoundCheck, false);
MusicLabel.Hide;
SoundLabel.Hide;
end;
Procedure CurPageChanged(CurPageID: Integer);
Begin
SetStateNewButtons;
HideComponents;
case CurPageID of
wpWelcome:
begin
ImgSetVisibility(Wizard1,True);
WelcomeLabel.Show;
WelcomeLabel2.Show;
end;
wpSelectDir:
begin
ImgSetVisibility(Wizard2,True);
DirEditLabel.Show;
ImgSetVisibility(Folder,True);
ImgSetVisibility(Edit,True);
WizardForm.DirEdit.Show;
SelectDir2.Show;
SelectDir.Show;
ImgSetVisibility(hdd,True);
BtnSetVisibility(hDirBrowseBtn, true);
GroupEditLabel.Show;
BtnSetVisibility(hGroupBrowseBtn, true);
ImgSetVisibility(Edit,True);
WizardForm.GroupEdit.Show;
SelectDir2.Show;
ImgSetVisibility(Start,True)
NoIconsLabel.Show;
BtnSetVisibility(MusicCheck, true);
BtnSetVisibility(SoundCheck, true);
MusicLabel.Show;
SoundLabel.Show;
BtnSetVisibility(NoIconsCheck, True);
ImgSetVisibility(Tasks,True);
BtnSetVisibility(DesktopCheck, true);
DesktopLabel.Show;
BtnSetVisibility(DPOCheck, true);
If WizardForm.FindComponent('NextButton') is TButton then
TButton(WizardForm.FindComponent('NextButton')). Caption:='Установить';
end;
wpInstalling:
begin
ImgSetVisibility(Wizard3,True);
end;
wpFinished:
begin
ImgSetVisibility(Wizard1,True);
WelcomeLabel.Caption:=ExpandConstant('{cm:Finished1}');
WelcomeLabel2.Caption:=ExpandConstant('{cm:Finished2}');
WelcomeLabel.Show;
WelcomeLabel2.Show;
end;
end;
if (CurPageID = wpFinished) and ISDoneError then
begin
ImgSetVisibility(Wizard1,True);
LabelTime3.Hide;
WelcomeLabel.Caption:=ExpandConstant('{cm:ErrorFinished2}');
WelcomeLabel2.Caption:=ExpandConstant('{cm:ErrorFinished1}');
//WelcomeLabel.Font.Color:= clRed;
//WelcomeLabel2.Font.Color:= clRed;
end;
ImgApplyChanges(WizardForm.Handle);
end;
procedure DeinitializeSetup();
begin
WFDeInit;
SetWindowLong(WizardForm.Handle,-4,WFOldProc);
SetMinimizeAnimation(OldMinimizeAnimation);
gdipShutdown;
ButtonFont.Free
WizardForm.Free;
end;
[/MORE]