#include "ISDone.iss"
#include "pb.iss"
[Setup]
AppName=BioShock 2
AppVerName=BioShock 2
DefaultDirName={pf}\2K Games\BioShock 2
Compression=none
WizardImageFile=Blue.bmp
WizardSmallImageFile=Blue.bmp
PrivilegesRequired=none
LicenseFile=EULA.rtf
OutputDir=output\d1
AppID={{4A8B461A-9336-4CF9-98F4-14DD38E673F0}
UninstallDisplayName=BioShock 2
DisableProgramGroupPage=true
ShowLanguageDialog=auto
AppPublisher=2K Games
AppVersion=1.00.0000
AppUpdatesURL=http://www.2kgames.com/bioshock2/support
AppSupportURL=http://www.2kgames.com/bioshock2/support
AppPublisherURL=http://www.2KGames.com
AppComments=При обращении в службу технической поддержки, будьте готовы назвать код активации программы. Его можно найти в упаковке с игрой.
AppContact=Служба техподдержки компании 2K Games и 1С-Софтклаб
AppSupportPhone=Техподдержка в США: +1-866-219-9839, техподдержка в России: +7-495-981-23-72.
AppReadmeFile={app}\Readme.txt
UninstallFilesDir={commonappdata}\Bio2
UninstallDisplayIcon={app}\SP\Builds\Binaries\Bioshock2GFW.dll
SetupIconFile=setup.ico
VersionInfoCopyright=Copyright (c) 2009 Acresso Software Inc. and/or InstallShield Co. Inc. All Rights Reserved.
VersionInfoVersion=16.0.328
VersionInfoCompany=Acresso Software Inc.
VersionInfoDescription=InstallScript Setup Launcher
VersionInfoProductName=InstallShield
VersionInfoProductVersion=16.0
UsePreviousGroup=false
AppendDefaultGroupName=false
MinVersion=,6.1.7601sp1
[Languages]
Name: russian; MessagesFile: Russian.isl
[Registry]
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\1.00.0000; ValueType: string; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\MP; ValueType: string; ValueName: InstallPath; ValueData: {app}\MP; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\MP; ValueType: string; ValueName: Working; ValueData: {app}\MP\Builds\Binaries; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\MP; ValueType: string; ValueName: Launcher; ValueData: {app}\MP\Builds\Binaries\Bioshock2Launcher.exe; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: Working; ValueData: {app}\SP\Builds\Binaries; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: Launcher; ValueData: {app}\SP\Builds\Binaries\Bioshock2Launcher.exe; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: InstallLocation; ValueData: {app}; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: ProductGuid; ValueData: {{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; Flags: createvalueifdoesntexist uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: InstallSource; ValueData: {src}\; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: DisplayName; ValueData: BioShock 2; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: RegOwner; ValueData: maratrepack; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: dword; ValueName: Language; ValueData: $00000419; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: DisplayVersion; ValueData: 1.00.0000; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
[Icons]
Name: {commondesktop}\BioShock 2; Filename: {app}\SP\Builds\Binaries\Bioshock2Launcher.exe; WorkingDir: {app}\SP\Builds\Binaries; IconFilename: {app}\SP\Builds\Binaries\Bioshock2GFW.dll; Flags: createonlyiffileexists
[Files]
[UninstallDelete]
Name: {app}; Type: filesandordirs
[Code]
procedure CurPageChanged1(CurPageID: Integer);
begin
if CurPageID = wpWelcome then
begin
WizardForm.NextButton.Width :=77
WizardForm.NextButton.Left :=375
WizardForm.NextButton.Caption:='Принять'
end
end;
procedure CurStepChanged1(CurStep: TSetupStep);
var
ResultCode:Integer;
begin
if CurStep = ssPostInstall then
begin
WizardForm.StatusLabel.Caption:='Установка дополнительного програмного обеспечения'+ #13#10 +
+ #13#10 +
+ #13#10 +
+ #13#10 +
+ #13#10 +
'Обновление компонентов библиотеки DirectX';
WizardForm.StatusLabel.Font.Color:= ClWindow;
WizardForm.StatusLabel.Font.Name := 'MS Sans Serif';
WizardForm.StatusLabel.Font.Size := 8;
Exec(ExpandConstant('{src}\Support\Redist\DirectX\DXSETUP.exe'), '/silent', ExpandConstant('{src}\Support\Redist\DirectX'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
WizardForm.StatusLabel.Caption:='Установка дополнительного програмного обеспечения'+ #13#10 +
+ #13#10 +
+ #13#10 +
+ #13#10 +
+ #13#10 +
'Установка обновлений для службы Games for Windows - LIVE';
WizardForm.StatusLabel.Font.Color:= ClWindow;
WizardForm.StatusLabel.Font.Name := 'MS Sans Serif';
WizardForm.StatusLabel.Font.Size := 8;
Exec(ExpandConstant('{src}\Support\Redist\G4WL\gfwlivesetup.exe'), '/Q', ExpandConstant('{src}\Support\Redist\G4WL'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
Exec(ExpandConstant('{src}\Support\Redist\vcredist_x86.exe'), '/Q', ExpandConstant('{src}\Support\Redist'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
end;
Procedure InitializeWizard1();
begin
with WizardForm do begin
Position :=poScreenCenter
ClientWidth :=690
ClientHeight:=496
Font.Color :=clWindow
Font.Name :='MS Sans Serif'
Font.Style :=[]
with Bevel do begin
Left :=0
Top :=313
Width :=497
Height :=2
Visible:=False
end
with CancelButton do begin
Left :=600
Top :=462
Width :=77
Height:=25
BringToFront
end
with NextButton do begin
Left :=375
Top :=462
Width :=77
Height:=25
BringToFront
end
with BackButton do begin
Left :=293
Top :=462
Width :=77
Height:=25
BringToFront
end
with OuterNotebook do begin
Left :=0
Top :=0
Width :=690
Height:=496
with WelcomePage do begin
Color:=11232829
with WizardBitmapImage do begin
Left :=0
Top :=0
Width :=690
Height:=496
end
with WelcomeLabel2 do begin
Left :=205
Top :=225
Width :=465
Height:=200
end
with WelcomeLabel1 do begin
Font.Name := 'MS Sans Serif';
Left :=205
Top :=158
Width :=465
Height :=28
Font.Color:=clWindow
Font.Size :=8
end
end
with InnerPage do begin
with Bevel1 do begin
Left :=0
Top :=58
Width :=499
Height :=3
Visible:=False
end
with InnerNotebook do begin
Left :=205
Top :=79
Width :=465
Height:=354
BringToFront
Color :=11232829
with LicensePage do begin
with LicenseNotAcceptedRadio do begin
Left :=22
Top :=329
Width :=465
Height :=17
Checked:=True
end
with LicenseAcceptedRadio do begin
Left :=22
Top :=309
Width :=465
Height:=17
end
with LicenseMemo do begin
Left :=22
Top :=4
Width :=445
Height :=281
ReadOnly :=True
ScrollBars:=ssVertical
end
with LicenseLabel1 do begin
Enabled:=False
Visible:=False
end
end
with SelectDirPage do begin
with SelectDirBitmapImage do begin
Left :=0
Top :=0
Width :=32
Height :=32
Visible:=False
end
with DiskSpaceLabel do begin
Enabled:=False
Visible:=False
end
with DirBrowseButton do begin
Left :=380
Top :=100
Width :=77
Height:=25
end
with DirEdit do begin
Left :=20
Top :=70
Width :=445
Height :=20
Font.Color:=clWindowText
end
with SelectDirBrowseLabel do begin
Left :=0
Top :=0
Width :=0
Height:=0
end
with SelectDirLabel do begin
Left :=0
Top :=0
Width :=465
Height:=26
end
end
with ReadyPage do begin
with ReadyMemo do begin
Left :=0
Top :=0
Width :=0
Height:=0
Color :=11232829
end
with ReadyLabel do begin
Left :=0
Top :=0
Width :=465
Height:=28
end
end
with PreparingPage do begin
with PreparingErrorBitmapImage do begin
Left :=0
Top :=0
Width :=16
Height :=16
Visible:=False
end
with PreparingLabel do begin
Left :=24
Top :=0
Width :=393
Height :=14
Visible:=False
end
end
with InstallingPage do begin
with FilenameLabel do begin
Left :=0
Top :=16
Width :=465
Height:=16
end
with StatusLabel do begin
Left :=25
Top :=5
Width :=435
Height:=78
end
with ProgressGauge do begin
Left :=25
Top :=115
Width :=435
Height:=21
Min :=0
Max :=100
end
end
with InfoAfterPage do begin
end
end
with MainPanel do begin
Left :=0
Top :=0
Width :=690
Height:=496
Color :=clWindow
with WizardSmallBitmapImage do begin
Left :=0
Top :=0
Width :=690
Height :=496
BackColor:=clWindow
end
with PageDescriptionLabel do begin
Left :=25
Top :=25
Width :=500
Height :=14
Color :=6697728
Font.Color:=clWindow
end
with PageNameLabel do begin
Left :=15
Top :=7
Width :=500
Height :=14
Color :=6697728
Font.Color:=clWindow
end
end
end
with FinishedPage do begin
Color:=11232829
with WizardBitmapImage2 do begin
Left :=0
Top :=0
Width :=690
Height:=496
end
with NoRadio do begin
Left :=205
Top :=227
Width :=465
Height:=17
end
with YesRadio do begin
Left :=205
Top :=199
Width :=465
Height:=17
end
with RunList do begin
Left :=205
Top :=199
Width :=465
Height :=149
BorderStyle:=bsNone
end
with FinishedLabel do begin
Left :=205
Top :=119
Width :=465
Height:=53
end
with FinishedHeadingLabel do begin
Font.Name := 'MS Sans Serif';
Left :=205
Top :=79
Width :=465
Height :=24
Font.Color:=clWindow
Font.Size :=8
end
end
end
with BeveledLabel do begin
Left :=10
Top :=468
Width :=150
Height :=14
Enabled:=False
Color :=14405068
end
end
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
CurStepChanged1(CurStep);
CurStepChanged2(CurStep);
CurStepChanged3(CurStep);
end;
procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
end;
procedure CurPageChanged(CurPageID: Integer);
begin
CurPageChanged1(CurPageID);
CurPageChanged2(CurPageID);
end;
////////////////////////////////////////////////////////////////////////
#define NeedMem 512
;#define records
#define facompress
#define PrecompInside
#define SrepInside
[Files]
Source: Include\Russian.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
[CustomMessages]
russian.ExtractedFile=
[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
LabelCurrFileName: TLabel;
ISDoneProgressBar1: TNewProgressBar;
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';
function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
Result := ISDoneCancel; //MinimizePathName
end;
procedure CancelButtonOnClick(Sender: TObject);
begin
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
end;
procedure HideControls;
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelCurrFileName.Hide;
MyCancelButton.Hide;
end;
procedure CreateControls;
var PBTop:integer;
begin
PBTop:=ScaleY(50);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(25);
Top := 115;
Width := ScaleX(435);
Height := 21;
Max := 1000;
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ScaleX(25);
Top := ScaleX(99);
Width := ScaleX(435);
Height := 16;
Font.Name:= 'MS Sans Serif';
Font.Size:= 8;
end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent := WizardForm;
Width := ScaleX(77);
Caption:= ExpandConstant('Отмена');
Left := ScaleX(600);
Top := WizardForm.cancelbutton.top;
OnClick:= @CancelButtonOnClick;
end;
end;
Procedure CurPageChanged2(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and ISDoneError then
begin
WizardForm.Caption:= ExpandConstant('Ошибка распаковки!');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;
function CheckError:boolean;
begin
result:= not ISDoneError;
end;
procedure CurStepChanged2(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:='Программа InstallShield Wizard выполняет установку BioShock 2'+ #13#10 +
+ #13#10 +
+ #13#10 +
+ #13#10 +
+ #13#10 +
'Установка';
ISDoneCancel:=0;
ExtractTemporaryFile('unarc.dll');
#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll');
#endif
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
ExtractTemporaryFile('Russian.ini');
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef precomp
PCFVer:={#precomp};
#else
PCFVer:=0;
#endif
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
repeat
if not SrepInit (ExpandConstant('{app}'),512,0) then break;
if not PrecompInit(ExpandConstant('{app}'),128,PCFVer) then break;
if not FileSearchInit(true) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY) then break;
// if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc') then break;
ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;
///////////////////////////////////////////////////////////////////////////////
[Files]
Source: InnoCallBack.dll; DestDir: {tmp}
Source: progress.bmp; DestDir: {tmp}
[Code]
type
TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
TPBInfo = record ProgressBarName: TNewProgressBar ; ImageHeight, LastWidth, MaxWidth: Integer; end;
var
ProgressBarEdit: array of TEdit;
ProgressBarImage: array of TBitmapImage;
PBBuff: array of TPBInfo;
ProgressTimer: Longword; PBCount: Integer;
function WrapTimerProc(callback:TProc; 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';
procedure TextureProgressBar(ProgressBar:TNewProgressBar);
var n: Integer;
begin
n:= PBCount; SetArrayLength(ProgressBarEdit, n+1); SetArrayLength(ProgressBarImage, n+1)
SetArrayLength(PBBuff, n+1);
ProgressBarEdit[n]:= TEdit.Create(WizardForm)
ProgressBarEdit[n].SetBounds(ProgressBar.Left, ProgressBar.Top, ProgressBar.Width, ProgressBar.Height);
ProgressBarEdit[n].Enabled:= False;
ProgressBarEdit[n].Parent:= ProgressBar.Parent;
ProgressBarEdit[n].Visible:= ProgressBar.Visible;
PBBuff[n].LastWidth:= ProgressBar.Position;
PBBuff[n].ImageHeight:= ProgressBarEdit[n].Height - ScaleY(2);
PBBuff[n].ProgressBarName:= ProgressBar ;
PBBuff[n].MaxWidth:= ScaleX(ProgressBar.Width);
ProgressbarImage[n]:= TBitmapImage.Create(WizardForm);
ProgressbarImage[n].Stretch:= True;
ProgressbarImage[n].Parent:= ProgressBarEdit[n];
ProgressbarImage[n].SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0))
ProgressbarImage[n].Bitmap.LoadFromFile(ExpandConstant('{tmp}\progress.bmp'));
ProgressBar.Width:= ScaleX(0); ProgressBar.Height:= ScaleY(0);
PBCount:= PBCount+1
end;
procedure HideAllTexturedPB();
var n: integer;
begin
for n:=0 to PBCount-1 do begin ProgressBarEdit[n].Hide; ProgressBarImage[n].Hide; end;
end;
procedure UpdateAllTexturedPB();
var n: integer;
begin
for n:=0 to PBCount-1 do begin
ProgressBarEdit[n].Visible:= PBBuff[n]. ProgressBarName.Visible;
ProgressBarImage[n].Visible:= PBBuff[n].ProgressBarName.Visible; end;
end;
procedure UpdatePB(HandleW, msg, idEvent, TimeSys: LongWord);
var f: integer; CurWidth: single;
begin
for f:=0 to PBCount-1 do begin
UpdateAllTexturedPB
with PBBuff[f].ProgressBarName do begin
CurWidth := (Position*PBBuff[f].MaxWidth)/Max;
if PBBuff[f].LastWidth <> Round(CurWidth) then begin
PBBuff[f].LastWidth:= Round(CurWidth);
ProgressBarImage[f].SetBounds(ScaleX(0), ScaleY(0), PBBuff[f].LastWidth, PBBuff[f].ImageHeight); end;
end;
end;
end;
procedure InitializeWizard2();
begin
ExtractTemporaryFile('progress.bmp');
TextureProgressBar(WizardForm.ProgressGauge)
end;
procedure CurStepChanged3(CurStep: TSetupStep);
begin
//if CurStep=ssInstall then ProgressTimer:= SetTimer(0,0, 200, WrapTimerProc(@UpdatePB, 4));
if CurStep=ssPostInstall then KillTimer(0, ProgressTimer);
end;