; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
DiskSpanning=true
DiskSliceSize=1457664000
AppName=Unreal Tournament 3
AppVerName=Unreal Tournament 3
AppPublisher=ND Games
AppPublisherURL=http://www.unrealtournament3.com/
AppSupportURL=http://www.unrealtournament3.com/
AppUpdatesURL=http://www.unrealtournament3.com/
DefaultDirName={pf}\Unreal Tournament 3
DefaultGroupName=Unreal Tournament 3
AllowNoIcons=yes
OutputDir=D:\RePack\
OutputBaseFilename=setup
SolidCompression=true
UninstallDisplayIcon=cd.ico
DisableProgramGroupPage=yes
DisableDirPage=no
DisableFinishedPage=no
DisableReadyPage=yes
DisableStartupPrompt=yes
InternalCompressLevel=ultra64
Compression=lzma/ultra64
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[UninstallDelete]
Name: {app}\*.*; Type: filesandordirs
[Files]
Source: main.bmp; DestDir: {tmp}; Flags: dontcopy
Source: Vista.cjstyles; DestDir: {tmp}; Flags: dontcopy
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: ..\Games\Unreal Tournament 3\*.*; DestDir: {app}; Flags: recursesubdirs createallsubdirs
[Icons]
Name: {group}\Unreal Tournament 3; Filename: {app}\Binaries\UT3.exe; WorkingDir: {app}\Binaries; Check: GroupIcons
Name: {group}\Сайт компании EpicGames; Filename:
http://www.epicgames.com; WorkingDir: {app}; Check: GroupIcons
Name: {group}\Сайт компании Midway; Filename:
http://www.midway.com/; WorkingDir: {app}; Check: GroupIcons
Name: {group}\Файл Readme; Filename: {app}\Readme.txt; WorkingDir: {app}; Check: GroupIcons
Name: {group}\Удалить игру; Filename: {app}\unins000; WorkingDir: {app}; Check: GroupIcons
Name: {userdesktop}\Unreal Tournament 3; Filename: {app}\Binaries\UT3.exe; WorkingDir: {app}; Check: CreateIcons
[Run]
Filename: {src}\DirectX\DXSETUP.exe; Check: InstallDirectX
Filename: {src}\PhysX.exe; WorkingDir: {src}; Check: InstallPhysX
[CustomMessages]
russian.BUT=Установить
russian.SPACE=Доступно места на диске:
russian.SPACE1=Требуется места на диске:
[Code]
var
DirectX, PhysX: TCheckBox;
Icons, Group: TCheckBox;
lblDirectX, lblSelectDir, lblSelectDirBrowse, lblPhysX: TLabel;
lblIcons, lblGroup: TLabel;
PageNameLabel, PageDescriptionLabel: TLabel;
PageNameLabel1, PageDescriptionLabel1: TLabel;
StatusLabel, FilenameLabel: TLabel;
WelcomeLabel1, WelcomeLabel2,
FinishedLabel, FinishedHeadingLabel: TLabel;
NeedSize:Integer;
FreeMB, TotalMB: Cardinal;
NeedSpaceLabel,FreeSpaceLabel: TLabel;
BmpFile: TBitmapImage;
function InstallDirectX: Boolean;
begin
Result:= DirectX.Checked;
end;
function InstallPhysX: Boolean;
begin
Result:= PhysX.Checked;
end;
function CreateIcons: Boolean;
begin
Result:=Icons.Checked;
end;
function GroupIcons: Boolean;
begin
Result:=Group.Checked;
end;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
procedure lblPhysXOnClick(Sender: TObject);
begin
if PhysX.Checked = False then
PhysX.Checked:= True else
PhysX.Checked:= False;
end;
procedure lblDirectXOnClick(Sender: TObject);
begin
if DirectX.Checked = False then
DirectX.Checked:= True else
DirectX.Checked:= False;
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;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи 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 ProgressExt();
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
ExtractTemporaryFile('Vista.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Vista.cjstyles'), '');
Result := True;
end;
procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
//Загрузка скина
procedure InitializeWizard();
begin
ExtractTemporaryFile('main.bmp');
NeedSize:= 6260;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\main.bmp'));
BmpFile.SetBounds(0, 0, 497, 360);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.WelcomePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\main.bmp'));
BmpFile.SetBounds(0, 0, 497, 360);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.LicensePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\main.bmp'));
BmpFile.SetBounds(0, 0, 497, 360);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectDirPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\main.bmp'));
BmpFile.SetBounds(0, 0, 497, 360);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.InstallingPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\main.bmp'));
BmpFile.SetBounds(0, 0, 497, 360);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.FinishedPage;
BmpFile:= TBitmapImage.Create(WizardForm);
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;
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);
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);
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(54);
AutoSize:= false;
Transparent:= true;
WordWrap:= true;
Font.Size:= 13;
Font.Color:=ClWhite
Font.Style := [fsBold]
Parent:= WizardForm.WelcomePage;
Caption:= WizardForm.WelcomeLabel1.Caption;
end;
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;
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:= 'Игра Unreal Tournament 3 установлена на Ваш компьютер.' + #10#13#10 + 'Нажмите «Завершить», чтобы выйти из программы' + #10 + 'установки.'
end;
// уменьшил размер CheckBox'а, по другому никак
DirectX:= TCheckBox.Create(WizardForm);
with DirectX do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left + 200;
Top:= WizardForm.DirEdit.Top + 35;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 0;
Checked:= True;
end;
// создаём надпись для CheckBox'а
lblDirectX:= TLabel.Create(WizardForm);
with lblDirectX do
begin
Caption:='Установить DirectX'
Left:= WizardForm.DirEdit.Left + 220;
Top:= WizardForm.DirEdit.Top + 35;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @lblDirectXOnClick;
end;
// уменьшил размер CheckBox'а, по другому никак
PhysX:= TCheckBox.Create(WizardForm);
with PhysX do
begin
Parent:= WizardForm.SelectDirPage;
Left:= WizardForm.DirEdit.Left + 200;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 1;
Checked:= True;
end;
// создаём надпись для CheckBox'а
lblPhysX:= TLabel.Create(WizardForm);
with lblPhysX do
begin
Caption:='Установить AGEIA PhysX'
Left:= WizardForm.DirEdit.Left + 220;
Top:= WizardForm.DirEdit.Top + 70;
Width:= ScaleX(150);
Height:= ScaleY(13);
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @lblPhysXOnClick;
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:= true;
end;
lblIcons:= TLabel.Create(WizardForm);
with lblIcons 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:= true;
end;
lblGroup:= TLabel.Create(WizardForm);
with lblGroup 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;
// создаём lblSelectDir
lblSelectDir:= TLabel.Create(WizardForm);
with lblSelectDir 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;
// создаём lblSelectDirBrowse
lblSelectDirBrowse:= TLabel.Create(WizardForm);
with lblSelectDirBrowse 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;
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;
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.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.InstallingPage;
end;
PageDescriptionLabel:= TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= WizardForm.PageDescriptionLabel.Width;
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
PageDescriptionLabel1:= TLabel.Create(WizardForm);
with PageDescriptionLabel1 do
begin
Left:= WizardForm.PageDescriptionLabel.Left;
Top:= WizardForm.PageDescriptionLabel.top;
Width:= WizardForm.PageDescriptionLabel.Width;
Height:= WizardForm.PageDescriptionLabel.Height;
AutoSize:= False;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
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;
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;
if CurPageID = wpSelectDir then
begin
WizardForm.NextButton.Caption:= ExpandConstant('{cm:BUT}');
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;
end.
[Messages]
InstallingLabel=