VASYAKRN, не учат.
Подскажите пожалуйста , почему на странице компоннетов нет выбора компонентов?
Вот скрипт
[more]#define Components
// Навания игры ;;
#define MyAppName "Call of Duty - Black Ops"
#define AppName "Call of Duty - Black Ops"
#define CompanyName "Activision"
#define Version "1.3"
#define Publisher "Dark"
// Навания игры ;;
// Создаем запуск игры ;;
#define EXE "Chernobyl.exe"
// Создаем запуск игры ;;
// Форма инсталлятора ;;
#define FormPic "form.png"
// Форма инсталлятора ;;
// Место на диске в (МБ)
#define Size "7500"
// Место на диске в (МБ)
// ExtraDiskSpaceRequired ;;
#define NeedSize "5000000000"
// ExtraDiskSpaceRequired ;;
// Количество свободной оперативной памяти нужное для распаковки ;;
#define NeedMem 512
// Количество свободной оперативной памяти нужное для распаковки ;;
// Раскоментируем после первой установки и компилим проект заново. ;;
//#define records
// Раскоментируем после первой установки и компилим проект заново. ;;
#define precomp04
//#define precomp038
//#define unrar
[Setup]
AppName={#MyAppName}
AppVerName={#MyAppName}
AppVersion={#Version}
AppPublisher={#Publisher}
DefaultDirName={pf}\{#CompanyName}\{#MyAppName}
DefaultGroupName={#Publisher}\{#MyAppName}
AllowNoIcons=yes
OutputDir=Out
OutputBaseFilename=setup
ShowLanguageDialog=no
DirExistsWarning=no
MinVersion=0,5.01
VersionInfoDescription={#MyAppName}
ShowTasksTreeLines=True
DisableReadyPage=True
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
#include "ISS\Messages.iss"
#ifdef Components
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: text; Description: Язык субтитров; Types: full; Flags: fixed
Name: text\rus; Description: Русский; Flags: exclusive; ExtraDiskSpaceRequired: 100000000
Name: text\eng; Description: Английский; Flags: exclusive; ExtraDiskSpaceRequired: 200000000
Name: voice; Description: Язык озвучки; Types: full; Flags: fixed
Name: voice\rus; Description: Русский; Flags: exclusive; ExtraDiskSpaceRequired: 500000000
Name: voice\eng; Description: Английский; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
Name: redist; Description: Дополнительное ПО; Types: full; Flags: fixed
Name: redist\VCRedist; Description: Установить библиотеки Microsoft Visual C ++ ; Flags:checkablealone;
Name: redist\DirectX; Description: Обновить Microsoft DirectX; Flags: checkablealone;
#endif
[Files]
Source: "Files\*"; Flags: dontcopy;
Source: "ISDone\*"; Flags: dontcopy;
Source: "Files\InnoCallback.dll"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;
//Source: "Files\ISSkin.dll"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;
//Source: "Files\skin.cjstyles"; DestDir: "{app}"; Flags: ignoreversion; Attribs: hidden system;
#ifdef records
Source: "ISDone\records.inf"; DestDir: "{tmp}"; Flags: dontcopy
#endif
#ifdef precomp04
Source: "ISDone\packjpg_dll.dll"; DestDir: "{tmp}"; Flags: dontcopy
Source: "ISDone\RTconsole.exe"; DestDir: "{tmp}"; Flags: dontcopy
Source: "ISDone\precomp04.exe"; DestDir: "{tmp}"; Flags: dontcopy
#endif
#ifdef precomp038
Source: "ISDone\packjpg_dll.dll"; DestDir: "{tmp}"; Flags: dontcopy
Source: "ISDone\RTconsole.exe"; DestDir: "{tmp}"; Flags: dontcopy
Source: "ISDone\precomp038.exe"; DestDir: "{tmp}"; Flags: dontcopy
Source: "ISDone\zlib1.dll"; DestDir: "{tmp}"; Flags: dontcopy
#endif
#ifdef unrar
Source: "ISDone\Unrar.dll"; DestDir: "{tmp}"; Flags: dontcopy
#endif
[Icons]
Name: {userdesktop}\{#MyAppName}; Filename: "{app}\{#EXE}"; WorkingDir: "{app}"; Check: Desktop and not InstallRedist;
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}; IconFilename: "{app}\5.ico"; Comment: {cm:Deletegame}; Check: NoIcons and not InstallRedist;
Name: {group}\{#MyAppName}; Filename: "{app}\{#EXE}"; WorkingDir: "{app}"; Comment: {cm:Launchgame}; Check: NoIcons and not InstallRedist;
[Registry]
Root: HKLM; Subkey: "SOFTWARE\{#CompanyName}\{#MyAppName}"; ValueName: "InstallDir"; ValueType: String; ValueData: "{app}"; Flags: uninsdeletekey; Check: not InstallRedist;
Root: HKLM; Subkey: "SOFTWARE\{#CompanyName}\{#MyAppName}"; ValueName: "Language"; ValueType: String; ValueData: "rus"; Flags: uninsdeletekey; Check: not InstallRedist;
Root: HKLM; Subkey: "SOFTWARE\{#CompanyName}\{#MyAppName}"; ValueName: "execPath"; ValueType: String; ValueData: "{app}\{#EXE}"; Flags: uninsdeletekey; Check: not InstallRedist;
Root: HKLM; Subkey: "SOFTWARE\{#CompanyName}\{#MyAppName}"; ValueName: "info"; ValueType: String; ValueData: "adab76f30e304e148dd119624ee27b07"; Flags: uninsdeletekey; Check: not InstallRedist;
Root: HKLM; Subkey: "SOFTWARE\{#CompanyName}\{#MyAppName}"; ValueName: "installdir"; ValueType: String; ValueData: "{app}"; Flags: uninsdeletekey; Check: not InstallRedist;
Root: HKLM; Subkey: "SOFTWARE\{#CompanyName}\{#MyAppName}"; ValueName: "language"; ValueType: String; ValueData: "us"; Flags: uninsdeletekey; Check: not InstallRedist;
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
[Code]
const
WFDiskTimerID = 1;
WFSysReqTimerID = 2;
ARTitleTimerID = 2;
BASS_ACTIVE_PAUSED = 3;
BASS_SAMPLE_LOOP = 4;
type
TPBProc = function (h:hWnd;Msg,wParam,lParam:Longint):Longint;// Для прогресс бара
TTimerProc = procedure (h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
TSystemTime = record wYear, wMonth, wDayOfWeek, wDay, wHour, wMinute, wSecond, wMilliseconds: Word; end;
var
SelectTasksPage: TWizardPage; // Создаем страницу с ДОП. ПО
Image, Workspace, TextWorkspace,
Logo, Edit, HDD: Longint;
Welcome1, Welcome2, PageNameLabel, PageDescriptionLabel,
SelectDirBrowseLabel, DirEditLabel,
SelectStartMenuFolderBrowseLabel, GroupEditLabel, NoIconsLabel,
SelectTasksLabel, DesktopLabel, DirectXLabel, Finish1, Finish2: TLabel;
NoIconsCheck, DesktopCheck, DirectXCheck: HWND;
StatusLabel, FilenameLabel: TLabel;
mp3Name: string;
MusicButton,mp3Handle: HWND;
NeedSize:Integer;
FreeMB, TotalMB: Cardinal;
NeedSpaceLabel, FreeSpaceLabel: TLabel;
/////////////////////////////////////////////////////////////////////
function ReleaseCapture(): Longint; external 'ReleaseCapture@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 LabelOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(WizardForm.Handle,$0112,$F012,0);
end;
function GetLocalTime(var lpSystemTime: TSystemTime): Boolean; external 'GetLocalTime@kernel32.dll stdcall';
function SystemTimeToFileTime(const lpSystemTime: TSystemTime; var lpFileTime: TFileTime): Boolean; external 'SystemTimeToFileTime@kernel32.dll stdcall';
function FileTimeToSystemTime(const lpFileTime: TFileTime; var lpSystemTime: TSystemTime): Boolean; external 'FileTimeToSystemTime@kernel32.dll stdcall';
function WrapTimerProc(callback:TTimerProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// Подключаем botva2
#include "ISS\botva2.iss"
// Подключаем кнопки
#include "ISS\Button.iss"
// Подключаем музыку
#include "ISS\BASS.iss"
// Подключаем сис требования
//#include "ISS\System.iss"
// Подключаем прогресс бар(Для прогресс бара)
#include "ISS\ProgressBar.iss"
// Подключаем распаковщик ISDone
#include "ISS\ISDone.iss"
// Подключаем сам прогресс бар
#include "ISS\ProgresStep.iss"
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure InitializeWizard2;
begin
with WizardForm do begin
ComponentsDiskSpaceLabel.Hide;
SelectComponentsLabel.Hide;
//WizardForm.ComponentsList.Hide;
//WizardForm.ComponentsList.Show;
Bevel.Hide;// Убераем стандартною линию
BorderStyle:=bsNone;// Убераем заголовок(Стандартную тему)
InnerNotebook.Hide;// Убераем всё стандартное
OuterNotebook.Hide;// Убераем всё стандартное
ClientWidth:=ScaleX(606);// Размер инсталлятора(Ширина)
ClientHeight:=ScaleY(384);// Размер инсталлятора(Высота)
Color:=$282828;// Цвет всего инсталлятора
end;
with TLabel.Create(WizardForm) do begin
Parent:=WizardForm;
AutoSize:=False;
Top:=14;
Left:=-10;
Width:=WizardForm.ClientWidth
Height:=WizardForm.ClientHeight
Transparent:=True;
Alignment := taCenter;
Font.Name:= 'Comic Sans MS'
Font.Color:=$FFFFFF;
Caption:=WizardForm.Caption;
OnMouseDown:=@LabelOnMouseDown;
end;
ExtractTemporaryFile('Skin.png');
ExtractTemporaryFile('Img.jpg');
ExtractTemporaryFile('Workspace.png');
ExtractTemporaryFile('Textspace.png');
ExtractTemporaryFile('Logo.png');
ExtractTemporaryFile('Edit.png');
ExtractTemporaryFile('hard-drive.png');
ExtractTemporaryFile('CheckBox.png');
//Skin - Тема инсталлятора Skin:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Skin.png'),ScaleX(0), ScaleY(0),WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);
//Image и Worspace - Картинка Инсталлятора
Image:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Img.jpg'),ScaleX(15), ScaleY(34),ScaleX(578), ScaleY(335),True,True);
Workspace:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Workspace.png'),ScaleX(15), ScaleY(34),ScaleX(578), ScaleY(335),True,True);
//TextWorckspace - Для того чтобы, текст можно было различить
TextWorkspace:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Textspace.png'),ScaleX(30), ScaleY(80),ScaleX(546), ScaleY(240),True,True);
//Logo - Инфо о создателя этой программы или RePack`a
Logo:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Logo.png'),ScaleX(35), ScaleY(345),ScaleX(171), ScaleY(13),True,True);
//Edit - полоса которая отображает путь установки
Edit:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Edit.png'),ScaleX(125), ScaleY(185),ScaleX(280),ScaleY(20),True,True);
//HDD - Просто картинка (Папка)
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\hard-drive.png'),ScaleX(60), ScaleY(147),ScaleX(60), ScaleY(60),True,True);
ImgApplyChanges(WizardForm.Handle);
SetWindowLong(WizardForm.Handle,-20,GetWindowLong(WizardForm.Handle,-20) or $80000);
SetLayeredWindowAttributes(WizardForm.Handle,$00FF00,0,1);
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
procedure GetFreeSpaceCaption(Sender: TObject);
var
Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if FreeMB > 1024 then
FreeSpaceLabel.Caption := ExpandConstant('{cm:FreeSpace} ')+ FloatToStr(round(FreeMB/1024*100)/100) + ' Гб' else
FreeSpaceLabel.Caption := ExpandConstant('{cm:FreeSpace} ')+ IntToStr(FreeMB)+ ' Мб';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False else
WizardForm.NextButton.Enabled := True; end;
procedure GetNeedSpaceCaptionFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
begin
if FreeSpaceLabel.Font.Color=$FFFFFF then FreeSpaceLabel.Font.Color:=$0000FF else FreeSpaceLabel.Font.Color:=$FFFFFF;
end;
procedure GetNeedSpaceCaption;
begin
if NeedSize > 1024 then
NeedSpaceLabel.Caption := ExpandConstant('{cm:NeedSpace} ')+ FloatToStr(round(NeedSize/1024*100)/100) + ' Гб' else
NeedSpaceLabel.Caption := ExpandConstant('{cm:NeedSpace} ')+ IntToStr(NeedSize)+ ' Мб';
if (FreeMB<NeedSize) then
SetTimer(WizardForm.Handle,WFDiskTimerID,1000,WrapTimerProc(@GetNeedSpaceCaptionFlashing,4));
end;
procedure CurPageChanged3(CurPageID: Integer);
begin
if CurPageID=wpSelectDir then begin
GetNeedSpaceCaption;
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled:=False
end;
end;
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
//Не создавать папку в меню Пуск
function InstallRedist: Boolean;
begin
if MyError then
Result:= True;
end;
function NoIcons: Boolean;
begin
Result:= BtnGetEnabled(hGroupBrowseBtn);
end;
procedure NoIconsClick(hBtn:HWND);
var
Check:boolean;
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
Check:=BtnGetChecked(hBtn);
BtnSetEnabled(hGroupBrowseBtn, not Check);
GroupEditLabel.Enabled:=not Check;
if Check then NoIconsLabel.Font.Color:=$B6B6B6 else NoIconsLabel.Font.Color:=$FFFFFF;
end;
procedure NoIconsLabelClick(Sender:TObject);
begin
BtnSetChecked(NoIconsCheck, not BtnGetChecked(NoIconsCheck));
NoIconsClick(NoIconsCheck);
end;
//=====================================
//Создать ярлык на Рабочем столе
function Desktop: Boolean;
begin
Result:= BtnGetChecked(DesktopCheck);
end;
procedure DesktopClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then DesktopLabel.Font.Color:=$B6B6B6 else DesktopLabel.Font.Color:=$FFFFFF;
end;
procedure DesktopLabelClick(Sender:TObject);
begin
BtnSetChecked(DesktopCheck, not BtnGetChecked(DesktopCheck));
DesktopClick(DesktopCheck);
end;
//=====================================
//Установить Microsoft DirectX
function DirectX: Boolean;
begin
Result:= BtnGetChecked(DirectXCheck);
end;
procedure DirectXClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'),$0001);
if BtnGetChecked(hBtn) then DirectXLabel.Font.Color:=$B6B6B6 else DirectXLabel.Font.Color:=$FFFFFF;
end;
procedure DirectXLabelClick(Sender:TObject);
begin
BtnSetChecked(DirectXCheck, not BtnGetChecked(DirectXCheck));
DirectXClick(DirectXCheck);
end;
//=====================================
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure InitializeWizard3;
begin
PageNameLabel:=TLabel.Create(WizardForm);
with PageNameLabel do begin
AutoSize:= False;
WordWrap:= True;
SetBounds(ScaleX(45), ScaleY(90), ScaleX(400), ScaleY(50));
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 9;
Font.Color:=$FFFFFF;
// Font.Style:=[fsBold, fsItalic];
OnMouseDown:=@LabelOnMouseDown;
Parent:=WizardForm;
end;
PageDescriptionLabel:=TLabel.Create(WizardForm);
with PageDescriptionLabel do begin
AutoSize:= False;
WordWrap:= True;
SetBounds(ScaleX(80), ScaleY(110), ScaleX(400), ScaleY(50));
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
// Font.Style:=[fsBold, fsItalic];
OnMouseDown:=@LabelOnMouseDown;
Parent:=WizardForm;
end;
///////////////////////////////
Welcome1:= TLabel.Create(WizardForm);
with Welcome1 do begin
AutoSize:=False
SetBounds(ScaleX(118), ScaleY(127), ScaleX(350), ScaleY(65));
WordWrap:=True
Alignment := taCenter;
Transparent:=True
Font.Name:='Verdana';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold]
Caption:= ExpandConstant('{cm:Welcome1}')+#13#10+('{#MyAppName}');
OnMouseDown:=@LabelOnMouseDown;
Parent:=WizardForm;
end;
Welcome2:=TLabel.Create(WizardForm);
with Welcome2 do begin
AutoSize:=False
SetBounds(ScaleX(50), ScaleY(170), ScaleX(500), ScaleY(500));
WordWrap:=True
Alignment := taCenter;
Transparent:=True
Font.Name:='Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style := [fsBold, fsItalic];
Caption:= ExpandConstant('{cm:Welcome2}');
OnMouseDown:=@LabelOnMouseDown;
Parent:=WizardForm;
end;
///////////////////////////////
SelectDirBrowseLabel := TLabel.Create(WizardForm);
with SelectDirBrowseLabel do begin
AutoSize:=False;
SetBounds(ScaleX(125), ScaleY(150), ScaleX(400), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
// Font.Style := [fsBold]//, fsItalic];
OnMouseDown:=@LabelOnMouseDown;
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
Parent := WizardForm;
end;
DirEditLabel := TLabel.Create(WizardForm);
with DirEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(130), ScaleY(188), ScaleX(275), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Name:= 'Arial'
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
OnMouseDown:=@LabelOnMouseDown;
Parent := WizardForm;
end;
NeedSize := {#Size};
NeedSpaceLabel := TLabel.Create(WizardForm);
with NeedSpaceLabel do begin
Parent := WizardForm;
AutoSize:=False;
Left := ScaleX(165);
Top := ScaleY(235);
Width := ScaleX(209);
Height := ScaleY(13);
WordWrap:= True;
Transparent:=True;
Alignment := taCenter;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsItalic];
OnMouseDown:=@LabelOnMouseDown;
end;
FreeSpaceLabel := TLabel.Create(WizardForm);
with FreeSpaceLabel do begin
Parent := WizardForm;
AutoSize:=False;
Left := ScaleX(165);
Top := ScaleY(213);
Width := ScaleX(209);
Height := ScaleY(13);
WordWrap:= True;
Transparent:=True;
Alignment := taCenter;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsItalic];
OnMouseDown:=@LabelOnMouseDown;
end;
WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption;
WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
WizardForm.DiskSpaceLabel.Hide;
///////////////////////////////
SelectStartMenuFolderBrowseLabel := TLabel.Create(WizardForm);
with SelectStartMenuFolderBrowseLabel do begin
AutoSize:=False;
SetBounds(ScaleX(125), ScaleY(150), ScaleX(400), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
// Font.Style := [fsBold]//, fsItalic];
OnMouseDown:=@LabelOnMouseDown;
Caption:= WizardForm.SelectStartMenuFolderBrowseLabel.Caption;
Parent := WizardForm;
end;
GroupEditLabel := TLabel.Create(WizardForm);
with GroupEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(130), ScaleY(188), ScaleX(275), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Name:= 'Arial'
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
OnMouseDown:=@LabelOnMouseDown;
Parent := WizardForm;
end;
//Не создавать папку в меню Пуск
NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(122),ScaleY(213),ScaleX(20),ScaleY(20),ExpandConstant('{tmp}\CheckBox.png'),2,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));
BtnSetEvent(NoIconsCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649));
NoIconsLabel := TLabel.Create(WizardForm);
with NoIconsLabel do begin
AutoSize:=False;
SetBounds(ScaleX(147), ScaleY(215), ScaleX(275), ScaleY(17));
OnClick:= @NoIconsLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsBold, fsItalic];
Caption := WizardForm.NoIconsCheck.Caption;
Parent := WizardForm;
end;
///////////////////////////////
SelectTasksPage := CreateCustomPage(wpSelectProgramGroup, ExpandConstant('{cm:TasksName}'), ExpandConstant('{cm:TasksDescription}'));
SelectTasksLabel := TLabel.Create(WizardForm);
with SelectTasksLabel do begin
AutoSize:=False;
SetBounds(ScaleX(90), ScaleY(150), ScaleX(400), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsBold, fsItalic];
Caption:= ExpandConstant('{cm:SelectTasksLabel}');
OnMouseDown:=@LabelOnMouseDown;
Parent := WizardForm;
end;
//Создать ярлык на Рабочем столе
DesktopCheck:=BtnCreate(WizardForm.Handle,ScaleX(87),ScaleY(196),ScaleX(20),ScaleY(20),ExpandConstant('{tmp}\CheckBox.png'),2,True);
BtnSetEvent(DesktopCheck,BtnClickEventID,WrapBtnCallback(@DesktopClick,1));
BtnSetEvent(DesktopCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(DesktopCheck,GetSysCursorHandle(32649));
DesktopLabel := TLabel.Create(WizardForm);
with DesktopLabel do begin
AutoSize:=False;
SetBounds(ScaleX(112), ScaleY(198), ScaleX(400), ScaleY(20));
OnClick:= @DesktopLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsBold, fsItalic];
Caption := ExpandConstant('{cm:Desktop}');
Parent := WizardForm;
end;
//Установить Microsoft DirectX
DirectXCheck:=BtnCreate(WizardForm.Handle,ScaleX(87),ScaleY(220),ScaleX(20),ScaleY(20),ExpandConstant('{tmp}\CheckBox.png'),2,True);
BtnSetEvent(DirectXCheck,BtnClickEventID,WrapBtnCallback(@DirectXClick,1));
BtnSetEvent(DirectXCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(DirectXCheck,GetSysCursorHandle(32649));
DirectXLabel := TLabel.Create(WizardForm);
with DirectXLabel do begin
AutoSize:=False;
SetBounds(ScaleX(112), ScaleY(222), ScaleX(400), ScaleY(20));
OnClick:= @DirectXLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsBold, fsItalic];
Caption := ExpandConstant('{cm:DirectX}');
Parent := WizardForm;
end;
///////////////////////////////
StatusLabel := TLabel.Create(WizardForm);
with StatusLabel do begin
AutoSize:=False;
SetBounds(ScaleX(95), ScaleY(166), ScaleX(400), ScaleY(17));
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsBold,fsItalic];
OnMouseDown:=@LabelOnMouseDown;
Parent := WizardForm;
end;
FilenameLabel := TLabel.Create(WizardForm);
with FilenameLabel do begin
AutoSize:=False;
SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0));
Transparent:=True;
Font.Name:= 'Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style:=[fsItalic];
OnMouseDown:=@LabelOnMouseDown;
end;
///////////////////////////////
Finish1:= TLabel.Create(WizardForm);
with Finish1 do begin
AutoSize:=False
SetBounds(ScaleX(118), ScaleY(127), ScaleX(350), ScaleY(65));
WordWrap:=True
Alignment := taCenter;
Transparent:=True
Font.Name:='Verdana';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold]
Caption:= ExpandConstant('{cm:Finish1}');
OnMouseDown:=@LabelOnMouseDown;
Parent:=WizardForm;
end;
Finish2:=TLabel.Create(WizardForm);
with Finish2 do begin
AutoSize:=False
SetBounds(ScaleX(50), ScaleY(170), ScaleX(500), ScaleY(500));
WordWrap:=True
Alignment := taCenter;
Transparent:=True
Font.Name:='Verdana';
Font.Size:= 8;
Font.Color:=$FFFFFF;
//Font.Style := [fsBold, fsItalic];
Caption:= ExpandConstant('{cm:Finish2}');
OnMouseDown:=@LabelOnMouseDown;
Parent:=WizardForm;
end;
end;
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure HideComponents;
begin
Welcome1.Hide;
Welcome2.Hide;
SelectDirBrowseLabel.Hide;
DirEditLabel.Hide;
NeedSpaceLabel.Hide;
FreeSpaceLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
GroupEditLabel.Hide;
NoIconsLabel.Hide;
SelectTasksLabel.Hide;
DesktopLabel.Hide;
DirectXLabel.Hide;
StatusLabel.Hide;
FilenameLabel.Hide;
Finish1.Hide;
Finish2.Hide;
end;
procedure ShowComponents(CurPageID: Integer);
begin
PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption
PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption
case CurPageID of
wpWelcome: begin
Welcome1.Show
Welcome2.Show
end;
wpSelectDir: begin
ImgSetVisibility(Edit,True);
ImgSetVisibility(HDD,True);
ImgSetVisibility(DirBrowse,True);
BtnSetVisibility(hDirBrowseBtn,True);
SelectDirBrowseLabel.Show
DirEditLabel.Show
NeedSpaceLabel.Show
FreeSpaceLabel.Show
end;
wpSelectProgramGroup: begin
ImgSetVisibility(Edit,True);
ImgSetVisibility(HDD,True);
ImgSetVisibility(GroupBrowse,True);
BtnSetVisibility(hGroupBrowseBtn,True);
BtnSetVisibility(NoIconsCheck,True);
SelectStartMenuFolderBrowseLabel.Show
GroupEditLabel.Show
NoIconsLabel.Show;
end;
SelectTasksPage.ID: begin
BtnSetVisibility(DesktopCheck,True);
BtnSetVisibility(DirectXCheck,True);
SelectTasksLabel.Show;
DesktopLabel.Show;
DirectXLabel.Show;
WizardForm.NextButton.Caption:=SetupMessage(msgButtonInstall);
end;
wpInstalling: begin
BtnSetVisibility(hNextBtn,False);
BtnSetVisibility(hNextBtn,True);
BtnSetEnabled(hNextBtn,false);
StatusLabel.Show;
FilenameLabel.Show;
end;
wpFinished: begin
BtnSetVisibility(CancelUnpackingBtn,False);
BtnSetVisibility(CancelUnpackingBtn,True);
BtnSetEnabled(CancelUnpackingBtn,false);
BtnSetVisibility(hNextBtn,True);
BtnSetEnabled(hNextBtn,false);
Finish1.Show;
Finish2.Show;
end;
end;
end;
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure InitializeWizard;
begin
InitializeWizard2; // Для изображения инсталлятора
CreateWizardImage; // Для изображения кнопок
InitializeWizard3; // Для надписей
ButtonsTextures; // Для кнопок
ProgresStepWizard; // Для прогресс бара
InsertMusic; // Для музыки
// SystemWizardImage; // Для сис требований
// SystemPageComponents; // Для сис требований
end;
// Для работы с botva2 и innocallback
function InitializeSetup: Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');// Botva2
if not FileExists(ExpandConstant('{tmp}\innocallback.dll')) then ExtractTemporaryFile('innocallback.dll');// innocallback
// if not FileExists(ExpandConstant('{tmp}\skin.cjstyles')) then ExtractTemporaryFile('skin.cjstyles');
if not FileExists(ExpandConstant('{tmp}\BASS.dll')) then ExtractTemporaryFile('BASS.dll');
if not FileExists(ExpandConstant('{tmp}\MusicButton.png')) then ExtractTemporaryFile('MusicButton.png');
if not FileExists(ExpandConstant('{tmp}\Music.mp3')) then ExtractTemporaryFile('Music.mp3');
// LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');
Result:=True;
end;
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons; // Для кнопок
HideComponents;
ImgSetVisibility(Edit,False);
ImgSetVisibility(HDD,False);
ImgSetVisibility(DirBrowse,False);
ImgSetVisibility(GroupBrowse,False);
BtnSetVisibility(hDirBrowseBtn,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
BtnSetVisibility(DesktopCheck,False);
BtnSetVisibility(DirectXCheck,False);
ShowComponents(CurPageID);
ISDonePageChanged(CurPageID);
CurPageChanged3(CurPageID);
// SystemCurPageChanged(CurPageID); // Для сис требований
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
ISDoneStepChanged(CurStep); // Для распаковщика ISDone
PBStepChanged(CurStep); // Для прогресс бара
end;
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure DeInitializeSetup();
begin
gdipShutdown;// Для botva2
BASS_Stop;
BASS_Free;
WFButtonFont.Free; // Для кнопок (Надписи)
end;
//function InitializeUninstall(): Boolean; // Скин для деинсталлятора[/more]
Заранее спасибо.