[Setup]
AppId={{B4866999-9FF1-4780-A2E9-A952A5E7BBCA}
AppName=Team Fortress 2
AppVerName=Team Fortress 2
AppPublisher=Waste Twice
AppVersion=1.0.7.0
AppSupportURL=
http://192.168.5.104/
DefaultDirName={pf}Waste TwiceTeam Fortress 2
OutputDir=D:РепакиTeam Fortress 2
DefaultGroupName=Waste TwiceTeam Fortress 2
UninstallFilesDir={app}Uninstall
Compression=lzma/ultra64
InternalCompressLevel=ultra64
SolidCompression=true
DiskSpanning=yes
SlicesPerDisk=5
DiskSliceSize=890000000
DisableProgramGroupPage=True
DisableReadyPage=True
WindowVisible=no
WindowResizable=no
UninstallDisplayIcon={app}Team Fortress 2.exe, 0
UninstallDisplayName=Team Fortress 2
[Languages]
Name: RUS; MessagesFile: compiler:LanguagesRussian.isl
[Icons]
Name: "{group}Запустить Team Fortress 2"; Filename: "{app}Team Fortress 2.exe"; WorkingDir: "{app}";
Name: "{group}Удалить Team Fortress 2"; Filename: "{uninstallexe}"
[Files]
Source: "C:Program FilesInno Setup 5ISSkin.dll"; DestDir: {app}; Flags: dontcopy
Source: "C:Program FilesCodejock SoftwareISSkinStylesVista.cjstyles"; DestDir: {tmp}; Flags: dontcopy
Source: "C:TF2installbg.bmp"; DestDir: {tmp}; Flags: dontcopy
Source: "C:TF2install*"; DestDir: {app}; BeforeInstall: FilenameExt(); Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:TF2installtf2logo.bmp"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "isgsg.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "bass.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:приколы на звонокDj Петух.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:TF2install2.bmp"; DestDir: "{tmp}"; Flags: dontcopy
Source: "D:GamesTeam Fortress 2Team Fortress 2.exe"; DestDir: {app}; BeforeInstall: FilenameExt(); Flags: ignoreversion
[Registry]
;Куда установлена игры
Root: HKLM; Subkey: SOFTWAREValveSteam; ValueType: string; ValueName: TF2Path; ValueData: {app}; Flags: uninsdeletevalue
;Версия игры
Root: HKLM; Subkey: SOFTWAREValveSteam; ValueType: dword; ValueName: TF2Version; ValueData: 10703964; Languages: ; Flags: uninsdeletevalue
[CustomMessages]
RUS.BUT=Установить
RUS.SPACE=Доступно места на диске:
RUS.SPACE1=Требуется места на диске:
[UninstallDelete]
Name: {app}*.*; Type: filesandordirs
Код: Выделить всё
function GetSystemMetrics(nIndex:Integer):Integer;
external '[email protected] stdcall';
const
Indent=10;
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;
width,height: Integer;
BackgroundBitmapImage: TBitmapImage;
s: string;
function GroupIcons: Boolean;
begin
Result:=Group.Checked;
end;
function Run: Boolean;
begin
Result:=RunProgram.Checked;
end;
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
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
ExtractTemporaryFile('Vista.cjstyles');
LoadSkin(ExpandConstant('{tmp}Vista.cjstyles'), '');
Result := True;
ExtractTemporaryFile('Dj Петух.mp3');
ExtractTemporaryFile('bass.dll');
end;
procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
//Загрузка скина
procedure InitializeWizard();
begin
ExtractTemporaryFile('bg.bmp');
ExtractTemporaryFile('tf2logo.bmp');
NeedSize:= 4000;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.WelcomePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.LicensePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectDirPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.InstallingPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.FinishedPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.SelectProgramGroupPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.ReadyPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}bg.bmp'));
BmpFile.SetBounds(0, 0, 597, 460);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.ReadyPage;
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:= WizardForm.ReadyMemo.Top + ScaleY(72)
ReadyMemo.Font.Color:= clBlack;
ReadyMemo.ScrollBars:= ssVertical; //ssNone
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;
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(20);
AutoSize:= False;
WordWrap:= true;
Transparent:= true;
Caption:= 'Нажмите «Установить», чтобы начать Устновку.'
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;
begin
ExtractTemporaryFile('2.bmp');
s:=ExpandConstant('{tmp}')+'2.bmp';
WizardForm.Position:=poScreenCenter;
MainForm.BORDERSTYLE:=bsNone;
width:=GetSystemMetrics(0);
height:=GetSystemMetrics(1);
MainForm.Width:=width;
MainForm.Height:=height;
width:=MainForm.ClientWidth;
height:=MainForm.ClientHeight;
MainForm.Left := 0;
MainForm.Top := 0;
BackgroundBitmapImage := TBitmapImage.Create(MainForm);
BackgroundBitmapImage.Bitmap.LoadFromFile(s);
BackgroundBitmapImage.Align := alClient;
BackgroundBitmapImage.Parent := MainForm;
BackgroundBitmapImage.Stretch:=True;
MainForm.Visible:=True;
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:= 'Team Fortress 2 установлена на Ваш компьютер.' + #10#13#10 + 'Нажмите «Завершить», чтобы выйти из программы' + #10 + 'установки.'
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:= False;
end;
RunProgramLabel:= TLabel.Create(WizardForm);
with RunProgramLabel do
begin
Caption:='Запустить Team Fortress 2'; // Имя вашей программы
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;[/spoiler]
[size=85][color=#808080]Добавлено спустя 16 минут 36 секунд:[/color][/size]
блин, когда нажимаю создать ярлык в меню "Пуск", то он создает и на рабочем столе, а если отмечаю просто на рабочем столе то не создает, помогите((