FalconRR
Мимокрокодил
Всем доброго времени суток. Хочу переделать этот http://krinkels.org/resources/l-a-noire.18/ скрипт под другую игру. Скрипт поставлялся с исходниками в PSD, поэтому я сразу начал с перерисовки. Перерисовал frame.png, получился такой
, так вот между верхней частью и нижней и еще по краям он должен быть прозрачным, собственно в графических редакторах, он так и отображается, а вот при компиляции прозрачность исчезает и выглядит это так
в местах помеченных красным, он должен быть прозрачным, но это не так. Подскажите пожалуйста, что не так, желательно по подробнее, я таки чайник, скрипт прилагаю. Заранее очень благодарен.
И еще вопрос не в тему, кому не трудно, распишите на пальцах, как все таки пользоваться CreateFormFromImage, желательно с примером и в какой секции и последовательности, что прописывать.


И еще вопрос не в тему, кому не трудно, распишите на пальцах, как все таки пользоваться CreateFormFromImage, желательно с примером и в какой секции и последовательности, что прописывать.
;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
; | | / / | \ | | | \ | | | | / / | | | | | | |
; | | / / | _ _ _ \ | | | \ | | | | / / | _ _ _ _ _ | | | | _ _ _ _ | |
; | | / / | | \ \ | | | \ | | | | / / | | | | | | |
; | |/ / | |_ _ _/ / | | | \ | | | |/ / | |_ _ _ | | | |_ _ _ _ |
; | / | / | | | \| | | / | | | | | | |
; | \ | _ _ / | | | |\ | | \ | _ _ _| | | |_ _ _ _ | |
; | |\ \ | | \ \ | | | | \ | | |\ \ | | | | | | |
; | | \ \ | | \ \ | | | | \ | | | \ \ | |_ _ _ _ _ | |_ _ _ _ _ _ _ _| | |
; | | \ \ | | \ \ | | | | \ | | | \ \ | | | | | | |
; |_ _ _| \_ _ _\ |_ _ _| \_ _ _\ |_ _| |_ _| \_ _| |_ _ _| \_ _ _\ |_ _ _ _ _ _ _ | |_ _ _ _ _ _| |_ _ _ _ _ _| |_ _ _ _ _
; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
; thx to: || | | | | / \ | \ / | |
; South - botva2. || |_ _ _ _ _ _ _ _| | _ _ _ _ _ | / \ | \ / | |
; VoLT - b2p. || | | | | / \ | \ / | |
; Ne0N - IsDone, SrepInside, PrecompInside. || | | | |_ _ _ / _ \ | \_/ | |
; David.D.Rocco - WinTB. || | | | | / / \ \ | |\ /| | |
; Hachapury - Installer design. || | | | _ _ _| / /_ _\ \ | | \_ _/ | | |
; || | | | | / \ | | | | |
; || | | | |_ _ _ _ _ / _ _ _ _ \ | | | | |
; Version: 0.0.1.8 | Build: 12052012 || | | | | / / \ \ | | | | |
; WebSite: krinkels.org | © KrinkelsTeam || |_ _ _| |_ _ _ _ _ _ _ _| /_ _ _/ \_ _ _\ |_ _| |_ _| |
;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
;#define FullWorkSpace /* Раскомментировать если хотите "Рабочее пространство" на всё задние изображение */
#define NeedMem 512 /* тут задается требуемое количество мегабайт оперативной памяти для распаковки архивов. */
;#define Components /* Закоментировать если компоненты не нужны */
;#define records /* Раскомментировать после "тестового прогона" */
;#define facompress /* Ускоряет распаковку FreeArc-архивов */
;#define PrecompInside /* Распаковка PRECOMP'а "на лету", (подробнее: http://krinkels.org/showthread.php?t=50) */
;#define SrepInside /* Распаковка SREP'а "на лету", (подробнее: http://krinkels.org/showthread.php?t=49) */
;#define precomp "0.42" /* Указать какую версию precomp'а использовать. */
;#define unrar /* Раскомментируйте, если необходима распаковка rar-файлов */
;#define XDelta /* Раскомментируйте, если необходима распаковка diff архивов, созданных с помощью xdelta3. */
;#define PackZIP /* Раскомментируйте, если необходима поддержка упаковки файлов в архивы zip. */
#define GameName "L.A. Noire" /* Название игры */
#define GameVersion "1.3.2613" /* Версия игры */
#define ExeFile "LANoire.exe" /* Название EXE-файла */
#define Launcher "LANLauncher.exe" /* Название Launcher'a */
#define InstallVersion "0.0.1.8" /* Версия инсталлятора (Скрипта). */
#define Company "Rockstar Games" /* Издатель / Разработчик игры */
#define RePacker "Edison007" /* Автор RePack'а' */
#define NeedSize "740" /* Размер игры (в МБ) */
#define NeedInstallSize "740" /* Необходимое место для установки (в МБ) */
;#define Russophobia /* Русофобия (Запрет русских символов в пути установки) */
;#define NotWindowsDir /* Запрет установки в папку Windows */
;#define NotDir /* Запрет установки в существующую папку */
;#define NeedHDD /* Установка только на жёсткий диск */
;#define NeedNTFS /* Установка только на диск с файловой системой NTFS */
#define Icon "Icons\Icon.ico" /* Иконка инсталлятора (закоментировать если не нужна) */
#define UninstallIcon "Icons\Uninstall.ico" /* Иконка деинсталлятора (закоментировать если не нужна) */
#ifdef UNICODE
#define A "W"
#else
#define A "A"
#endif
#ifdef IS_ENHANCED
#if (Ver < 0x5040000) || (Pos('ee', IS_Ver_Str) < 1)
#pragma error 'Enhanced edition of Inno Setup (5.4.0.ee1 or higher) is required to compile this script'
#endif
#else
#error Enhanced edition of Inno Setup (restools) is required to compile this script
#endif
#define ktFile
#define st
#define CheckResult = "false"
#define Current AddBackslash(GetEnv("TEMP"))+ "KrinkelsTeam_" + GetDateTimeString('dd/mm-hh:nn', '-', '-') +'.txt'
#expr SaveToFile(Current)
#sub CheckString
#if Pos("website: krinkels.org", st) != 0
#expr CheckResult = "true"
#endif
#endsub
#for {ktFile = FileOpen(Current); !FileEof(ktFile); st = Lowercase(Trim(FileRead(ktFile)))} CheckString
#expr FileClose(ktFile)
#expr DeleteFile(Current)
#if (CheckResult == "false")
#define pr
#endif
[Setup]
AppName={#GameName}
DefaultDirName={pf}\{#Company}\{#GameName}
DefaultGroupName={#Company}\{#GameName}
InternalCompressLevel=ultra64
SolidCompression=true
Compression=lzma/ultra64
DisableReadyPage=yes
DirExistsWarning=no
AppVerName={#GameName} v{#GameVersion} / RePack by {#RePacker}
VersionInfoDescription={#GameName} / RePack by {#RePacker}
VersionInfoTextVersion={#InstallVersion}
VersionInfoVersion={#InstallVersion}
VersionInfoCompany={#Company} / KrinkelsTeam / Hachapury
AppCopyright=© {#Company} / KrinkelsTeam / Hachapury
#ifdef Icon
SetupIconFile={#Icon}
#endif
#ifdef UninstallIcon
UninstallIconFile={#UninstallIcon}
#endif
[Files]
Source: "InstallFiles\*"; Flags: "DontCopy";
Source: "InstallFiles\botva2.dll"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\CallbackCtrl.dll"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\Frame.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\WizardImage.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
#ifdef FullWorkSpace
Source: "InstallFiles\WorkSpace.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
#else
Source: "InstallFiles\1st_WorkSpace.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
#endif
Source: "InstallFiles\ButtonsPanel.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\BackButton.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\finishbtn.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\NextButton.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\ProgressBar.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\UnistallStatusPanel.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
[Icons]
Name: "{userdesktop}\{#GameName}"; Filename: "{app}\{#ExeFile}"; WorkingDir: "{app}"; Check: "CheckFunction('DESKTOPICON') and CheckError";
Name: "{group}\Играть в {#GameName}"; Filename: "{app}\{#ExeFile}"; WorkingDir: "{app}"; Check: "CheckFunction('GROUPICONS') and CheckError";
Name: "{group}\Launcher {#GameName}"; Filename: "{app}\{#Launcher}"; WorkingDir: "{app}"; Check: "CheckFunction('GROUPICONS') and CheckError";
Name: "{group}\Удалить {#GameName}"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; Check: "CheckFunction('GROUPICONS') and CheckError";
[Run]
Filename: "{src}\Redist\DirectX\dxwebsetup.exe"; Parameters: "/Q"; WorkingDir: "{src}\Redist\DirectX"; Check: "CheckFunction('DIRECTXINSTALL') and CheckError"; BeforeInstall: "BeforeSoftInstall('InstallingDirectX')";
Filename: "{src}\Redist\vcredist_x86.exe"; Parameters: "/q"; WorkingDir: "{src}\Redist"; Check: "CheckFunction('VCREDISTINSTALL') and Not IsWin64 and CheckError"; BeforeInstall: "BeforeSoftInstall('InstallingVCRedist')";
Filename: "{src}\Redist\vcredist_x64.exe"; Parameters: "/q"; WorkingDir: "{src}\Redist"; Check: "CheckFunction('VCREDISTINSTALL') and IsWin64 and CheckError"; BeforeInstall: "BeforeSoftInstall('InstallingVCRedist')";
;-- Подключение модулей --
#include "Modules\Messages.iss"
#include "Modules\WinTB.iss"
#include "Modules\b2p.iss"
#include "Modules\IsUtils.iss"
#include "Modules\Header.iss"
#include "Modules\IsDone.iss"
#include "Modules\Botva2.iss"
#include "Modules\Uninstall.iss"
; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
; | | / / | \ | | | \ | | | | / / | | | | | | |
; | | / / | _ _ _ \ | | | \ | | | | / / | _ _ _ _ _ | | | | _ _ _ _ | |
; | | / / | | \ \ | | | \ | | | | / / | | | | | | |
; | |/ / | |_ _ _/ / | | | \ | | | |/ / | |_ _ _ | | | |_ _ _ _ |
; | / | / | | | \| | | / | | | | | | |
; | \ | _ _ / | | | |\ | | \ | _ _ _| | | |_ _ _ _ | |
; | |\ \ | | \ \ | | | | \ | | |\ \ | | | | | | |
; | | \ \ | | \ \ | | | | \ | | | \ \ | |_ _ _ _ _ | |_ _ _ _ _ _ _ _| | |
; | | \ \ | | \ \ | | | | \ | | | \ \ | | | | | | |
; |_ _ _| \_ _ _\ |_ _ _| \_ _ _\ |_ _| |_ _| \_ _| |_ _ _| \_ _ _\ |_ _ _ _ _ _ _ | |_ _ _ _ _ _| |_ _ _ _ _ _| |_ _ _ _ _
; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
; thx to: || | | | | / \ | \ / | |
; South - botva2. || |_ _ _ _ _ _ _ _| | _ _ _ _ _ | / \ | \ / | |
; VoLT - b2p. || | | | | / \ | \ / | |
; Ne0N - IsDone, SrepInside, PrecompInside. || | | | |_ _ _ / _ \ | \_/ | |
; David.D.Rocco - WinTB. || | | | | / / \ \ | |\ /| | |
; Hachapury - Installer design. || | | | _ _ _| / /_ _\ \ | | \_ _/ | | |
; || | | | | / \ | | | | |
; || | | | |_ _ _ _ _ / _ _ _ _ \ | | | | |
; Version: 0.0.1.8 | Build: 12052012 || | | | | / / \ \ | | | | |
; WebSite: krinkels.org | © KrinkelsTeam || |_ _ _| |_ _ _ _ _ _ _ _| /_ _ _/ \_ _ _\ |_ _| |_ _| |
;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
;#define FullWorkSpace /* Раскомментировать если хотите "Рабочее пространство" на всё задние изображение */
#define NeedMem 512 /* тут задается требуемое количество мегабайт оперативной памяти для распаковки архивов. */
;#define Components /* Закоментировать если компоненты не нужны */
;#define records /* Раскомментировать после "тестового прогона" */
;#define facompress /* Ускоряет распаковку FreeArc-архивов */
;#define PrecompInside /* Распаковка PRECOMP'а "на лету", (подробнее: http://krinkels.org/showthread.php?t=50) */
;#define SrepInside /* Распаковка SREP'а "на лету", (подробнее: http://krinkels.org/showthread.php?t=49) */
;#define precomp "0.42" /* Указать какую версию precomp'а использовать. */
;#define unrar /* Раскомментируйте, если необходима распаковка rar-файлов */
;#define XDelta /* Раскомментируйте, если необходима распаковка diff архивов, созданных с помощью xdelta3. */
;#define PackZIP /* Раскомментируйте, если необходима поддержка упаковки файлов в архивы zip. */
#define GameName "L.A. Noire" /* Название игры */
#define GameVersion "1.3.2613" /* Версия игры */
#define ExeFile "LANoire.exe" /* Название EXE-файла */
#define Launcher "LANLauncher.exe" /* Название Launcher'a */
#define InstallVersion "0.0.1.8" /* Версия инсталлятора (Скрипта). */
#define Company "Rockstar Games" /* Издатель / Разработчик игры */
#define RePacker "Edison007" /* Автор RePack'а' */
#define NeedSize "740" /* Размер игры (в МБ) */
#define NeedInstallSize "740" /* Необходимое место для установки (в МБ) */
;#define Russophobia /* Русофобия (Запрет русских символов в пути установки) */
;#define NotWindowsDir /* Запрет установки в папку Windows */
;#define NotDir /* Запрет установки в существующую папку */
;#define NeedHDD /* Установка только на жёсткий диск */
;#define NeedNTFS /* Установка только на диск с файловой системой NTFS */
#define Icon "Icons\Icon.ico" /* Иконка инсталлятора (закоментировать если не нужна) */
#define UninstallIcon "Icons\Uninstall.ico" /* Иконка деинсталлятора (закоментировать если не нужна) */
#ifdef UNICODE
#define A "W"
#else
#define A "A"
#endif
#ifdef IS_ENHANCED
#if (Ver < 0x5040000) || (Pos('ee', IS_Ver_Str) < 1)
#pragma error 'Enhanced edition of Inno Setup (5.4.0.ee1 or higher) is required to compile this script'
#endif
#else
#error Enhanced edition of Inno Setup (restools) is required to compile this script
#endif
#define ktFile
#define st
#define CheckResult = "false"
#define Current AddBackslash(GetEnv("TEMP"))+ "KrinkelsTeam_" + GetDateTimeString('dd/mm-hh:nn', '-', '-') +'.txt'
#expr SaveToFile(Current)
#sub CheckString
#if Pos("website: krinkels.org", st) != 0
#expr CheckResult = "true"
#endif
#endsub
#for {ktFile = FileOpen(Current); !FileEof(ktFile); st = Lowercase(Trim(FileRead(ktFile)))} CheckString
#expr FileClose(ktFile)
#expr DeleteFile(Current)
#if (CheckResult == "false")
#define pr
#endif
[Setup]
AppName={#GameName}
DefaultDirName={pf}\{#Company}\{#GameName}
DefaultGroupName={#Company}\{#GameName}
InternalCompressLevel=ultra64
SolidCompression=true
Compression=lzma/ultra64
DisableReadyPage=yes
DirExistsWarning=no
AppVerName={#GameName} v{#GameVersion} / RePack by {#RePacker}
VersionInfoDescription={#GameName} / RePack by {#RePacker}
VersionInfoTextVersion={#InstallVersion}
VersionInfoVersion={#InstallVersion}
VersionInfoCompany={#Company} / KrinkelsTeam / Hachapury
AppCopyright=© {#Company} / KrinkelsTeam / Hachapury
#ifdef Icon
SetupIconFile={#Icon}
#endif
#ifdef UninstallIcon
UninstallIconFile={#UninstallIcon}
#endif
[Files]
Source: "InstallFiles\*"; Flags: "DontCopy";
Source: "InstallFiles\botva2.dll"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\CallbackCtrl.dll"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\Frame.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\WizardImage.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
#ifdef FullWorkSpace
Source: "InstallFiles\WorkSpace.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
#else
Source: "InstallFiles\1st_WorkSpace.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
#endif
Source: "InstallFiles\ButtonsPanel.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\BackButton.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\finishbtn.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\NextButton.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\ProgressBar.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
Source: "InstallFiles\UnistallStatusPanel.png"; DestDir:"{app}\uninst_tmp"; Flags: "IgnoreVersion"; Attribs: "Hidden System";
[Icons]
Name: "{userdesktop}\{#GameName}"; Filename: "{app}\{#ExeFile}"; WorkingDir: "{app}"; Check: "CheckFunction('DESKTOPICON') and CheckError";
Name: "{group}\Играть в {#GameName}"; Filename: "{app}\{#ExeFile}"; WorkingDir: "{app}"; Check: "CheckFunction('GROUPICONS') and CheckError";
Name: "{group}\Launcher {#GameName}"; Filename: "{app}\{#Launcher}"; WorkingDir: "{app}"; Check: "CheckFunction('GROUPICONS') and CheckError";
Name: "{group}\Удалить {#GameName}"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; Check: "CheckFunction('GROUPICONS') and CheckError";
[Run]
Filename: "{src}\Redist\DirectX\dxwebsetup.exe"; Parameters: "/Q"; WorkingDir: "{src}\Redist\DirectX"; Check: "CheckFunction('DIRECTXINSTALL') and CheckError"; BeforeInstall: "BeforeSoftInstall('InstallingDirectX')";
Filename: "{src}\Redist\vcredist_x86.exe"; Parameters: "/q"; WorkingDir: "{src}\Redist"; Check: "CheckFunction('VCREDISTINSTALL') and Not IsWin64 and CheckError"; BeforeInstall: "BeforeSoftInstall('InstallingVCRedist')";
Filename: "{src}\Redist\vcredist_x64.exe"; Parameters: "/q"; WorkingDir: "{src}\Redist"; Check: "CheckFunction('VCREDISTINSTALL') and IsWin64 and CheckError"; BeforeInstall: "BeforeSoftInstall('InstallingVCRedist')";
;-- Подключение модулей --
#include "Modules\Messages.iss"
#include "Modules\WinTB.iss"
#include "Modules\b2p.iss"
#include "Modules\IsUtils.iss"
#include "Modules\Header.iss"
#include "Modules\IsDone.iss"
#include "Modules\Botva2.iss"
#include "Modules\Uninstall.iss"
Код:
procedure BeforeSoftInstall(const CurrentSoftInstall: String);
begin
IsDoneComponentsSetVisible(False);
TLabelExSetText(InstallingLabel, CustomMessage('SoftInstall'));
TLabelExSetText(StatusLabel, CustomMessage(CurrentSoftInstall));
ImgApplyChanges(WizardForm.Handle);
end;
function InitializeSetup:boolean;
begin
ExtractTemporaryFile('WinTB.dll');
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('b2p.dll');
ExtractTemporaryFile('CallbackCtrl.dll');
ExtractTemporaryFile('Next.ico');
ExtractTemporaryFile('Back.ico');
ExtractTemporaryFile('Exit.ico');
Result:=True;
end;
procedure CreateWizardImage;
begin
with WizardForm do begin
OuterNotebook.Hide;
Bevel.Hide;
BorderStyle:=bsNone;
Position:=poScreenCenter;
ClientWidth:=800;
ClientHeight:=620;
OnMouseDown:=@WizardFormOnMouseDown;
DirEdit.OnChange:=@ObjectFunc;
GroupEdit.OnChange:= @ObjectFunc
ImgLoad(Handle, 'Frame.png', 0, 0, 0, 0, False, True);
ImgLoad(Handle, 'WizardImage.png', 0, 0, 0, 0, False, True);
#ifdef FullWorkSpace
ImgLoad(Handle, 'WorkSpace.png', 0, 75, 0, 0, False, True);
#else
ImgLoad(Handle, '1st_WorkSpace.png', 0, 88, 0, 0, False, True);
#endif
ImgLoad(Handle, 'ButtonsPanel.png', 0, 0, 0, 0, False, True);
ImgLoad(Handle, 'StatusPanel.png', 0, 36, 0, 0, False, True);
CurrentImage:=ImgLoad(Handle, 'CurrentImage.png', 0, 36, 0, 0, False, True);
FolderImage:=ImgLoad(Handle, 'Folder.png', 175, 106, 0, 0, False, True);
StartImage:=ImgLoad(Handle, 'Start.png', 175, 118, 0, 0, False, True);
ComponentsImage:=ImgLoad(Handle, 'components.png', 170, 105, 0, 0, False, True);
TasksImage:=ImgLoad(Handle, 'tasks.png', 175, 102, 0, 0, False, True);
EditImage:=ImgLoad(Handle, 'Edit.png', 173, 193, 0, 0, False, True);
end;
with TLabel.Create(WizardForm) do begin
Parent:=WizardForm; AutoSize:=False; Alignment:=taCenter; Transparent:=True;
Top:=13; Left:=0; Width:=WizardForm.Width; Height:= 15; OnMouseDown:=@WizardFormOnMouseDown;
caption:=CustomMessage('HeaderLabel'); Font.Name:='Myriad Pro'; Font.Height:=15; Font.Color:=$FFFFFF;
end;
TaskBarV12(MainForm.Handle, WizardForm.Handle, false);
SetTaskBarToolTip(0, '{#GameName} v{#GameVersion} / RePack by {#RePacker}');
end;
//************************************************ [Начало - Компоненты страниц] ***************************************************//
procedure CreatePageComponents;
#ifdef Components
var
i: integer;
#endif
begin
//=============== [Начало - WelcomePage] ===============\\
WelcomeLabel1:=TLabelExCreate(WizardForm, 0, 120, WizardForm.Width, 50, 20, 1, CustomMessage('WelcomeLabel1'), 'Myriad Pro', [], $D5A862, $000000, False, taCenter);
WelcomeLabel2:=TLabelExCreate(WizardForm, 0, 200, WizardForm.Width, 120, 17, 1, CustomMessage('WelcomeLabel2'), 'Myriad Pro', [], $D5A862, $000000, False, taCenter);
//=============== [Конец - WelcomePage] ===============\\
//=============== [Начало - SelectDirPage] ===============\\
SelectDirBrowseLabel:=TLabelExCreate(WizardForm, 270, 116, 0, 0, 18, 1, CustomMessage('SelectDirBrowseLabel'), 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
DirEditLabel:=TLabelExCreate(WizardForm, 177, 200, 345, 20, 18, 1, WizardForm.DirEdit.Text, 'Myriad Pro', [], $FFFFFF, $000000, False, taLeftJustify);
TotalSpaceLabel:=TLabelExCreate(WizardForm, 175, 245, 0, 0, 18, 1, '', 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
FreeSpaceLabel:=TLabelExCreate(WizardForm, 175, 262, 0, 0, 18, 1, '', 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
InstallSpacelabel:=TLabelExCreate(WizardForm, 175, 279, 0, 0, 18, 1, '', 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
NeedSpaceLabel:=TLabelExCreate(WizardForm, 175, 296, 0, 0, 18, 1, '', 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
//=============== [Конец - SelectDirPage] ===============\\
//=============== [Начало - SelectProgramGroupPage] ===============\\
SelectStartMenuFolderBrowseLabel:=TLabelExCreate(WizardForm, 255, 121, 0, 0, 18, 1, CustomMessage('SelectStartMenuFolderBrowseLabel'), 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
GroupEditLabel:=TLabelExCreate(WizardForm, 177, 200, 345, 20, 18, 1, WizardForm.GroupEdit.Text, 'Myriad Pro', [], $FFFFFF, $000000, False, taLeftJustify);
NoIconsCheckBox:=TCheckBoxExCreate(WizardForm, 173, 245, 20, 20, 0, 1, 'CheckBox.png', 'Myriad Pro', CustomMessage('NoProgramGroupCheck'), 19, [], $D5A862, $000000);
CheckBoxExSetEvent(NoIconsCheckBox, @CheckBoxOnClick);
TLabelExSetEvent(NoIconsCheckBox.Description, @LabelsOnClick);
//=============== [Конец - SelectProgramGroupPage] ===============\\
//=============== [Начало - ComponentsPage] ===============\\
#ifdef Components
ComponentsPage:= CreateCustomPage(WpSelectProgramGroup, '', '');
SelectComponentsLabel:=TLabelExCreate(WizardForm, 270, 116, 0, 0, 18, 1, CustomMessage('SelectComponentsLabel'), 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
ComponentsCheckBox:=TCheckBoxExCreate(WizardForm, 280, 218, 20, 20, 0, 1, 'CheckBox.png', 'Myriad Pro', CustomMessage('InterfaceLang'), 19, [], $D5A862, $000000);
CheckBoxExSetEnabled(ComponentsCheckBox, False);
CheckBoxExSetChecked(ComponentsCheckBox, True);
for i:=0 to 1 do begin
TextRadioButtons[i]:=TCheckBoxExCreate(WizardForm, 302, 245+25*i, 20, 20, 0, 1, 'RadioButton.png', 'Myriad Pro', '', 19, [], $D5A862, $000000);
CheckBoxExSetEvent(TextRadioButtons[i], @ComponentsCheckBoxOnClick);
TLabelExSetEvent(TextRadioButtons[i].Description, @LabelsOnClick);
end;
CheckBoxExSetChecked(TextRadioButtons[0], True);
TLabelExSetText(TextRadioButtons[0].Description, CustomMessage('RusLang'));
TLabelExSetText(TextRadioButtons[1].Description, CustomMessage('EngLang'));
#endif
//=============== [Конец - ComponentsPage] ===============\\
//=============== [Начало - SelectTasksPage] ===============\\
#ifdef Components
SelectTasksPage:= CreateCustomPage(ComponentsPage.ID, '', '');
#else
SelectTasksPage:= CreateCustomPage(WpSelectProgramGroup, '', '');
#endif
SelectTasksLabel:=TLabelExCreate(WizardForm, 270, 112, 0, 0, 18, 1, CustomMessage('SelectTasksLabel'), 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
DesktopIconCheckBox:=TCheckBoxExCreate(WizardForm, 155, 210, 20, 20, 0, 1, 'CheckBox.png', 'Myriad Pro', CustomMessage('CreateDesktopIcon'), 19, [], $D5A862, $000000);
DirectXCheckBox:=TCheckBoxExCreate(WizardForm, 155, 235, 20, 20, 0, 1, 'CheckBox.png', 'Myriad Pro', CustomMessage('InstallDirectX'), 19, [], $D5A862, $000000);
VCRedistCheckBox:=TCheckBoxExCreate(WizardForm, 155, 260, 20, 20, 0, 1, 'CheckBox.png', 'Myriad Pro', CustomMessage('InstallVCRedist'), 19, [], $D5A862, $000000);
TLabelExSetEvent(DesktopIconCheckBox.Description, @LabelsOnClick);
TLabelExSetEvent(DirectXCheckBox.Description, @LabelsOnClick);
TLabelExSetEvent(VCRedistCheckBox.Description, @LabelsOnClick);
//=============== [Конец - SelectTasksPage] ===============\\
//=============== [Начало - InstallingPage] ===============\\
InstallingLabel:=TLabelExCreate(WizardForm, 135, 160, 0, 0, 18, 1, CustomMessage('InstallingLabel'), 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
StatusLabel:=TLabelExCreate(WizardForm, 140, 185, 0, 0, 18, 1, '', 'Myriad Pro', [], $D5A862, $000000, True, taLeftJustify);
CreateIsDoneComponents;
//=============== [Конец - InstallingPage] ===============\\
//=============== [Начало - FinishedPage] ===============\\
FinishedHeadingLabel:=TLabelExCreate(WizardForm, 0, 120, WizardForm.Width, 50, 20, 1, '', 'Myriad Pro', [], $D5A862, $000000, False, taCenter);
FinishedLabel:=TLabelExCreate(WizardForm, 0, 200, WizardForm.Width, 120, 17, 1, '', 'Myriad Pro', [], $D5A862, $000000, False, taCenter);
//=============== [Конец - FinishedPage] ===============\\
end;
//************************************************ [Конец - Компоненты страниц] ***************************************************//
//************************************************ [Начало - Текстуры кнопок] ***************************************************//
procedure SetStateNewButtons;
begin
with WizardForm.BackButton do begin
TaskBarButtonEnabled(BackButtonTB, Visible);
TaskBarButtonToolTip(BackButtonTB, Caption);
end;
with WizardForm.NextButton do begin
TaskBarButtonEnabled(NextButtonTB, Visible);
TaskBarButtonToolTip(NextButtonTB, Caption);
end;
with WizardForm.CancelButton do begin
TaskBarButtonEnabled(CancelButtonTB, Visible);
TaskBarButtonToolTip(CancelButtonTB, Caption);
end;
BtnSetText(DirBrowseButton,PAnsiChar(WizardForm.DirBrowseButton.Caption));
BtnSetText(GroupBrowseButton,PAnsiChar(WizardForm.GroupBrowseButton.Caption));
end;
procedure TaskBarBtnOnClick(Btn: integer);
begin
case Btn of
BackButtonTB: WizardForm.BackButton.OnClick(WizardForm.BackButton);
NextButtonTB: WizardForm.NextButton.OnClick(WizardForm.NextButton);
CancelButtonTB: WizardForm.CancelButton.OnClick(WizardForm.CancelButton);
end;
SetStateNewButtons;
end;
procedure WizardFormBtnClick(hBtn:HWND);
var
Btn:TButton;
begin
case hBtn of
CancelButton: if WizardForm.CurPageID= wpFinished then Btn:=WizardForm.NextButton else Btn:=WizardForm.CancelButton;
NextButton: Btn:=WizardForm.NextButton;
BackButton: Btn:=WizardForm.BackButton;
DirBrowseButton: Btn:=WizardForm.DirBrowseButton;
GroupBrowseButton: Btn:=WizardForm.GroupBrowseButton;
end;
Btn.OnClick(Btn);
SetStateNewButtons;
BtnRefresh(hBtn);
end;
procedure ButtonsTextures;
begin
// Текстурирование кнопок
CancelButton:=BtnCreate(WizardForm.Handle, 341, 363, 68, 68, 'finishbtn.png', 0, False);
BackButton:=BtnCreate(WizardForm.Handle, 274, 387, 41, 41, 'BackButton.png', 0, False);
NextButton:=BtnCreate(WizardForm.Handle, 434, 387, 41, 41, 'NextButton.png', 0, False);
DirBrowseButton:=BtnCreate(WizardForm.Handle, 537, 191, 115, 34, 'BrowseButton.png', 0, False);
GroupBrowseButton:=BtnCreate(WizardForm.Handle, 537, 191, 115, 34, 'BrowseButton.png', 0, False);
BtnSetFontColor(DirBrowseButton, $D5A862, $D5A862, $D5A862, $959595);
BtnSetFontColor(GroupBrowseButton, $D5A862, $D5A862, $D5A862, $959595);
ButtonSetEvents(CancelButton, @WizardFormBtnClick, nil, nil, nil);
ButtonSetEvents(BackButton, @WizardFormBtnClick, nil, nil, nil);
ButtonSetEvents(NextButton, @WizardFormBtnClick, nil, nil, nil);
ButtonSetEvents(DirBrowseButton, @WizardFormBtnClick, nil, nil, nil);
ButtonSetEvents(GroupBrowseButton, @WizardFormBtnClick, nil, nil, nil);
// Кнопки на панели задач (Win 7/8)
BackButtonIcon := LoadImage(0, ExpandConstant('{tmp}\Back.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
NextButtonIcon := LoadImage(0, ExpandConstant('{tmp}\Next.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
CancelButtonIcon := LoadImage(0, ExpandConstant('{tmp}\Exit.ico'), IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
BackButtonTB:=TaskBarAddButton(BackButtonIcon, WizardForm.BackButton.Caption, BtnCallbackaddr(@TaskBarBtnOnClick, 1), True);
CancelButtonTB:=TaskBarAddButton(CancelButtonIcon, WizardForm.CancelButton.Caption, BtnCallbackaddr(@TaskBarBtnOnClick, 1), True);
NextButtonTB:=TaskBarAddButton(NextButtonIcon, WizardForm.NextButton.Caption, BtnCallbackaddr(@TaskBarBtnOnClick, 1), True);
TaskBarUpdateButtons(0);
WizardForm.BackButton.SetBounds(0, 0, 0, 0); WizardForm.NextButton.SetBounds(0, 0, 0, 0); WizardForm.CancelButton.SetBounds(0, 0, 0, 0);
end;
//************************************************ [Конец - Текстуры кнопок] ***************************************************//
procedure HidePageComponents;
begin
TLabelExSetVisible(WelcomeLabel1, False);
TLabelExSetVisible(WelcomeLabel2, False);
TLabelExSetVisible(SelectDirBrowseLabel, False);
TLabelExSetVisible(DirEditLabel, False);
TLabelExSetVisible(TotalSpaceLabel, False);
TLabelExSetVisible(FreeSpaceLabel, False);
TLabelExSetVisible(InstallSpacelabel, False);
TLabelExSetVisible(NeedSpaceLabel, False);
TLabelExSetVisible(SelectStartMenuFolderBrowseLabel, False);
TLabelExSetVisible(GroupEditLabel, False);
TLabelExSetVisible(SelectTasksLabel, False);
TLabelExSetVisible(InstallingLabel, False);
TLabelExSetVisible(StatusLabel, False);
TLabelExSetVisible(FinishedHeadingLabel, False);
TLabelExSetVisible(FinishedLabel, False);
ImgSetVisibility(EditImage, False);
ImgSetVisibility(FolderImage, False);
ImgSetVisibility(StartImage, False);
ImgSetVisibility(ComponentsImage, False);
ImgSetVisibility(TasksImage, False);
BtnSetVisibility(DirBrowseButton, False);
BtnSetVisibility(GroupBrowseButton, False);
CheckBoxExSetVisibility(NoIconsCheckBox, False);
CheckBoxExSetVisibility(DesktopIconCheckBox, False);
CheckBoxExSetVisibility(DirectXCheckBox, False);
CheckBoxExSetVisibility(VCRedistCheckBox, False);
#ifdef Components
TLabelExSetVisible(SelectComponentsLabel, False);
CheckBoxExSetVisibility(ComponentsCheckBox, False);
CheckBoxExSetVisibility(TextRadioButtons[0], False);
CheckBoxExSetVisibility(TextRadioButtons[1], False);
#Endif
IsDoneComponentsSetVisible(false);
BtnSetEnabled(BackButton, True);
BtnSetEnabled(NextButton, True);
BtnSetEnabled(CancelButton, True);
end;
procedure ShowPageComponents(CurPageID: Integer);
begin
case CurPageID of
WpWelcome: begin
TLabelExSetVisible(WelcomeLabel1, True);
TLabelExSetVisible(WelcomeLabel2, True);
BtnSetEnabled(BackButton, False);
ImgSetPosition(CurrentImage, 0, 36, 0, 0);
end;
WpSelectDir: begin
ObjectFunc(WizardForm.DirEdit);
TLabelExSetVisible(SelectDirBrowseLabel, True);
TLabelExSetVisible(DirEditLabel, True);
TLabelExSetVisible(TotalSpaceLabel, True);
TLabelExSetVisible(FreeSpaceLabel, True);
TLabelExSetVisible(InstallSpacelabel, True);
TLabelExSetVisible(NeedSpaceLabel, True);
ImgSetVisibility(EditImage, True);
ImgSetVisibility(FolderImage, True);
BtnSetVisibility(DirBrowseButton, True);
ImgSetPosition(CurrentImage, 107, 36, 0, 0);
end;
WpSelectProgramGroup: begin
ObjectFunc(WizardForm.GroupEdit);
TLabelExSetVisible(SelectStartMenuFolderBrowseLabel, True);
TLabelExSetVisible(GroupEditLabel, True);
ImgSetVisibility(StartImage, True);
ImgSetVisibility(EditImage, True);
BtnSetVisibility(GroupBrowseButton, True);
CheckBoxExSetVisibility(NoIconsCheckBox, True);
ImgSetPosition(CurrentImage, 214, 36, 0, 0);
end;
#ifdef Components
ComponentsPage.ID: begin
TLabelExSetVisible(SelectComponentsLabel, True);
ImgSetVisibility(ComponentsImage, True);
CheckBoxExSetVisibility(ComponentsCheckBox, True);
CheckBoxExSetVisibility(TextRadioButtons[0], True);
CheckBoxExSetVisibility(TextRadioButtons[1], True);
ImgSetPosition(CurrentImage, 321, 36, 0, 0);
end;
#endif
SelectTasksPage.ID: begin
WizardForm.NextButton.Caption:='Установить';
TLabelExSetVisible(SelectTasksLabel, True);
ImgSetVisibility(TasksImage, True);
CheckBoxExSetVisibility(DesktopIconCheckBox, True);
CheckBoxExSetVisibility(DirectXCheckBox, True);
CheckBoxExSetVisibility(VCRedistCheckBox, True);
ImgSetPosition(CurrentImage, 428, 36, 0, 0);
end;
wpInstalling: begin
TLabelExSetVisible(InstallingLabel, True);
TLabelExSetVisible(StatusLabel, True);
IsDoneComponentsSetVisible(True);
BtnSetEnabled(BackButton, False);
BtnSetEnabled(NextButton, False);
ImgSetPosition(CurrentImage, 535, 36, 0, 0);
end;
wpFinished: begin
TLabelExSetVisible(FinishedHeadingLabel, True);
TLabelExSetVisible(FinishedLabel, True);
TLabelExSetText(FinishedHeadingLabel, CustomMessage('FinishedHeadingLabel'));
if (not CheckBoxExGetChecked(NoIconsCheckBox) and CheckBoxExGetChecked(DesktopIconCheckBox)) then TLabelExSetText(FinishedLabel, CustomMessage('FinishedLabel'));
if (not CheckBoxExGetChecked(NoIconsCheckBox) and not CheckBoxExGetChecked(DesktopIconCheckBox)) then TLabelExSetText(FinishedLabel, CustomMessage('FinishedLabelNoDesktop'));
if (CheckBoxExGetChecked(NoIconsCheckBox) and CheckBoxExGetChecked(DesktopIconCheckBox)) then TLabelExSetText(FinishedLabel, CustomMessage('FinishedLabelNoIcons'));
if (CheckBoxExGetChecked(NoIconsCheckBox) and not CheckBoxExGetChecked(DesktopIconCheckBox)) then TLabelExSetText(FinishedLabel, CustomMessage('FinishedLabelNoIconsNoDesktop'));
if ISDoneError then begin
TLabelExSetText(FinishedHeadingLabel, CustomMessage('FinishedHeadingLabelSetupAborted'));
TLabelExSetText(FinishedLabel, CustomMessage('FinishedLabelSetupAborted'));
end;
BtnSetEnabled(BackButton, False);
BtnSetEnabled(NextButton, False);
ImgSetPosition(CurrentImage, 642, 36, 0, 0);
end;
end;
end;
#ifndef pr
procedure InitializeWizard;
begin
CreateWizardImage;
CreatePageComponents;
ButtonsTextures;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
HidePageComponents;
ShowPageComponents(CurPageID);
SetStateNewButtons;
ImgApplyChanges(WizardForm.Handle);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
IsDoneUnpack(CurStep);
end;
procedure DeinitializeSetup;
begin
DestroyIcon(BackButtonIcon);
DestroyIcon(CancelButtonIcon);
DestroyIcon(NextButtonIcon);
TaskBarDestroy;
gdipShutDown;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
TaskBarButtonEnabled(BackButtonTB, false);
TaskBarButtonEnabled(NextButtonTB, false);
TaskBarButtonEnabled(CancelButtonTB, false);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
#ifdef NeedNTFS
var
VolumeName, FileSystemName: String;
#endif
begin
Result:= True;
case CurPageID of
WpSelectDir: begin
#ifdef NotDir
If DirExists(ExpandConstant('{app}')) then begin
MsgBox(CustomMessage('NotDir'), mbError, mb_Ok); Result:=False;
end;
#endif
#ifdef NeedHDD
if GetDriveType(ExtractFileDrive(WizardForm.DirEdit.Text))<>DRIVE_FIXED then begin
MsgBox(CustomMessage('NeedHDD'), mbError, mb_OK); Result:= False;
end;
#endif
#ifdef NeedNTFS
FileSystemName:= StringOfChar(' ', 32); VolumeName:= StringOfChar(' ', 256);
GetVolumeInformation(PAnsiChar(ExtractFileDrive(WizardForm.DirEdit.Text)+'\'), PAnsiChar(VolumeName), 255, 0, 0, 0, PAnsiChar(FileSystemName), 31);
if Pos('NTFS', FileSystemName)=0 then begin
MsgBox(CustomMessage('NeedNTFS'), mbError, mb_OK); Result := False ;
end;
#endif
#ifdef Russophobia
if not IsAnsi(WizardForm.DirEdit.Text) then begin
MsgBox(CustomMessage('Ansi'), mbError, mb_OK); Result := False ;
end;
#endif
#ifdef NotWindowsDir
if Pos(Uppercase(ExpandConstant('{win}')), Uppercase(ExpandConstant('{app}')))>0 then begin
MsgBox(CustomMessage('WindowsDir'), mbError, mb_OK); Result := False;
end;
#endif
end;
end;
end;
#endif
[UninstallDelete]
Type: "FilesAndOrDirs"; Name: "{app}";
[/SPOILER]