[Setup]
SourceDir=.
OutputDir=Setup
AppName=Red Faction
AppVerName=Red Faction
AppVersion=Red Faction
AppPublisher=l7cux
AppCopyright=l7cux
DefaultDirName={pf}\Red Faction
DefaultGroupName=Red Faction
AllowNoIcons=true
OutputBaseFilename=setup
WizardImageFile=C:\Users\l7cux\Desktop\978586662.bmp
WizardSmallImageFile=C:\Users\l7cux\Desktop\12png_3226380_306935.bmp
SetupIconFile=C:\Users\l7cux\Desktop\rfg.ico
WindowVisible=false
WindowShowCaption=false
WindowResizable=false
DiskSpanning=true
DiskSliceSize=2100000000
SlicesPerDisk=1
WizardImageBackColor=clMaroon
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
[Files]
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: D:\RF2\978586662.bmp; DestDir: {tmp}; Flags: dontcopy
Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
[Icons]
Name: {group}\Red Faction; Filename: {app}\rfg_launcher.exe; WorkingDir: {app}; Parameters: Запуск игры
Name: {userdesktop}\Red Faction; Filename: {app}\rfg_launcher.exe; WorkingDir: {app}; Tasks: desktopicon; Parameters: Запуск игры
Name: {group}\{cm:UninstallProgram, Red Faction}; Filename: {uninstallexe}
[Run]
Description: {cm:LaunchProgram, Red Faction}; Filename: {app}\rfg_launcher.exe; WorkingDir: {app}; Parameters: Запуск игры; Flags: nowait postinstall skipifsilent unchecked
[UninstallDelete]
Type: filesandordirs; Name: {app}
Type: filesandordirs; Name: {app}
[code]
var
Icons, Group: TCheckBox;
SelectDirLabel, SelectDirLabelBrowse: TLabel;
IconsLabel, GroupLabel, RedistLabel, DirectXLabel: TLabel;
PageNameLabel, PageNameLabel1, PageNameLabel2, PageNameLabel3, PageNameLabel4: TLabel;
PageDescriptionLabel, PageDescriptionLabel1, PageDescriptionLabel2, PageDescriptionLabel3, PageDescriptionLabel4: TLabel;
StatusLabel, FilenameLabel: TLabel;
WelcomeLabel1, WelcomeLabel2,FinishedLabel, FinishedHeadingLabel: TLabel;
NeedSize:Integer;
FreeMB, TotalMB: Cardinal;
NeedSpaceLabel,FreeSpaceLabel: TLabel;
BmpFile: TBitmapImage;
SelectStartMenuFolderLabel, SelectStartMenuFolderBrowseLabel, ReadyLabel, NoIconsLabel: TLabel;
RunProgram: TCheckBox;
RunProgramLabel: Tlabel;
LicenseLabel1, LicenseAcceptedLabel, LicenseNotAcceptedLabel: Tlabel;
function InstallDirectX: Boolean;
begin
end;
function InstallRedist: Boolean;
begin
end;
function CreateIcons: Boolean;
begin
Result:=Icons.Checked;
end;
function GroupIcons: Boolean;
begin
Result:=Group.Checked;
end;
function Run: Boolean;
begin
Result:=RunProgram.Checked;
end;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
procedure RedistOnClick(Sender: TObject);
begin
end;
procedure DirectXLabelOnClick(Sender: TObject);
begin
end;
procedure IconsOnClick(Sender: TObject);
begin
if Icons.Checked = False then
Icons.Checked:= True else
Icons.Checked:= False;
end;
procedure GroupOnClick(Sender: TObject);
begin
if Group.Checked = False then
Group.Checked:= True else
Group.Checked:= False;
end;
procedure RunProgramClick(Sender: TObject);
begin
if RunProgram.Checked = False then
RunProgram.Checked:= True else
RunProgram.Checked:= False;
end;
Procedure NoIconsLabelOnClick (Sender: TObject);
begin
WizardForm.NoIconsCheck.Checked:=Not(WizardForm.NoIconsCheck.Checked)
end;
procedure LicenceAcceptedRadioOnClick(Sender: TObject);
begin
WizardForm.NextButton.Enabled:=True
end;
procedure LicenceNotAcceptedRadioOnClick(Sender: TObject);
begin
WizardForm.NextButton.Enabled:=False
end;
Procedure YesRadioOnClick (Sender: TObject);
begin
WizardForm.LicenseAcceptedRadio.Checked:=True
end;
Procedure NoRadioOnClick (Sender: TObject);
begin
WizardForm.LicenseNotAcceptedRadio.Checked:=True
end;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
//Свободное место
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:SPACE} ')+ FloatToStr(round(FreeMB/1024*100)/100) + ' GB' else
FreeSpaceLabel.Caption := ExpandConstant('{cm:SPACE} ')+ IntToStr(FreeMB)+ ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False else
WizardForm.NextButton.Enabled := True;
end;
procedure GetNeedSpaceCaption;
begin
if NeedSize > 1024 then
NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ FloatToStr(round(NeedSize/1024*100)/100) + ' GB' else
NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ IntToStr(NeedSize)+ ' MB';
end;
//Свободное место
procedure FilenameExt();
begin
FilenameLabel.Caption:= ExpandConstant(ExtractFileDir(CurrentFilename)) + '\' + ExtractFilename(CurrentFilename);
end;
//Загрузка скина
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external '
[email protected] stdcall';
function InitializeSetup(): Boolean;
begin
Result := True;
end;
procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
//Загрузка скина
procedure InitializeWizard2();
begin
ExtractTemporaryFile('978586662.bmp');
NeedSize:= 5580;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.WelcomePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.LicensePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectDirPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectProgramGroupPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.ReadyPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.InstallingPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.FinishedPage;
with WizardForm do
begin
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
DiskSpaceLabel.Hide;
SelectDirBitmapImage.Hide;
SelectDirBrowseLabel.Hide;
SelectDirLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
MainPanel.Hide
FilenameLabel.Hide;
StatusLabel.Hide;
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
ReadyLabel.Hide;
LicenseLabel1.Hide;
end;
with WizardForm do
begin
DirBrowseButton.Left:= DirBrowseButton.Left + ScaleX(40);
DirBrowseButton.Top:= DirBrowseButton.Top + ScaleY(72);
DirEdit.Left:= DirEdit.Left + ScaleX(40);
DirEdit.Top:= DirEdit.Top + ScaleY(72);
GroupBrowseButton.Left:= GroupBrowseButton.Left + ScaleX(40);
GroupBrowseButton.Top:= GroupBrowseButton.Top + ScaleY(72);
GroupEdit.Left:= GroupEdit.Left + ScaleX(40);
GroupEdit.Top:= GroupEdit.Top + ScaleX(72);
GroupEdit.Color:= ClBlack
NextButton.BringToFront;
BackButton.BringToFront;
CancelButton.BringToFront;
Font.Style:=[];
Font.Name:= 'MS Sans Serif';
DirEdit.Color:=clBlack;
Font.Color:=clWhite;
ProgressGauge.Top:=ScaleY(120);
ProgressGauge.Left:=ScaleX(20);
ProgressGauge.Width:=ScaleX(457);
ReadyMemo.Left:=ScaleX(40);
ReadyMemo.Top:=ScaleY(95)
ReadyMemo.ScrollBars:= ssVertical; //ssNone
ReadyMemo.font.Color:= clblack;
end;
with WizardForm do
begin
InnerNotebook.Left := ScaleX(0);
InnerNotebook.Top := ScaleY(0);
InnerNotebook.Width := ScaleX(497);
InnerNotebook.Height := ScaleY(360);
OuterNotebook.Left := ScaleX(0);
OuterNotebook.Top := ScaleY(0);
OuterNotebook.Width := ScaleX(497);
OuterNotebook.Height := ScaleY(360);
end;
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do
begin
Left:= ScaleX(176);
Top:= ScaleY(66);
Width:= ScaleX(301);
Height:= ScaleY(71);
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
Font.Size:= 14;
Font.Color:=ClWhite
Font.Style := [fsBold]
Parent:= WizardForm.WelcomePage;
Caption:= WizardForm.WelcomeLabel1.Caption;
end;
//WelcomePage
WelcomeLabel2:=TLabel.Create(WizardForm);
with WelcomeLabel2 do
begin
Top:= ScaleY(136);
Left:= ScaleX(176);
Width:= ScaleX(301);
Height:= ScaleY(300);
AutoSize:= false;
WordWrap:= true;
Transparent:= true;
Parent:= WizardForm.WelcomePage;
Caption:= WizardForm.WelcomeLabel2.Caption;
end;
//WelcomePage
//licensePage
LicenseLabel1:=TLabel.Create(WizardForm)
with LicenseLabel1 do
begin
Left:=40
Top:=70
Width:=465
Height:=28
AutoSize:=False
WordWrap:=True
Transparent:=True
Caption:=WizardForm.LicenseLabel1.Caption
Parent:=WizardForm.LicensePage
end;
WizardForm.LicenseMemo.Left:=40
WizardForm.LicenseMemo.Top:=108
WizardForm.LicenseMemo.Parent:=WizardForm.LicensePage
WizardForm.LicenseAcceptedRadio.Left:=40
WizardForm.LicenseAcceptedRadio.Top:=265
WizardForm.LicenseAcceptedRadio.Width:=14
WizardForm.LicenseAcceptedRadio.Height:=14
WizardForm.LicenseAcceptedRadio.Color:=clBlack
WizardForm.LicenseAcceptedRadio.Parent:=WizardForm.LicensePage
LicenseAcceptedLabel:=TLabel.Create(WizardForm)
with LicenseAcceptedLabel do
begin
Left:=56
Top:=265
Transparent:=True
Caption:=WizardForm.LicenseAcceptedRadio.Caption
Parent:=WizardForm.LicensePage
OnClick:= @YesRadioOnClick
end;
WizardForm.LicenseNotAcceptedRadio.Left:=40
WizardForm.LicenseNotAcceptedRadio.Top:=285
WizardForm.LicenseNotAcceptedRadio.Width:=14
WizardForm.LicenseNotAcceptedRadio.Height:=14
WizardForm.LicenseNotAcceptedRadio.Color:=clBlack
WizardForm.LicenseNotAcceptedRadio.Parent:=WizardForm.LicensePage
LicenseNotAcceptedLabel:=TLabel.Create(WizardForm)
with LicenseNotAcceptedLabel do
begin
Left:=56
Top:=285
Transparent:=True
Caption:=WizardForm.LicenseNotAcceptedRadio.Caption
Parent:=WizardForm.LicensePage;
OnClick:= @NoRadioOnClick;
end;
PageNameLabel:= TLabel.Create(WizardForm);
with PageNameLabel do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.LicensePage;
end;
PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.LicensePage;
end;
//LicensePage
//SelectDirPage
SelectDirLabel:= TLabel.Create(WizardForm);
with SelectDirLabel do
begin
Caption:= WizardForm.SelectDirLabel.Caption;
Left:= ScaleX(40);
Top:= WizardForm.SelectDirLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirLabel.Width;
Height:= WizardForm.SelectDirLabel.Height;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
SelectDirLabelBrowse:= TLabel.Create(WizardForm);
with SelectDirLabelBrowse do
begin
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
Left:= ScaleX(40);
Top:= WizardForm.SelectDirBrowseLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirBrowseLabel.Width;
Height:= WizardForm.SelectDirBrowseLabel.Height;
WordWrap:= True;
Transparent:= True;
Parent:= WizardForm.SelectDirPage;
end;
PageNameLabel1:= TLabel.Create(WizardForm);
with PageNameLabel1 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
PageDescriptionLabel1:= TLabel.Create(WizardForm);
with PageDescriptionLabel1 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
end;
begin
begin
end;
RedistLabel:= TLabel.Create(WizardForm);
with RedistLabel do
begin
Caption:='Установить NVidia Redist';
Left:= WizardForm.DirEdit.Left + 220;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @RedistOnClick;
end;
Icons:= TCheckBox.Create(WizardForm);
with Icons do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top + 35;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 2;
Checked:= False;
end;
IconsLabel:= TLabel.Create(WizardForm);
with IconsLabel do
begin
Caption:='Создать ярлык на рабочем столе';
Left:= WizardForm.DirEdit.Left + 20;
Top:= WizardForm.DirEdit.Top + 35;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @IconsOnClick;
end;
Group:= TCheckBox.Create(WizardForm);
with Group do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 3;
Checked:= False;
end;
GroupLabel:= TLabel.Create(WizardForm);
with GroupLabel do
begin
Caption:='Создать ярлыки в меню "Пуск"';
Left:= WizardForm.DirEdit.Left + 20;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @GroupOnClick;
end;
NeedSpaceLabel:= TLabel.Create(WizardForm);
with NeedSpaceLabel do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= ScaleY(262);
Width:= ScaleX(209);
Height:= ScaleY(13);
Transparent:= True;
end;
FreeSpaceLabel:= TLabel.Create(WizardForm);
with FreeSpaceLabel do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= ScaleY(280);
Width:= ScaleX(209);
Height:= ScaleY(13);
Transparent:= True;
end;
WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;
WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0;
//SelectDirPage
//ProgrammGroupPage
SelectStartMenuFolderLabel:=TLabel.Create(WizardForm)
with SelectStartMenuFolderLabel do
begin
Left:= ScaleX(40);
Top:= WizardForm.SelectDirLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirBrowseLabel.Width;
Height:= WizardForm.SelectDirBrowseLabel.Height;
AutoSize:=False
WordWrap:=True
Transparent:=True
Caption:=WizardForm.SelectStartMenuFolderLabel.Caption
Parent:=WizardForm.SelectProgramGroupPage
end;
SelectStartMenuFolderBrowseLabel:=TLabel.Create(WizardForm)
with SelectStartMenuFolderBrowseLabel do
begin
Left:= ScaleX(40);
Top:= WizardForm.SelectDirBrowseLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirBrowseLabel.Width
Height:= WizardForm.SelectDirBrowseLabel.Height
AutoSize:=False
WordWrap:=True
Transparent:=True
Caption:=WizardForm.SelectStartMenuFolderBrowseLabel.Caption
Parent:=WizardForm.SelectProgramGroupPage
end;
WizardForm.NoIconsCheck.Left:=ScaleX(40);
WizardForm.NoIconsCheck.Top:= WizardForm.DirEdit.Top + ScaleY(140)
WizardForm.NoIconsCheck.Width:=13
WizardForm.NoIconsCheck.Height:=13
WizardForm.NoIconsCheck.Visible:=True
WizardForm.NoIconsCheck.Parent:= WizardForm.SelectProgramGroupPage
NoIconsLabel:=TLabel.Create(WizardForm)
with NoIconsLabel do
begin
Left:=ScaleX(56);
Top:= WizardForm.DirEdit.Top + ScaleY(140)
Transparent:=True
OnClick:= @NoIconsLabelOnClick
Caption:=WizardForm.NoIconsCheck.Caption
Parent:=WizardForm.SelectProgramGroupPage
end;
PageNameLabel2:= TLabel.Create(WizardForm);
with PageNameLabel2 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectProgramGroupPage;
end;
PageDescriptionLabel2:= TLabel.Create(WizardForm);
with PageDescriptionLabel2 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.SelectProgramGroupPage;
end;
//ProgrammGroupPage
//ReadyPage
ReadyLabel:= TLabel.Create(WizardForm);
with ReadyLabel do
begin
Left:= ScaleX(40);
Top:= ScaleY(70);
Width:= ScaleX(325);
Height:= ScaleY(26);
AutoSize:= False;
Transparent:= true;
Caption:= 'Нажмите «Установить», чтобы продолжить, или «Назад», если Вы хотите' + #10 + 'просмотреть или изменить опции установки.'
Parent:= WizardForm.ReadyPage;
end;
PageNameLabel3:= TLabel.Create(WizardForm);
with PageNameLabel3 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.ReadyPage;
end;
PageDescriptionLabel3:= TLabel.Create(WizardForm);
with PageDescriptionLabel3 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.ReadyPage;
end;
//ReadyPage
//InstallingPage
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do
begin
Left:= ScaleX(20);
Top:= ScaleY(80);
Width:= WizardForm.StatusLabel.Width;
Height:= WizardForm.StatusLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.InstallingPage;
Caption:= 'Распаковка файлов...'
end;
FilenameLabel:= TLabel.Create(WizardForm);
with FilenameLabel do
begin
Left:= ScaleX(20);
Top:= ScaleY(100);
Width:= WizardForm.StatusLabel.Width;
Height:= WizardForm.StatusLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
PageNameLabel4:= TLabel.Create(WizardForm);
with PageNameLabel4 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
PageDescriptionLabel4:= TLabel.Create(WizardForm);
with PageDescriptionLabel4 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
//InstallingPage
//FinishedPage
FinishedHeadingLabel:=TLabel.Create(WizardForm);
with FinishedHeadingLabel do
begin
Top:= ScaleY(66);
Left:= ScaleX(176);
Width:= ScaleX(301);
Height:= ScaleY(53);
AutoSize:= false;
WordWrap:= true;
Font.Size:= 14;
Font.Color:=ClWhite
Font.Style := [fsBold]
Transparent:= true;
Parent:= WizardForm.FinishedPage;
Caption:= WizardForm.FinishedHeadingLabel.Caption;
end;
FinishedLabel:= TLabel.Create(WizardForm);
with FinishedLabel do
begin
Left:= ScaleX(176);
Top:= ScaleY(136);
Width:= ScaleX(301);
Height:= ScaleY(54);
AutoSize:= false;
WordWrap:= true;
Transparent:= true;
Parent:= WizardForm.FinishedPage;
Caption:= WizardForm.FinishedLabel.Caption;
end;
RunProgram:= TCheckBox.Create(WizardForm);
with RunProgram do
begin
Parent:= WizardForm.FinishedPage;
Left:= WizardForm.FinishedLabel.Left;
Top:= WizardForm.FinishedLabel.Top + 140;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 5;
Checked:= true;
end;
RunProgramLabel:= TLabel.Create(WizardForm);
with RunProgramLabel do
begin
Caption:='Запустить IconXP'; // Имя вашей программы
Left:= WizardForm.FinishedLabel.Left + 20;
Top:= WizardForm.FinishedLabel.Top + 140;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.FinishedPage;
OnClick:= @RunProgramClick;
end;
//FinishedPage
end.
procedure CurPageChanged(CurPageID: Integer);
begin
PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel1.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel1.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel2.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel2.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel3.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel3.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel4.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel4.Caption:= WizardForm.PageDescriptionLabel.Caption;
if CurPageID = wpSelectDir then
begin
GetNeedSpaceCaption;
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled:=False;
begin
if CurPageID=wpInstalling
then
if CurPageID=wpFinished
then
begin
WizardForm.Width:=497;
WizardForm.Height:=358;
WizardForm.Position:=poScreenCenter;
end
end;
end;
end;
const
Color = clblack;
procedure InitializeWizard1();
begin
WizardForm.Font.Color:=clwhite;
WizardForm.Color:=clblack;
WizardForm.WelcomeLabel1.Font.Color:=clWhite;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.WelcomePage.Color:=Color;
WizardForm.InnerPage.Color:=Color;
WizardForm.FinishedPage.Color:=Color;
WizardForm.LicensePage.Color:=clblack;
WizardForm.PasswordPage.Color:=Color;
WizardForm.InfoBeforePage.Color:=Color;
WizardForm.UserInfoPage.Color:=Color;
WizardForm.SelectDirPage.Color:=Color;
WizardForm.SelectComponentsPage.Color:=Color;
WizardForm.SelectProgramGroupPage.Color:=Color;
WizardForm.SelectTasksPage.Color:=Color;
WizardForm.ReadyPage.Color:=Color;
WizardForm.PreparingPage.Color:=Color;
WizardForm.InstallingPage.Color:=Color;
WizardForm.InfoAfterPage.Color:=Color;
WizardForm.DirEdit.Color:=clwhite;
WizardForm.DiskSpaceLabel.Color:=Color;
WizardForm.DirEdit.Color:=clGray;
WizardForm.GroupEdit.Color:=Color;
WizardForm.PasswordLabel.Color:=Color;
WizardForm.PasswordEdit.Color:=Color;
WizardForm.PasswordEditLabel.Color:=Color;
WizardForm.ReadyMemo.Color:=Color;
WizardForm.TypesCombo.Color:=Color;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.InfoBeforeClickLabel.Color:=Color;
WizardForm.MainPanel.Color:=Color;
WizardForm.PageNameLabel.Color:=Color;
WizardForm.PageDescriptionLabel.Color:=Color;
WizardForm.ReadyLabel.Color:=Color;
WizardForm.FinishedLabel.Color:=Color;
WizardForm.YesRadio.Color:=Color;
WizardForm.NoRadio.Color:=Color;
WizardForm.WelcomeLabel2.Color:=Color;
WizardForm.LicenseLabel1.Color:=Color;
WizardForm.InfoAfterClickLabel.Color:=Color;
WizardForm.ComponentsList.Color:=Color;
WizardForm.ComponentsDiskSpaceLabel.Color:=Color;
WizardForm.BeveledLabel.Color:=Color;
WizardForm.StatusLabel.Color:=Color;
WizardForm.FilenameLabel.Color:=Color;
WizardForm.SelectDirLabel.Color:=Color;
WizardForm.SelectStartMenuFolderLabel.Color:=Color;
WizardForm.SelectComponentsLabel.Color:=Color;
WizardForm.SelectTasksLabel.Color:=Color;
WizardForm.LicenseAcceptedRadio.Color:=Color;
WizardForm.LicenseNotAcceptedRadio.Color:=Color;
WizardForm.UserInfoNameLabel.Color:=Color;
WizardForm.UserInfoNameEdit.Color:=Color;
WizardForm.UserInfoOrgLabel.Color:=Color;
WizardForm.UserInfoOrgEdit.Color:=Color;
WizardForm.PreparingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Color:=Color;
WizardForm.UserInfoSerialLabel.Color:=Color;
WizardForm.UserInfoSerialEdit.Color:=Color;
WizardForm.TasksList.Color:=Color;
WizardForm.RunList.Color:=Color;
WizardForm.SelectDirBrowseLabel.Color:=Color;
WizardForm.SelectStartMenuFolderBrowseLabel.Color:=Color;
end;
const
Indent=25;
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external '
[email protected] stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boolean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload';
procedure ssAddImage(FileName:PChar); external 'ssAddImage@files:isgsg.dll stdcall delayload';
procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload';
procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external '
[email protected] stdcall delayload';
procedure CurPageChanged(CurPageID: Integer);
begin
CurPageChanged1(CurPageID);
end;
procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
endame=Red Faction
AppVerName=Red Faction
AppVersion=Red Faction
AppPublisher=l7cux
AppCopyright=l7cux
DefaultDirName={pf}\Red Faction
DefaultGroupName=Red Faction
AllowNoIcons=true
OutputBaseFilename=setup
WizardImageFile=C:\Users\l7cux\Desktop\978586662.bmp
WizardSmallImageFile=C:\Users\l7cux\Desktop\12png_3226380_306935.bmp
SetupIconFile=C:\Users\l7cux\Desktop\rfg.ico
WindowVisible=false
WindowShowCaption=false
WindowResizable=false
DiskSpanning=true
DiskSliceSize=2100000000
SlicesPerDisk=1
WizardImageBackColor=clMaroon
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
[Files]
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: D:\RF2\978586662.bmp; DestDir: {tmp}; Flags: dontcopy
Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
[Icons]
Name: {group}\Red Faction; Filename: {app}\rfg_launcher.exe; WorkingDir: {app}; Parameters: Запуск игры
Name: {userdesktop}\Red Faction; Filename: {app}\rfg_launcher.exe; WorkingDir: {app}; Tasks: desktopicon; Parameters: Запуск игры
Name: {group}\{cm:UninstallProgram, Red Faction}; Filename: {uninstallexe}
[Run]
Description: {cm:LaunchProgram, Red Faction}; Filename: {app}\rfg_launcher.exe; WorkingDir: {app}; Parameters: Запуск игры; Flags: nowait postinstall skipifsilent unchecked
[UninstallDelete]
Type: filesandordirs; Name: {app}
Type: filesandordirs; Name: {app}
[code]
var
Icons, Group: TCheckBox;
SelectDirLabel, SelectDirLabelBrowse: TLabel;
IconsLabel, GroupLabel, RedistLabel, DirectXLabel: TLabel;
PageNameLabel, PageNameLabel1, PageNameLabel2, PageNameLabel3, PageNameLabel4: TLabel;
PageDescriptionLabel, PageDescriptionLabel1, PageDescriptionLabel2, PageDescriptionLabel3, PageDescriptionLabel4: TLabel;
StatusLabel, FilenameLabel: TLabel;
WelcomeLabel1, WelcomeLabel2,FinishedLabel, FinishedHeadingLabel: TLabel;
NeedSize:Integer;
FreeMB, TotalMB: Cardinal;
NeedSpaceLabel,FreeSpaceLabel: TLabel;
BmpFile: TBitmapImage;
SelectStartMenuFolderLabel, SelectStartMenuFolderBrowseLabel, ReadyLabel, NoIconsLabel: TLabel;
RunProgram: TCheckBox;
RunProgramLabel: Tlabel;
LicenseLabel1, LicenseAcceptedLabel, LicenseNotAcceptedLabel: Tlabel;
function InstallDirectX: Boolean;
begin
end;
function InstallRedist: Boolean;
begin
end;
function CreateIcons: Boolean;
begin
Result:=Icons.Checked;
end;
function GroupIcons: Boolean;
begin
Result:=Group.Checked;
end;
function Run: Boolean;
begin
Result:=RunProgram.Checked;
end;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
procedure RedistOnClick(Sender: TObject);
begin
end;
procedure DirectXLabelOnClick(Sender: TObject);
begin
end;
procedure IconsOnClick(Sender: TObject);
begin
if Icons.Checked = False then
Icons.Checked:= True else
Icons.Checked:= False;
end;
procedure GroupOnClick(Sender: TObject);
begin
if Group.Checked = False then
Group.Checked:= True else
Group.Checked:= False;
end;
procedure RunProgramClick(Sender: TObject);
begin
if RunProgram.Checked = False then
RunProgram.Checked:= True else
RunProgram.Checked:= False;
end;
Procedure NoIconsLabelOnClick (Sender: TObject);
begin
WizardForm.NoIconsCheck.Checked:=Not(WizardForm.NoIconsCheck.Checked)
end;
procedure LicenceAcceptedRadioOnClick(Sender: TObject);
begin
WizardForm.NextButton.Enabled:=True
end;
procedure LicenceNotAcceptedRadioOnClick(Sender: TObject);
begin
WizardForm.NextButton.Enabled:=False
end;
Procedure YesRadioOnClick (Sender: TObject);
begin
WizardForm.LicenseAcceptedRadio.Checked:=True
end;
Procedure NoRadioOnClick (Sender: TObject);
begin
WizardForm.LicenseNotAcceptedRadio.Checked:=True
end;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
//Свободное место
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:SPACE} ')+ FloatToStr(round(FreeMB/1024*100)/100) + ' GB' else
FreeSpaceLabel.Caption := ExpandConstant('{cm:SPACE} ')+ IntToStr(FreeMB)+ ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False else
WizardForm.NextButton.Enabled := True;
end;
procedure GetNeedSpaceCaption;
begin
if NeedSize > 1024 then
NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ FloatToStr(round(NeedSize/1024*100)/100) + ' GB' else
NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ IntToStr(NeedSize)+ ' MB';
end;
//Свободное место
procedure FilenameExt();
begin
FilenameLabel.Caption:= ExpandConstant(ExtractFileDir(CurrentFilename)) + '\' + ExtractFilename(CurrentFilename);
end;
//Загрузка скина
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external '
[email protected] stdcall';
function InitializeSetup(): Boolean;
begin
Result := True;
end;
procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
//Загрузка скина
procedure InitializeWizard2();
begin
ExtractTemporaryFile('978586662.bmp');
NeedSize:= 5580;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.WelcomePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.LicensePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectDirPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectProgramGroupPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.ReadyPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.InstallingPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\978586662.bmp'));
BmpFile.SetBounds(0, 0, 500, 375);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.FinishedPage;
with WizardForm do
begin
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
DiskSpaceLabel.Hide;
SelectDirBitmapImage.Hide;
SelectDirBrowseLabel.Hide;
SelectDirLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
MainPanel.Hide
FilenameLabel.Hide;
StatusLabel.Hide;
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
ReadyLabel.Hide;
LicenseLabel1.Hide;
end;
with WizardForm do
begin
DirBrowseButton.Left:= DirBrowseButton.Left + ScaleX(40);
DirBrowseButton.Top:= DirBrowseButton.Top + ScaleY(72);
DirEdit.Left:= DirEdit.Left + ScaleX(40);
DirEdit.Top:= DirEdit.Top + ScaleY(72);
GroupBrowseButton.Left:= GroupBrowseButton.Left + ScaleX(40);
GroupBrowseButton.Top:= GroupBrowseButton.Top + ScaleY(72);
GroupEdit.Left:= GroupEdit.Left + ScaleX(40);
GroupEdit.Top:= GroupEdit.Top + ScaleX(72);
GroupEdit.Color:= ClBlack
NextButton.BringToFront;
BackButton.BringToFront;
CancelButton.BringToFront;
Font.Style:=[];
Font.Name:= 'MS Sans Serif';
DirEdit.Color:=clBlack;
Font.Color:=clWhite;
ProgressGauge.Top:=ScaleY(120);
ProgressGauge.Left:=ScaleX(20);
ProgressGauge.Width:=ScaleX(457);
ReadyMemo.Left:=ScaleX(40);
ReadyMemo.Top:=ScaleY(95)
ReadyMemo.ScrollBars:= ssVertical; //ssNone
ReadyMemo.font.Color:= clblack;
end;
with WizardForm do
begin
InnerNotebook.Left := ScaleX(0);
InnerNotebook.Top := ScaleY(0);
InnerNotebook.Width := ScaleX(497);
InnerNotebook.Height := ScaleY(360);
OuterNotebook.Left := ScaleX(0);
OuterNotebook.Top := ScaleY(0);
OuterNotebook.Width := ScaleX(497);
OuterNotebook.Height := ScaleY(360);
end;
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do
begin
Left:= ScaleX(176);
Top:= ScaleY(66);
Width:= ScaleX(301);
Height:= ScaleY(71);
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
Font.Size:= 14;
Font.Color:=ClWhite
Font.Style := [fsBold]
Parent:= WizardForm.WelcomePage;
Caption:= WizardForm.WelcomeLabel1.Caption;
end;
//WelcomePage
WelcomeLabel2:=TLabel.Create(WizardForm);
with WelcomeLabel2 do
begin
Top:= ScaleY(136);
Left:= ScaleX(176);
Width:= ScaleX(301);
Height:= ScaleY(300);
AutoSize:= false;
WordWrap:= true;
Transparent:= true;
Parent:= WizardForm.WelcomePage;
Caption:= WizardForm.WelcomeLabel2.Caption;
end;
//WelcomePage
//licensePage
LicenseLabel1:=TLabel.Create(WizardForm)
with LicenseLabel1 do
begin
Left:=40
Top:=70
Width:=465
Height:=28
AutoSize:=False
WordWrap:=True
Transparent:=True
Caption:=WizardForm.LicenseLabel1.Caption
Parent:=WizardForm.LicensePage
end;
WizardForm.LicenseMemo.Left:=40
WizardForm.LicenseMemo.Top:=108
WizardForm.LicenseMemo.Parent:=WizardForm.LicensePage
WizardForm.LicenseAcceptedRadio.Left:=40
WizardForm.LicenseAcceptedRadio.Top:=265
WizardForm.LicenseAcceptedRadio.Width:=14
WizardForm.LicenseAcceptedRadio.Height:=14
WizardForm.LicenseAcceptedRadio.Color:=clBlack
WizardForm.LicenseAcceptedRadio.Parent:=WizardForm.LicensePage
LicenseAcceptedLabel:=TLabel.Create(WizardForm)
with LicenseAcceptedLabel do
begin
Left:=56
Top:=265
Transparent:=True
Caption:=WizardForm.LicenseAcceptedRadio.Caption
Parent:=WizardForm.LicensePage
OnClick:= @YesRadioOnClick
end;
WizardForm.LicenseNotAcceptedRadio.Left:=40
WizardForm.LicenseNotAcceptedRadio.Top:=285
WizardForm.LicenseNotAcceptedRadio.Width:=14
WizardForm.LicenseNotAcceptedRadio.Height:=14
WizardForm.LicenseNotAcceptedRadio.Color:=clBlack
WizardForm.LicenseNotAcceptedRadio.Parent:=WizardForm.LicensePage
LicenseNotAcceptedLabel:=TLabel.Create(WizardForm)
with LicenseNotAcceptedLabel do
begin
Left:=56
Top:=285
Transparent:=True
Caption:=WizardForm.LicenseNotAcceptedRadio.Caption
Parent:=WizardForm.LicensePage;
OnClick:= @NoRadioOnClick;
end;
PageNameLabel:= TLabel.Create(WizardForm);
with PageNameLabel do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.LicensePage;
end;
PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.LicensePage;
end;
//LicensePage
//SelectDirPage
SelectDirLabel:= TLabel.Create(WizardForm);
with SelectDirLabel do
begin
Caption:= WizardForm.SelectDirLabel.Caption;
Left:= ScaleX(40);
Top:= WizardForm.SelectDirLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirLabel.Width;
Height:= WizardForm.SelectDirLabel.Height;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
SelectDirLabelBrowse:= TLabel.Create(WizardForm);
with SelectDirLabelBrowse do
begin
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
Left:= ScaleX(40);
Top:= WizardForm.SelectDirBrowseLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirBrowseLabel.Width;
Height:= WizardForm.SelectDirBrowseLabel.Height;
WordWrap:= True;
Transparent:= True;
Parent:= WizardForm.SelectDirPage;
end;
PageNameLabel1:= TLabel.Create(WizardForm);
with PageNameLabel1 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
PageDescriptionLabel1:= TLabel.Create(WizardForm);
with PageDescriptionLabel1 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
end;
begin
begin
end;
RedistLabel:= TLabel.Create(WizardForm);
with RedistLabel do
begin
Caption:='Установить NVidia Redist';
Left:= WizardForm.DirEdit.Left + 220;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @RedistOnClick;
end;
Icons:= TCheckBox.Create(WizardForm);
with Icons do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top + 35;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 2;
Checked:= False;
end;
IconsLabel:= TLabel.Create(WizardForm);
with IconsLabel do
begin
Caption:='Создать ярлык на рабочем столе';
Left:= WizardForm.DirEdit.Left + 20;
Top:= WizardForm.DirEdit.Top + 35;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @IconsOnClick;
end;
Group:= TCheckBox.Create(WizardForm);
with Group do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 3;
Checked:= False;
end;
GroupLabel:= TLabel.Create(WizardForm);
with GroupLabel do
begin
Caption:='Создать ярлыки в меню "Пуск"';
Left:= WizardForm.DirEdit.Left + 20;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @GroupOnClick;
end;
NeedSpaceLabel:= TLabel.Create(WizardForm);
with NeedSpaceLabel do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= ScaleY(262);
Width:= ScaleX(209);
Height:= ScaleY(13);
Transparent:= True;
end;
FreeSpaceLabel:= TLabel.Create(WizardForm);
with FreeSpaceLabel do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left;
Top:= ScaleY(280);
Width:= ScaleX(209);
Height:= ScaleY(13);
Transparent:= True;
end;
WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;
WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0;
//SelectDirPage
//ProgrammGroupPage
SelectStartMenuFolderLabel:=TLabel.Create(WizardForm)
with SelectStartMenuFolderLabel do
begin
Left:= ScaleX(40);
Top:= WizardForm.SelectDirLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirBrowseLabel.Width;
Height:= WizardForm.SelectDirBrowseLabel.Height;
AutoSize:=False
WordWrap:=True
Transparent:=True
Caption:=WizardForm.SelectStartMenuFolderLabel.Caption
Parent:=WizardForm.SelectProgramGroupPage
end;
SelectStartMenuFolderBrowseLabel:=TLabel.Create(WizardForm)
with SelectStartMenuFolderBrowseLabel do
begin
Left:= ScaleX(40);
Top:= WizardForm.SelectDirBrowseLabel.Top + ScaleY(62);
Width:= WizardForm.SelectDirBrowseLabel.Width
Height:= WizardForm.SelectDirBrowseLabel.Height
AutoSize:=False
WordWrap:=True
Transparent:=True
Caption:=WizardForm.SelectStartMenuFolderBrowseLabel.Caption
Parent:=WizardForm.SelectProgramGroupPage
end;
WizardForm.NoIconsCheck.Left:=ScaleX(40);
WizardForm.NoIconsCheck.Top:= WizardForm.DirEdit.Top + ScaleY(140)
WizardForm.NoIconsCheck.Width:=13
WizardForm.NoIconsCheck.Height:=13
WizardForm.NoIconsCheck.Visible:=True
WizardForm.NoIconsCheck.Parent:= WizardForm.SelectProgramGroupPage
NoIconsLabel:=TLabel.Create(WizardForm)
with NoIconsLabel do
begin
Left:=ScaleX(56);
Top:= WizardForm.DirEdit.Top + ScaleY(140)
Transparent:=True
OnClick:= @NoIconsLabelOnClick
Caption:=WizardForm.NoIconsCheck.Caption
Parent:=WizardForm.SelectProgramGroupPage
end;
PageNameLabel2:= TLabel.Create(WizardForm);
with PageNameLabel2 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectProgramGroupPage;
end;
PageDescriptionLabel2:= TLabel.Create(WizardForm);
with PageDescriptionLabel2 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.SelectProgramGroupPage;
end;
//ProgrammGroupPage
//ReadyPage
ReadyLabel:= TLabel.Create(WizardForm);
with ReadyLabel do
begin
Left:= ScaleX(40);
Top:= ScaleY(70);
Width:= ScaleX(325);
Height:= ScaleY(26);
AutoSize:= False;
Transparent:= true;
Caption:= 'Нажмите «Установить», чтобы продолжить, или «Назад», если Вы хотите' + #10 + 'просмотреть или изменить опции установки.'
Parent:= WizardForm.ReadyPage;
end;
PageNameLabel3:= TLabel.Create(WizardForm);
with PageNameLabel3 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.ReadyPage;
end;
PageDescriptionLabel3:= TLabel.Create(WizardForm);
with PageDescriptionLabel3 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.ReadyPage;
end;
//ReadyPage
//InstallingPage
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do
begin
Left:= ScaleX(20);
Top:= ScaleY(80);
Width:= WizardForm.StatusLabel.Width;
Height:= WizardForm.StatusLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.InstallingPage;
Caption:= 'Распаковка файлов...'
end;
FilenameLabel:= TLabel.Create(WizardForm);
with FilenameLabel do
begin
Left:= ScaleX(20);
Top:= ScaleY(100);
Width:= WizardForm.StatusLabel.Width;
Height:= WizardForm.StatusLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
PageNameLabel4:= TLabel.Create(WizardForm);
with PageNameLabel4 do
begin
Left:= WizardForm.PageNameLabel.Left;
Top:= WizardForm.PageNameLabel.Top;
Width:= ScaleX(300);
Height:= ScaleY(14);
AutoSize:= False;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
PageDescriptionLabel4:= TLabel.Create(WizardForm);
with PageDescriptionLabel4 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= ScaleX(400);
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
//InstallingPage
//FinishedPage
FinishedHeadingLabel:=TLabel.Create(WizardForm);
with FinishedHeadingLabel do
begin
Top:= ScaleY(66);
Left:= ScaleX(176);
Width:= ScaleX(301);
Height:= ScaleY(53);
AutoSize:= false;
WordWrap:= true;
Font.Size:= 14;
Font.Color:=ClWhite
Font.Style := [fsBold]
Transparent:= true;
Parent:= WizardForm.FinishedPage;
Caption:= WizardForm.FinishedHeadingLabel.Caption;
end;
FinishedLabel:= TLabel.Create(WizardForm);
with FinishedLabel do
begin
Left:= ScaleX(176);
Top:= ScaleY(136);
Width:= ScaleX(301);
Height:= ScaleY(54);
AutoSize:= false;
WordWrap:= true;
Transparent:= true;
Parent:= WizardForm.FinishedPage;
Caption:= WizardForm.FinishedLabel.Caption;
end;
RunProgram:= TCheckBox.Create(WizardForm);
with RunProgram do
begin
Parent:= WizardForm.FinishedPage;
Left:= WizardForm.FinishedLabel.Left;
Top:= WizardForm.FinishedLabel.Top + 140;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 5;
Checked:= true;
end;
RunProgramLabel:= TLabel.Create(WizardForm);
with RunProgramLabel do
begin
Caption:='Запустить IconXP'; // Имя вашей программы
Left:= WizardForm.FinishedLabel.Left + 20;
Top:= WizardForm.FinishedLabel.Top + 140;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.FinishedPage;
OnClick:= @RunProgramClick;
end;
//FinishedPage
end.
procedure CurPageChanged(CurPageID: Integer);
begin
PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel1.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel1.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel2.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel2.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel3.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel3.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel4.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel4.Caption:= WizardForm.PageDescriptionLabel.Caption;
if CurPageID = wpSelectDir then
begin
GetNeedSpaceCaption;
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled:=False;
begin
if CurPageID=wpInstalling
then
if CurPageID=wpFinished
then
begin
WizardForm.Width:=497;
WizardForm.Height:=358;
WizardForm.Position:=poScreenCenter;
end
end;
end;
end;
const
Color = clblack;
procedure InitializeWizard1();
begin
WizardForm.Font.Color:=clwhite;
WizardForm.Color:=clblack;
WizardForm.WelcomeLabel1.Font.Color:=clWhite;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.WelcomePage.Color:=Color;
WizardForm.InnerPage.Color:=Color;
WizardForm.FinishedPage.Color:=Color;
WizardForm.LicensePage.Color:=clblack;
WizardForm.PasswordPage.Color:=Color;
WizardForm.InfoBeforePage.Color:=Color;
WizardForm.UserInfoPage.Color:=Color;
WizardForm.SelectDirPage.Color:=Color;
WizardForm.SelectComponentsPage.Color:=Color;
WizardForm.SelectProgramGroupPage.Color:=Color;
WizardForm.SelectTasksPage.Color:=Color;
WizardForm.ReadyPage.Color:=Color;
WizardForm.PreparingPage.Color:=Color;
WizardForm.InstallingPage.Color:=Color;
WizardForm.InfoAfterPage.Color:=Color;
WizardForm.DirEdit.Color:=clwhite;
WizardForm.DiskSpaceLabel.Color:=Color;
WizardForm.DirEdit.Color:=clGray;
WizardForm.GroupEdit.Color:=Color;
WizardForm.PasswordLabel.Color:=Color;
WizardForm.PasswordEdit.Color:=Color;
WizardForm.PasswordEditLabel.Color:=Color;
WizardForm.ReadyMemo.Color:=Color;
WizardForm.TypesCombo.Color:=Color;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.InfoBeforeClickLabel.Color:=Color;
WizardForm.MainPanel.Color:=Color;
WizardForm.PageNameLabel.Color:=Color;
WizardForm.PageDescriptionLabel.Color:=Color;
WizardForm.ReadyLabel.Color:=Color;
WizardForm.FinishedLabel.Color:=Color;
WizardForm.YesRadio.Color:=Color;
WizardForm.NoRadio.Color:=Color;
WizardForm.WelcomeLabel2.Color:=Color;
WizardForm.LicenseLabel1.Color:=Color;
WizardForm.InfoAfterClickLabel.Color:=Color;
WizardForm.ComponentsList.Color:=Color;
WizardForm.ComponentsDiskSpaceLabel.Color:=Color;
WizardForm.BeveledLabel.Color:=Color;
WizardForm.StatusLabel.Color:=Color;
WizardForm.FilenameLabel.Color:=Color;
WizardForm.SelectDirLabel.Color:=Color;
WizardForm.SelectStartMenuFolderLabel.Color:=Color;
WizardForm.SelectComponentsLabel.Color:=Color;
WizardForm.SelectTasksLabel.Color:=Color;
WizardForm.LicenseAcceptedRadio.Color:=Color;
WizardForm.LicenseNotAcceptedRadio.Color:=Color;
WizardForm.UserInfoNameLabel.Color:=Color;
WizardForm.UserInfoNameEdit.Color:=Color;
WizardForm.UserInfoOrgLabel.Color:=Color;
WizardForm.UserInfoOrgEdit.Color:=Color;
WizardForm.PreparingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Color:=Color;
WizardForm.UserInfoSerialLabel.Color:=Color;
WizardForm.UserInfoSerialEdit.Color:=Color;
WizardForm.TasksList.Color:=Color;
WizardForm.RunList.Color:=Color;
WizardForm.SelectDirBrowseLabel.Color:=Color;
WizardForm.SelectStartMenuFolderBrowseLabel.Color:=Color;
end;
const
Indent=25;
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external '
[email protected] stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boolean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload';
procedure ssAddImage(FileName:PChar); external 'ssAddImage@files:isgsg.dll stdcall delayload';
procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload';
procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external '
[email protected] stdcall delayload';
procedure CurPageChanged(CurPageID: Integer);
begin
CurPageChanged1(CurPageID);
end;
procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
end