AntonOVS
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору ;script by moonlight82 ;original design & labels by Avengerz13 #define NeedSize "10800" #define GUID "{B40FA060-71FD-44B2-9DF7-F34C80413725}" #define NeedMem 512 #define appname "Fable 3" #define exe "FableLauncher.exe" #define icon "1.ico" ;#define records ;#define precomp04 #define precomp038 ;#define unrar [Setup] AppName={#appname} AppVerName={#appname} DefaultDirName={pf}\{#appname} DefaultGroupName={#appname} OutputDir=.\ OutputBaseFilename=Setup SolidCompression=yes disablereadypage=true SetupIconFile={#icon} [Registry] Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "ConfigInstallType"; ValueType: String; ValueData: "2"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "ConfigApplicationPath"; ValueType: String; ValueData: "{app}\"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "ConfigGDFBinaryPath"; ValueType: String; ValueData: "{app}\Fable3.dll"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "ApplicationId"; ValueType: String; ValueData: "{{078BAC47-0E49-4D3A-9F70-6F1A5A7F35ED}"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "GDFVersion"; ValueType: Dword; ValueData: "$2"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "AppExePath"; ValueType: String; ValueData: "{app}\FableLauncher.exe"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "Title"; ValueType: String; ValueData: "Fable III"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "RatingsInfo"; ValueType: String; ValueData: "<Ratings xmlns=""urn:schemas-microsoft-com:GameDescription.v1"""; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "Type"; ValueType: Dword; ValueData: "$0"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games\{{BB3B9A92-3C10-B7C2-C17D-368079DE73EB}"; ValueName: "IsSigned"; ValueType: Dword; ValueData: "$1"; Flags: uninsdeletevalue uninsdeletekeyifempty [Icons] Name: {group}\{#AppName}; Filename: {app}\{#exe}; WorkingDir: {app}; IconFilename: "{app}\{#exe}"; Comment: {#AppName}; Check: CheckError and GroupIcons Name: {group}\Удалить игру; Filename: {uninstallexe}; WorkingDir: {app}\Uninstall\; Comment: Удалить игру {#AppName}; Check: CheckError and GroupIcons Name: {commondesktop}\{#AppName}; Filename: {app}\{#exe}; WorkingDir: {app}; IconFilename: "{app}\{#exe}"; Comment: {#AppName}; Check: CheckError and CreateIcons Name: {commondesktop}\Настройка графики Fable 3; Filename: "{app}\PCVideoOptionsApplet\PCVideoOptionsApplet.exe"; WorkingDir: "{app}\PCVideoOptionsApplet"; IconFilename: "{app}\PCVideoOptionsApplet\PCVideoOptionsApplet.exe"; Comment: {#AppName}; Check: CheckError and CreateIcons [Run] Filename: {src}\Redist\vcredist_x86.exe; WorkingDir: "{src}\Redist"; Parameters: "/q"; StatusMsg: Устанавливаем Microsoft Visual C++ Redist...; Flags: skipifdoesntexist; Check: InstallRedist and CheckError and not IsWin64 Filename: {src}\Redist\vcredist_x64.exe; WorkingDir: "{src}\Redist"; Parameters: "/q"; StatusMsg: Устанавливаем Microsoft Visual C++ Redist...; Flags: skipifdoesntexist; Check: InstallRedist and CheckError and IsWin64 Filename: {src}\Redist\dxwebsetup.exe; WorkingDir: "{src}\Redist"; StatusMsg: Обновляем DirectX...; Flags: skipifdoesntexist; Check: InstallDirectX and CheckError Filename: {app}\Game For Windows Live\GFWLIVESetupStub.exe; [Files] Source: 1.bmp; DestDir: {tmp}; Flags: dontcopy nocompression Source: 1.bmp; DestDir: {app}; Attribs: hidden system Source: button.bmp; DestDir: {tmp}; Flags: dontcopy nocompression Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy #ifdef records Source: records.inf; DestDir: {tmp}; Flags: dontcopy #endif #ifdef precomp04 Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy Source: Include\precomp04.exe; DestDir: {tmp}; Flags: dontcopy #endif #ifdef precomp038 Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy #endif #ifdef unrar Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy #endif [CustomMessages] rus.Welcome1=Вас приветствует Мастер установки игры %n {#appname} rus.Welcome2=Программа установит {#appname} на Ваш компьютер.%n Рекомендуется закрыть все прочие приложения перед тем, как продолжить.%nНажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти из программы установки. rus.Caption1=Выбор папки установки rus.Caption2=В какую папку Вы хотите установить {#appname} ?%nНажмите «Далее», чтобы продолжить. Если Вы хотите выбрать другую папку, нажмите «Обзор». %n Программа установит {#appname} в следущую папку. rus.Caption3=Выберите папку в меню «Пуск» rus.Caption4=Где программа установки должна создать ярлыки? %n Программа создаст ярлыки в следующей папке меню «Пуск» rus.Caption5=Нажмите «Далее», чтобы продолжить. Если Вы хотите выбрать другую папку, нажмите «Обзор». rus.Caption6=Установка... rus.Caption7=Распаковка файлов... rus.Caption8=Пожалуйста, подождите пока {#appname} установится на Ваш компьютер. rus.Caption10=Состояние деинсталляции rus.Caption11=Деинсталляция{#appname} ... rus.Finished1=Завершение Мастера установки %n{#appname} rus.Finished2=Игра {#appname} установлена на Ваш компьютер. %nПриложение можно запустить с помощью соответствующего значка. %nНажмите «Завершить», чтобы выйти из программы установки. rus.FreeSpace=Доступно места на диске: rus.NeedSpace=Требуется места на диске: rus.Icons=Создать ярлык на рабочем столе rus.Group=Создать ярлыки в меню "Пуск" rus.redist=Установить MS Visual C++ 2008 rus.DRT=Обновить DirectX rus.UP=Идет обновление DirectX... rus.ExtractedFile=Извлекается файл: rus.Extracted=Распаковка архивов... rus.CancelButton=Отмена rus.Error=Ошибка распаковки! rus.ElapsedTime=Прошло: rus.RemainingTime=Осталось времени: rus.EstimatedTime=Всего: rus.AllElapsedTime=Время установки: rus.Space=Доступно места на диске: rus.Space1=Требуется места на диске: [Languages] Name: rus; MessagesFile: compiler:Languages\Russian.isl [UninstallDelete] Type: filesandordirs; Name: {app} [Code] const PCFonFLY=true; notPCFonFLY=false; ButtonWidth = 80; ButtonHeight = 23; bidBack = 0; bidNext = 1; bidCancel = 2; bidDirBrowse = 3; bidGroupBrowse = 4; bidbtnCancelUnpacking = 5; var LabelPct1,LabelCurrFileName: TLabel; //LabelTime1,LabelTime2,LabelTime3: TLabel; ISDoneProgressBar1: TNewProgressBar; MyCancelButton: TButton; Cancel:integer; MyError:boolean; PCFVer:double; ButtonPanel: array [0..5] of TPanel; ButtonImage: array [0..5] of TBitmapImage; ButtonLabel: array [0..5] of TLabel; NeedSpaceLabel,FreeSpaceLabel: TLabel; NeedSize:Integer; FreeMB, TotalMB: Cardinal; SizeStr: String; SizeInt: Integer; SymbolNumber: Integer; type TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword; function WrapMyCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall'; function ISArcExtract(CurComponent:longword; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: BOOL ):BOOL; external 'ISArcExtract@files:ISDone.dll stdcall'; function IS7ZipExtract(CurComponent:longword; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):BOOL; external 'IS7zipExtract@files:ISDone.dll stdcall'; function ISRarExtract(CurComponent:longword; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):BOOL; external 'ISRarExtract@files:ISDone.dll stdcall'; function ISPrecompExtract(CurComponent:longword; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):BOOL; external 'ISPrecompExtract@files:ISDone.dll stdcall'; function ISSRepExtract(CurComponent:longword; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):BOOL; external 'ISSrepExtract@files:ISDone.dll stdcall'; function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):BOOL; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall'; function ISDoneInitialize(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:longword; PrecompVers: double; RecursiveSubDir:boolean; WinHandle, NeededMem:longint; callback:TCallback):BOOL; external 'ISDoneInitialize@files:ISDone.dll stdcall'; function ISDoneStop:BOOL; external 'ISDoneStop@files:ISDone.dll stdcall'; function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword; begin if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct; LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%'; LabelCurrFileName.Caption:=MinimizePathName(ExpandConstant('{cm:ExtractedFile} ')+CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width); Result := Cancel; end; Function NumToStr(Float: Extended): String; Begin Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.'); while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do SetLength(Result, Length(Result)-1); End; function GetSize(): Integer; begin SizeStr:= WizardForm.DiskSpaceLabel.Caption; for SymbolNumber:= 97 to 122 do begin while (Pos(Chr(SymbolNumber), SizeStr) > 0) do Delete(SizeStr, Pos(Chr(SymbolNumber), SizeStr),1); //Находим все символы нижнего регистра и удаляем while (Pos(AnsiUppercase(Chr(SymbolNumber)), SizeStr) > 0) do Delete(SizeStr, Pos(AnsiUppercase(Chr(SymbolNumber)), SizeStr),1); end; //Находим все символы верхнего регистра и удаляем for SymbolNumber:= 192 to 255 do begin while (Pos(Chr(SymbolNumber), SizeStr) > 0) do Delete(SizeStr, Pos(Chr(SymbolNumber), SizeStr),1); end; //Находим все символы нижнего регистра и удаляем while (Pos('.', SizeStr) > 0) do Delete(SizeStr, Pos('.', SizeStr), 1) //Удаляем точки ;Delete(SizeStr, Pos(',', SizeStr), 5) //Удаляем дробную часть Result:= StrToInt(Trim(SizeStr)); //Переводим в число end; function CompareNum(FirstNum, SecondNum: Integer): Boolean; begin if FirstNum < SecondNum then Result:= False else Result:= True; end; Function MbOrTb(Byte: Extended): String; begin if Byte < 1024 then Result:= NumToStr(Byte) + ' Мб' else if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' Гб' else Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' Тб' end; function BackButtonClick(CurPageID: Integer): Boolean; begin Result := True; if CurPageID = wpSelectDir then ButtonPanel[bidNext].Enabled := True; end; procedure ButtonLabelClick(Sender: TObject); var Button: TButton; begin ButtonImage[TLabel(Sender).Tag].Left := 0; case TLabel(Sender).Tag of bidBack: Button := WizardForm.BackButton; bidNext: Button := WizardForm.NextButton; bidCancel: Button := WizardForm.CancelButton; bidDirBrowse: Button := WizardForm.DirBrowseButton; bidGroupBrowse: Button := WizardForm.GroupBrowseButton; bidbtnCancelUnpacking: Button := MyCancelButton; else Exit end if Button.Enabled then Button.OnClick(Button); end; procedure ButtonLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if ButtonLabel[TLabel(Sender).Tag].Enabled then ButtonImage[TLabel(Sender).Tag].Left := -ScaleX(ButtonWidth); end; procedure ButtonLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin ButtonImage[TLabel(Sender).Tag].Left := 0; end; procedure LoadButtonImage(AButton: TButton; AButtonIndex: integer); var Image: TBitmapImage; Panel: TPanel; Labl: TLabel; begin Panel := TPanel.Create(WizardForm); Panel.Left := AButton.Left; Panel.Top := AButton.Top; Panel.Width := AButton.Width; Panel.Height := AButton.Height; Panel.Tag := AButtonIndex; Panel.Parent := AButton.Parent; ButtonPanel[AButtonIndex] := Panel; Image := TBitmapImage.Create(WizardForm); Image.Width := ScaleX(160); Image.Height := ScaleY(23); Image.Enabled := False; Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\button.bmp')); Image.Stretch := True; Image.Parent := Panel; ButtonImage[AButtonIndex] := Image; with TLabel.Create(WizardForm) do begin Tag := AButtonIndex; Parent := Panel; Width := Panel.Width; Height := Panel.Height; Transparent := True; OnClick := @ButtonLabelClick; OnDblClick := @ButtonLabelClick; OnMouseDown := @ButtonLabelMouseDown; OnMouseUp := @ButtonLabelMouseUp; end; Labl := TLabel.Create(WizardForm); Labl.Autosize := True; Labl.Alignment := taCenter; Labl.Tag := AButtonIndex; Labl.Transparent := True; Labl.Font.Color := clWhite; Labl.Caption := AButton.Caption; Labl.OnClick := @ButtonLabelClick; Labl.OnDblClick := @ButtonLabelClick; Labl.OnMouseDown := @ButtonLabelMouseDown; Labl.OnMouseUp := @ButtonLabelMouseUp; Labl.Parent := Panel; ButtonLabel[AButtonIndex] := Labl; end; procedure UpdateButton(AButton: TButton;AButtonIndex: integer); begin ButtonLabel[AButtonIndex].Caption := AButton.Caption; ButtonPanel[AButtonIndex].Visible := AButton.Visible; ButtonLabel[AButtonIndex].Enabled := Abutton.Enabled; ButtonLabel[AButtonIndex].Left := ButtonPanel[AButtonIndex].Width div 2 - ButtonLabel[AButtonIndex].Width div 2; ButtonLabel[AButtonIndex].Top := ButtonPanel[AButtonIndex].Height div 2 - ButtonLabel[AButtonIndex].Height div 2; end; procedure ButtonsTextures; begin WizardForm.BackButton.Left:=ScaleX(322) WizardForm.BackButton.Top:=ScaleY(375) WizardForm.BackButton.Width:=ButtonWidth WizardForm.BackButton.Height:=ButtonHeight WizardForm.NextButton.Left:=ScaleX(407) WizardForm.NextButton.Top:=ScaleY(375) WizardForm.NextButton.Width:=ButtonWidth WizardForm.NextButton.Height:=ButtonHeight WizardForm.CancelButton.Left:=ScaleX(492) WizardForm.CancelButton.Top:=ScaleY(375) WizardForm.CancelButton.Width:=ButtonWidth WizardForm.CancelButton.Height:=ButtonHeight WizardForm.DirBrowseButton.Left:=ScaleX(420) WizardForm.DirBrowseButton.Top:=ScaleY(170) WizardForm.DirBrowseButton.Width:=ButtonWidth WizardForm.DirBrowseButton.Height:=ButtonHeight WizardForm.GroupBrowseButton.Left:=ScaleX(420) WizardForm.GroupBrowseButton.Top:=ScaleY(170) WizardForm.GroupBrowseButton.Width:=ButtonWidth WizardForm.GroupBrowseButton.Height:=ButtonHeight ExtractTemporaryFile('button.bmp') LoadButtonImage(WizardForm.BackButton,bidBack) LoadButtonImage(WizardForm.NextButton,bidNext) LoadButtonImage(WizardForm.CancelButton,bidCancel) LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse) LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse) //Сначала текстурируются кнопки, затем выполняется процедура которую мы перенесли end; procedure GetFreeSpaceCaption(Sender: TObject); var Path: String; begin Path := ExtractFileDrive(WizardForm.DirEdit.Text); GetSpaceOnDisk(Path, True, FreeMB, TotalMB); FreeSpaceLabel.Caption:= ExpandConstant('{cm:FreeSpace} ') + MbOrTb(FreeMB) NeedSpaceLabel.Caption := ExpandConstant('{cm:NeedSpace} ') + MbOrTb(SizeInt) if WizardForm.CurPageID = wpSelectDir then begin WizardForm.NextButton.Enabled:= CompareNum(FreeMB, SizeInt) UpdateButton(WizardForm.NextButton, bidNext) end; end; procedure CancelButtonOnClick(Sender: TObject); begin if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then Cancel:=1; end; procedure HideComponents; begin WizardForm.FileNamelabel.Hide; ISDoneProgressBar1.Hide; LabelPct1.Hide; LabelCurrFileName.Hide; MyCancelButton.Hide; end; procedure ShowComponents; var PBTop:integer; begin PBTop:=ScaleY(160); ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm); with ISDoneProgressBar1 do begin Parent := WizardForm.InstallingPage; Height := WizardForm.ProgressGauge.Height; Left := ScaleX(90); Top := PBTop; Width := ScaleX(400); Max := 1000; end; LabelPct1 := TLabel.Create(WizardForm); with LabelPct1 do begin Parent := WizardForm.InstallingPage; AutoSize := False; Left := ScaleX(272); Top := ScaleY(143); Width := ScaleX(160); Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; end; LabelCurrFileName := TLabel.Create(WizardForm); with LabelCurrFileName do begin Parent := WizardForm.InstallingPage; AutoSize := False; Width := ISDoneProgressBar1.Width+ScaleX(30); Left := ScaleX(90); Top := ScaleY(190); Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; end; MyCancelButton:=TButton.Create(WizardForm); with MyCancelButton do begin Parent:=WizardForm.InstallingPage; Width:=ScaleX(80); Height:=ScaleY(23); Caption:=ExpandConstant('{cm:CancelButton}'); Left:=ScaleX(405); Top:=WizardForm.cancelbutton.top; OnClick:=@CancelButtonOnClick; end; end; Procedure CurPageChanged(CurPageID: Integer); Begin if CurPageID = wpSelectProgramGroup then begin WizardForm.NextButton.Caption:= 'Установить'; end; UpdateButton(WizardForm.BackButton,bidBack) UpdateButton(WizardForm.NextButton,bidNext) UpdateButton(WizardForm.CancelButton,bidCancel) UpdateButton(WizardForm.DirBrowseButton,bidDirBrowse) UpdateButton(WizardForm.GroupBrowseButton,bidGroupBrowse) if (CurPageID = wpFinished) and MyError then begin WizardForm.Caption:= ExpandConstant('{cm:Error}'); WizardForm.FinishedLabel.Font.Color:= clRed; WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ; end; if CurPageID = wpSelectDir then begin GetFreeSpaceCaption(nil) end; end; function CheckError:boolean; begin result:= not MyError; end; procedure CurStepChanged(CurStep: TSetupStep); var Comps1,Comps2,Comps3, TmpValue:longword; tmp:integer; begin if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall WizardForm.ProgressGauge.Hide; WizardForm.CancelButton.Hide; ShowComponents; LoadButtonImage(MyCancelButton, bidbtnCancelUnpacking) UpdateButton(MyCancelButton, bidbtnCancelUnpacking); UpdateButton(WizardForm.CancelButton, bidCancel); WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}'); Cancel:=0; // Распаковка всех необходимых файлов в папку {tmp}. ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов. #ifdef records ExtractTemporaryFile('records.inf'); #endif #ifdef precomp04 ExtractTemporaryFile('packjpg_dll.dll'); ExtractTemporaryFile('RTconsole.exe'); ExtractTemporaryFile('precomp04.exe'); #endif #ifdef precomp038 ExtractTemporaryFile('packjpg_dll.dll'); ExtractTemporaryFile('RTconsole.exe'); ExtractTemporaryFile('precomp038.exe'); ExtractTemporaryFile('zlib1.dll'); #endif #ifdef unrar ExtractTemporaryFile('Unrar.dll'); #endif // Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll // максимум 96 компонентов. Comps1:=0; Comps2:=0; Comps3:=0; #ifdef Components TmpValue:=1; if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue; //компонент 1 TmpValue:=TmpValue*2; if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue; //компонент 2 TmpValue:=TmpValue*2; if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue; //компонент 3 TmpValue:=TmpValue*2; if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue; //компонент 4 // ..... #endif #ifdef precomp04 PCFVer:=0.4; #else #ifdef precomp038 PCFVer:=0.38; #else PCFVer:=0; #endif #endif repeat MyError:=true; if not ISDoneInitialize(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, PCFVer, false, MainForm.Handle, {#NeedMem}, @ProgressCallback) then break; repeat if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data1.bin'), ExpandConstant('{app}\data\'), false, '', '', '', notPCFonFLY ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data\data1.srep'), ExpandConstant('{app}\data\data1.pcf'), true ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data\data1.pcf'), ExpandConstant('{app}\data\levels.bnk.dat'), true ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data2.bin'), ExpandConstant('{app}\data\'), false, '', '', '', notPCFonFLY ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data\data2.srep'), ExpandConstant('{app}\data\data2.pcf'), true ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data\data2.pcf'), ExpandConstant('{app}\data\streaming.bnk.dat'), true ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data3.bin'), ExpandConstant('{app}\data\audio\'), false, '', '', '', notPCFonFLY ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data\audio\data3.srep'), ExpandConstant('{app}\data\audio\data3.pcf'), true ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data\audio\data3.pcf'), ExpandConstant('{app}\data\audio\data3.7z'), true ) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\data\audio\data3.7z'), ExpandConstant('{app}\data\audio\'), true, '' ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data4.bin'), ExpandConstant('{app}\data\globals\'), false, '', '', '', notPCFonFLY ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data5.bin'), ExpandConstant('{app}\data\language\'), false, '', '', '', notPCFonFLY ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data\language\data5.srep'), ExpandConstant('{app}\data\language\data5.pcf'), true ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data\language\data5.pcf'), ExpandConstant('{app}\data\language\data5.7z'), true ) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\data\language\data5.7z'), ExpandConstant('{app}\data\language\'), true, '' ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data6.bin'), ExpandConstant('{app}\data\art\'), false, '', '', '', notPCFonFLY ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data7.bin'), ExpandConstant('{app}\data\'), false, '', '', '', notPCFonFLY ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data\data7.srep'), ExpandConstant('{app}\data\data7.pcf'), true ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data\data7.pcf'), ExpandConstant('{app}\data\audio_lod.bnk.dat'), true ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data8.bin'), ExpandConstant('{app}\'), false, '', '', '', notPCFonFLY ) then break; // далее находятся закомментированые примеры различных комбинаций параметров и функций распаковки (* if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Spider.arc'), ExpandConstant('{app}'), false, '', '', ExpandConstant('{app}'), notPCFonFLY) then break; if not ISSRepExtract( 0, 0, ExpandConstant('{app}\*.srep'),ExpandConstant('{app}\data1024.arc'), true ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{app}\data1024.arc'), ExpandConstant('{app}'), true, '', '', ExpandConstant('{app}'), notPCFonFLY) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\data64.7z'), ExpandConstant('{app}'), false, '' ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data64a.srep'),ExpandConstant('{app}\data64.arc'), true ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{app}\data64.arc'), ExpandConstant('{app}\'), true, '', '', '',notPCFonFLY ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'), ExpandConstant('{app}\data.7z'), true ) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\data.7z'), ExpandConstant('{app}\'), true, '' ) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\CODMW_2.arc'), ExpandConstant('{app}\data1'), false, '', '', '', notPCFonFLY ) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data1\CODMW2.srep'), ExpandConstant('{app}\data1\CODMW2.pcf'), true ) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data1\CODMW2.pcf'), ExpandConstant('{app}\data1\CODMW2.7z'), true ) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{app}\data1\CODMW2.7z'), ExpandConstant('{app}\data1'), true, '' ) then break; // примеры использования компонентов и всплывающего запроса следующего диска: if not ShowChangeDiskWindow('Пожалуйста, вставьте диск 2 и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW2_Disk2.arc' ) then break; if not ISArcExtract ( 1, 0, ExpandConstant('{src}\rustext.arc'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break; if not ISArcExtract ( 2, 0, ExpandConstant('{src}\engtext.arc'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break; if not ISArcExtract ( 3, 0, ExpandConstant('{src}\rusvoice.arc'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break; if not ISArcExtract ( 4, 0, ExpandConstant('{src}\engvoice.arc'), ExpandConstant('{app}'), false, '', '', '', notPCFonFLY ) then break; if not ShowChangeDiskWindow('Пожалуйста, вставьте первый диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc' ) then break; // просто различные комбинации параметров в функциях распаковки if not ISArcExtract ( 0, 0, ExpandConstant('{src}\sds_ru2.arc'), ExpandConstant('{app}\data1'), false, '', '', ExpandConstant('{app}\data1'), PCFonFLY) then break; if not ISArcExtract ( 0, 0, ExpandConstant('{src}\sds_ru.arc'), ExpandConstant('{app}\data1'), false, '', '', ExpandConstant('{app}\data1'), PCFonFLY) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\data1\*.pcf'), ExpandConstant('{src}\data1'), false) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\data1\sds_ru.7z'), ExpandConstant('{src}\data1'), true, '') then break; if not ISRarExtract ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '' ) then break; if not ISRarExtract ( 0, 0, ExpandConstant('{src}\*part1.rar'), ExpandConstant('{app}'), false, 'Password' ) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\data*.7z'), ExpandConstant('{app}\data1'), false, '' ) then break; if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\sound.7z'), ExpandConstant('{app}\data1'), false, '' ) then break; if not ISArcExtract ( 0, 33, ExpandConstant('{src}\dataR.arc'), ExpandConstant('{app}\data1'), false, '', '', '',notPCFonFLY) then break; if not ISArcExtract ( 0, 33, ExpandConstant('{src}\CODMW_*.arc'), ExpandConstant('{app}\data1'), false, '', '', '',notPCFonFLY) then break; if not ISArcExtract ( 0, 34, ExpandConstant('{src}\dataR.arc'), ExpandConstant('{app}\data1\'), false, '', '', '',notPCFonFLY) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\*.pcf'), ExpandConstant('{app}\data1'), false) then break; if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\data0.pcf'), ExpandConstant('{app}\data1'), false) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{src}\*.srep'), ExpandConstant('{app}\data1\'), false) then break; if not ISSRepExtract ( 0, 0, ExpandConstant('{src}\data02.srep'), ExpandConstant('{app}\data1\data.pcf'), false) then break; *) MyError:=false; until true; ISDoneStop; until true; HideComponents; WizardForm.CancelButton.Visible:=true; WizardForm.CancelButton.Enabled:=false; UpdateButton(MyCancelButton, bidbtnCancelUnpacking); UpdateButton(WizardForm.CancelButton, bidCancel); end; if (CurStep=ssPostInstall) and MyError then begin Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, tmp); end; end; Procedure InitializeWizard1(); begin WizardForm.DiskSpaceLabel.Hide; #ifdef NeedSize SizeInt:= {#NeedSize} #else SizeInt:= GetSize; #endif ButtonsTextures; end; /////Наложение картинки на страницы инсталла var WelcomeLabel1, WelcomeLabel2, FinishedLabel, FinishedHeadingLabel: TLabel; SelectDirLabel, SelectDirLabelBrowse, Label1, Label2, Label3: TLabel; lblDirectX, lblRedist, lblGroup, lblIcons, SelectStartMenuFolderLabel, SelectStartMenuFolderBrowseLabel, Parentlabel1: Tlabel; BmpFile: TBitmapImage; DirectX, Redist: TCheckBox; Icons, Group: TCheckBox; function InstallDirectX: Boolean; begin Result:= DirectX.Checked; end; function InstallRedist: Boolean; begin Result:=Redist.Checked; end; function CreateIcons: Boolean; begin Result:=Icons.Checked; end; function GroupIcons: Boolean; begin Result:=Group.Checked; end; // задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox procedure RedistOnClick(Sender: TObject); begin if Redist.Checked = False then Redist.Checked:= True else Redist.Checked:= False; end; procedure DirectXOnClick(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 StartMenuIconOnClick(Sender: TObject); begin if Group.Checked = False then Group.Checked:= True else Group.Checked:= False; end; procedure GroupOnClickIcon(Sender: TObject); begin if Group.Checked = False then begin wizardform.GroupEdit.enabled:= false; wizardform.GroupBrowseButton.enabled:= false; end else begin wizardform.GroupEdit.enabled:= true; wizardform.GroupBrowseButton.enabled:= true; end; end; procedure InitializeWizard2(); begin ExtractTemporaryFile('1.bmp'); //Извлекаем файл, который пойдет в окно инсталлятора //Вставляем изображение в окно инсталлятора, для каждой страницы нужно добвлять изображение заново BmpFile:= TBitmapImage.Create(WizardForm); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= WizardForm.WelcomePage; BmpFile:= TBitmapImage.Create(WizardForm); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= WizardForm.SelectDirPage; BmpFile:= TBitmapImage.Create(WizardForm); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= WizardForm.SelectComponentsPage; BmpFile:= TBitmapImage.Create(WizardForm); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= WizardForm.SelectProgramGroupPage; BmpFile:= TBitmapImage.Create(WizardForm); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= WizardForm.InstallingPage; BmpFile:= TBitmapImage.Create(WizardForm); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= WizardForm.FinishedPage; /////Наложение картинки на страницы инсталла DirectX:= TCheckBox.Create(WizardForm); with DirectX do begin Parent:= WizardForm.SelectDirPage; Left:= ScaleX(80); Top:= ScaleY(200); Width:= ScaleX(13); Height:= ScaleY(13); Checked:= True; end; lblDirectX:= TLabel.Create(WizardForm); with lblDirectX do begin Caption:= ExpandConstant('{cm:drt}'); Left:= ScaleX(100); Top:= ScaleY(200); Width:= ScaleX(150); Height:= ScaleY(13); Transparent := True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Parent:= WizardForm.SelectDirPage; OnClick:= @DirectXOnClick; end; Redist:= TCheckBox.Create(WizardForm); with Redist do begin Parent:= WizardForm.SelectDirPage; Left:= ScaleX(80); Top:= ScaleY(220); Width:= ScaleX(13); Height:= ScaleY(13); Checked:= True; end; lblRedist:= TLabel.Create(WizardForm); with lblRedist do begin Caption:= ExpandConstant('{cm:redist}'); Left:= ScaleX(100); Top:= ScaleY(220); Width:= ScaleX(150); Height:= ScaleY(13); Transparent := True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Parent:= WizardForm.SelectDirPage; OnClick:= @RedistOnClick; end; Icons:= TCheckBox.Create(WizardForm); with Icons do begin Parent:= WizardForm.SelectDirPage; Left:= ScaleX(280); Top:= ScaleY(200) Width:= ScaleX(13); Height:= ScaleY(13); Checked:= True; end; lblIcons:= TLabel.Create(WizardForm); with lblIcons do begin Caption:= ExpandConstant('{cm:icons}'); Left:= ScaleX(300); Top:= ScaleY(200) Width:= ScaleX(150); Height:= ScaleY(13); Transparent := True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Parent:= WizardForm.SelectDirPage; OnClick:= @IconsOnClick; end; Group:= TCheckBox.Create(WizardForm); with Group do begin Parent:= WizardForm.SelectDirPage; Left:= ScaleX(280); Top:= ScaleY(220) Width:= ScaleX(13); Height:= ScaleY(13); Checked:= True; OnClick:= @GroupOnClickIcon; end; lblGroup:= TLabel.Create(WizardForm); with lblGroup do begin Caption:= ExpandConstant('{cm:group}'); Left:= ScaleX(300); Top:= ScaleY(220) Width:= ScaleX(150); Height:= ScaleY(13); Transparent := True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Parent:= WizardForm.SelectDirPage; OnClick:= @StartMenuIconOnClick; end; with WizardForm do begin PageNameLabel.Hide; PageDescriptionLabel.Hide; WelcomeLabel1.Hide; WelcomeLabel2.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; InfoBeforeClickLabel.Hide; InfoAfterClickLabel.Hide; ComponentsDiskSpaceLabel.Hide; SelectComponentsLabel.Hide; ///////////////// ClientHeight := ScaleY(412); ClientWidth := ScaleX(592); InnerNotebook.Left:= ScaleX(0); InnerNotebook.Top:= ScaleY(0); InnerNotebook.Width:= ScaleX(592); InnerNotebook.Height:= ScaleY(412); OuterNotebook.Left:= ScaleX(0); OuterNotebook.Top:= ScaleY(0); OuterNotebook.Width:= ScaleX(592); OuterNotebook.Height:= ScaleY(412); DirEdit.Left:= ScaleX(80); DirEdit.Top:= ScaleY(170); GroupEdit.Left:= ScaleX(80); GroupEdit.Top:= ScaleY(170); end; //WelcomePage, создаем надписи на странице WelcomeLabel1:= TLabel.Create(WizardForm); with WelcomeLabel1 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(140), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 12; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption:= ExpandConstant('{cm:Welcome1}'); Parent:=WizardForm.WelcomePage; end; WelcomeLabel2:= TLabel.Create(WizardForm); with WelcomeLabel2 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(190), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:Welcome2}'); Parent:=WizardForm.WelcomePage; end; //WelcomePage //SelectDirPage SelectDirLabel:= TLabel.Create(WizardForm); with SelectDirLabel do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(90), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 12; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption:= ExpandConstant('{cm:caption1}'); Parent:=WizardForm.SelectDirPage; end; SelectDirLabelBrowse:= TLabel.Create(WizardForm); with SelectDirLabelBrowse do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(120), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:caption2}'); Parent:=WizardForm.SelectDirPage; end; NeedSpaceLabel:= TLabel.Create(WizardForm); with NeedSpaceLabel do begin AutoSize:=False; SetBounds(ScaleX(-167), ScaleY(320), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:needspace}'); Parent:=WizardForm.SelectDirPage; end; FreeSpaceLabel:= TLabel.Create(WizardForm); with FreeSpaceLabel do begin AutoSize:=False; SetBounds(ScaleX(-168), ScaleY(335), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:freespace}'); Parent:=WizardForm.SelectDirPage; end; WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption; WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0; //SelectDirPage //SelectProgramGroupPage SelectStartMenuFolderLabel:= TLabel.Create(WizardForm); with SelectStartMenuFolderLabel do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(110), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 12; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption:= ExpandConstant('{cm:caption3}'); Parent:=WizardForm.SelectProgramGroupPage; end; SelectStartMenuFolderBrowseLabel:= TLabel.Create(WizardForm); with SelectStartMenuFolderBrowseLabel do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(130), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:caption4}'); Parent:=WizardForm.SelectProgramGroupPage; end; Parentlabel1:= TLabel.Create(WizardForm); with Parentlabel1 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(200), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:caption5}'); Parent:=WizardForm.SelectProgramGroupPage; end; //SelectProgramGroupPage //installingpage Label1:= TLabel.Create(WizardForm); with Label1 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(105), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 12; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption:= ExpandConstant('{cm:caption6}'); Parent:=WizardForm.InstallingPage; end; Label2:= TLabel.Create(WizardForm); with Label2 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(125), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:caption7}'); Parent:=WizardForm.InstallingPage; end; Label3:= TLabel.Create(WizardForm); with Label3 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(210), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:caption8}'); Parent:=WizardForm.InstallingPage; end; //installingpage //FinishedPage FinishedLabel:= TLabel.Create(WizardForm); with FinishedLabel do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(140), ScaleX(550), ScaleY(70)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 12; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption:= ExpandConstant('{cm:Finished1}'); Parent:=WizardForm.FinishedPage; end; FinishedHeadingLabel:= TLabel.Create(WizardForm); with FinishedHeadingLabel do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(190), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:Finished2}'); Parent:=WizardForm.FinishedPage; end; //FinishedPage end; Procedure InitializeWizard(); Begin InitializeWizard1(); InitializeWizard2(); end; procedure InitializeUninstallProgressForm; var BmpFile: TBitmapImage; UNLabel1, UNLabel2: Tlabel; begin FileCopy(ExpandConstant('{app}\1.bmp'), ExpandConstant('{tmp}\1.bmp'), False); UninstallProgressForm.AutoScroll := False; UninstallProgressForm.ClientWidth := ScaleX(592); UninstallProgressForm.ClientHeight := ScaleY(412); UninstallProgressForm.InnerNotebook.Left := ScaleX(0); UninstallProgressForm.InnerNotebook.Top := ScaleY(0); UninstallProgressForm.InnerNotebook.Width := ScaleX(592); UninstallProgressForm.InnerNotebook.Height := ScaleY(412); UninstallProgressForm.OuterNotebook.Left := ScaleX(0); UninstallProgressForm.OuterNotebook.Top := ScaleY(0); UninstallProgressForm.OuterNotebook.Width := ScaleX(592); UninstallProgressForm.OuterNotebook.Height := ScaleY(412); UninstallProgressForm.ProgressBar.Left := ScaleX(90); UninstallProgressForm.ProgressBar.Top := ScaleY(160); UninstallProgressForm.ProgressBar.Width := ScaleX(400); UninstallProgressForm.Font.Color:=clLime; UninstallProgressForm.CancelButton.Hide; UninstallProgressForm.Bevel.Hide; UninstallProgressForm.StatusLabel.Hide; UninstallProgressForm.MainPanel.Hide; UninstallProgressForm.WizardSmallBitmapImage.Hide; BmpFile:= TBitmapImage.Create(UninstallProgressForm.InstallingPage); BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp')); BmpFile.SetBounds(0, 0, 592, 412); BmpFile.Stretch:= true BmpFile.Parent:= UninstallProgressForm.InstallingPage; UninstallProgressForm.CancelButton.Visible:=False; UNLabel1:= TLabel.Create(UninstallProgressForm); with UNLabel1 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(105), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 12; Font.Color:=$FFFFFF; Font.Style:=[fsBold]; Caption:= ExpandConstant('{cm:caption10}'); Parent:=UninstallProgressForm.InstallingPage; end; UNLabel2:= TLabel.Create(UninstallProgressForm); with UNLabel2 do begin AutoSize:=False; SetBounds(ScaleX(20), ScaleY(125), ScaleX(550), ScaleY(100)); WordWrap:=True; Alignment := taCenter; Transparent:=True; Font.Name:='Arial'; Font.Size:= 8; Font.Color:=$FFFFFF; Caption:= ExpandConstant('{cm:caption11}'); Parent:=UninstallProgressForm.InstallingPage; end; end; |