// Навзание игры
#define GameName "Star Wars: Battlefront 2"
// Название экзешника
#define GameExe "BattlefrontII.exe"
//Название экзешника 2
#define GameExe2 "BattlefrontII.exe"
// Версия Игры
#define GameVersion "1.1"
//Версия Инсталла
#define InstallVersion "1.0"
// Название Группы
#define RGName "Не в R.G."
//Имя Репакера
#define RePackerName "NeVeRN"
//Необходимое св.место для Игры
#define NeedSize "5 гб"
//Необходимое св.место для установки
#define NeedInstallSize "6 гб"
//Необходимое ОЗУ для установки
#define NeedMem "512"
// Компоненты
#define Components
// Информация об авторе
#define AuthorButton
////////////Возможно выбрать только один из трех вариантов////////////////////
////////////(Var1) Вариант 1 - только выбор таблеток
////////////(Var2) Вариант 2 - только выбор доп компонентов
////////////(Var3) Вариант 3 - Выбор и доп компонентов и таблетки
#define Var2
;#define Var2
;#define Var3
//Задачи
#define Tasks
// Сплешь
#define Splash
// Музыка
#define Music
////ISDone/////////////////
;#define records
;#define PrecompInside
;#define SrepInside
#define facompress
;#define precomp "0.38"
;#define unrar
;#define XDelta
;#define PackZIP
[Setup]
DiskSpanning=true
DiskSliceSize=1457664000
AppName={#GameName}
DefaultDirName={pf}\{#RGName}\{#GameName}
DefaultGroupName={#RGName}\{#GameName}
AppVerName={#GameName}{#GameVersion}
VersionInfoDescription={#GameName}by{#RePackerName}
VersionInfoTextVersion={#InstallVersion}
AppCopyright={#RGName}
OutputDir=D:\1
InternalCompressLevel=ultra64
SolidCompression=true
Compression=lzma/ultra64
SetupIconFile=InstallFiles/icon.ico
UninstallDisplayIcon={app}\Del.ico
ShowTasksTreeLines=Yes
[Files]
//////Файлы графики и инсталлятора///////////:
Source: InstallFiles\*; DestDir: {app}\Temp; Attribs: hidden system
/////// файлы музыки///////////////////////:
#ifdef Music
Source: Music\*; DestDir: {tmp}; Flags: dontcopy
#endif
//////////////файлы сплеша/////////////:
#ifdef Splash
Source: Splash\*; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
#endif
///////////////////////////Файлы ISDone\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\:
Source: Include\russian.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: Include\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
#ifdef precomp
#if precomp == "0.38"
; Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
; Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
; Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
; Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
; Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
; Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#endif
#endif
#endif
#ifdef unrar
Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef XDelta
Source: Include\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PackZIP
Source: Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
#endif
Source: "D:\Battlefront 2\GameData\BattlefrontII.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\Battlefront 2\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Messages]
ButtonBack=< Назад
ButtonNext=Далее >
ButtonCancel=Выход
ButtonInstall=Установить
ButtonFinish=Завершить
ButtonWizardBrowse=Обзор...
[CustomMessages]
Uninstall=Удалить {#GameName}
Run=Запустить {#GameName}
WelcomeLabel1=Вас приветствует мастер установки игры %n {#GameName}
WelcomeLabel2=Программа установит {#GameName} %nна Ваш компьютер. %n%nРекомендуется закрыть антивирусные пакеты %nи все прочие приложения перед тем, как продолжить. %n%nНажмите «Далее», что бы продолжить установку, %nили «Отмена», чтобы выйти из программы установки.
SelectDirLabel=Программа установит игру в следующую папку.
TotalSpaceLabel=Всего места на диске:
FreeSpaceLabel=Доступно места на диске:
InstallSpacelabel=Требуется места для установки:
NeedSpaceLabel=Требуется места на диске:
SelectDirBrowseLabel=Нажмите «Далее», чтобы продолжить. Если вы хотите %nвыбрать другую папку, нажмите «Обзор».
SelectComponentsLabel=Выберите компоненты, которые Вы хотите установить, снимите %nфлажки с компонентов, устанавливать которые не требуется. %nНажмите «Далее», когда Вы будете готовы продолжить
////////////////////выбор таблетки////////////=
Crack=Выбор Кряка
Crack1=Crack от THETA
Crack2=Crack от 3DM
Crack3=Crack от SKiDROW
/////////////////////////////////////=
Text=Язык интерфейса:
Voice=Язык озвучки:
Russian=Русский.
English=Английский.
SelectStartMenuFolderLabel=Программа создаст ярлыки в следующей папке меню «Пуск».
SelectStartMenuFolderBrowseLabel=Нажмите «Далее», чтобы продолжить. Если вы хотите выбрать другую папку, нажмите «Обзор».
NoIconsCheck=Не создавать папку в меню «Пуск»
SelectTasksLabel=Выберите дополнительные задачи, которые должны выполниться %nпри установке {#GameName}, после этого нажмите «Далее».
Icons=Дополнительные ярлыки:
CreateDesktopIcon=Создать ярлык на Рабочем столе.
CreateDesktopIcon2=Создать ярлык на Рабочем столе (Настройки Live)
CreateQuickLaunchIcon=Создать ярлык в Панеле бысрого запуска.
Soft=Дополнительное ПО:
Physx=Обновить | Установить Physx.
DirectX=Обновить | Установить DirectX.
ReadyLabel=Нажмите «Далее», чтобы начать установку, или «Назад», %nесли Вы хотите просмотреть или изменить опции установки.
InstallingLabel=Пожалуйста, подождите, пока игра устновится на Ваш компьютер.
ExtractedFile=Извлекается файл:
Extracted=Распаковка архивов...
ElapsedTime=Прошло:
RemainingTime=Осталось времени:
EstimatedTime=Всего:
AllElapsedTime=Время установки:
Error=Ошибка распаковки!
StatusRollback=Откат изменений...
FinishedHeadingLabel=Установка игры "{#GameName}" %nуспешно завершена
FinishedLabel=Игра "{#GameName}" была %nуспешно установлена на Ваш компьютер. %n%nДля ее запуска выберите соответствующий ярлык в меню "Пуск" %nили на Рабочем столе. %n%nНажмите "Завершить", чтобы выйти из программы установки.
ErrorFinishedHeadingLabel=Установка игры "{#GameName}" %n не завершена
ErrorFinishedLabel=Установка не была завершена.%n%nПожалуйста, устраните проблему и запустите установку снова.
UninstDescript=Пожалуйста, подождите, пока игра будет удалена %nс Вашего компьютера.
StatusUninst=Удаление игры {#GameName}...
fold=
[Icons]
Name: {commondesktop}\{#GameName}; Filename: {app}\GameData\{#GameExe}; WorkingDir: {app}\; IconFilename: {app}\GameData\{#GameExe}; Tasks: Icons\DesktopIcon; Check: CheckError
#ifdef GameExe2
Name: {commondesktop}\{#GameName}.(Настройки Live); Filename: {app}\GameData\{#GameExe2}; WorkingDir: {app}\; IconFilename: {app}\GameData\{#GameExe2}; Tasks: Icons\DesktopIcon2; Check: CheckError
#endif
Name: {group}\{#GameName}; Filename: {app}\GameData\{#GameExe}; WorkingDir: {app}\; IconFilename: {app}\GameData\{#GameExe}; Tasks: Icons\QuickLaunchIcon; Check: CheckError
Name: {group}\{cm:UninstallProgram,{#GameName}}; Filename: {uninstallexe}; IconFilename: {app}\Temp\Del.ico; Tasks: Icons\QuickLaunchIcon; Check: CheckError
#ifdef Components
[Types]
Name: full; Description: Полная установка; Flags: iscustom
[Components]
#ifdef Var1
Name: Crack; Description: {cm:Crack}; Flags: fixed; Types: Full
Name: crack\theta; Description: {cm:Crack2}; Flags: exclusive
Name: crack\3dm; Description: {cm:Crack1}; Flags: exclusive
#endif
#ifdef Var2
Name: Text; Description: {cm:Text}; Flags: fixed; Types: Full
Name: Text\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000
Name: Text\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000
Name: Voice; Description: {cm:Voice}; Flags: fixed; Types: Full
Name: Voice\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000
Name: Voice\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
#endif
#ifdef Var3
Name: Text; Description: {cm:Text}; Flags: fixed; Types: Full
Name: Text\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000
Name: Text\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000
Name: Voice; Description: {cm:Voice}; Flags: fixed; Types: Full
Name: Voice\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000
Name: Voice\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
Name: Crack; Description: {cm:Crack}; Flags: fixed; Types: Full
Name: crack\theta; Description: {cm:Crack2}; Flags: exclusive
Name: crack\3dm; Description: {cm:Crack1}; Flags: exclusive
#endif
#endif
#ifdef Tasks
[Tasks]
Name: Icons; Description: {cm:Icons}; Flags: unchecked
Name: Icons\DesktopIcon; Description: {cm:CreateDesktopIcon}; Flags: unchecked
#ifdef GameExe2
Name: Icons\DesktopIcon2; Description: {cm:CreateDesktopIcon2}; Flags: unchecked
#endif
Name: Icons\QuickLaunchIcon; Description: {cm:CreateQuickLaunchIcon}; Flags: unchecked
Name: DPO; Description: {cm:Soft}
Name: DPO\VCCheck; Description: Установить Visual C++2008 Redist 32-х bit; Flags: unchecked
Name: DPO\VCCheck1; Description: Установить Visual C++2008 Redist 64-х bit; Flags: unchecked
Name: DPO\DirectX; Description: Обновить DirectX (Вэб Установка); Flags: unchecked; Components: ; Languages:
#endif
[Run]
Filename: {src}\Soft\Redist\vcredist_x86.exe; StatusMsg: Устанавливаем Visual C++ 2008 Redist...; Flags: skipifdoesntexist; Tasks: DPO\VCCheck; Components: ; Check: CheckError
Filename: {src}\Soft\Redist\vcredist_x64.exe; StatusMsg: Устанавливаем Visual C++ 2005 Redist...; Flags: skipifdoesntexist; Tasks: DPO\VCCheck1; Components: ; Check: CheckError
Filename: {src}\Soft\DirectX\dxwebsetup.exe; WorkingDir: {src}\Soft\DirectX\; Flags: waituntilterminated; Tasks: DPO\DirectX; StatusMsg: Обновление DirectX...; Check: CheckError
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
#ifdef Splash
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
#endif
#include "Modules\Botva2.iss"
#include "Modules\PB.iss"
#include "Modules\botva2u.iss"
#include "Modules\Header.iss"
#include "Modules\IsDone.iss"
///////////модуль музыки////////////////
#ifdef Music
#include "Modules\BASS.iss"
#endif
////////////////////////////////////////////////////////////Текстура кнопок\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
procedure SetStateNewButtons;
begin
with WizardForm.BackButton do begin
BtnSetText(hBackBtn,PAnsiChar(Caption));
BtnSetVisibility(hBackBtn,Visible);
BtnSetEnabled(hBackBtn,Enabled);
end;
with WizardForm.NextButton do begin
BtnSetText(hNextBtn,PAnsiChar(Caption));
BtnSetVisibility(hNextBtn,Visible);
BtnSetEnabled(hNextBtn,Enabled);
end;
with WizardForm.CancelButton do begin
BtnSetText(hCancelBtn,PAnsiChar(Caption));
BtnSetVisibility(hCancelBtn,Visible);
BtnSetEnabled(hCancelBtn,Enabled);
end;
BtnSetText(hDirBrowseBtn,PAnsiChar(WizardForm.DirBrowseButton.Caption));
BtnSetText(hGroupBrowseBtn,PAnsiChar(WizardForm.GroupBrowseButton.Caption));
end;
procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);
case hBtn of
hCancelBtn: Btn:=WizardForm.CancelButton;
hNextBtn: Btn:=WizardForm.NextButton;
hBackBtn: Btn:=WizardForm.BackButton;
hDirBrowseBtn: Btn:=WizardForm.DirBrowseButton;
hGroupBrowseBtn: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;
procedure WFBtnEnter(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\WFEnter.wav'),$0001);
end;
procedure ButtonsTextures;
begin
with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,205,320,88,34,ExpandConstant('BackBtn.png'),0,False);
BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,WFButtonFont.Handle);
BtnSetFontColor(hBackBtn,$FFFFFF,$E16941,$000000,$B6B6B6);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,409,320,88,34,ExpandConstant('NextBtn.png'),1,False);
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,$FFFFFF,$E16941,$000000,$B6B6B6);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,295,320,112,34,ExpandConstant('CancelBtn.png'),1,False);
BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn,$FFFFFF,$E16941,$000000,$B6B6B6);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,520,173,88,34,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,$FFFFFF,$E16941,$000000,$B6B6B6);
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,520,173,88,34,ExpandConstant('browse.png'),1,False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,$FFFFFF,$E16941,$000000,$B6B6B6);
BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
end;
#ifdef AuthorButton
procedure AuthorBtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);
ImgSetVisibility(AuthorImg, not ImgGetVisibility(AuthorImg));
BtnSetEnabled(Bass_OnOffBtn, not BtnGetEnabled(Bass_OnOffBtn));
BtnSetEnabled(NoIconsCheck, not BtnGetEnabled(NoIconsCheck));
NoIconsLabel.Enabled := not (NoIconsLabel.Enabled);
BtnSetEnabled(hBackBtn, not BtnGetEnabled(hBackBtn));
BtnSetEnabled(hNextBtn, not BtnGetEnabled(hNextBtn));
BtnSetEnabled(hCancelBtn, not BtnGetEnabled(hCancelBtn));
BtnSetEnabled(hDirBrowseBtn, not BtnGetEnabled(hDirBrowseBtn));
BtnSetEnabled(hGroupBrowseBtn, not BtnGetEnabled(hGroupBrowseBtn));
if BtnGetChecked(hbtn) then
begin
#ifdef Components
WizardForm.ComponentsList.Width := 0;
#endif
#ifdef Tasks
WizardForm.TasksList.Width := 0;
#endif
ReadyPanel.Width := 0;
end else
begin
#ifdef Components
WizardForm.ComponentsList.Width := ScaleX(350);
#endif
#ifdef Tasks
WizardForm.TasksList.Width := ScaleX(350);
#endif
ReadyPanel.Width := ScaleX(350);
end;
ImgApplyChanges(WizardForm.Handle);
end;
#endif
#ifdef AuthorButton
procedure CreateAuthorBtn;
begin
AuthorBtn := BtnCreate(WizardForm.Handle,ScaleX(576), ScaleY(317), ScaleX(34), ScaleY(41), ExpandConstant('about.png'),1,True);
BtnSetEvent(AuthorBtn, BtnMouseEnterEventID, WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(AuthorBtn, BtnClickEventID, WrapBtnCallback(@AuthorBtnClick,1));
BtnSetCursor(AuthorBtn, GetSysCursorHandle(32649));
end;
procedure CreateAuthorImg;
begin
AuthorImg := ImgLoad(WizardForm.Handle,ExpandConstant('Logo.png'),0,0,ScaleX(700),ScaleY(400),False, False);
ImgSetVisibility(AuthorImg, False);
ImgApplyChanges(WizardForm.Handle);
end;
#endif
/////////////////////////////////////////////////конец\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////////////////////////////Вставка изображений\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
procedure CreateWizardForm;
var
n: Integer;
begin
with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
ClientWidth:=ScaleX(700);
ClientHeight:=ScaleY(400);
DirEdit.OnChange:=@ObjectFunc;
GroupEdit.OnChange:= @ObjectFunc
OnMouseDown:=@LabelOnMouseDown;
Center;
end;
WFButtonFont:=TFont.Create;
with WFButtonFont do begin
Style:=[fsBold];
Size:=10;
Name:='Tahoma';
end;
BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BMPImage.bmp', BGImageStream);
BGImageStream.Position := 0;
BTNImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('btnimage.bmp', BTNImageStream);
BTNImageStream.Position := 0;
BGImage := TBitmapImage.Create(WizardForm);
BGImage.Bitmap.LoadFromStream(BGImageStream);
BTNImage := TBitmapImage.Create(WizardForm);
BTNImage.Bitmap.LoadFromStream(BTNImageStream);
ImgLoad(WizardForm.Handle,ExpandConstant('MainImage.png'),0,0,0,0,False,True);
//////////////////////////////////////////!!!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
/////////////////////////////////////////////////// ст. Главная\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
WelcomeLabel1:= CreateLabel(WizardForm, ScaleX(90), ScaleY(95), ScaleX(522), ScaleY(80), ExpandConstant('{cm:WelcomeLabel1}'), False);
LabelSetFont(WelcomeLabel1, 12, 'Tahoma', $FFFFFF, [fsBold]);
WelcomeLabel1.Alignment := taCenter;
WelcomeLabel2:= CreateLabel(WizardForm, ScaleX(90), ScaleY(160), ScaleX(522), ScaleY(150), ExpandConstant('{cm:WelcomeLabel2}'), False);
LabelSetFont(WelcomeLabel2, 10, 'Tahoma', $FFFFFF, [fsBold]);
WelcomeLabel2.Alignment := taCenter;
//////////////////////////////////////////////////ст.Выбор Дириктории\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('DirFolder.png'),ScaleX(120),ScaleY(75),ScaleX(45),ScaleY(45),True,True);
DirEditImg:=ImgLoad(WizardForm.Handle,ExpandConstant('DirEditImg.png'),ScaleX(105),ScaleY(178),ScaleX(420),ScaleY(22),True,True);
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('HDD.png'),ScaleX(130),ScaleY(235),ScaleX(62),ScaleY(60),True,True);
SelectDirLabel:= CreateLabel(WizardForm, ScaleX(186), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectDirLabel}'), true);
LabelSetFont(SelectDirLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectDirBrowseLabel:= CreateLabel(WizardForm, ScaleX(165), ScaleY(115), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectDirBrowseLabel}'), true);
LabelSetFont(SelectDirBrowseLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectDirBrowseLabel.Alignment := taCenter;
DirEditLabel:= CreateLabel(WizardForm, ScaleX(110), ScaleY(180), ScaleX(450), ScaleY(20), '', false);
LabelSetFont(DirEditLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
DirEditLabel.Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
TotalSpaceLabel:= CreateLabel(WizardForm, ScaleX(270), ScaleY(230), ScaleX(0), ScaleY(0), ExpandConstant('{cm:TotalSpaceLabel}'), true);
LabelSetFont(TotalSpaceLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);
FreeSpaceLabel:= CreateLabel(WizardForm, ScaleX(270), ScaleY(245), ScaleX(0), ScaleY(0), ExpandConstant('{cm:FreeSpaceLabel}'), true);
LabelSetFont(FreeSpaceLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);
InstallSpacelabel:= CreateLabel(WizardForm, ScaleX(270), ScaleY(260), ScaleX(0), ScaleY(0), ExpandConstant('{cm:InstallSpacelabel}'), true);
LabelSetFont(InstallSpacelabel, 8, 'Tahoma', $FFFFFF, [fsBold]);
NeedSpaceLabel:= CreateLabel(WizardForm, ScaleX(270), ScaleY(275), ScaleX(0), ScaleY(0), ExpandConstant('{cm:NeedSpaceLabel}'), true);
LabelSetFont(NeedSpaceLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);
TotalSpaceLabel2:= CreateLabel(WizardForm, ScaleX(570), ScaleY(230), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(TotalSpaceLabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
TotalSpaceLabel2.Alignment := taRightJustify;
FreeSpaceLabel2:= CreateLabel(WizardForm, ScaleX(570), ScaleY(245), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(FreeSpaceLabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
FreeSpaceLabel2.Alignment := taRightJustify;
InstallSpacelabel2:= CreateLabel(WizardForm, ScaleX(570), ScaleY(260), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(InstallSpacelabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
InstallSpacelabel2.Alignment := taRightJustify;
NeedSpaceLabel2:= CreateLabel(WizardForm, ScaleX(570), ScaleY(275), ScaleX(0), ScaleY(0), '', true);
LabelSetFont(NeedSpaceLabel2, 8, 'Tahoma', $FFFFFF, [fsBold]);
NeedSpaceLabel2.Alignment := taRightJustify;
#ifdef Components
//////////////////////////////////////////ст.Компонентов\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
SelectComponentsLabel:= CreateLabel(WizardForm, ScaleX(145), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectComponentsLabel}'), true);
LabelSetFont(SelectComponentsLabel, 9, 'Tahoma', $FFFFFF, [fsBold]);
SelectComponentsLabel.Alignment := taCenter;
with WizardForm.ComponentsList do begin
Parent:= WizardForm;
SetBounds(ScaleX(175), ScaleY(150), ScaleX(350), ScaleY(110));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:=$FFFFFF;
for n:=0 to ItemCount-1 do begin
ItemFontStyle[n]:= [fsBold];
SubItemFontStyle[n]:= [fsBold];
end;
BorderWidth := (WizardForm.ComponentsList.Width-WizardForm.ComponentsList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.ComponentsList.Left+BorderWidth, WizardForm.ComponentsList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
#endif
/////////////////////////////////////////////////ст.Выбор Группы\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('GroupFolder.png'),ScaleX(90),ScaleY(75),ScaleX(45),ScaleY(45),True,True);
SelectStartMenuFolderLabel:= CreateLabel(WizardForm, ScaleX(140), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectStartMenuFolderLabel}'), true);
LabelSetFont(SelectStartMenuFolderLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectStartMenuFolderLabel.Alignment := taCenter;
SelectStartMenuFolderBrowseLabel:= CreateLabel(WizardForm, ScaleX(170), ScaleY(115), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectDirBrowseLabel}'), true);
LabelSetFont(SelectStartMenuFolderBrowseLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
SelectStartMenuFolderBrowseLabel.Alignment := taCenter;
GroupEditLabel:= CreateLabel(WizardForm, ScaleX(110), ScaleY(180), ScaleX(450), ScaleY(20), WizardForm.GroupEdit.Text, false);
LabelSetFont(GroupEditLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(234),ScaleY(251),ScaleX(13),ScaleY(13),ExpandConstant('CheckBox.png'),1,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649));
NoIconsLabel:= CreateLabel(WizardForm, ScaleX(250), ScaleY(250), ScaleX(0), ScaleY(0), ExpandConstant('{cm:NoIconsCheck}'), true);
LabelSetFont(NoIconsLabel, 8, 'Tahoma', $FFFFFF, [fsBold]);
with NoIconsLabel do begin
Cursor := crHand;
OnClick:= @ObjectFunc;
end;
/////////////////////////////////////////////ст.Задачь\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#ifdef Tasks
SelectTasksLabel:= CreateLabel(WizardForm, ScaleX(120), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:SelectTasksLabel}'), true);
LabelSetFont(SelectTasksLabel, 9, 'Tahoma', $FFFFFF, [fsBold]);
SelectTasksLabel.Alignment := taCenter;
with WizardForm.TasksList do begin
Parent:= WizardForm;
SetBounds(ScaleX(180), ScaleY(150), ScaleX(350), ScaleY(140));
Color:=$000000;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:=$FFFFFF;
BorderStyle := bsSingle;
//TreeViewStyle := True;
BorderWidth := (WizardForm.TasksList.Width-WizardForm.TasksList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGImage.Bitmap, WizardForm.TasksList.Left+BorderWidth, WizardForm.TasksList.Top+BorderWidth);
LoadBtnBmpFromBitmap(btnimage.Bitmap);
end;
#endif
/////////////////////////////////////////////////ст.Итого\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
BGImageStream.position:=0;
ReadyLabel:= CreateLabel(WizardForm, ScaleX(160), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:ReadyLabel}'), true);
LabelSetFont(ReadyLabel, 9, 'Tahoma', $FFFFFF, [fsBold]);
ReadyLabel.Alignment := taCenter;
ReadyPanel := TPanel.Create(WizardForm);
with ReadyPanel do begin
Parent := WizardForm;
SetBounds(ScaleX(180), ScaleY(150), ScaleX(350), ScaleY(140));
BorderStyle := bsSingle;
end;
ReadyBitmap := TBitmapImage.Create(WizardForm);
with ReadyBitmap do begin
Parent := ReadyPanel;
SetBounds(ScaleX(-182), ScaleY(-152), ScaleX(700), ScaleY(400));
Bitmap.LoadFromStream(BGImageStream);
end;
ReadyScrollBar := TScrollBar.Create(WizardForm);
with ReadyScrollBar do begin
Parent := ReadyPanel;
SetBounds(ScaleX(330), ScaleY(0), ScaleX(136), ScaleY(15));
Kind := sbVertical;
OnScroll:=@ScrollText3Scroll;
end;
ReadyPanelLabel := TLabel.Create(WizardForm);
with ReadyPanelLabel do begin
Parent := ReadyPanel;
WordWrap := true;
Transparent:=true;
Font.Name:='Tahoma';
Font.Size:= 8;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
SetBounds(ScaleX(5), ScaleY(5), ScaleX(325), ScaleY(130));
Caption := WizardForm.ReadyMemo.Lines.Text;
end;
////////////////////////////////////////////ст.Установка\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
IsDoneAddComponents
InstallingLabel:= CreateLabel(WizardForm, ScaleX(120), ScaleY(80), ScaleX(0), ScaleY(0), ExpandConstant('{cm:InstallingLabel}'), true);
LabelSetFont(InstallingLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
StatusLabel:= CreateLabel(WizardForm, ScaleX(105), ScaleY(130), ScaleX(0), ScaleY(0), ExpandConstant('{cm:Extracted}'), true);
LabelSetFont(StatusLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
/////////////////////////////////////////////ст.Конец\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
FinishedHeadingLabel:= CreateLabel(WizardForm, ScaleX(90), ScaleY(95), ScaleX(522), ScaleY(80), ExpandConstant('{cm:FinishedHeadingLabel}'), false);
LabelSetFont(FinishedHeadingLabel, 12, 'Tahoma', $FFFFFF, [fsBold]);
FinishedHeadingLabel.Alignment := taCenter;
FinishedLabel:= CreateLabel(WizardForm, ScaleX(90), ScaleY(160), ScaleX(522), ScaleY(150), ExpandConstant('{cm:FinishedLabel}'), false);
LabelSetFont(FinishedLabel, 10, 'Tahoma', $FFFFFF, [fsBold]);
FinishedLabel.Alignment := taCenter;
end;
procedure HideComponents;
begin;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
SelectDirLabel.Hide;
SelectDirBrowseLabel.Hide;
#ifdef Components
SelectComponentsLabel.Hide;
WizardForm.ComponentsList.Hide;
#endif
#ifdef Tasks
SelectTasksLabel.Hide;
WizardForm.TasksList.Hide;
#endif
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
DirEditLabel.Hide;
TotalSpaceLabel.Hide;
FreeSpaceLabel.Hide;
InstallSpacelabel.Hide;
NeedSpaceLabel.Hide;
TotalSpaceLabel2.Hide;
FreeSpaceLabel2.Hide;
InstallSpacelabel2.Hide;
NeedSpaceLabel2.Hide;
GroupEditLabel.Hide;
NoIconsLabel.Hide;
InstallingLabel.Hide;
StatusLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
IMGSetVisibility(DirFolder,False);
IMGSetVisibility(DirEditImg,False);
IMGSetVisibility(HDD,False);
IMGSetVisibility(GroupFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
ReadyPanel.Hide;
ReadyBitmap.Hide;
ReadyScrollBar.Hide;
ReadyPanelLabel.Hide;
ReadyLabel.Hide;
IsDoneHide;
end;
procedure ShowComponents(CurPageID: Integer);
begin
case CurPageID of
wpWelcome: begin
WelcomeLabel1.Show;
WelcomeLabel2.Show;
end;
wpSelectDir: begin
SelectDirLabel.Show;
SelectDirBrowseLabel.Show;
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
InstallSpacelabel.Show;
NeedSpaceLabel.Show
TotalSpaceLabel2.Show;
FreeSpaceLabel2.Show;
InstallSpacelabel2.Show;
NeedSpaceLabel2.Show;
IMGSetVisibility(DirFolder,True);
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(HDD,True);
BtnSetVisibility(hDirBrowseBtn,True);
end;
#ifdef Components
wpSelectComponents: begin
SelectComponentsLabel.Show;
WizardForm.ComponentsList.Show;
end;
#endif
wpSelectProgramGroup: begin
SelectStartMenuFolderLabel.Show;
SelectStartMenuFolderBrowseLabel.Show;
GroupEditLabel.Show;
NoIconsLabel.Show;
IMGSetVisibility(DirEditImg,True);
IMGSetVisibility(GroupFolder,True);
BtnSetVisibility(NoIconsCheck,True);
BtnSetVisibility(hGroupBrowseBtn,True);
end;
#ifdef Tasks
wpSelectTasks: begin
SelectTasksLabel.Show;
WizardForm.TasksList.Show;
end;
#endif
wpReady: begin
ReadyBitmap.Show;
ReadyScrollBar.Show;
ReadyPanelLabel.Show;
ReadyPanel.Show;
ReadyLabel.Show;
ReadyPanelLabel.Caption := WizardForm.ReadyMemo.Lines.Text;
end;
wpInstalling: begin
InstallingLabel.Show;
StatusLabel.Show;
IsDoneShow();
end;
wpFinished: begin
FinishedHeadingLabel.Show;
FinishedLabel.Show;
LabelTime3.Show;
end;
end;
end;
function UninstPBProc(h:hWnd;Msg,wParam,lParam:Longint):Longint;
var
pr,i1,i2:Extended;
p:string;
begin
if Msg=$2 then SetWindowLong(h,-4,UninstPBOldProc);
Result:=CallWindowProc(UninstPBOldProc,h,Msg,wParam,lParam);
if (Msg=$402) and (UninstallProgressForm.ProgressBar.Position>UninstallProgressForm.ProgressBar.Min) then begin
i1:=UninstallProgressForm.ProgressBar.Position-UninstallProgressForm.ProgressBar.Min;
i2:=UninstallProgressForm.ProgressBar.Max-UninstallProgressForm.ProgressBar.Min;
pr:=(i1*100)/i2;
p:=+Format('%f',[pr])+'%';
UnLabelPct.Caption:=p;
StringChange(p,',','.');
ImgPBSetPositionUn(UninstPB,pr);
ImgApplyChangesBotvaU(UninstallProgressForm.Handle);
end;
end;
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('b2p.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('Click.wav');
ExtractTemporaryFile('WFEnter.wav');
ExtractTemporaryFile('Check.wav');
Result:=True;
end;
procedure InitializeWizard;
begin
/////////////////команды для сплеша/////////////
#ifdef Splash
ExtractTemporaryFile('splash.png');
ExtractTemporaryFile('isgsg.dll');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\splash.png',1000,3000,1000,0,255,False,$FFFFFF,10);
#endif
/////////////////////команды для музыки///////////////////
#ifdef Music
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('MusicButton.png');
ExtractTemporaryFile('Music.mp3');
BASS_Init(ExpandConstant('{tmp}\Music.mp3'))
BASS_CreateOnOffButton(ExpandConstant('{tmp}\MusicButton.png'), 90, 320, 34, 34, 4)
BtnSetEvent(Bass_OnOffBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
#endif
////////////////////////конец команды для музыки////////////
CreateWizardForm;
ButtonsTextures;
#ifdef AuthorButton
CreateAuthorBtn;
CreateAuthorImg;
#endif
end;
procedure CurPageChanged(CurPageID: Integer);
begin
HideComponents;
ShowComponents(CurPageID);
WizardForm.NextButton.Enabled:= True;
if CurPageID = wpSelectDir then
ObjectFunc(WizardForm.DirEdit);
if (CurPageID = wpFinished) and ISDoneError then begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
FinishedLabel.Font.Color:= $0000FF;
FinishedHeadingLabel.Caption:= ExpandConstant('{cm:ErrorFinishedHeadingLabel}');
FinishedLabel.Caption:= ExpandConstant('{cm:ErrorFinishedLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
end;
SetStateNewButtons;
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
IsDoneUnpack(CurStep);
end;
procedure DeinitializeSetup;
begin
#ifdef Music
BASS_DeInit; //Освобождаем процесс для музыки
#endif
BGImageStream.Free;
BTNImageStream.Free;
WFButtonFont.Free;
gdipShutdown;
end;