Ru-Board.club
← Вернуться в раздел «Программы»

» Inno Setup (создание инсталяционных пакетов)

Автор: log1stable
Дата сообщения: 29.08.2011 11:27
Задачка: сделать параметр устанавливаемому приложению "отключить композицию рабочего стола". Желательно через реестр. Я, конечнр, могу сделать это, но только для одного компа, т.к. Ветка в реестре уникальна для каждого компьютера.
Автор: NumberI
Дата сообщения: 29.08.2011 12:45
Объясните, почему если из строчки Name: nomer0; Description: Все222; GroupDescription: w; MinVersion: 0,1; Check: isTaskChecked('nomer0'); Components: nomer0; удалить Components: nomer0; то становится видно зависимые задачи у nomer1, если оставить - нет
[more]
[Types]
Name: Ros; Description: Рос
Name: Other; Description: Другое

[Components]
;компоненты Другое
Name: nomer0; Description: Все; Types: Other; Flags: disablenouninstallwarning checkablealone;
Name: ex1; Description: Alcohol52; Types: Other; Flags: disablenouninstallwarning
Name: ex2; Description: BullzipPDFPrinter; Flags: disablenouninstallwarning; Types: Other;
Name: ex3; Description: FoxitReader; Types: Other; Flags: disablenouninstallwarning;
;компоненты Рос
Name: nomer1; Description: Все; Types: Ros; Flags: disablenouninstallwarning checkablealone;
Name: ex4; Description: 7zip; Types: Ros; Flags: disablenouninstallwarning;

[Tasks]
Name: nomer1; Description: Все; GroupDescription: ж; MinVersion: 0,1; Check: isTaskChecked('nomer1'); Components: nomer1;
Name: nomer1; Description: Все; GroupDescription: ж; MinVersion: 0,1; Flags: unchecked; Check: not(isTaskChecked('nomer1')); Components: nomer1;

Name: nomer0; Description: Все222; GroupDescription: w; MinVersion: 0,1; Check: isTaskChecked('nomer0'); Components: nomer0;
Name: nomer0; Description: Все222; GroupDescription: w; MinVersion: 0,1; Flags: unchecked; Check: not(isTaskChecked('nomer0')); Components: nomer0;
Name: nomer0\Alcohol52; Description: Alcohol52; GroupDescription: w; Components: ex1; MinVersion: 0,1; Check: isTaskChecked('nomer0\Alcohol52');
Name: nomer0\Alcohol52; Description: Alcohol52; GroupDescription: w; Components: ex1; MinVersion: 0,1; Flags: unchecked ; Check: not(isTaskChecked('nomer0\Alcohol52'));
Name: nomer0\FoxitReader; Description: FoxitReader; GroupDescription: w; Components: ex3; MinVersion: 0,1; Check: isTaskChecked('nomer0\FoxitReader');
Name: nomer0\FoxitReader; Description: FoxitReader; GroupDescription: w; Components: ex3; MinVersion: 0,1; Flags: unchecked; Check: not(isTaskChecked('nomer0\FoxitReader'));
Name: nomer0\BullzipPDFPrinter; Description: BullzipPDFPrinter; GroupDescription: w; Components: ex2; MinVersion: 0,1; Check: isTaskChecked('nomer0\BullzipPDFPrinter');
Name: nomer0\BullzipPDFPrinter; Description: BullzipPDFPrinter; GroupDescription: w; Components: ex2; MinVersion: 0,1; Flags: unchecked; Check: not(isTaskChecked('nomer0\BullzipPDFPrinter'));
Name: nomer1\zip7; Description: 7zip; GroupDescription: ж; Components: ex4; MinVersion: 0,1; Check: isTaskChecked('nomer1\zip7');
Name: nomer1\zip7; Description: 7zip; GroupDescription: ж; Components: ex4; MinVersion: 0,1; Flags: unchecked; Check: not(isTaskChecked('nomer1\zip7'));
[/more]

Также хотелось бы увидеть ответ на это сообщение

Цитата:
Здравствуйте, мучаюсь довольно долго
Нужно чтобы при выборе одной задачи (то есть отметки в тасках на первой в списке) все остальные стали б неотмеченными и скрытыми

В этом варианте почему-то только при постановке второй галочки процедура срабатывает

[more]
procedure TaskOnClick(Sender: TObject);
var
i:integer;
begin
if IsTaskSelected('nomer1') or IsTaskSelected('nomer0') then
begin
for i:=2 to WizardForm.TasksList.Items.Count-1 do
begin
WizardForm.TasksList.ItemEnabled[i]:= False;
end;
end;
end;

procedure InitializeWizard();
begin
WizardForm.TasksList.OnClick := @TaskOnClick;
end;
[/more]

А здесь оно срабатывает только при переходе на другую страницу

[more]
procedure CurPageChanged(CurPageID: Integer);
var
i: integer;
begin
if CurPageID = wpSelectTasks then
begin
if IsTaskSelected('nomer1') or IsTaskSelected('nomer0') then
begin
for i:=2 to WizardForm.TasksList.Items.Count-1 do
begin
WizardForm.TasksList.ItemEnabled[i]:= False;
end;
WizardForm.TasksList.Repaint;
end;
end;
end;
[/more]


Автор: nik1967
Дата сообщения: 29.08.2011 13:44
Sergey_Demchuk

Цитата:
И еще, к прошлому вопросу, насчет запуска приложения на последней странице

Можно повесить на OnClick кнопки "Старт" следующее:
[more]
Код: OnClick:= @LaunchButtonOnClick;

procedure LaunchButtonOnClick(Sender: TObject);
var
ErrorCode: integer;
begin
Exec(ExpandConstant('{app}') + '\Archicad.exe',' ', ExpandConstant('{app}'), SW_HIDE, ewNoWait, ErrorCode);
SendMessage(WizardForm.NextButton.handle, $F5, 0, 0);
end;
Автор: vint56
Дата сообщения: 29.08.2011 14:50
Sergey_Demchuk часть кода взята от nik1967 часть я дописал может пригодится
[more][Setup]
AppName=My Program
AppVersion=1.5
AppVerName=My Program 1.5
DefaultDirName={pf}\My Program

[Files]
Source: C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe; DestDir: {app}; Flags: ignoreversion

[Code]
var
RunEXE: TNewButton;

procedure LaunchButtonOnClick(Sender: TObject);
var
ErrorCode: integer;
begin
Exec(ExpandConstant('{app}') + '\MyProg.exe',' ', ExpandConstant('{app}'), SW_HIDE, ewNoWait, ErrorCode);
SendMessage(WizardForm.NextButton.handle, $F5, 0, 0);
end;

procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpFinished then begin
RunEXE := TNewButton.Create(WizardForm);
with RunEXE do
begin
Name := 'RunEXE';
Parent := WizardForm;
Left := ScaleX(104);
Top := ScaleY(328);
Width := ScaleX(120);
Height := ScaleY(23);
Caption := 'Запуск приложения';
OnClick:= @LaunchButtonOnClick;
end;
end;
end;[/more]
Автор: Shegorat
Дата сообщения: 29.08.2011 15:25
Sergey_Demchuk
Попробуй так
Код: [Setup]
AppName=MyApp
AppVername=MyApp
DefaultDirName={pf}\MyApp

[ code]
procedure InitializeWizard();
begin
WizardForm.WelcomeLabel2.ShowAccelChar:= False;
WizardForm.WelcomeLabel2.Caption:='&';
end;
Автор: alex0413
Дата сообщения: 29.08.2011 16:18
vint56
Спасибо, работает.
Автор: Sergey_Demchuk
Дата сообщения: 29.08.2011 16:59
nik1967
vint56

Цитата:
SendMessage(WizardForm.NextButton.handle, $F5, 0, 0);

Вот это то что и нужно было, биг сенкс.

Shegorat

Цитата:
WizardForm.WelcomeLabel2.ShowAccelChar:= False;

Да, в самую точку, спасибо.
Автор: NumberI
Дата сообщения: 29.08.2011 17:00
Shegorat
если из строчки Name: nomer0; Description: Все222; GroupDescription: w; MinVersion: 0,1; Check: isTaskChecked('nomer0'); Components: nomer0;

удалить Components: nomer0; то становится видно зависимые задачи у nomer1, если оставить - нет
Автор: Kizyak
Дата сообщения: 29.08.2011 17:44
Всем привет, такой вопрос, может кто нибудь сталкивался, после создания и установки репака в "Установка и удаление программ" появляется два названия игры, как сделать чтобы было одно, вот пример:

Название игры Chaos Legion, а получается Chaos LegionChaos Legion, кто знает как исправить помогите!

Добавлено:
Вот если картинка не отображается
http://i26.fastpic.ru/big/2011/0828/c8/83256f9093b2c1ecf9f3861b735a4bc8.png

Люди, неужели никто не сталкивался? Подскажите пожалуйста)
Автор: alex0413
Дата сообщения: 29.08.2011 19:22
Kizyak
Скрипт покажи
Автор: Kizyak
Дата сообщения: 29.08.2011 20:09
[more=Скрипт]
Цитата:
Kizyak
Скрипт покажи

Вот

#define GameID "{E86312E3-7778-465D-9AF2-C99418AF301D}"

#define GameName "Chaos Legion"
#define GameVerName "Chaos Legion"

#define NeedSize "1260"
#define TNeedSize "1260"

#define Processor "2000"
#define VideoCard "128"
#define RAM "512"
#define WinVerMajor "5"
#define WinVerMinor "1"
#define ServicePack "2"

;#define Components

;; Только если используется модуль FreeArc. Для ISDone прописывать файлы в одноимённом модуле. ;;
#define ArcLocation "{src}\bin\data.bin"

#define SlidesCount "1"

;; Выбор подключаемых модулей. Если используется FreeArc, то обязательно закомментировать #define ISDone, ;;
;; если используется ISDone, то обязательно закомментировать #define FreeArc. Модуль Autorun независим. ;;
;#define Autorun
;#define FreeArc
#define ISDone

#define NeedMem 256
#define records
#define precomp04
;#define precomp038
;#define unrar

[Setup]
AppId={{#GameID}
AppName={#GameName}Chaos Legion
AppVerName={#GameName}Chaos Legion
AppPublisher=Rockman
//AppPublisherURL=http://www.ea.com
AppVersion=1.0.
//AppSupportURL={app}\Support\EA Help\Ru\EA_HELP_RU.htm
//AppUpdatesURL=http://www.needforspeed.com/downloads
//AppReadmeFile={group}\ReadMe.lnk
DefaultDirName={pf}\Chaos Legion
DefaultGroupName=Chaos Legion
OutputBaseFilename=Chaos Legion
DirExistsWarning=no
MinVersion=0,5.01
VersionInfoDescription={#GameName}
SetupIconFile=G:\Репаки\Скрипты\Скрипты by Rockman\Chaos Legion\icon.ico
DiskSpanning=yes
SlicesPerDisk=3
DiskSliceSize=1566000000
DisableReadyPage=True
outputdir=C:\repack\
UsePreviousAppDir=no
UsePreviousGroup=no

[Files]
Source: InstallFiles\*; Flags: dontcopy
Source: Slides\*; Flags: dontcopy
Source: Icons\*; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system

Source: InstallFiles\WizardImage.jpg; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\botva2.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\ProgressBackground.png; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\ProgressImg.png; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\StatusPanel2.png; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\StatusPanel.png; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\Button.png; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\Tiger.cjstyles; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\Workspace.png; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\ISSkin.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system
Source: InstallFiles\innocallback.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system

;Source: {win}\help\*; DestDir: {app}\Files; Flags: external recursesubdirs createallsubdirs; Check: not Install;
;Source: "C:\Program Files\EA Games\Need for Speed Undercover\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Install;

#ifdef records
Source: InstallFiles\records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp04
Source: InstallFiles\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\precomp04.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp038
Source: InstallFiles\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: InstallFiles\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef unrar
Source: InstallFiles\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef Components
;; Если используются компоненты в ISDone (архивами) - закомментировать. Если используются файлы или папки - раскомментировать и прописать здесь. ;;
;; Компонент 2 ;;
;Source: "rus.txt"; DestDir: "{app}"; Flags: ignoreversion; Check: Comp2;
;; Компонент 3 ;;
;Source: "eng.txt"; DestDir: "{app}"; Flags: ignoreversion; Check: Comp3;
;; Компонент 5 ;;
;Source: "rus.mp3"; DestDir: "{app}"; Flags: ignoreversion; Check: Comp5;
;; Компонент 6 ;;
;Source: "eng.mp3"; DestDir: "{app}"; Flags: ignoreversion; Check: Comp6;

;; Надписи (лебелы) компонентов. ;;
#define Comp1Description "Язык субтитров"
#define Comp2Description "Русский"
#define Comp3Description "Английский"
#define Comp4Description "Язык озвучки"
#define Comp5Description "Русский"
#define Comp6Description "Английский"
#endif

[Icons]
Name: {group}\{#GameName}; Filename: {app}\game.exe; WorkingDir: {app}; Comment: Запустить игру; Check: NoIcons and not Install
Name: {group}\{cm:Uninstall}; Filename: {uninstallexe}; Comment: Удалить игру; Check: NoIcons and not Install
Name: {userdesktop}\{#GameName}; Filename: {app}\game.exe; WorkingDir: {app}; Check: Desktop and not Install

[INI]

[UninstallDelete]
Type: filesandordirs; Name: {app}

//[Run]
//Filename: {src}\DirectX\DXSETUP.exe; WorkingDir: {src}\DirectX; Parameters: /silent; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress

[Registry]

[Code]
type
TTimerProc = procedure (h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
TALabel = array of TLabel;

const
LanguageButtonCount = 2;
BASS_ACTIVE_PAUSED = 3;
BASS_SAMPLE_LOOP = 4;
WFDiskTimerID = 1;
WFSysReqTimerID = 2;

var
SystemPage, SelectComponentsPage, SelectTasksPage: TWizardPage;

Rus: boolean;
MusicButton,
hCancelBtn, hNextBtn, hBackBtn, hDirBrowseBtn, hGroupBrowseBtn, hCancelUninstBtn,
NoIconsCheck, DesktopCheck, QuickLaunchCheck, DirectXCheck, mp3Handle: HWND;

WFButtonFont, UPFButtonFont: TFont;
mp3Name, OldDisk: string;

Welcome, System, Catalogue, StartMenu, Tasks, Installing, Finish, Uninstalling,

PageNameLabel, PageDescriptionLabel,
WelcomeLabel1, WelcomeLabel2,
RequirementsLbl, ProcessorLbl, VideoCardLbl, SoundCardLbl, RAMLbl, SystemLbl,
ProcessorNameLbl, VideoCardNameLbl, SoundCardNameLbl, RAMTotalLbl, SystemNameLbl,

SelectDirBrowseLabel, DirEditLabel, TotalSpaceLabel, NeedSpaceLabel, FreeSpaceLabel,
SelectStartMenuFolderBrowseLabel, GroupEditLabel, NoIconsLabel, NeedSpaceTLabel,
SelectTasksLabel, DesktopLabel, QuickLaunchLabel, DirectXLabel, LanguageLabel, LngNameLbl,
FinishedHeadingLabel, FinishedLabel, Components,
WizardUninstLabel, UninstPageDescriptLabel, StatusUninstLabel: TLabel;

StatusPanel, RequirementsPanel, Edit,DirFolder,HardDrivePanel,
GroupFolder,WizardImg, HDD: Longint;

FreeMB, TotalMB: Cardinal;
LanguageButton: array [1..LanguageButtonCount] of HWND;
ASysReq, ADisk: TALabel;
Keys: TArrayOfString;
#ifndef ISDone
Cancel: Integer;
MyError: boolean;
LabelTime3: TLabel;
#endif
#ifndef FreeArc
UnPackError: Integer;
#endif

function sndPlaySound(lpszSoundName: AnsiString; uFlags: cardinal):integer; external 'sndPlaySoundA@winmm.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
function WrapTimerProc(callback:TTimerProc; paramcount:integer):LongWord; external 'wrapcallback@{tmp}\innocallback.dll stdcall delayload';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
procedure UnloadSkin; external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';

procedure FinishFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
begin
if FinishedLabel.Font.Color=$FFFFFF then FinishedLabel.Font.Color:=$0030ff else FinishedLabel.Font.Color:=$FFFFFF;
if FinishedHeadingLabel.Font.Color=$FFFFFF then FinishedHeadingLabel.Font.Color:=$0030ff else FinishedHeadingLabel.Font.Color:=$FFFFFF;
end;

//================== Подключение модулей ==================//

#include "Messages.iss"
#include "botva2.iss"
#include "PB.iss"
#ifdef Autorun
#include "AutoRun.iss"
#endif
#ifdef FreeArc
#include "FreeArc.iss"
#endif

//================== Подключение модулей ==================//

function InitializeSetup: Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
if not FileExists(ExpandConstant('{tmp}\innocallback.dll')) then ExtractTemporaryFile('innocallback.dll');
if not FileExists(ExpandConstant('{tmp}\Click.wav')) then ExtractTemporaryFile('Click.wav');
if not FileExists(ExpandConstant('{tmp}\isskin.dll')) then ExtractTemporaryFile('isskin.dll');
if not FileExists(ExpandConstant('{tmp}\Tiger.cjstyles')) then ExtractTemporaryFile('Tiger.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
#ifdef Autorun
Result:=AutoRunExec;
#else
Result:=true;
#endif
end;

//************************************************ [Начало - Вставка изображений] ***************************************************//

procedure CreateWizardImage;
var
i: integer;
begin
with WizardForm do begin
ClientWidth:=ScaleX(798);
ClientHeight:=ScaleY(543);
Center;
OuterNotebook.Hide;
InnerNotebook.Hide;
Bevel.Hide;
end;

ExtractTemporaryFile('WizardImage.jpg');
ExtractTemporaryFile('button.png');
ExtractTemporaryFile('MusicButton.png');
ExtractTemporaryFile('StatusPanel.png');
ExtractTemporaryFile('StatusPanel2.png');
ExtractTemporaryFile('Workspace.png');
ExtractTemporaryFile('RequirementsPanel.png');
ExtractTemporaryFile('Edit.png');
ExtractTemporaryFile('DirFolder.png');
ExtractTemporaryFile('HardDrivePanel.png');
ExtractTemporaryFile('HDD.png');
ExtractTemporaryFile('GroupFolder.png');
ExtractTemporaryFile('CheckBox.png');
ExtractTemporaryFile('CheckBox1.png');
ExtractTemporaryFile('RadioBatton.png');
ExtractTemporaryFile('ru.png');
ExtractTemporaryFile('us.png');
ExtractTemporaryFile('ProgressBackground.png');
ExtractTemporaryFile('ProgressBackground2.png');
ExtractTemporaryFile('ProgressImg.png');

ExtractTemporaryFile('WFEnter.wav');
ExtractTemporaryFile('Check.wav');
ExtractTemporaryFile('Music.mp3');
ExtractTemporaryFile('BASS.dll');
for i:=1 to {#SlidesCount} do
ExtractTemporaryFile(IntToStr(i)+'.jpg');

WizardImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\WizardImage.jpg'),ScaleX(0),ScaleY(0),WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);

SetArrayLength(AImg,{#SlidesCount});
for i:=0 to GetArrayLength(AImg)-1 do begin
AImg[i]:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\'+IntToStr(i+1)+'.jpg'),0,0,WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);
ImgSetVisibility(AImg[i],False);
end;

ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\StatusPanel.png'),ScaleX(0), ScaleY(95),WizardForm.ClientWidth,ScaleY(20),True,True);
StatusPanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\StatusPanel2.png'),ScaleX(0), ScaleY(95),ScaleX(114),ScaleY(20),True,True);
ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Workspace.png'),ScaleX(42), ScaleY(160),ScaleX(714),ScaleY(309),True,True);
RequirementsPanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\RequirementsPanel.png'),ScaleX(100), ScaleY(292),ScaleX(601),ScaleY(146),True,True);
Edit:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\Edit.png'),ScaleX(120), ScaleY(305),ScaleX(460),ScaleY(22),True,True);
DirFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\DirFolder.png'),ScaleX(60), ScaleY(260),ScaleX(50),ScaleY(70),True,True);
HardDrivePanel:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\HardDrivePanel.png'),ScaleX(120), ScaleY(354),ScaleX(460),ScaleY(90),True,True);
HDD:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\HDD.png'),ScaleX(60), ScaleY(372),ScaleX(50),ScaleY(50),True,True);
GroupFolder:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\GroupFolder.png'),ScaleX(60), ScaleY(260),ScaleX(50),ScaleY(70),True,True);

ImgApplyChanges(WizardForm.Handle);
end;

//************************************************ [Конец - Вставка изображений] ***************************************************//

//************************************************ [Начало - Текстуры кнопок] ***************************************************//

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
WFButtonFont:=TFont.Create;
WFButtonFont.Style:=[fsBold];

with WizardForm.BackButton do begin
hBackBtn:=BtnCreate(WizardForm.Handle,Left+205,Top+160,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(hBackBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hBackBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hBackBtn,WFButtonFont.Handle);
BtnSetFontColor(hBackBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetCursor(hBackBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;

with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,Left+230,Top+160,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hNextBtn,WFButtonFont.Handle);
BtnSetFontColor(hNextBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetCursor(hNextBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;

with WizardForm.CancelButton do begin
hCancelBtn:=BtnCreate(WizardForm.Handle,Left+245,Top+160,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(hCancelBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hCancelBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hCancelBtn,WFButtonFont.Handle);
BtnSetFontColor(hCancelBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetCursor(hCancelBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;

with WizardForm.DirBrowseButton do begin
hDirBrowseBtn:=BtnCreate(WizardForm.Handle,Left+280,Top+215,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(hDirBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hDirBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hDirBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hDirBrowseBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetCursor(hDirBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;

with WizardForm.GroupBrowseButton do begin
hGroupBrowseBtn:=BtnCreate(WizardForm.Handle,Left+280,Top+215,Width+31,Height+16,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(hGroupBrowseBtn,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetEvent(hGroupBrowseBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFont(hGroupBrowseBtn,WFButtonFont.Handle);
BtnSetFontColor(hGroupBrowseBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetCursor(hGroupBrowseBtn,GetSysCursorHandle(32649));
Width:=0;
Height:=0;
end;
end;

//************************************************ [Конец - Текстуры кнопок] ***************************************************//

//************************************************ [Начало - Музыка] ***************************************************//

function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_ChannelIsActive(handle: DWORD): Integer; external 'BASS_ChannelIsActive@files:BASS.dll stdcall delayload';
function BASS_ChannelPause(handle: DWORD): Boolean; external 'BASS_ChannelPause@files:BASS.dll stdcall delayload';
function BASS_Pause: Boolean; external 'BASS_Pause@files:BASS.dll stdcall delayload';
function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';

procedure MusicButtonClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'), $0001);
if BtnGetChecked(MusicButton) then BASS_ChannelPause(mp3Handle)
else if BASS_ChannelIsActive(mp3Handle)=BASS_ACTIVE_PAUSED then BASS_ChannelPlay(mp3Handle, False);
end;

procedure InsertMusic;
begin
MusicButton:=BtnCreate(WizardForm.Handle,ScaleX(758),ScaleY(5),ScaleX(36),ScaleY(36),ExpandConstant('{tmp}\MusicButton.png'),0,True);
BtnSetEvent(MusicButton,BtnClickEventID,WrapBtnCallback(@MusicButtonClick,1));
BtnSetEvent(MusicButton,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetVisibility(MusicButton,True);
BtnSetCursor(MusicButton,GetSysCursorHandle(32649));

mp3Name:=ExpandConstant('{tmp}\Music.mp3');
BASS_Init(-1,44100,0,0,0);
mp3Handle:=BASS_StreamCreateFile(FALSE,PAnsiChar(mp3Name),0,0,BASS_SAMPLE_LOOP);
BASS_Start;
BASS_ChannelPlay(mp3Handle,False);
end;

//************************************************ [Конец - Музыка] ***************************************************//

//************************************************ [Начало - Панель] ***************************************************//

procedure CreateStatusPanel;
begin
Welcome := TLabel.Create(WizardForm);
with Welcome do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(7), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(13), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Welcome}');
Parent := WizardForm;
end;

System := TLabel.Create(WizardForm);
with System do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(125), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(143), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:System}');
Parent := WizardForm;
end;

Catalogue := TLabel.Create(WizardForm);
with Catalogue do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(225), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(260), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Catalogue}');
Parent := WizardForm;
end;

#ifdef Components
Components := TLabel.Create(WizardForm);
with Components do begin
AutoSize:=False;
SetBounds(ScaleX(310), ScaleY(96), ScaleX(100), ScaleY(20));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Components}');
Parent := WizardForm;
end;
#endif

StartMenu := TLabel.Create(WizardForm);
with StartMenu do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(407), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(357), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:StartMenu}');
Parent := WizardForm;
end;

Tasks := TLabel.Create(WizardForm);
with Tasks do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(525), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(490), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Task}');
Parent := WizardForm;
end;

Installing := TLabel.Create(WizardForm);
with Installing do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(617), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(593), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Installing}');
Parent := WizardForm;
end;

Finish := TLabel.Create(WizardForm);
with Finish do begin
AutoSize:=False;
#ifdef Components
SetBounds(ScaleX(710), ScaleY(96), ScaleX(100), ScaleY(20));
#else
SetBounds(ScaleX(703), ScaleY(96), ScaleX(114), ScaleY(20));
#endif
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Finish}');
Parent := WizardForm;
end;
end;

//************************************************ [Конец - Панель] ***************************************************//

//************************************************ [Начало - Компоненты страниц] ***************************************************//

function DetectHardware: Integer; external 'hwc_DetectHardware@files:get_hw_caps.dll stdcall';
function GetProcessorName: PAnsiChar; external 'hwc_GetProcessorName@files:get_hw_caps.dll stdcall';
function GetProcessorFreq: Integer; external 'hwc_GetProcessorFreq@files:get_hw_caps.dll stdcall';
function GetVideoCardName: PAnsiChar; external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall';
function GetVidMemLocal: Integer; external 'hwc_GetVidMemLocal@files:get_hw_caps.dll stdcall';
function GetPdmWidth: Integer; external 'hwc_GetPdmWidth@files:get_hw_caps.dll stdcall';
function GetPdmHeight: Integer; external 'hwc_GetPdmHeight@files:get_hw_caps.dll stdcall';
function GetSoundCards: Integer; external 'hwc_GetSoundCards@files:get_hw_caps.dll stdcall';
function GetSoundCardName: PAnsiChar; external 'hwc_GetSoundCardName@files:get_hw_caps.dll stdcall';
function GetSystemPhys: Integer; external 'hwc_GetSystemPhys@files:get_hw_caps.dll stdcall';
function GetWindowsName: PAnsiChar; external 'hwc_GetWindowsName@files:get_hw_caps.dll stdcall';

function DelSp(s: string): string;
begin
while Pos(' ',s)>0 do StringChange(s,' ',' ');
Result:=Trim(s);
end;

procedure GroupChange(Sender: TObject);
begin
GroupEditLabel.Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
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 MbOrTB(Float: Extended): string;
begin
if Float<1024 then Result:=NumToStr(Float)+' MB'
else if (Float/1024)<1024 then Result:=NumToStr(Float/1024)+' GB'
else if (Float/(1024*1024))<1024 then Result:=NumToStr(Float/(1024*1024))+' TB'
end;

procedure SysReqFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
var
i:integer;
begin
for i:= 0 to GetArrayLength(ASysReq)-1 do
if ASysReq[i].Font.Color=$FFFFFF then ASysReq[i].Font.Color:=$0000FF else ASysReq[i].Font.Color:=$FFFFFF;
end;

procedure DiskFlashing(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
var
i:integer;
begin
for i:= 0 to GetArrayLength(ADisk)-1 do
if ADisk[i].Font.Color=$FFFFFF then ADisk[i].Font.Color:=$0000FF else ADisk[i].Font.Color:=$FFFFFF;
end;

function GetElementIndex(a:TALabel; lbl:TLabel):integer;
var
i:integer;
f:boolean;
begin
Result:=-1;
f:=False;
for i:=0 to GetArrayLength(a)-1 do
if a[i]=lbl then begin
f:=True;
Break;
end;
if f then Result:=i;
end;

procedure AddLabelToArray(var a:TALabel; lbl:TLabel);
begin
if GetElementIndex(a,lbl)=-1 then begin
SetArrayLength(a,GetArrayLength(a)+1);
a[GetArrayLength(a)-1]:=lbl;
end;
end;

procedure DeleteLabelFromArray(var a:TALabel; lbl:integer);
var
Last,i:integer;
begin
if lbl<>-1 then begin
Last:=GetArrayLength(a)-1;
if lbl<Last then
for i:=lbl to Last-1 do a[i]:=a[i+1];
SetArrayLength(a,Last);
end;
end;

procedure GetFreeSpaceCaption(Sender: TObject);
var
CurrentDisk: String;
i:integer;
begin
CurrentDisk:=ExtractFileDrive(WizardForm.DirEdit.Text);
DirEditLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
if not GetSpaceOnDisk(CurrentDisk,True,FreeMB,TotalMB) then begin
KillTimer(WizardForm.Handle,WFDiskTimerID);
SetArrayLength(ADisk,0);
TotalSpaceLabel.Visible:=False;
FreeSpaceLabel.Visible:=False;
BtnSetEnabled(hNextBtn,False);
WizardForm.NextButton.Enabled:=False;
OldDisk:=CurrentDisk;
Exit;
end;

TotalSpaceLabel.Visible:=True;
FreeSpaceLabel.Visible:=True;

if CurrentDisk<>OldDisk then begin
OldDisk:=CurrentDisk;
TotalSpaceLabel.Caption := ExpandConstant('{cm:TotalSpace} ') + MbOrTB(TotalMb);
FreeSpaceLabel.Caption := ExpandConstant('{cm:FreeSpace} ') + MbOrTB(FreeMb) + ' (' + IntToStr((FreeMb*100) div TotalMB) + ' %)';

if WizardForm.CurPageID = wpSelectDir then begin
if FreeMB>={#TNeedSize} then begin
i:=GetElementIndex(ADisk,FreeSpaceLabel);
if i<>-1 then begin
DeleteLabelFromArray(ADisk,i);
FreeSpaceLabel.Font.Color:=$FFFFFF;
if GetArrayLength(ADisk)=0 then KillTimer(WizardForm.Handle,WFDiskTimerID);
end;
end else AddLabelToArray(ADisk,FreeSpaceLabel);

if TotalMb>={#TNeedSize} then begin
i:=GetElementIndex(ADisk,TotalSpaceLabel);
if i<>-1 then begin
DeleteLabelFromArray(ADisk,i);
TotalSpaceLabel.Font.Color:=$FFFFFF;
if GetArrayLength(ADisk)=0 then KillTimer(WizardForm.Handle,WFDiskTimerID);
end;
end else AddLabelToArray(ADisk,TotalSpaceLabel);

if GetArrayLength(ADisk)>0 then SetTimer(WizardForm.Handle,WFDiskTimerID,1000,WrapTimerProc(@DiskFlashing,4));
BtnSetEnabled(hNextBtn,not (GetArrayLength(ADisk)>0));
WizardForm.NextButton.Enabled:=not (GetArrayLength(ADisk)>0);
end;
end;
end;

//================== Подключение модулей ==================//

#ifdef Components
#include "Components.iss"
#endif
#ifdef ISDone
#include "ISDone.iss"
#endif

//================== Подключение модулей ==================//

function Install: Boolean;
begin
if (Cancel <> 0) or MyError or (UnPackError <> 0) then
Result:= True;
end;

function NoIcons: Boolean;
begin
Result:= BtnGetEnabled(hGroupBrowseBtn);
end;

function Desktop: Boolean;
begin
Result:= BtnGetChecked(DesktopCheck);
end;

function QuickLaunch: Boolean;
begin
Result:= BtnGetChecked(QuickLaunchCheck);
end;

function DirectX: Boolean;
begin
ProgressInfoLabel.Visible:=False;
FilenameLabel.Hide;
Result:= BtnGetChecked(DirectXCheck);
end;

function Lang: Boolean;
begin
Result:= BtnGetChecked(LanguageButton[1]);
end;

procedure NoIconsClick(hBtn:HWND);
var
Check:boolean;
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
Check:=BtnGetChecked(hBtn);
BtnSetEnabled(hGroupBrowseBtn, not Check);
GroupEditLabel.Enabled:=not Check;
if Check then NoIconsLabel.Font.Color:=$00FFFF else NoIconsLabel.Font.Color:=$FFFFFF;
end;

procedure NoIconsLabelClick(Sender:TObject);
begin
BtnSetChecked(NoIconsCheck, not BtnGetChecked(NoIconsCheck));
NoIconsClick(NoIconsCheck);
end;

procedure DesktopClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then DesktopLabel.Font.Color:=$00FFFF else DesktopLabel.Font.Color:=$FFFFFF;
end;

procedure DesktopLabelClick(Sender:TObject);
begin
BtnSetChecked(DesktopCheck, not BtnGetChecked(DesktopCheck));
DesktopClick(DesktopCheck);
end;

procedure QuickLaunchClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then QuickLaunchLabel.Font.Color:=$00FFFF else QuickLaunchLabel.Font.Color:=$FFFFFF;
end;

procedure QuickLaunchLabelClick(Sender:TObject);
begin
BtnSetChecked(QuickLaunchCheck, not BtnGetChecked(QuickLaunchCheck));
QuickLaunchClick(QuickLaunchCheck);
end;

procedure DirectXClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then DirectXLabel.Font.Color:=$00FFFF else DirectXLabel.Font.Color:=$FFFFFF;
end;

procedure DirectXLabelClick(Sender:TObject);
begin
BtnSetChecked(DirectXCheck, not BtnGetChecked(DirectXCheck));
DirectXClick(DirectXCheck);
end;

procedure SelectLanguage(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Click.wav'),$0001);
BtnSetChecked(hBtn,True);
if hBtn=LanguageButton[1] then begin
BtnSetChecked(LanguageButton[2],False);
LngNameLbl.Caption:=ExpandConstant('{cm:LanguageRus}');
Rus:= True;
end else begin
BtnSetChecked(LanguageButton[1],False);
LngNameLbl.Caption:=ExpandConstant('{cm:LanguageUS}');
Rus:= False;
end;
end;

procedure DirectXProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:DirectXInstall}')
end;

procedure CreatePageComponents;
var
Pdm: string;
vr,VidRam : Longint;
Version: TWindowsVersion;
begin
PageNameLabel:=TLabel.Create(WizardForm);
with PageNameLabel do begin
AutoSize:= False;
SetBounds(ScaleX(70), ScaleY(185), ScaleX(400), ScaleY(30));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 13;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Parent:=WizardForm;
end;

PageDescriptionLabel:=TLabel.Create(WizardForm);
with PageDescriptionLabel do begin
AutoSize:= False;
SetBounds(ScaleX(100), ScaleY(215), ScaleX(600), ScaleY(50));
Wordwrap:= True;
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Parent:=WizardForm;
end;

////////////////////// WelcomePage //////////////////////

WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do begin
AutoSize:=False
SetBounds(ScaleX(75), ScaleY(185), ScaleX(648), ScaleY(65));
WordWrap:=True
Alignment := taCenter;
Transparent:=True
Font.Name:='Georgia';
Font.Size:= 16;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold]
Caption:= ExpandConstant('{cm:Welcome1}');
Parent:=WizardForm
end;

WelcomeLabel2:=TLabel.Create(WizardForm);
with WelcomeLabel2 do begin
AutoSize:=False
SetBounds(ScaleX(75), ScaleY(275), ScaleX(648), ScaleY(200));
WordWrap:=True
Transparent:=True
Font.Name:='Georgia';
Font.Size:= 11;
Font.Color:=$FFFFFF;
Font.Style := [fsBold, fsItalic];
Caption:= ExpandConstant('{cm:Welcome2}');
Parent:=WizardForm
end;

////////////////////// WelcomePage //////////////////////

////////////////////// SystemPage //////////////////////

SystemPage:=CreateCustomPage(wpLicense, ExpandConstant('{cm:Requirements1}'), ExpandConstant('{cm:Requirements2}'));

RequirementsLbl := TLabel.Create(WizardForm);
with RequirementsLbl do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(250), ScaleX(605), ScaleY(50));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption := ExpandConstant('{cm:Requirements3}');
Parent:=WizardForm;
end;

//================= Начало - Процессор =================//

ProcessorLbl := TLabel.Create(WizardForm);
with ProcessorLbl do begin
AutoSize:=False;
SetBounds(ScaleX(107), ScaleY(296), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Processor}');
Parent := WizardForm;
end;

ProcessorNameLbl := TLabel.Create(WizardForm);
with ProcessorNameLbl do begin
AutoSize:=False;
SetBounds(ScaleX(278), ScaleY(296), ScaleX(400), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := DelSP(GetProcessorName) + ' @' + IntToStr(GetProcessorFreq) + ' MHz';
Parent := WizardForm;
end;

RegGetSubkeyNames(HKLM, 'Hardware\Description\System\CentralProcessor', Keys)

if (GetProcessorFreq*GetArrayLength(Keys)) < {#Processor} then
begin
RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}');
AddLabelToArray(AsysReq,ProcessorNameLbl);
end;

//================= Конец - Процессор =================//

//================= Начало - Видеоадаптер =================//

VideoCardLbl := TLabel.Create(WizardForm);
with VideoCardLbl do begin
AutoSize:=False;
SetBounds(ScaleX(107), ScaleY(327), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:VideoCard}');
Parent := WizardForm;
end;

VideoCardNameLbl := TLabel.Create(WizardForm);
with VideoCardNameLbl do begin
AutoSize:=False;
SetBounds(ScaleX(280), ScaleY(327), ScaleX(400), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := GetVideoCardName;
Parent := WizardForm;
end;

Pdm:=' ['+IntToStr(GetPdmWidth)+'x'+IntToStr(GetPdmHeight)+']';

VidRam:=GetVidMemLocal/1000000;
if (VidRam<63) or (VidRam>1100) then vr:=VidRam
else if VidRam<100 then vr:=64
else if VidRam<200 then vr:=128
else if VidRam<300 then vr:=256
else if VidRam<400 then vr:=384
else if VidRam<600 then vr:=512
else if VidRam<800 then vr:=792
else if VidRam>800 then vr:=1024;

if VidRam=0 then VideoCardNameLbl.Caption:=ExpandConstant('{cm:DeviceDriver}')
else VideoCardNameLbl.Caption:=DelSp(VideoCardNameLbl.Caption)+' ~'+IntToStr(vr)+' MB'+Pdm;
if vr<{#VideoCard} then begin
RequirementsLbl.Caption:=ExpandConstant('{cm:Requirements4}');
AddLabelToArray(ASysReq,VideoCardNameLbl);
end;

//================= Конец - Видеоадаптер =================//

//================= Начало - Звуковая карта =================//

SoundCardLbl := TLabel.Create(WizardForm);
with SoundCardLbl do begin
AutoSize:=False;
SetBounds(ScaleX(107), ScaleY(358), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:SoundCard}');
Parent := WizardForm;
end;

SoundCardNameLbl := TLabel.Create(WizardForm);
with SoundCardNameLbl do begin
AutoSize:=False;
SetBounds(ScaleX(278), ScaleY(358), ScaleX(400), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := GetSoundCardName;
Parent := WizardForm;
end;

if GetSoundCards = 0 then begin
RequirementsLbl.Caption:= ExpandConstant('{cm:Requirements4}');
SoundCardNameLbl.Caption:= ExpandConstant('{cm:DeviceDriver}');
AddLabelToArray(ASysReq,SoundCardNameLbl);
end;

//================= Конец - Звуковая карта =================//

//================= Начало - ОЗУ =================//

RAMLbl := TLabel.Create(WizardForm);
with RAMLbl do begin
AutoSize:=False;
SetBounds(ScaleX(107), ScaleY(389), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:RAM}');
Parent := WizardForm;
end;

RAMTotalLbl := TLabel.Create(WizardForm);
with RAMTotalLbl do begin
AutoSize:=False;
SetBounds(ScaleX(279), ScaleY(389), ScaleX(400), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := IntToStr(GetSystemPhys + 1) + ' MB';
Parent := WizardForm;
end;

if (GetSystemPhys+1)<{#RAM} then begin
RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}');
AddLabelToArray(ASysReq,RAMTotalLbl);
end;

//================= Конец - ОЗУ =================//

//================= Начало - Операционная система =================//

SystemLbl := TLabel.Create(WizardForm);
with SystemLbl do begin
AutoSize:=False;
SetBounds(ScaleX(107), ScaleY(420), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:OperationSystem}');
Parent := WizardForm;
end;

SystemNameLbl := TLabel.Create(WizardForm);
with SystemNameLbl do begin
AutoSize:=False;
SetBounds(ScaleX(279), ScaleY(420), ScaleX(400), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := GetWindowsName;
Parent := WizardForm;
end;

GetWindowsVersionEx(Version);

if not Version.NTPlatform or
(Version.NTPlatform and (Version.Major<{#WinVerMajor})) or
(Version.NTPlatform and (Version.Major={#WinVerMajor}) and (Version.Minor<{#WinVerMinor})) or
(Version.NTPlatform and (Version.Major={#WinVerMajor}) and (Version.Minor={#WinVerMinor}) and (Version.ServicePackMajor<{#ServicePack})) then begin
RequirementsLbl.Caption := ExpandConstant('{cm:Requirements4}');
AddLabelToArray(ASysReq,SystemNameLbl);
end;

//================= Конец - Операционная система =================//

////////////////////// SystemPage //////////////////////

////////////////////// SelectDirPage //////////////////////

SelectDirBrowseLabel := TLabel.Create(WizardForm);
with SelectDirBrowseLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(250), ScaleX(600), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
Parent := WizardForm;
end;

DirEditLabel := TLabel.Create(WizardForm);
with DirEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(127), ScaleY(308), ScaleX(446), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Name:= 'Arial'
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Parent := WizardForm;
end;

TotalSpaceLabel := TLabel.Create(WizardForm);
with TotalSpaceLabel do begin
AutoSize:=False;
SetBounds(ScaleX(130), ScaleY(360), ScaleX(500), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Parent := WizardForm;
end;

FreeSpaceLabel := TLabel.Create(WizardForm);
with FreeSpaceLabel do begin
AutoSize:=False;
SetBounds(ScaleX(130), ScaleY(380), ScaleX(500), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Parent := WizardForm;
end;

NeedSpaceLabel := TLabel.Create(WizardForm);
with NeedSpaceLabel do begin
AutoSize:=False;
SetBounds(ScaleX(130), ScaleY(420), ScaleX(500), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption := ExpandConstant('{cm:NeedSpace} ') + MbOrTB({#NeedSize});
Parent := WizardForm;
end;

NeedSpaceTLabel := TLabel.Create(WizardForm);
with NeedSpaceTLabel do begin
AutoSize:=False;
SetBounds(ScaleX(130), ScaleY(400), ScaleX(500), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption := ExpandConstant('{cm:TNeedSpace} ') + MbOrTB({#TNeedSize});
Parent := WizardForm;
end;

////////////////////// SelectDirPage //////////////////////

////////////////////// SelectComponentsPage //////////////////////

////////////////////// SelectComponentsPage //////////////////////

////////////////////// SelectProgramGroupPage //////////////////////

SelectStartMenuFolderBrowseLabel := TLabel.Create(WizardForm);
with SelectStartMenuFolderBrowseLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(250), ScaleX(600), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= WizardForm.SelectStartMenuFolderBrowseLabel.Caption;
Parent := WizardForm;
end;

GroupEditLabel := TLabel.Create(WizardForm);
with GroupEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(127), ScaleY(308), ScaleX(446), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Name:= 'Arial'
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
Parent := WizardForm;
end;

NoIconsCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(430),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);
BtnSetEvent(NoIconsCheck,BtnClickEventID,WrapBtnCallback(@NoIconsClick,1));
BtnSetEvent(NoIconsCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(NoIconsCheck,GetSysCursorHandle(32649));

NoIconsLabel := TLabel.Create(WizardForm);
with NoIconsLabel do begin
AutoSize:=False;
SetBounds(ScaleX(115), ScaleY(437), ScaleX(275), ScaleY(17));
OnClick:= @NoIconsLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption := WizardForm.NoIconsCheck.Caption;
Parent := WizardForm;
end;

WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption;
WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text;
WizardForm.GroupEdit.OnChange := @GroupChange;

////////////////////// SelectProgramGroupPage //////////////////////

////////////////////// SelectTasksPade //////////////////////

SelectTasksPage := CreateCustomPage(wpSelectProgramGroup, ExpandConstant('{cm:TasksName}'), ExpandConstant('{cm:TasksDescription}'));
SelectTasksLabel := TLabel.Create(WizardForm);
with SelectTasksLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(250), ScaleX(600), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= ExpandConstant('{cm:SelectTasksLabel}');
Parent := WizardForm;
end;

DesktopCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(303),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);
BtnSetEvent(DesktopCheck,BtnClickEventID,WrapBtnCallback(@DesktopClick,1));
BtnSetEvent(DesktopCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(DesktopCheck,GetSysCursorHandle(32649));

DesktopLabel := TLabel.Create(WizardForm);
with DesktopLabel do begin
AutoSize:=False;
SetBounds(ScaleX(115), ScaleY(310), ScaleX(265), ScaleY(17));
OnClick:= @DesktopLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$00FFFF;
Font.Style:=[fsBold,fsItalic];
Caption := ExpandConstant('{cm:Desktop}');
Parent := WizardForm;
end;

QuickLaunchCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(333),ScaleX(28),ScaleY(28),ExpandConstant('{tmp}\CheckBox.png'),8,True);
BtnSetEvent(QuickLaunchCheck,BtnClickEventID,WrapBtnCallback(@QuickLaunchClick,1));
BtnSetEvent(QuickLaunchCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(QuickLaunchCheck,GetSysCursorHandle(32649));

QuickLaunchLabel := TLabel.Create(WizardForm);
with QuickLaunchLabel do begin
AutoSize:=False;
SetBounds(ScaleX(115), ScaleY(340), ScaleX(345), ScaleY(17));
OnClick:= @QuickLaunchLabelClick;
Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Caption := ExpandConstant('{cm:QuickLaunch}');
Parent := WizardForm;
end;

DirectXCheck:=BtnCreate(WizardForm.Handle,ScaleX(75),ScaleY(363),ScaleX(0),ScaleY(0),ExpandConstant('{tmp}\CheckBox.png'),8,True);
BtnSetEvent(DirectXCheck,BtnClickEventID,WrapBtnCallback(@DirectXClick,1));
BtnSetEvent(DirectXCheck,BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(DirectXCheck,GetSysCursorHandle(32649));

DirectXLabel := TLabel.Create(WizardForm);
with DirectXLabel do begin
AutoSize:=False;
SetBounds(ScaleX(115), ScaleY(370), ScaleX(145), ScaleY(17));
//OnClick:= @DirectXLabelClick;
//Cursor:= CrHand;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
//Caption := ExpandConstant('{cm:DirectX}');
Parent := WizardForm;
end;

LanguageLabel := TLabel.Create(WizardForm);
with LanguageLabel do begin
AutoSize:=False;
SetBounds(ScaleX(115), ScaleY(410), ScaleX(400), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= ExpandConstant('{cm:Language}');
Parent := WizardForm;
end;

LngNameLbl := TLabel.Create(WizardForm);
with LngNameLbl do begin
AutoSize:=False;
SetBounds(ScaleX(300), ScaleY(410), ScaleX(100), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$00FFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= ExpandConstant('{cm:LanguageRus}');
Parent := WizardForm;
end;

LanguageButton[1]:=BtnCreate(WizardForm.Handle,ScaleX(395),ScaleY(403),ScaleX(48),ScaleY(36),ExpandConstant('{tmp}\ru.png'),0,True);
BtnSetEvent(LanguageButton[1],BtnClickEventID,WrapBtnCallback(@SelectLanguage,1));
BtnSetEvent(LanguageButton[1],BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(LanguageButton[1],GetSysCursorHandle(32649));

LanguageButton[2]:=BtnCreate(WizardForm.Handle,ScaleX(460),ScaleY(403),ScaleX(48),ScaleY(36),ExpandConstant('{tmp}\us.png'),0,True);
BtnSetEvent(LanguageButton[2],BtnClickEventID,WrapBtnCallback(@SelectLanguage,1));
BtnSetEvent(LanguageButton[2],BtnMouseEnterEventID,WrapBtnCallback(@WFBtnEnter,1));
BtnSetCursor(LanguageButton[2],GetSysCursorHandle(32649));

BtnSetChecked(LanguageButton[1],True);

////////////////////// SelectTasksPade //////////////////////

////////////////////// InstallingPage //////////////////////

StatusLabel := TLabel.Create(WizardForm);
with StatusLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(245), ScaleX(558), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Parent := WizardForm;
end;

FilenameLabel := TLabel.Create(WizardForm);
with FilenameLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(270), ScaleX(558), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 9;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Parent := WizardForm;
end;

ProgressInfoLabel := TLabel.Create(WizardForm);
with ProgressInfoLabel do
begin
AutoSize:=False;
SetBounds(ScaleX(80), ScaleY(355), ScaleX(638), ScaleY(17));
Alignment := taCenter;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Parent := WizardForm;
end;

////////////////////// InstallingPage //////////////////////

////////////////////// FinishedPage //////////////////////

FinishedHeadingLabel:= TLabel.Create(WizardForm);
with FinishedHeadingLabel do begin
AutoSize:=False
SetBounds(ScaleX(75), ScaleY(185), ScaleX(648), ScaleY(65));
WordWrap:=True
Alignment := taCenter;
Transparent:=True
Font.Name:='Georgia';
Font.Size:= 16;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold]
Caption:= ExpandConstant('{cm:FinishedHeading}');
Parent:=WizardForm
end;

FinishedLabel:=TLabel.Create(WizardForm);
with FinishedLabel do begin
AutoSize:=False
SetBounds(ScaleX(75), ScaleY(275), ScaleX(648), ScaleY(200));
WordWrap:=True
Transparent:=True
Font.Name:='Georgia';
Font.Size:= 11;
Font.Color:=$FFFFFF;
Font.Style := [fsBold, fsItalic];
Caption:= ExpandConstant('{cm:FinishedLabel}')+#13#13+ExpandConstant('{cm:FinishedLabel2}');
Parent:=WizardForm
end;
end;

////////////////////// FinishedPage //////////////////////

////////////////////// UninstallingPage //////////////////////

function InitializeUninstall: Boolean;
begin
FileCopy(ExpandConstant('{app}\botva2.dll'), ExpandConstant('{tmp}\botva2.dll'), False);
FileCopy(ExpandConstant('{app}\innocallback.dll'), ExpandConstant('{tmp}\innocallback.dll'), False);
FileCopy(ExpandConstant('{app}\isskin.dll'), ExpandConstant('{tmp}\isskin.dll'), False);
FileCopy(ExpandConstant('{app}\Tiger.cjstyles'), ExpandConstant('{tmp}\Tiger.cjstyles'), False);
LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
Result:=True;
end;

//================== Удаление сохранений ==================//

procedure DeleteSavedGames(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep=usUninstall then
if DirExists(ExpandConstant('{userdocs}')+'\NFS Undercover') then
if MsgBox(ExpandConstant('{cm:DeleteSave}'), mbInformation, MB_YESNO) = idYes then
DelTree(ExpandConstant('{userdocs}')+'\NFS Undercover', True, True, True)
end;

//================== Удаление сохранений ==================//

procedure InitializeUninstallProgressForm;
var
h:HWND;
begin
with UninstallProgressForm do
begin
ClientWidth:=ScaleX(798);
ClientHeight:=ScaleY(543);
BorderStyle:=bsSingle
BorderIcons:=[biSystemMenu]
OuterNotebook.Hide;
InnerNotebook.Hide;
Center;
Bevel.Hide;
CancelButton.Left:=ScaleX(660);
CancelButton.Top:=ScaleY(495);
CancelButton.Width:=CancelButton.Width+15;

WizardUninstLabel := TLabel.Create(UninstallProgressForm);
with WizardUninstLabel do begin
AutoSize:=False;
SetBounds(ScaleX(70), ScaleY(185), ScaleX(400), ScaleY(30));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 13;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption:= ExpandConstant('{cm:WizardUninst}');
Parent := UninstallProgressForm;
end;

UninstPageDescriptLabel := TLabel.Create(UninstallProgressForm);
with UninstPageDescriptLabel do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(215), ScaleX(600), ScaleY(50));
WordWrap:= True;
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= ExpandConstant('{cm:UninstDescript}');
Parent := UninstallProgressForm;
end;

StatusUninstLabel := TLabel.Create(UninstallProgressForm);
with StatusUninstLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(250), ScaleX(560), ScaleY(17));
Transparent:=True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold, fsItalic];
Caption:= ExpandConstant('{cm:StatusUninst}');
Parent := UninstallProgressForm;
end;

Installing := TLabel.Create(UninstallProgressForm);
with Installing do begin
AutoSize:=False;
SetBounds(ScaleX(170), ScaleY(96), ScaleX(114), ScaleY(20));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Installing}');
Parent := UninstallProgressForm;
end;

Uninstalling := TLabel.Create(UninstallProgressForm);
with Uninstalling do begin
AutoSize:=False;
SetBounds(ScaleX(570), ScaleY(96), ScaleX(114), ScaleY(20));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 10;
Font.Color:=$00FFFF;
Font.Style:=[fsBold];
Caption := ExpandConstant('{cm:Uninstalling}');
Parent := UninstallProgressForm;
end;

ProgressInfoLabel := TLabel.Create(UninstallProgressForm);
with ProgressInfoLabel do begin
AutoSize:=False;
SetBounds(ScaleX(120), ScaleY(355), ScaleX(560), ScaleY(17));
Alignment := taCenter;
Transparent:=True;
Font.Name:= 'Georgia';
Font.Size:= 10;
Font.Color:=$FFFFFF;
Font.Style:=[fsBold,fsItalic];
Parent := UninstallProgressForm;
end;

h:=UninstallProgressForm.Handle;

FileCopy(ExpandConstant('{app}\WizardImage.jpg'), ExpandConstant('{tmp}\WizardImage.jpg'), False);
FileCopy(ExpandConstant('{app}\Workspace.png'), ExpandConstant('{tmp}\Workspace.png'), False);
FileCopy(ExpandConstant('{app}\StatusPanel.png'), ExpandConstant('{tmp}\StatusPanel.png'), False);
FileCopy(ExpandConstant('{app}\StatusPanel2.png'), ExpandConstant('{tmp}\StatusPanel2.png'), False);
FileCopy(ExpandConstant('{app}\button.png'), ExpandConstant('{tmp}\button.png'), False);
FileCopy(ExpandConstant('{app}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressBackground.png'), False);
FileCopy(ExpandConstant('{app}\ProgressImg.png'), ExpandConstant('{tmp}\ProgressImg.png'), False);

ImgLoad(h,ExpandConstant('{tmp}\WizardImage.jpg'),ScaleX(0),ScaleY(0),UninstallProgressForm.ClientWidth,UninstallProgressForm.ClientHeight,True,True);
ImgLoad(h,ExpandConstant('{tmp}\Workspace.png'),ScaleX(42), ScaleY(160),ScaleX(714),ScaleY(309),True,True);
ImgLoad(h,ExpandConstant('{tmp}\StatusPanel.png'),ScaleX(0), ScaleY(95),UninstallProgressForm.ClientWidth,ScaleY(20),True,True);
ImgLoad(h,ExpandConstant('{tmp}\StatusPanel2.png'),ScaleX(399), ScaleY(95),ScaleX(399), ScaleY(20),True,True);
ImgLoad(h,ExpandConstant('{tmp}\ProgressBackground.png'),119,300,560,25,True,True);

UPFButtonFont:=TFont.Create;
UPFButtonFont.Style:=[fsBold];

UninstallProgressForm.CancelButton.Visible:=False;
with UninstallProgressForm.CancelButton do begin
hCancelUninstBtn:=BtnCreate(h,Left-8,Top-8,Width+16,Height+16,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetText(hCancelUninstBtn, UninstallProgressForm.CancelButton.Caption);
BtnSetFont(hCancelUninstBtn,UPFButtonFont.Handle);
BtnSetFontColor(hCancelUninstBtn,$DAE369,$DAE369,$DAE369,$B6B6B6);
BtnSetEnabled(hCancelUninstBtn,False);
end;
end;
ImgApplyChanges(h);
end;

////////////////////// UninstallingPage //////////////////////

procedure HideComponents;
begin
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
RequirementsLbl.Hide;
ProcessorLbl.Hide;
ProcessorNameLbl.Hide;
VideoCardLbl.Hide;
VideoCardNameLbl.Hide;
SoundCardLbl.Hide;
SoundCardNameLbl.Hide;
RAMLbl.Hide;
RAMTotalLbl.Hide;
SystemLbl.Hide;
SystemNameLbl.Hide;
SelectDirBrowseLabel.Hide;
DirEditLabel.Hide;
TotalSpaceLabel.Hide;
FreeSpaceLabel.Hide;
NeedSpaceLabel.Hide;
NeedSpaceTLabel.Hide;
NoIconsLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
WizardForm.GroupBrowseButton.Hide;
GroupEditLabel.Hide;
SelectTasksLabel.Hide;
DesktopLabel.Hide;
QuickLaunchLabel.Hide;
DirectXLabel.Hide;
LanguageLabel.Hide;
LngNameLbl.Hide;
StatusLabel.Hide;
FilenameLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
ProgressInfoLabel.Hide;
WizardForm.ComponentsList.Hide;
#ifdef ISDone
LabelTime3.Hide;
LabelStatusRollback.Hide;
LabelStatus.Hide;
#endif
#ifdef FreeArc
LabelStatusRollback.Hide;
LabelStatus.Hide;
#endif
#ifdef Components
Comp1Label.Hide;
Comp2Label.Hide;
Comp3Label.Hide;
Comp4Label.Hide;
Comp5Label.Hide;
Comp6Label.Hide;
#endif
end;

procedure ShowComponents(CurPageID: Integer);
begin
PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption
PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption

case CurPageID of
wpWelcome:
begin
Welcome.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(0),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(0),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
WelcomeLabel1.Show
WelcomeLabel2.Show
end;

SystemPage.ID:
begin
System.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(100),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(114),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
ImgSetVisibility(RequirementsPanel,True);
RequirementsLbl.Show;
ProcessorLbl.Show;
ProcessorNameLbl.Show;
VideoCardLbl.Show;
VideoCardNameLbl.Show;
SoundCardLbl.Show;
SoundCardNameLbl.Show;
RAMLbl.Show;
RAMTotalLbl.Show;
SystemLbl.Show;
SystemNameLbl.Show;
end;

wpSelectDir:
begin
Catalogue.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(200),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(228),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
ImgSetVisibility(Edit,True);
ImgSetVisibility(DirFolder,True);
ImgSetVisibility(HardDrivePanel,True);
ImgSetVisibility(HDD,True);
BtnSetVisibility(hDirBrowseBtn,True);
SelectDirBrowseLabel.Show
DirEditLabel.Show;
TotalSpaceLabel.Show;
FreeSpaceLabel.Show;
NeedSpaceLabel.Show;
NeedSpaceTLabel.Show;
end;

#ifdef Components
SelectComponentsPage.ID:
begin
Components.Font.Color := $00FFFF;
ImgSetPosition(StatusPanel,ScaleX(300),ScaleY(95),ScaleX(100),ScaleY(20));
WizardForm.ComponentsList.Show;
BtnSetVisibility(Comp1Check,True);
BtnSetVisibility(Comp2Check,True);
BtnSetVisibility(Comp3Check,True);
BtnSetVisibility(Comp4Check,True);
BtnSetVisibility(Comp5Check,True);
BtnSetVisibility(Comp6Check,True);
Comp1Label.Show;
Comp2Label.Show;
Comp3Label.Show;
Comp4Label.Show;
Comp5Label.Show;
Comp6Label.Show;
end;
#endif

wpSelectProgramGroup:
begin
StartMenu.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(400),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(342),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
ImgSetVisibility(GroupFolder,True);
ImgSetVisibility(Edit,True);
BtnSetVisibility(hGroupBrowseBtn,True);
BtnSetVisibility(NoIconsCheck,True);
SelectStartMenuFolderBrowseLabel.Show;
WizardForm.GroupBrowseButton.Show;
GroupEditLabel.Show;
NoIconsLabel.Show;
end;

SelectTasksPage.ID:
begin
Tasks.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(500),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(456),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
BtnSetVisibility(DesktopCheck,True);
BtnSetVisibility(QuickLaunchCheck,True);
BtnSetVisibility(DirectXCheck,True);
BtnSetVisibility(LanguageButton[1],false);
BtnSetVisibility(LanguageButton[2],false);
BtnSetChecked(DesktopCheck,True);
SelectTasksLabel.Show;
DesktopLabel.Show;
QuickLaunchLabel.Show;
DirectXLabel.Show;
LanguageLabel.hide;
LngNameLbl.hide;
WizardForm.NextButton.Caption:=SetupMessage(msgButtonInstall);
end;

wpInstalling:
begin
Installing.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(600),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(570),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
StatusLabel.Show;
FilenameLabel.Show;
ProgressInfoLabel.Show;
end;

wpFinished:
begin
Finish.Font.Color := $00FFFF;
#ifdef Components
ImgSetPosition(StatusPanel,ScaleX(700),ScaleY(95),ScaleX(100),ScaleY(20));
#else
ImgSetPosition(StatusPanel,ScaleX(684),ScaleY(95),ScaleX(114),ScaleY(20));
#endif
BtnSetPosition(hNextBtn, ScaleX(657),ScaleY(487),ScaleX(106),ScaleY(39));
FinishedHeadingLabel.Show;
FinishedLabel.Show;
ImgSetVisibility(PBBkg1Img,False);
ImgSetVisibility(PBBkg2Img,False);
ImgSetVisibility(PB1Img,False);
ImgSetVisibility(PB2Img,False);
#ifdef ISDone
LabelTime3.Show;
ImgSetVisibility(PB3Img,False);
#endif
#ifdef FreeArc
ImgSetVisibility(PB3Img,False);
#endif
end
end;
end;

//************************************************ [Конец - Компоненты страниц] ***************************************************//

//************************************************ [Начало - ПрогрессБары] ***************************************************//

function PBProcUninst(h:hWnd;Msg,wParam,lParam:Longint):Longint;
var
pr,i1,i2:Extended;
p:string;
w : integer;
begin
if Msg=$2 then SetWindowLong(h,-4,PBOldProc);
Result:=CallWindowProc(PBOldProc,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:=IntToStr(Round(pr))+' %';
ProgressInfoLabel.Caption:=ExpandConstant('{cm:AllProgressUninst} ')+p;
w:=Round(558*pr/100);
ImgSetPosition(PB3Img,120,302,w,21);
ImgApplyChanges(UninstallProgressForm.Handle);
end;
end;

procedure AllCancel;
begin
SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
ImgSetVisibility(AImg[CurrentImage],False);
ImgSetVisibility(WizardImg,True);
ImgSetVisibility(PBImg,False);
ImgSetVisibility(PBBkgImg,False);
ImgApplyChanges(WizardForm.Handle);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
#ifdef ISDone
UnpackingISDone(CurStep);
#endif
#ifdef FreeArc
UnpackingArc(CurStep);
#endif
case CurStep of
ssInstall: begin
if GetArrayLength(ADisk)>0 then begin
KillTimer(WizardForm.Handle,WFDiskTimerID);
    SetArrayLength(ADisk,0);
end;
if GetArrayLength(ASysReq)>0 then begin
KillTimer(WizardForm.Handle,WFSysReqTimerID);
    SetArrayLength(ASysReq,0);
end;

WizardForm.ProgressGauge.Visible:=False;

OldPosition:=0;
CurrentImage:=0;
ImgSetVisibility(WizardImg,False);
ImgSetVisibility(AImg[0],True);
#ifndef ISDone
#ifndef FreeArc
// Прогрессбары создаются в скрипте //
PBBkgImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressBackground.png'),119,300,560,25,True,True);
ImgApplyChanges(WizardForm.Handle);
PBImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,558,21,True,True);
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4));
#endif
#endif
     sTime:=GetTickCount;
eTime:=sTime;
ProgressStep:=100 div GetArrayLength(AImg);
end;
ssPostInstall: AllCancel;
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
DeleteSavedGames(CurUninstallStep);
case CurUninstallStep of
usUninstall: begin
UninstallProgressForm.ProgressBar.Visible:=False;
PB3Img:=ImgLoad(UninstallProgressForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,558,21,True,True);
PBOldProc:=SetWindowLong(UninstallProgressForm.ProgressBar.Handle,-4,CallBackProc(@PBProcUninst,4));
end;
end;
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID=wpInstalling then begin
Confirm:=False;
Cancel:=ExitSetupMsgBox;
if Cancel then begin
AllCancel;
StatusLabel.Caption:=SetupMessage(msgStatusRollback);
FilenameLabel.Hide;
ProgressInfoLabel.Hide;
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WizardForm.CancelButton.Enabled:=False;
end;
end;
end;

//************************************************ [Конец - ПрогрессБары] ***************************************************//

procedure InitializeWizard;
begin
wizardform.Position := poScreenCenter;
CreateStatusPanel;
CreateWizardImage;
ButtonsTextures;
InsertMusic;
CreatePageComponents;
#ifdef Components
CreateComponents;
#endif
#ifdef ISDone
CreateISDoneComponents;
#endif
#ifdef FreeArc
CreateArcComponents;
#endif
end;

procedure CurPageChanged(CurPageID: Integer);
begin
SetStateNewButtons;
Welcome.Font.Color := $FFFFFF;
System.Font.Color := $FFFFFF;
Catalogue.Font.Color := $FFFFFF;
#ifdef Components
Components.Font.Color := $FFFFFF;
#endif
StartMenu.Font.Color := $FFFFFF;
Tasks.Font.Color := $FFFFFF;
Installing.Font.Color :=$FFFFFF;
Finish.Font.Color := $FFFFFF;

HideComponents;
ImgSetVisibility(RequirementsPanel,False);
ImgSetVisibility(Edit,False);
ImgSetVisibility(DirFolder,False);
BtnSetVisibility(hDirBrowseBtn,False);
ImgSetVisibility(HardDrivePanel,False);
ImgSetVisibility(HDD,False);
ImgSetVisibility(GroupFolder,False);
BtnSetVisibility(hGroupBrowseBtn,False);
BtnSetVisibility(NoIconsCheck,False);
BtnSetVisibility(DesktopCheck,False);
BtnSetVisibility(QuickLaunchCheck,False);
BtnSetVisibility(DirectXCheck,False);
BtnSetVisibility(LanguageButton[1],False);
BtnSetVisibility(LanguageButton[2],False);
#ifdef Components
BtnSetVisibility(Comp1Check,False);
BtnSetVisibility(Comp2Check,False);
BtnSetVisibility(Comp3Check,False);
BtnSetVisibility(Comp4Check,False);
BtnSetVisibility(Comp5Check,False);
BtnSetVisibility(Comp6Check,False);
#endif

ShowComponents(CurPageID);
ImgApplyChanges(WizardForm.Handle);
#ifdef ISDone
UnpackingISDoneFinished(CurPageID);
#endif
#ifdef FreeArc
UnpackingArcFinished(CurPageID);
#endif
if GetArrayLength(ASysReq)>0 then
if CurPageID=SystemPage.ID then SetTimer(WizardForm.Handle,WFSysReqTimerID,1000,WrapTimerProc(@SysReqFlashing,4))
else KillTimer(WizardForm.Handle,WFSysReqTimerID);

if CurPageID=wpSelectDir then begin
OldDisk:='';
GetFreeSpaceCaption(nil);
end else if GetArrayLength(ADisk)>0 then KillTimer(WizardForm.Handle,WFDiskTimerID);
end;

procedure DeinitializeSetup;
begin
#ifdef Autorun
if ContinueInstall then begin
#endif
BASS_Stop;
BASS_Free;
WFButtonFont.Free;
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')),0);
    UnloadSkin;
     SetArrayLength(AImg,0);
     gdipShutdown;
#ifdef Autorun
end;
#endif
end;

procedure DeinitializeUninstall;
begin
gdipShutdown;
UnloadSkin;
if Assigned(UPFButtonFont) then UPFButtonFont.Free;
end;[/more]
Автор: insombia
Дата сообщения: 29.08.2011 20:30
Kizyak в [#more] [/more] возьми свой скрипт

# убрать нужно.Разобрался это хорошо
Автор: Kizyak
Дата сообщения: 29.08.2011 20:53

Цитата:
Kizyak в Подробнее... возьми свой скрипт

еле разобрался, спасибо)
Автор: vasyaetoyaept
Дата сообщения: 30.08.2011 04:14
riperoc1
поделись скриптом в лс?
Автор: log1stable
Дата сообщения: 30.08.2011 06:48
Shegorat, HKEY_USERS\S-1-5-21-1701691739-3833327790-670432840-1000\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers". Имя значения: "C:\Program Files\****\Counter-Strike Source\Run_CSS.exe", например. Значение параметра: "DISABLEDWM". Дело в том, что вторая директория - уникальна. Проверял на трех машинах.
Автор: SotM
Дата сообщения: 30.08.2011 07:11
log1stable
млин, этот форум не место где нужно обсуждать ветку реестра HKER_USERS. В инете ПОЛНО информации об этом. Зачем этот глупый вопрос задавать здесь?!
Гугл уже не работает что ли?
Автор: log1stable
Дата сообщения: 30.08.2011 07:52
SotM, увы, на сей раз гугл не помог. Поэтому я и спрашиваю людей, возможно знающих решение, ибо с инно работаю всего-ничего.
Автор: SotM
Дата сообщения: 30.08.2011 08:49
log1stable
А при чём здесь инно?! Ты спрашивал про ветку в реестре, Инно тут ни причём.
Подскажу, тогда ищи в этой же теме, ибо я же и отвечал таким вот как ты, которые не умеют найти нужную информацию о структуре реестра в винде, и какая ветка за что отвечает.
Хоть это и оффтоп, но я спокойно в гугле нашел пару ссылок по запросу "структура реестра HKER_USERS": ссылка 1, ссылка 2.
Ну если тебе воооообще сложно хоть что-то найти, то вот еще ссылка на этом же форуме
Автор: jonikDk
Дата сообщения: 30.08.2011 11:47
Можно ли из процедуры
procedure CurStepChanged(CurStep: TSetupStep);

if CurStep = ssPostInstall then
выполняем нужные действия
и по условию вернуться на форму созданную в процедуре procedure InitializeWizard;

?



Автор: Raf_SE
Дата сообщения: 30.08.2011 14:47
Ктонить может объединить [more=код конвертирования OGG]

Код: [C0de]
var
Files: Array of String;
S: String;
n: Integer;

Function StringToArray(Text, Cut: String): array of String; var i, k: Integer;
Begin
SetArrayLength(Result, 0); if Cut = '' then Cut:= #1310; //если шаблон пуст, считаем переводы строк
Repeat k:= Pos(Cut,Text);
if k = 1 then begin Delete(Text, 1, Length(Cut)); CONTINUE
end;
SetArrayLength(Result, GetArrayLength(Result) +1); i:= GetArrayLength(Result) -1;
if k = 0 then
Result[i]:=Text
else begin
Result[i]:= Copy(Text, 1, k -1); Delete(Text, 1, Length(Result[i]) + Length(Cut));
end;
Until Length(Text) * k = 0;
End;

procedure FindFiles(FromDir: String; Mask: String);
var FSR, DSR: TFindRec; FindResult: Boolean;
begin
FindResult:= FindFirst(AddBackslash(FromDir)+Mask, FSR)
while FindResult do begin
if FSR.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then begin
S:= S + AddBackslash(fromDir) + FSR.Name +'|';
end;
FindResult:= FindNext(FSR);
end;
FindResult:= FindFirst(AddBackslash(FromDir)+ '*.*', DSR)
while FindResult do begin
if ((DSR.Attributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY) and not ((DSR.Name = '.') or (DSR.Name = '..')) then begin
FindFiles(AddBackSlash(FromDir)+DSR.Name, Mask)
end;
FindResult:= FindNext(DSR);
end;
FindClose(FSR); FindClose(DSR)
end;

procedure RecodeOgg;
var ResultCode: integer; CurFile: String;
begin
FindFiles(ExpandConstant('{app}'), '*.ogg') //Находим все файлы по маске, в выбранной папке
Files:= StringToArray(S, '|') //Переводим в массив
WizardForm.ProgressGauge.Max:= GetArrayLength(Files)-1; //Получаем кол-во файлов
WizardForm.ProgressGauge.Position:=0
for n:=(GetArrayLength(Files)-1) downto 0 do begin
CurFile:= Files[n]
StringChange(CurFile, AddBackslash(ExpandConstant('{app}')), '')
Exec(ExpandConstant('{app}\oggdec.exe'), '-Q '+AddQuotes(CurFile), '', SW_Hide, EwWaitUntilTerminated, ResultCode) //Для каждого файла запускаем декодер
DeleteFile(Files[n]) //Удаляем ненужный файл
WizardForm.FilenameLabel.Caption:= Files[n]; //Двигаем прогрессбар
WizardForm.ProgressGauge.Position:= WizardForm.ProgressGauge.Position +1;
end;
DeleteFile(ExpandConstant('{app}\oggdec.exe'))
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then RecodeOgg;
end;
Автор: log1stable
Дата сообщения: 30.08.2011 15:12
Сотм, мне надо просто через инно поставить галку "Убрать композицию рабочего стола". В топике инно парень уже задавал вопрос этот, но ему не ответили. Я надеялся, что есть подобное что-то: Windows - {win}, Application - {app} только для SID'a.

Добавлено:
Raf_SE, насчет слайд-шоу. Неправильно экспортируются изображения, скорее всего. Попробуй прописать каждому изображению строку.
ExtractTemporaryFile(ExpandConstant({tmp}\Image_1.bmp')) и т.д.

Добавлено:
Это в теории. На практике я не могу проверить - комп в ремонте.
Автор: Raf_SE
Дата сообщения: 30.08.2011 15:24
log1stable
Совместимость, это тут:
Root: HKCU; Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"

Типы совместимости пишуться через пробел
ValueData: "WIN98 256COLOR 640X480 DISABLETHEMES DISABLEDWM HIGHDPIAWARE";

Добавлено:
log1stable (15:12 30-08-2011)
Цитата:
Неправильно экспортируются изображения, скорее всего.

Нет, не тот случай. Второй код я уже сотню раз испытал. Он работает нормально, если его не объединять с кодом конвертации OGG.
Автор: log1stable
Дата сообщения: 30.08.2011 16:12
Раф, спасибо, попробую обязательно. А вот насчет объединения.. Может, попробуешь iss_joiner?
Автор: Raf_SE
Дата сообщения: 30.08.2011 16:22
log1stable (16:12 30-08-2011)
Цитата:
Может, попробуешь iss_joiner?

Он чуда не делает. Просто переименовывает функции добавляя номера, а в конце пишет что-то типа

procedure InitializeWizard;
begin
InitializeWizard1();
InitializeWizard2();
InitializeWizard3();
InitializeWizard4();
InitializeWizard5();
end;

Так и я пробовал, бестолку =\
Автор: Kizyak
Дата сообщения: 30.08.2011 17:34

Цитата:
insombia

Kizyak в [#more] [/more] возьми свой скрипт
 
# убрать нужно.Разобрался это хорошо


insombia я разобрался в том как свернуть скрипт , но не в проблеме, так что вопрос (Chaos LegionChaos Legion) актуален....
Автор: Despofix
Дата сообщения: 30.08.2011 18:12
с помощью какой программы создаются кнопки для инсталляторов?
Автор: Denis_T
Дата сообщения: 30.08.2011 18:52
Помогите пожалуйста с такой проблемой.

У самого ничего не получается.
Автор: moonlight82
Дата сообщения: 30.08.2011 19:03
Denis_T
Скинь скрипт
Автор: Denis_T
Дата сообщения: 30.08.2011 19:10
moonlight82
[MORE]
// Название и версия игры
#define MyAppName "Gothic"
#define AppVerName "Gothic"
// Требуется свободного места на диске
#define NeedSize "5120"
// ОЗУ для распаковки
#define NeedMem 512
// Второй прогрессбар, если не нужен закоментировать "//"
//#define SecondProgressBar
// Компоненты установки, если не требуются закоментировать "//"
#define Components

;#define records

// Библиотеки для распакови, выбираем, снимаем комент
;#define facompress
;#define precomp "0.4"
;#define SrepInside
;#define unrar
;#define XDelta
;#define PackZIP

#include "iswin7&fairy&logo.iss"

[Setup]
AppName={#MyAppName}
AppVerName={#MyAppName}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=.
OutputBaseFilename=Setup
SolidCompression=yes
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif

;Картинка на главной странице
WizardImageFile=Img\WizardImage.bmp
WizardSmallImageFile=Img\WizardSmallImage.bmp
#ifdef Components
ShowTasksTreeLines=true
[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
Name: text; Description: Язык субтитров; Types: full; Flags: fixed
Name: text\rus; Description: Русский; Flags: exclusive; ExtraDiskSpaceRequired: 100000000
Name: text\eng; Description: Английский; Flags: exclusive; ExtraDiskSpaceRequired: 200000000
Name: voice; Description: Язык озвучки; Types: full; Flags: fixed
Name: voice\rus; Description: Русский; Flags: exclusive; ExtraDiskSpaceRequired: 500000000
Name: voice\eng; Description: Английский; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
#endif

[Registry]


[Icons]
Name: "{group}\Grand Theft Auto IV"; Filename: "{app}\LaunchGTAIV.exe" ; WorkingDir: {app} ; IconFilename: "{app}\GTAIV.ico"
Name: "{group}\Удалить игру"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Grand Theft Auto IV"; Filename: "{app}\LaunchGTAIV.exe"; Tasks: desktopicon ; WorkingDir: {app} ; IconFilename: "{app}\GTAIV.ico"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Grand Theft Auto IV"; Filename: "{app}\LaunchGTAIV.exe"; Tasks: quicklaunchicon ; WorkingDir: {app}; IconFilename: "{app}\GTAIV.ico"

[Tasks]
Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: Redist; Description: Дополнительное программное обеспечение:
Name: Redist\DirectXCheck; Description: Обновить DirectX; Flags: unchecked
Name: Redist\PhysXCheck; Description: Установить Nvidia PhysX; Flags: unchecked
Name: Redist\VCCheck; Description: Установить Microsoft Visual C++ Redist; Flags: unchecked


[Run]
Filename: {src}\Redist\vcredist_x86.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x86...; Flags: skipifdoesntexist; Tasks: Redist\VCCheck; Check: CheckError and not IsWin64
Filename: {src}\Redist\vcredist_x64.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x64...; Flags: skipifdoesntexist; Tasks: Redist\VCCheck; Check: CheckError and IsWin64
Filename: {src}\Redist\PhysX.exe; Parameters: /qn; StatusMsg: Устанавливаем Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: Redist\PhysXCheck; Check: CheckError
Filename: {src}\Redist\DirectX\DXSETUP.exe; Parameters: /silent; StatusMsg: Обновляем DirectX...; Flags: skipifdoesntexist; Tasks: Redist\DirectXCheck; Check: CheckError

[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
Source: Img\*; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\arc.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\srep.exe; 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

[CustomMessages]
russian.ExtractedFile=Извлекается файл:
russian.Extracted=Распаковка архивов...
russian.CancelButton=Отменить распаковку
russian.Error=Ошибка распаковки!
russian.ElapsedTime=Прошло:
russian.RemainingTime=Осталось времени:
russian.EstimatedTime=Всего:
russian.AllElapsedTime=Время установки:


russian.FreeSpace=Доступно места на диске:
russian.NeedSpace=Требуется места на диске:

[LangOptions]
WelcomeFontName=Georgia

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

[UninstallDelete]
Type: filesandordirs; Name: {app}

[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
Install,Install2,
NeedSpaceLabel,FreeSpaceLabel,
PageNameLabel, PageDescriptionLabel,
WelcomeLabel1, WelcomeLabel2, FinishedLabel, FinishedHeadingLabel,
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;

FreeMB, TotalMB: Cardinal;
SizeStr: String;
SizeInt: Integer;
SymbolNumber: Integer;

type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpFile:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';

function 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)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
// LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
end;

procedure HideControls;
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar1.Hide;
LabelPct1.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
#ifdef SecondProgressBar
ISDoneProgressBar2.Hide;
LabelPct2.Hide;
#endif
end;



procedure CreateControls;
var PBTop:integer;
begin
PBTop:=ScaleY(50);
ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar1 do begin
Parent := WizardForm.InstallingPage;
Height := WizardForm.ProgressGauge.Height;
Left := ScaleX(0);
Top := PBTop;
Width := ScaleX(365);
Max := 1000;
end;
LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar1.Width+ScaleX(5);
Top := ISDoneProgressBar1.Top + ScaleY(2);
Width := ScaleX(80);
end;
LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width+ScaleX(30);
Left := ScaleX(0);
Top := ScaleY(30);
end;
#ifdef SecondProgressBar
PBTop:=PBTop+ScaleY(25);
ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar2 do begin
Parent := WizardForm.InstallingPage;
Left := ScaleX(0);
Top := PBTop+ScaleY(8);
Width := ISDoneProgressBar1.Width;
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
end;
LabelPct2 := TLabel.Create(WizardForm);
with LabelPct2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Left := ISDoneProgressBar2.Width+ScaleX(5);
Top := ISDoneProgressBar2.Top + ScaleY(2);
Width := ScaleX(80);
end;
#endif
LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := ISDoneProgressBar1.Width div 2;
Left := ScaleX(0);
Top := PBTop + ScaleY(35);
end;
LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := LabelTime1.Width+ScaleX(40);
Left := ISDoneProgressBar1.Width div 2;
Top := LabelTime1.Top;
end;


// LabelTime3 := TLabel.Create(WizardForm);
// with LabelTime3 do begin
// Parent := WizardForm.FinishedPage;
// AutoSize := False;
// Width := 300;
// Left := 180;
// Top := 200;
// end;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent:=WizardForm;
Width:=ScaleX(135);
Caption:=ExpandConstant('{cm:CancelButton}');
Left:=ScaleX(360);
Top:=WizardForm.cancelbutton.top;
OnClick:=@CancelButtonOnClick;
end;
end;

Procedure CurPageChanged1(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and ISDoneError then
begin
// LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;

function CheckError:boolean;
begin
result:= not ISDoneError;
end;















procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
ISDoneCancel:=0;

// Распаковка всех необходимых файлов в папку {tmp}.
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#endif
#ifdef SrepInside
ExtractTemporaryFile('arc.ini');
ExtractTemporaryFile('srep.exe');
#endif
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
#ifdef precomp
#if precomp == "0.38"
ExtractTemporaryFile('precomp038.exe');
#else
#if precomp == "0.4"
ExtractTemporaryFile('precomp040.exe');
#else
#if precomp == "0.41"
ExtractTemporaryFile('precomp041.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
#endif
#endif
#endif
#endif
#ifdef unrar
ExtractTemporaryFile('Unrar.dll');
#endif
#ifdef XDelta
ExtractTemporaryFile('XDelta3.dll');
#endif
#ifdef PackZIP
ExtractTemporaryFile('7z.dll');
ExtractTemporaryFile('PackZIP.exe');
#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 precomp
PCFVer:={#precomp};
#else
PCFVer:=0;
#endif
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
repeat
if not SrepInit('',512,0) then break;
if not PrecompInit(PCFVer) then break;
if not FileSearchInit(false) then break;

// if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;

// далее находятся закомментированые примеры различных функций распаковки (чтобы каждый раз не лазить в справку за примерами)
(*
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\arc.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\CODMW2.7z'), ExpandConstant('{app}\data1'), false, '') then break;
if not ISRarExtract ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '') then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data1024_1024.srep'),ExpandConstant('{app}\data1024.arc'), true) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'), ExpandConstant('{app}\data.7z'), true) then break;
if not ISxDeltaExtract ( 0, 0, 0, 640, ExpandConstant('{app}\in.pcf'), ExpandConstant('{app}\*.diff'), ExpandConstant('{app}\out.dat'), false) then break;
if not ISPackZIP ( 0, 0, ExpandConstant('{app}\1a1\*'), ExpandConstant('{app}\1a1.pak'), 2, false ) then break;
if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{arr}\"'), ExpandConstant('{tmp}'), '...') then break;
if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc') then break;

// распаковка группы файлов посредством внешнего приложения

FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
ExecError:=false;
while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
InFilePath:=ISGetName(0);
OutFilePath:=ISGetName(1);
OutFileName:=ISGetName(2);
ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName);
end;
ISFindFree(FindHandle1);
if ExecError then break;
*)

ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;





// ---------------- { Начало Шрифт } ---------------//
procedure InitializeWizard1();
begin
WizardForm.DirEdit.Text:= MinimizePathName(WizardForm.DirEdit.Text, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width);
WizardForm.Font.Name:= 'Georgia'; // название шрифта
//WizardForm.Font.Style:= [fsBold] // Стиль шрифта
WizardForm.Font.Size:= 8; // Размер шрифта
end;
// ---------------- { Конец Шрифт } ---------------//
// ---------------- { Начало Вставка картинки на первую и последнюю страницу } ---------------//
procedure InitializeWizard2();
begin
ExtractTemporaryFile('img2.bmp'); // картинка на финишной странице

WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\img2.bmp'));

WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.AutoSize:= False;
with WizardForm.WelcomeLabel1 do
WelcomeLabel1.SetBounds(245, 40, 200, 200); // Текст на главной странице
WelcomeLabel1.Font:= WizardForm.WelcomeLabel1.Font // Шрифт
WelcomeLabel1.Alignment := taCenter;
WelcomeLabel1.Font.Color:= clWhite; // Цвет
WelcomeLabel1.Transparent:= True;
WelcomeLabel1.WordWrap:= true;
WelcomeLabel1.Caption:= WizardForm.WelcomeLabel1.Caption;
WelcomeLabel1.Parent:= WizardForm.WelcomePage

WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.AutoSize:= False;
with WizardForm.WelcomeLabel2 do
WelcomeLabel2.SetBounds(245, 100, 200, 300);
WelcomeLabel2.Font:= WizardForm.WelcomeLabel2.Font
WelcomeLabel2.Font.Color:= clWhite;
WelcomeLabel2.Font.Style:=[fsItalic];
WelcomeLabel2.Alignment := taCenter;
WelcomeLabel2.Transparent:= True;
WelcomeLabel2.WordWrap:= true;
WelcomeLabel2.Caption:= WizardForm.WelcomeLabel2.Caption;
WelcomeLabel2.Parent:= WizardForm.WelcomePage

FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.AutoSize:= False;
with WizardForm.FinishedHeadingLabel do
FinishedHeadingLabel.SetBounds(Left, 1024, Width, Height); // Текст на финишной странице
FinishedHeadingLabel.Font:= WizardForm.FinishedHeadingLabel.Font
FinishedHeadingLabel.Font.Color:= clWhite;
FinishedHeadingLabel.Transparent:= True;
FinishedHeadingLabel.WordWrap:= true;
FinishedHeadingLabel.Caption:= WizardForm.FinishedHeadingLabel.Caption;
FinishedHeadingLabel.Parent:= WizardForm.FinishedPage

FinishedLabel:= TLabel.Create(WizardForm);
FinishedLabel.AutoSize:= False;
with WizardForm.FinishedLabel do
FinishedLabel.SetBounds(Left, 1024, Width, Height);
FinishedLabel.Font:= WizardForm.FinishedLabel.Font
FinishedLabel.Font.Color:= clWhite;
FinishedLabel.Transparent:= True;
FinishedLabel.WordWrap:= true;
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
FinishedLabel.Parent:= WizardForm.FinishedPage

WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;







WizardForm.ComponentsList.Top := ScaleY(52);
//WizardForm.ComponentsList.Height := ScaleY(130);
//WizardForm.TypesCombo.Top := ScaleX(130);
WizardForm.SelectComponentsLabel.Height := ScaleY(50);
end;



procedure CurPageChanged2(CurPageID: Integer);
begin
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption:= WizardForm.PageDescriptionLabel.Caption;
end;
//------------------- { Конец картинки } -------------------//
//------------------- { Начало Растяжение WizardSmallImage } -------------------//
procedure InitializeWizard3();
begin
WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);

PageNameLabel:= TLabel.Create(WizardForm)
with WizardForm.PageNameLabel do
PageNameLabel.SetBounds(Left, 2024, Width, Height); // Положение текста
PageNameLabel.Transparent:= True;
PageNameLabel.Font.Name:= 'Georgia'; // Шрифт
PageNameLabel.Font.Color:= clWhite; // Цвет
PageNameLabel.Font.Style:= [fsBold];
PageNameLabel.Parent:= WizardForm.MainPanel;

PageDescriptionLabel:= TLabel.Create(WizardForm)
with WizardForm.PageDescriptionLabel do
PageDescriptionLabel.SetBounds(Left, 1024, Width, Height);
PageDescriptionLabel.Transparent:= True;
PageDescriptionLabel.Font:= WizardForm.PageDescriptionLabel.Font;
PageDescriptionLabel.Font.Color:= clWhite; //???? ???????
PageDescriptionLabel.Parent:= WizardForm.MainPanel;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
end;

//procedure CurPageChanged(CurPageID: Integer);
//begin
//PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
//PageDescriptionLabel.Caption:= WizardForm.PageDescriptionLabel.Caption;
//end;
//------------------- { Конец Растяжение WizardSmallImage } -------------------//

//------------------- { Начало Прозрачность Win 7 } -------------------//
procedure InitializeWizard4();
begin
LogoWizard();
end;

procedure DeinitializeSetup();
begin
DeinitializeWizard();
end;
//------------------- { Конец Прозрачность Win 7 } -------------------//
//------------------- { Начало Место на диске } -------------------//
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;

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)
end;
end;

procedure InitializeWizard5();
begin
WizardForm.DiskSpaceLabel.Hide;
#ifdef NeedSize
SizeInt:= {#NeedSize}
#else
SizeInt:= GetSize;
#endif

NeedSpaceLabel := TLabel.Create(WizardForm);
NeedSpaceLabel.SetBounds(ScaleX(0), ScaleY(198), ScaleX(209), ScaleY(13))
NeedSpaceLabel.Parent := WizardForm.SelectDirPage;
NeedSpaceLabel.Transparent:=true;

FreeSpaceLabel := TLabel.Create(WizardForm);
FreeSpaceLabel.SetBounds(ScaleX(0), ScaleY(216), ScaleX(209), ScaleY(13))
FreeSpaceLabel.Parent := WizardForm.SelectDirPage;
FreeSpaceLabel.Transparent:=true;

WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;
WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0;
end;

procedure CurPageChanged4(CurPageID: Integer);
begin
if CurPageID = wpSelectDir then begin
GetFreeSpaceCaption(nil)
end;
end;
//------------------- { Конец Место на диске } -------------------//
//------------------- { Текст на странице установки } -------------//

//------------------- { Конец на странице установки } -------------//
//------------------- { Начало Данные о винтах ( древо ) } -------------------//
var
DirTreeView: TFolderTreeView;

procedure DirFolderChange(Sender: TObject);
Begin
WizardForm.DirEdit.Text:=AddBackslash(DirTreeView.Directory) + '{#MyAppName}'
end;

Procedure InitializeWizard6();
begin
DirTreeView:= TFolderTreeView.Create(WizardForm)
DirTreeView.SetBounds(0,113,332,80)
DirTreeView.OnChange:= @DirFolderChange
DirTreeView.Parent:= WizardForm.SelectDirPage
// DirTreeView.ChangeDirectory(ExpandConstant('{pf}'), True)
end;
//------------------- { Конец Данные о винтах ( древо ) } -------------------//



///////////////////////////////////////////////////////////////
procedure InitializeWizard();
begin
with WizardForm do
begin
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
end;
begin
InitializeWizard1();
InitializeWizard2();
InitializeWizard3();
InitializeWizard4();
InitializeWizard5();
InitializeWizard6();

end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
CurPageChanged1(CurPageID);
CurPageChanged2(CurPageID);

CurPageChanged4(CurPageID);
end;


[/MORE]

Добавлено:
Всё, вопрос решён.
Автор: kostyamks
Дата сообщения: 30.08.2011 22:39
Добрый вечер!
Скиньте пожалуйста скрипт в котором есть такая возможность как на скрине:

Страницы: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177

Предыдущая тема: поиск


Форум Ru-Board.club — поднят 15-09-2016 числа. Цель - сохранить наследие старого Ru-Board, истории становления российского интернета. Сделано для людей.