GenriБыл вопрос. Мне нужно чтоб установщик извлек файлы туда где он находится. Установщик буду кидать из другой програмы потом устанавливать. Установиться должен туда где находится сам установщик. Как правильно.
» Inno Setup (создание инсталяционных пакетов)
Цитата:
Мне нужно чтоб установщик извлек файлы туда где он находится.ну так пропиши в извлекаемые файлы путь {src}
Извините, если не увидел, но искал долго. Прошу поделиться последней версией IsDone. Заранее благодарен
Karbid87
Держи
Держи
подскажите пожалуйста,как исправить проблему со шрифтоми
скажите пожалуйста
я создал чекбоксы завязанные через Check к файлам из [Files]
как сделать, чтобы при отметке каждого чекбокса добавлялся размер в ComponentsDiskSpaceLabel
(а лучше свой лейбл)
и аналогично при снятии флажка убирался
нужно просто копировать функцию ComponentsDiskSpaceLabel, тк у меня компоненты на кастомной станице
и компонентов "стандартных" - [Components] нет
я себе уже все мозги сломал с этой функцией
[more]
Код:
[Setup]
AppName=SlideShowOnBackground
AppVerName=SlideShowOnBackground
CreateAppDir=true
DefaultDirName={pf}\Test
[Code]
const
Comp1Size = 100;
Comp2Size = 200;
var
FreeMB, TotalMB: Cardinal;
NeedSize: Integer;
NeedSpaceLabel, FreeSpaceLabel: TLabel;
Comp1, Comp2: TCheckBox;
procedure GetFreeSpaceCaption(Sender: TObject);
var
Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if FreeMB > 1024 then
FreeSpaceLabel.Caption := 'Ñâîáîäíî íà âûáðàííîì äèñêå: ' + FloatToStr(round(FreeMB/1024*100)/100) + ' GB'
else
FreeSpaceLabel.Caption := 'Ñâîáîäíî íà âûáðàííîì äèñêå: ' + IntToStr(FreeMB)+ ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
end;
procedure Comp1OnClick(Sender: TObject);
begin
if Comp1.Checked then
NeedSize := NeedSize + Comp1Size
else
NeedSize := NeedSize - Comp1Size;
NeedSpaceLabel.Caption := 'Òðåáóåòñÿ äëÿ óñòàíîâêè: ' + IntToStr(NeedSize) + ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
end;
procedure Comp2OnClick(Sender: TObject);
begin
if Comp2.Checked then
NeedSize := NeedSize + Comp2Size
else
NeedSize := NeedSize - Comp2Size;
NeedSpaceLabel.Caption := 'Òðåáóåòñÿ äëÿ óñòàíîâêè: ' + IntToStr(NeedSize) + ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
end;
procedure InitializeWizard();
begin
NeedSize := 0;
WizardForm.DiskSpaceLabel.Hide;
NeedSpaceLabel := TLabel.Create(WizardForm);
with NeedSpaceLabel do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(198);
Width := ScaleX(209);
Height := ScaleY(13);
Caption := 'Òðåáóåòñÿ äëÿ óñòàíîâêè: ' + IntToStr(NeedSize) + ' MB';
end;
FreeSpaceLabel := TLabel.Create(WizardForm);
with FreeSpaceLabel do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(216);
Width := ScaleX(209);
Height := ScaleY(13);
end;
Comp1 := TCheckBox.Create(WizardForm);
with Comp1 do
begin
Parent := WizardForm.SelectDirPage;
Caption := 'Component 1';
Left := ScaleX(0);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
TabOrder := WizardForm.DirBrowseButton.TabOrder + 1;
OnClick := @Comp1OnClick;
end;
Comp2 := TCheckBox.Create(WizardForm);
with Comp2 do
begin
Parent := WizardForm.SelectDirPage;
Caption := 'Component 2';
Left := ScaleX(0);
Top := ScaleY(160);
Width := ScaleX(97);
Height := ScaleY(17);
TabOrder := Comp1.TabOrder + 1;
OnClick := @Comp2OnClick;
end;
WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption;
WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
end;
я создал чекбоксы завязанные через Check к файлам из [Files]
как сделать, чтобы при отметке каждого чекбокса добавлялся размер в ComponentsDiskSpaceLabel
(а лучше свой лейбл)
и аналогично при снятии флажка убирался
нужно просто копировать функцию ComponentsDiskSpaceLabel, тк у меня компоненты на кастомной станице
и компонентов "стандартных" - [Components] нет
я себе уже все мозги сломал с этой функцией
[more]
Код:
[Setup]
AppName=SlideShowOnBackground
AppVerName=SlideShowOnBackground
CreateAppDir=true
DefaultDirName={pf}\Test
[Code]
const
Comp1Size = 100;
Comp2Size = 200;
var
FreeMB, TotalMB: Cardinal;
NeedSize: Integer;
NeedSpaceLabel, FreeSpaceLabel: TLabel;
Comp1, Comp2: TCheckBox;
procedure GetFreeSpaceCaption(Sender: TObject);
var
Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if FreeMB > 1024 then
FreeSpaceLabel.Caption := 'Ñâîáîäíî íà âûáðàííîì äèñêå: ' + FloatToStr(round(FreeMB/1024*100)/100) + ' GB'
else
FreeSpaceLabel.Caption := 'Ñâîáîäíî íà âûáðàííîì äèñêå: ' + IntToStr(FreeMB)+ ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
end;
procedure Comp1OnClick(Sender: TObject);
begin
if Comp1.Checked then
NeedSize := NeedSize + Comp1Size
else
NeedSize := NeedSize - Comp1Size;
NeedSpaceLabel.Caption := 'Òðåáóåòñÿ äëÿ óñòàíîâêè: ' + IntToStr(NeedSize) + ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
end;
procedure Comp2OnClick(Sender: TObject);
begin
if Comp2.Checked then
NeedSize := NeedSize + Comp2Size
else
NeedSize := NeedSize - Comp2Size;
NeedSpaceLabel.Caption := 'Òðåáóåòñÿ äëÿ óñòàíîâêè: ' + IntToStr(NeedSize) + ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
end;
procedure InitializeWizard();
begin
NeedSize := 0;
WizardForm.DiskSpaceLabel.Hide;
NeedSpaceLabel := TLabel.Create(WizardForm);
with NeedSpaceLabel do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(198);
Width := ScaleX(209);
Height := ScaleY(13);
Caption := 'Òðåáóåòñÿ äëÿ óñòàíîâêè: ' + IntToStr(NeedSize) + ' MB';
end;
FreeSpaceLabel := TLabel.Create(WizardForm);
with FreeSpaceLabel do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(216);
Width := ScaleX(209);
Height := ScaleY(13);
end;
Comp1 := TCheckBox.Create(WizardForm);
with Comp1 do
begin
Parent := WizardForm.SelectDirPage;
Caption := 'Component 1';
Left := ScaleX(0);
Top := ScaleY(136);
Width := ScaleX(97);
Height := ScaleY(17);
TabOrder := WizardForm.DirBrowseButton.TabOrder + 1;
OnClick := @Comp1OnClick;
end;
Comp2 := TCheckBox.Create(WizardForm);
with Comp2 do
begin
Parent := WizardForm.SelectDirPage;
Caption := 'Component 2';
Left := ScaleX(0);
Top := ScaleY(160);
Width := ScaleX(97);
Height := ScaleY(17);
TabOrder := Comp1.TabOrder + 1;
OnClick := @Comp2OnClick;
end;
WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption;
WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
end;
ENERGES, заюзать другой шрифт, этот не поддерживает русских символов.
ENERGES
Если текст из файла, то наверное тот файл в юникоде. Такой скрипт инсталлятора есть в паблике?
Если текст из файла, то наверное тот файл в юникоде. Такой скрипт инсталлятора есть в паблике?
alex0413
Цитата:
Закос под R.G. Механики
Добавлено:
xanloz
Цитата:
Цитата:
Такой скрипт инсталлятора есть в паблике?
Закос под R.G. Механики
Добавлено:
xanloz
Цитата:
nik1967Здравствуйте! Скрипт писался под одну определённую игру, и я не думал, что он(скрипт) будет востребован. На счёт помощи: если быть до конца откровенным, то лень. Да и другим я сейчас занят. Если когда нибудь выберу время и не заленюсь, то прикручу. Вопрос в другом - когда это будет?
Здравствуйте, решил взять за основу ваш скрипт "Власть Закона", но никак не могу подключить к нему ISDone, не можете ли мне помочь?
Подскажите пожалуйста, как не показывать список копируемых файлов во время инсталляции, а показывать только прогрессбар?
Помогите пожалуйста собрать скрипт, чтоб установка доп. ПО определяла какая система установлена 32 или 64 бита.
В этот
[more=Скрипт1]#define GameID "{45C3A802-3D17-4F23-ADD1-B2D066CDC0CE}"
#define GameName "Syndicate"
#define GameVerName "Syndicate [v 1.0]"
#define NeedSize "10601"
#define TNeedSize "15601"
#define Processor "3000"
#define VideoCard "512"
#define RAM "2048"
#define WinVerMajor "5"
#define WinVerMinor "1"
#define ServicePack "2"
;#define Components
;; Òîëüêî åñëè èñïîëüçóåòñÿ ìîäóëü FreeArc. Äëÿ ISDone ïðîïèñûâàòü ôàéëû â îäíîèì¸ííîì ìîäóëå. ;;
;#define ArcLocation "{src}\bin\data.bin"
#define SlidesCount "15"
;; Âûáîð ïîäêëþ÷àåìûõ ìîäóëåé. Åñëè èñïîëüçóåòñÿ 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}
AppVerName={#GameName}
AppPublisher=EA Games
AppPublisherURL=http://www.ea.com
AppVersion=1.13
AppSupportURL={app}\Support\EA Help\Ru\EA_HELP_RU.htm
AppUpdatesURL=http://www.ea.com
AppReadmeFile={group}\ReadMe.lnk
DefaultDirName={pf}\EA Games\Syndicate
DefaultGroupName=EA Games\Syndicate
OutputBaseFilename=Setup
DirExistsWarning=no
MinVersion=0,5.01
VersionInfoDescription={#GameName}
SetupIconFile=syn.ico
DiskSpanning=no
InternalCompressLevel=ultra64
Compression=lzma2/ultra64
DisableReadyPage=True
[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: "d:\Need for Speed The Run\Core\*"; DestDir: "{app}\Core"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\Support\*"; DestDir: "{app}\Support"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\Content_Rus\*"; DestDir: "{app}\Content_Rus"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\System\*"; DestDir: "{app}\System"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\*.cfg"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\*.dll"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
#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}\System\Win32_x86_Release\Syndicate.exe"; WorkingDir: {app}; Comment: "Çàïóñòèòü èãðó"; Check: NoIcons;
Name: "{group}\Îòêðûòü ôàéë ReadMe"; Filename: "{app}\Support\eula\ru_RU_eula.rtf"; WorkingDir: "{app}\Support\eula"; IconFilename: "{app}\1.ico"; Comment: "Ïðîñìîòðåòü ôàéë ReadMe.txt"; Check: NoIcons;
;Name: "{group}\Ïîèñê îáíîâëåíèé"; Filename: "{app}\Core\PatchProgress.exe"; WorkingDir: "{app}\Core"; IconFilename: "{app}\2.ico"; Comment: "Ïîèñê îáíîâëåíèé èãðû â èíòåðíåòå"; Check: NoIcons;
Name: "{group}\Òåõíè÷åñêàÿ ïîääåðæêà"; Filename: "{app}\Support\EA Help\Electronic_Arts_Technical_Support.htm"; WorkingDir: "{app}\Support\EA Help"; IconFilename: "{app}\3.ico"; Comment: "Ïðîñìîòðåòü ôàéë Òåõíè÷åñêîé ïîääåðæêè"; Check: NoIcons;
Name: "{group}\Âåá-ñàéò èçäàòåëÿ"; Filename: "{app}\publisher.url"; WorkingDir: "{app}"; IconFilename: "{app}\2.ico"; Comment: "Ïîñåòèòü Âåá-ñàéò èçäàòåëÿ"; Check: NoIcons;
;Name: "{group}\Ðåãèñòðàöèÿ"; Filename: "{app}\Support\EAregister.exe"; WorkingDir: "{app}\Support"; IconFilename: "{app}\4.ico"; Comment: "Çàðåãèñòðèðîâàòü èãðó"; Check: NoIcons;
Name: "{group}\{cm:Uninstall}"; Filename: "{uninstallexe}"; IconFilename: "{app}\5.ico"; Comment: "Óäàëèòü èãðó"; Check: NoIcons;
Name: "{userdesktop}\{#GameName}"; Filename: "{app}\System\Win32_x86_Release\Syndicate.exe"; WorkingDir: {app}; Check: Desktop;
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameName}"; Filename: "{app}\System\Win32_x86_Release\Syndicate.exe"; WorkingDir: {app}; Check: QuickLaunch;
[INI]
FileName: "{app}\publisher.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.ea.com";
FileName: "{app}\Update.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.ea.com";
[UninstallDelete]
Type: files; Name: "{app}\publisher.url"
Type: files; Name: "{app}\Update.url"
Type: filesandordirs; Name: {app}
[Run]
Filename: "{src}\DirectX\DXSETUP.exe"; WorkingDir: "{src}\DirectX"; Parameters: "/silent"; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress;
Filename: "{src}\DirectX\DXSETUP.exe"; WorkingDir: "{src}\DirectX"; Parameters: "/silent"; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress;
[Registry]
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: GDFBinary; ValueData: {app}\GDFBinary_ru_RU.dll; Flags: uninsdeletekey noerror
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: DisplayName; ValueData: Syndicate; Flags: uninsdeletekey noerror
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: Locale; ValueData: ru_RU; Flags: uninsdeletekey noerror
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey noerror
[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, RedistCheck, 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, RedistLabel, 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 Redist: Boolean;
begin
ProgressInfoLabel.Visible:=False;
FilenameLabel.Hide;
Result:= BtnGetChecked(RedistCheck);
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 DirectXProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:DirectXInstall}')
end;
procedure RedistClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF;
end;
procedure RedistLabelClick(Sender:TObject);
begin
BtnSetChecked(RedistCheck, not BtnGetChecked(RedistCheck));
RedistClick(RedistCheck);
end;
procedure RedistProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:RedistInstall}')
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 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(28),ScaleY(28),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}')+'\Syndicate') then
if MsgBox(ExpandConstant('{cm:DeleteSave}'), mbInformation, MB_YESNO) = idYes then
DelTree(ExpandConstant('{userdocs}')+'\Syndicate', 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],True);
BtnSetVisibility(LanguageButton[2],True);
BtnSetChecked(DesktopCheck,True);
SelectTasksLabel.Show;
DesktopLabel.Show;
QuickLaunchLabel.Show;
DirectXLabel.Show;
// LanguageLabel.Show;
// LngNameLbl.Show;
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
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]
добавить вот типа этого
[more=Скрипт2]if Redist.Checked then
begin
FilenameLabel.Caption:=ExpandConstant('{cm:RedistInstall}')
if isWin64 then
Exec(ExpandConstant('{src}\Redist\vcredist_x64.exe'), '', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, ResultCode)
else begin
Exec(ExpandConstant('{src}\Redist\vcredist_x86.exe'), '', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
end;[/more]
Заранее благодарен за ответ, если где этот вопрос обсуждался, подскажите где его искать.
В этот
[more=Скрипт1]#define GameID "{45C3A802-3D17-4F23-ADD1-B2D066CDC0CE}"
#define GameName "Syndicate"
#define GameVerName "Syndicate [v 1.0]"
#define NeedSize "10601"
#define TNeedSize "15601"
#define Processor "3000"
#define VideoCard "512"
#define RAM "2048"
#define WinVerMajor "5"
#define WinVerMinor "1"
#define ServicePack "2"
;#define Components
;; Òîëüêî åñëè èñïîëüçóåòñÿ ìîäóëü FreeArc. Äëÿ ISDone ïðîïèñûâàòü ôàéëû â îäíîèì¸ííîì ìîäóëå. ;;
;#define ArcLocation "{src}\bin\data.bin"
#define SlidesCount "15"
;; Âûáîð ïîäêëþ÷àåìûõ ìîäóëåé. Åñëè èñïîëüçóåòñÿ 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}
AppVerName={#GameName}
AppPublisher=EA Games
AppPublisherURL=http://www.ea.com
AppVersion=1.13
AppSupportURL={app}\Support\EA Help\Ru\EA_HELP_RU.htm
AppUpdatesURL=http://www.ea.com
AppReadmeFile={group}\ReadMe.lnk
DefaultDirName={pf}\EA Games\Syndicate
DefaultGroupName=EA Games\Syndicate
OutputBaseFilename=Setup
DirExistsWarning=no
MinVersion=0,5.01
VersionInfoDescription={#GameName}
SetupIconFile=syn.ico
DiskSpanning=no
InternalCompressLevel=ultra64
Compression=lzma2/ultra64
DisableReadyPage=True
[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: "d:\Need for Speed The Run\Core\*"; DestDir: "{app}\Core"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\Support\*"; DestDir: "{app}\Support"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\Content_Rus\*"; DestDir: "{app}\Content_Rus"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\System\*"; DestDir: "{app}\System"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\*.cfg"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "d:\Program Files (x86)\Syndicate\*.dll"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
#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}\System\Win32_x86_Release\Syndicate.exe"; WorkingDir: {app}; Comment: "Çàïóñòèòü èãðó"; Check: NoIcons;
Name: "{group}\Îòêðûòü ôàéë ReadMe"; Filename: "{app}\Support\eula\ru_RU_eula.rtf"; WorkingDir: "{app}\Support\eula"; IconFilename: "{app}\1.ico"; Comment: "Ïðîñìîòðåòü ôàéë ReadMe.txt"; Check: NoIcons;
;Name: "{group}\Ïîèñê îáíîâëåíèé"; Filename: "{app}\Core\PatchProgress.exe"; WorkingDir: "{app}\Core"; IconFilename: "{app}\2.ico"; Comment: "Ïîèñê îáíîâëåíèé èãðû â èíòåðíåòå"; Check: NoIcons;
Name: "{group}\Òåõíè÷åñêàÿ ïîääåðæêà"; Filename: "{app}\Support\EA Help\Electronic_Arts_Technical_Support.htm"; WorkingDir: "{app}\Support\EA Help"; IconFilename: "{app}\3.ico"; Comment: "Ïðîñìîòðåòü ôàéë Òåõíè÷åñêîé ïîääåðæêè"; Check: NoIcons;
Name: "{group}\Âåá-ñàéò èçäàòåëÿ"; Filename: "{app}\publisher.url"; WorkingDir: "{app}"; IconFilename: "{app}\2.ico"; Comment: "Ïîñåòèòü Âåá-ñàéò èçäàòåëÿ"; Check: NoIcons;
;Name: "{group}\Ðåãèñòðàöèÿ"; Filename: "{app}\Support\EAregister.exe"; WorkingDir: "{app}\Support"; IconFilename: "{app}\4.ico"; Comment: "Çàðåãèñòðèðîâàòü èãðó"; Check: NoIcons;
Name: "{group}\{cm:Uninstall}"; Filename: "{uninstallexe}"; IconFilename: "{app}\5.ico"; Comment: "Óäàëèòü èãðó"; Check: NoIcons;
Name: "{userdesktop}\{#GameName}"; Filename: "{app}\System\Win32_x86_Release\Syndicate.exe"; WorkingDir: {app}; Check: Desktop;
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameName}"; Filename: "{app}\System\Win32_x86_Release\Syndicate.exe"; WorkingDir: {app}; Check: QuickLaunch;
[INI]
FileName: "{app}\publisher.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.ea.com";
FileName: "{app}\Update.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.ea.com";
[UninstallDelete]
Type: files; Name: "{app}\publisher.url"
Type: files; Name: "{app}\Update.url"
Type: filesandordirs; Name: {app}
[Run]
Filename: "{src}\DirectX\DXSETUP.exe"; WorkingDir: "{src}\DirectX"; Parameters: "/silent"; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress;
Filename: "{src}\DirectX\DXSETUP.exe"; WorkingDir: "{src}\DirectX"; Parameters: "/silent"; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress;
[Registry]
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: GDFBinary; ValueData: {app}\GDFBinary_ru_RU.dll; Flags: uninsdeletekey noerror
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: DisplayName; ValueData: Syndicate; Flags: uninsdeletekey noerror
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: Locale; ValueData: ru_RU; Flags: uninsdeletekey noerror
Root: HKLM; SubKey: SOFTWARE\EA Games\Syndicate; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey noerror
[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, RedistCheck, 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, RedistLabel, 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 Redist: Boolean;
begin
ProgressInfoLabel.Visible:=False;
FilenameLabel.Hide;
Result:= BtnGetChecked(RedistCheck);
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 DirectXProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:DirectXInstall}')
end;
procedure RedistClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\Check.wav'), $0001);
if BtnGetChecked(hBtn) then RedistLabel.Font.Color:=$00FFFF else RedistLabel.Font.Color:=$FFFFFF;
end;
procedure RedistLabelClick(Sender:TObject);
begin
BtnSetChecked(RedistCheck, not BtnGetChecked(RedistCheck));
RedistClick(RedistCheck);
end;
procedure RedistProgress;
begin
StatusLabel.Caption:=ExpandConstant('{cm:RedistInstall}')
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 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(28),ScaleY(28),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}')+'\Syndicate') then
if MsgBox(ExpandConstant('{cm:DeleteSave}'), mbInformation, MB_YESNO) = idYes then
DelTree(ExpandConstant('{userdocs}')+'\Syndicate', 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],True);
BtnSetVisibility(LanguageButton[2],True);
BtnSetChecked(DesktopCheck,True);
SelectTasksLabel.Show;
DesktopLabel.Show;
QuickLaunchLabel.Show;
DirectXLabel.Show;
// LanguageLabel.Show;
// LngNameLbl.Show;
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
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]
добавить вот типа этого
[more=Скрипт2]if Redist.Checked then
begin
FilenameLabel.Caption:=ExpandConstant('{cm:RedistInstall}')
if isWin64 then
Exec(ExpandConstant('{src}\Redist\vcredist_x64.exe'), '', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, ResultCode)
else begin
Exec(ExpandConstant('{src}\Redist\vcredist_x86.exe'), '', ExpandConstant('{src}\Redist'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
end;[/more]
Заранее благодарен за ответ, если где этот вопрос обсуждался, подскажите где его искать.
jangle2
Цитата:
[Files]
Source: "MyProg.exe"; DestDir: "{app}"; BeforeInstall: HideInstallPath; AfterInstall: ShowInstallPath
[Code]
procedure HideInstallPath();
begin
WizardForm.FileNameLabel.Visible := False;
end;
//*******//
procedure ShowInstallPath();
begin
WizardForm.FileNameLabel.Visible := True;
end;
[/no]
Добавлено:
bioscorpius
Цитата:
Цитата:
как не показывать список копируемых файлов во время инсталляции-- как один из вариантов: [no]
[Files]
Source: "MyProg.exe"; DestDir: "{app}"; BeforeInstall: HideInstallPath; AfterInstall: ShowInstallPath
[Code]
procedure HideInstallPath();
begin
WizardForm.FileNameLabel.Visible := False;
end;
//*******//
procedure ShowInstallPath();
begin
WizardForm.FileNameLabel.Visible := True;
end;
[/no]
Добавлено:
bioscorpius
Цитата:
32 или 64 бита... подскажите где его искать-- Help - Pascal Scripting: Support Functions Reference - функция IsWin64. Пример
Genri - спасибо работает!
Еще интересует почему ISSkin не работает. Инсталляции из примеров ISSkin компилятся, но скинов на них нет
Еще интересует почему ISSkin не работает. Инсталляции из примеров ISSkin компилятся, но скинов на них нет
Подскажите пожалуйста, как сделать такое:
Если у меня получается вот так:
Скрипт:
[more]
;Название игры
#define appname "Trine"
;Версия игры
#define appver "1.0"
;Ваш ник
#define RePacker "AntonOVS"
;Exe
#define exe "trine.exe"
;Реестр
;#define Registry
;Сколько требуется для установки
#define NeedSize "5000000000"
#define NeedMem 512
#define SecondProgressBar
;#define Components
;#define records
#define facompress
;#define PrecompInside
;#define SrepInside
;#define MSCInside
;#define precomp "0.42"
;#define unrar
;#define XDelta
;#define PackZIP
[Setup]
AppId={{49BA2453-69E4-4985-A03A-CD7FC9A69E14}
AppName={#appname}
AppVerName={#appname} v{#appver} / RePack by {#RePacker}
DefaultDirName={pf}\{#appname}
DefaultGroupName=Games\{#appname}
AllowNoIcons=yes
OutputDir=.
OutputBaseFilename={#appname}
VersionInfoCopyright={#RePacker}
VersionInfoDescription={#appname} / RePack by {#RePacker}
WizardImageFile=Files\164x314.bmp
WizardSmallImageFile=Files\55x58.bmp
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
#ifdef Components
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: text; Description: Язык субтитров; Types: full; Flags: fixed
Name: text\rus; Description: Русский; Flags: exclusive;
Name: text\eng; Description: Английский; Flags: exclusive;
Name: voice; Description: Язык озвучки; Types: full; Flags: fixed
Name: voice\rus; Description: Русский; Flags: exclusive;
Name: voice\eng; Description: Английский; Flags: exclusive;
#endif
#ifdef Registry
[Registry]
Root: HKLM; Subkey: Software\ProFrager; ValueName: path; ValueType: String; ValueData: {app}; Flags: uninsdeletekey; Check: CheckError
Root: HKLM; Subkey: Software\ProFrager; ValueName: name; ValueType: String; ValueData: Data; Flags: uninsdeletekey; Check: CheckError
#endif
[Icons]
Name: "{group}\{#appname}{#appver}"; Filename: "{app}\{#exe}";
Name: "{group}\{cm:UninstallProgram,{#appname}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#appname}"; Filename: "{app}\{#exe}"; Tasks: desktopicon
[Tasks]
Name: desktopicon; Description: Добавить ярлык на рабочий стол; GroupDescription: Создание ярлыков:
Name: Redist; Description: Дополнительное программное обеспечение:
Name: DirectXCheck; Description: Обновить DirectX; Flags: unchecked
Name: PhysXCheck; Description: Установить Nvidia PhysX; Flags: unchecked
Name: VCCheck; Description: Установить Microsoft Visual C++ Redist; Flags: unchecked
[Run]
Filename: {src}\Soft\vcredist_x86.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x86...; Flags: skipifdoesntexist; Tasks: VCCheck; Check: CheckError and not IsWin64
Filename: {src}\Soft\vcredist_x64.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x64...; Flags: skipifdoesntexist; Tasks: VCCheck; Check: CheckError and IsWin64
Filename: {src}\Soft\PhysX.exe; Parameters: /qn; StatusMsg: Устанавливаем Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: PhysXCheck; Check: CheckError
Filename: {src}\Soft\DirectX\DXSETUP.exe; Parameters: /silent; StatusMsg: Обновляем DirectX...; Flags: skipifdoesntexist; Tasks: DirectXCheck; Check: CheckError
[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef MSCInside
Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.42"
Source: Include\precomp042.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
Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#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=Время установки:
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function 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, DeleteDiffFile: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;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
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
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
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 CurPageChanged(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}.
ExtractTemporaryFile('unarc.dll');
#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef MSCInside
ExtractTemporaryFile('CLS-MSC.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#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
#if precomp == "0.42"
ExtractTemporaryFile('precomp042.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
ExtractTemporaryFile('precomp042.exe');
#endif
#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
ExtractTemporaryFile('English.ini');
// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для 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
// ChangeLanguage('English');
if not SrepInit('',512,0) then break;
if not PrecompInit('',128,PCFVer) then break;
if not FileSearchInit(true) 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, 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" "{app}\"'), ExpandConstant('{tmp}'), '...',false) 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+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
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;
[/more]
Заранее благодарен.
Если у меня получается вот так:
Скрипт:
[more]
;Название игры
#define appname "Trine"
;Версия игры
#define appver "1.0"
;Ваш ник
#define RePacker "AntonOVS"
;Exe
#define exe "trine.exe"
;Реестр
;#define Registry
;Сколько требуется для установки
#define NeedSize "5000000000"
#define NeedMem 512
#define SecondProgressBar
;#define Components
;#define records
#define facompress
;#define PrecompInside
;#define SrepInside
;#define MSCInside
;#define precomp "0.42"
;#define unrar
;#define XDelta
;#define PackZIP
[Setup]
AppId={{49BA2453-69E4-4985-A03A-CD7FC9A69E14}
AppName={#appname}
AppVerName={#appname} v{#appver} / RePack by {#RePacker}
DefaultDirName={pf}\{#appname}
DefaultGroupName=Games\{#appname}
AllowNoIcons=yes
OutputDir=.
OutputBaseFilename={#appname}
VersionInfoCopyright={#RePacker}
VersionInfoDescription={#appname} / RePack by {#RePacker}
WizardImageFile=Files\164x314.bmp
WizardSmallImageFile=Files\55x58.bmp
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
#ifdef Components
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: text; Description: Язык субтитров; Types: full; Flags: fixed
Name: text\rus; Description: Русский; Flags: exclusive;
Name: text\eng; Description: Английский; Flags: exclusive;
Name: voice; Description: Язык озвучки; Types: full; Flags: fixed
Name: voice\rus; Description: Русский; Flags: exclusive;
Name: voice\eng; Description: Английский; Flags: exclusive;
#endif
#ifdef Registry
[Registry]
Root: HKLM; Subkey: Software\ProFrager; ValueName: path; ValueType: String; ValueData: {app}; Flags: uninsdeletekey; Check: CheckError
Root: HKLM; Subkey: Software\ProFrager; ValueName: name; ValueType: String; ValueData: Data; Flags: uninsdeletekey; Check: CheckError
#endif
[Icons]
Name: "{group}\{#appname}{#appver}"; Filename: "{app}\{#exe}";
Name: "{group}\{cm:UninstallProgram,{#appname}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#appname}"; Filename: "{app}\{#exe}"; Tasks: desktopicon
[Tasks]
Name: desktopicon; Description: Добавить ярлык на рабочий стол; GroupDescription: Создание ярлыков:
Name: Redist; Description: Дополнительное программное обеспечение:
Name: DirectXCheck; Description: Обновить DirectX; Flags: unchecked
Name: PhysXCheck; Description: Установить Nvidia PhysX; Flags: unchecked
Name: VCCheck; Description: Установить Microsoft Visual C++ Redist; Flags: unchecked
[Run]
Filename: {src}\Soft\vcredist_x86.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x86...; Flags: skipifdoesntexist; Tasks: VCCheck; Check: CheckError and not IsWin64
Filename: {src}\Soft\vcredist_x64.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x64...; Flags: skipifdoesntexist; Tasks: VCCheck; Check: CheckError and IsWin64
Filename: {src}\Soft\PhysX.exe; Parameters: /qn; StatusMsg: Устанавливаем Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: PhysXCheck; Check: CheckError
Filename: {src}\Soft\DirectX\DXSETUP.exe; Parameters: /silent; StatusMsg: Обновляем DirectX...; Flags: skipifdoesntexist; Tasks: DirectXCheck; Check: CheckError
[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef MSCInside
Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.42"
Source: Include\precomp042.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
Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#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=Время установки:
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function 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, DeleteDiffFile: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;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
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
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
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 CurPageChanged(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}.
ExtractTemporaryFile('unarc.dll');
#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef MSCInside
ExtractTemporaryFile('CLS-MSC.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#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
#if precomp == "0.42"
ExtractTemporaryFile('precomp042.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
ExtractTemporaryFile('precomp042.exe');
#endif
#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
ExtractTemporaryFile('English.ini');
// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для 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
// ChangeLanguage('English');
if not SrepInit('',512,0) then break;
if not PrecompInit('',128,PCFVer) then break;
if not FileSearchInit(true) 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, 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" "{app}\"'), ExpandConstant('{tmp}'), '...',false) 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+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
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;
[/more]
Заранее благодарен.
AntonOVS
procedure InitializeWizard;
begin
WizardForm.TasksList.TreeViewStyle := True;
end;
procedure InitializeWizard;
begin
WizardForm.TasksList.TreeViewStyle := True;
end;
AntonOVS
Код:
[Tasks]
Name: desktopicon; Description: Добавить ярлык на рабочий стол; GroupDescription: Создание ярлыков:
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
Код:
[Tasks]
Name: desktopicon; Description: Добавить ярлык на рабочий стол; GroupDescription: Создание ярлыков:
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
Nasgul1987
TaTTDoGG
Спасибо, но все так и осталось...
Мне важно чтобы появилась, эта линия:
http://i32.fastpic.ru/big/2012/0229/90/487bf06b6b1ca23964615902a65d7f90.jpg
TaTTDoGG
Спасибо, но все так и осталось...
Мне важно чтобы появилась, эта линия:
http://i32.fastpic.ru/big/2012/0229/90/487bf06b6b1ca23964615902a65d7f90.jpg
AntonOVS
Код: [Setup]
ShowTasksTreeLines=yes
Код: [Setup]
ShowTasksTreeLines=yes
nik1967
помогли, благодарен однако.
помогли, благодарен однако.
Помогите плиз.
На странице выбора пути установки, когда пользователь нажимает кнопку "Обзор..." и выбирает папку (нажимает ОК в диалоге Обзор папок), мне надо (находясь на этой странице) проанализировать, какую папку он выбрал.
В каком месте отловить событие нажатия кнопки ОК в диалоге Обзор папок?
На странице выбора пути установки, когда пользователь нажимает кнопку "Обзор..." и выбирает папку (нажимает ОК в диалоге Обзор папок), мне надо (находясь на этой странице) проанализировать, какую папку он выбрал.
В каком месте отловить событие нажатия кнопки ОК в диалоге Обзор папок?
Alexan
ты лучше скажи что ты хочешь сделать
зачем оно тебе?
ты лучше скажи что ты хочешь сделать
зачем оно тебе?
Как получить SID?
Эти самые циферки S-1-5-21-18180607-2342071299-161221411-1008 ....
Эти самые циферки S-1-5-21-18180607-2342071299-161221411-1008 ....
Нужна помощь. Кто может составить инсталятор для игры, со всеми плюшками, сам делаю, но все же не то что хотелось бы. В долгу не останусь.
Добавлено:
Основа скрипта в принципи есть, нужно только несколько функций прилепить.
Добавлено:
Основа скрипта в принципи есть, нужно только несколько функций прилепить.
Nasgul1987
Цитата:
Я же написал - получить путь установки и если он меня НЕ устраивает, то выдать сообщение пользователю и изменить этот путь на свой.
Цитата:
ты лучше скажи что ты хочешь сделать
зачем оно тебе?
Я же написал - получить путь установки и если он меня НЕ устраивает, то выдать сообщение пользователю и изменить этот путь на свой.
Alexan
посмотри примеры запрета установки в папку виндовса
http://forum.ru-board.com/topic.cgi?forum=5&topic=30413&start=2562&limit=1&m=8#1
и запрет на русские символы в пути
http://forum.ru-board.com/topic.cgi?forum=5&topic=35848&start=1484&limit=1&m=2#1
скажите пожалуйста у кого есть библиотека распаковки WinRar и Zip с отображение прогресбара
посмотри примеры запрета установки в папку виндовса
http://forum.ru-board.com/topic.cgi?forum=5&topic=30413&start=2562&limit=1&m=8#1
и запрет на русские символы в пути
http://forum.ru-board.com/topic.cgi?forum=5&topic=35848&start=1484&limit=1&m=2#1
скажите пожалуйста у кого есть библиотека распаковки WinRar и Zip с отображение прогресбара
Nasgul1987
Вы шапку внимательно изучили, я так понимаю что нет. Все есть в шапке.
Вы шапку внимательно изучили, я так понимаю что нет. Все есть в шапке.
Nasgul1987
Цитата:
ISDone отменили?
Цитата:
скажите пожалуйста у кого есть библиотека распаковки WinRar и Zip с отображение прогресбара
ISDone отменили?
Нужна помощь..
Никак не могу разобраться в компонентах ISDone, справку перечитал, но ответа на свой вопрос так и не нашел. Ситуация такова: при установке появляется запрос компонента (я сделал один "HR textures") но возле него я не ставлю галочку (для проверки). При инсталляции все прекрасно распаковывается, НО! Зайдя в папку игры я вижу тот самый компонент, который, как уже писал выше, я не выбирал. Помогите пожалуйста это исправить, вот скрипт:
[more]
;Название игры
#define appname "The Elder Scrolls V. Skyrim"
;Версия игры
#define appver "1.4.27.0.4"
;Ваш ник
#define RePacker "AntonOVS"
;Exe
#define exe "SkyrimLauncher.exe"
;Реестр
;#define Registry
;Сколько требуется для установки
#define NeedSize "5000000000"
#define NeedMem 512
#define SecondProgressBar
#define Components
;#define records
#define facompress
;#define PrecompInside
;#define SrepInside
;#define MSCInside
;#define precomp "0.42"
;#define unrar
;#define XDelta
;#define PackZIP
[Setup]
AppId={{49BA2453-69E4-4985-A03A-CD7FC9A69E14}
AppName={#appname}
AppVerName={#appname} v{#appver}
DefaultDirName={pf}\{#appname}
DefaultGroupName=Games\{#appname}
AllowNoIcons=yes
OutputDir=.
ShowTasksTreeLines=yes
OutputBaseFilename={#appname}
VersionInfoCopyright={#RePacker}
VersionInfoDescription={#appname} / RePack by {#RePacker}
WizardImageFile=Files\164x314.bmp
WizardSmallImageFile=Files\55x58.bmp
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
#ifdef Components
[Types]
Name: full; Description: HR textures; Flags: iscustom
[Components]
Name: textures; Description: HR textures; Types: full; ExtraDiskSpaceRequired: 100000000
#endif
#ifdef Registry
[Registry]
Root: HKLM; Subkey: Software\ProFrager; ValueName: path; ValueType: String; ValueData: {app}; Flags: uninsdeletekey; Check: CheckError
Root: HKLM; Subkey: Software\ProFrager; ValueName: name; ValueType: String; ValueData: Data; Flags: uninsdeletekey; Check: CheckError
#endif
[Icons]
Name: "{group}\{#appname}{#appver}"; Filename: "{app}\{#exe}";
Name: "{group}\{cm:UninstallProgram,{#appname}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#appname}"; Filename: "{app}\{#exe}"; Tasks: desktopicon
[Tasks]
Name: desktopicon; Description: Добавить ярлык на рабочий стол; GroupDescription: Создание ярлыков:
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}\Soft\vcredist_x86.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x86...; Flags: skipifdoesntexist; Tasks: Redist\VCCheck; Check: CheckError and not IsWin64
Filename: {src}\Soft\vcredist_x64.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x64...; Flags: skipifdoesntexist; Tasks: Redist\VCCheck; Check: CheckError and IsWin64
Filename: {src}\Soft\PhysX.exe; Parameters: /qn; StatusMsg: Устанавливаем Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: Redist\PhysXCheck; Check: CheckError
Filename: {src}\Soft\DXSETUP.exe; Parameters: /silent; StatusMsg: Обновляем DirectX...; Flags: skipifdoesntexist; Tasks: Redist\DirectXCheck; Check: CheckError
[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef MSCInside
Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.42"
Source: Include\precomp042.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
Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#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=Время установки:
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function 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, DeleteDiffFile: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;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
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
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
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 CurPageChanged(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}.
ExtractTemporaryFile('unarc.dll');
#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef MSCInside
ExtractTemporaryFile('CLS-MSC.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#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
#if precomp == "0.42"
ExtractTemporaryFile('precomp042.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
ExtractTemporaryFile('precomp042.exe');
#endif
#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
ExtractTemporaryFile('English.ini');
// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll
// максимум 96 компонентов.
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
if IsComponentSelected('textures') then Comps1:=Comps1+TmpValue; //компонент 1
// .....
// см. справку
#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
// ChangeLanguage('English');
if not FileSearchInit(false) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\skyrim.arc'), ExpandConstant('{app}\'), '', false, '', '', '', notPCFonFLY) then break;
if not ISArcExtract ( 1, 0, ExpandConstant('{src}\textures.arc'), ExpandConstant('{app}\tesxtures\'), '', false, '', '', '', notPCFonFLY) 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, 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" "{app}\"'), ExpandConstant('{tmp}'), '...',false) 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+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
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 InitializeWizard();
begin
WizardForm.Position:=poScreenCenter;
end;
[/more]
И еще один вопрос: как сделать так, чтобы при отсутствии файла компонента, страница с выбором компонентов в инсталляторе не появлялась ? То есть если бы отсутствовал, архив с компонентом, то этой бы страницы:
http://i29.fastpic.ru/big/2012/0302/d5/dab0dee0db4eaeba7f88eb8ba2af97d5.jpg
не было. Заранее спасибо...
Никак не могу разобраться в компонентах ISDone, справку перечитал, но ответа на свой вопрос так и не нашел. Ситуация такова: при установке появляется запрос компонента (я сделал один "HR textures") но возле него я не ставлю галочку (для проверки). При инсталляции все прекрасно распаковывается, НО! Зайдя в папку игры я вижу тот самый компонент, который, как уже писал выше, я не выбирал. Помогите пожалуйста это исправить, вот скрипт:
[more]
;Название игры
#define appname "The Elder Scrolls V. Skyrim"
;Версия игры
#define appver "1.4.27.0.4"
;Ваш ник
#define RePacker "AntonOVS"
;Exe
#define exe "SkyrimLauncher.exe"
;Реестр
;#define Registry
;Сколько требуется для установки
#define NeedSize "5000000000"
#define NeedMem 512
#define SecondProgressBar
#define Components
;#define records
#define facompress
;#define PrecompInside
;#define SrepInside
;#define MSCInside
;#define precomp "0.42"
;#define unrar
;#define XDelta
;#define PackZIP
[Setup]
AppId={{49BA2453-69E4-4985-A03A-CD7FC9A69E14}
AppName={#appname}
AppVerName={#appname} v{#appver}
DefaultDirName={pf}\{#appname}
DefaultGroupName=Games\{#appname}
AllowNoIcons=yes
OutputDir=.
ShowTasksTreeLines=yes
OutputBaseFilename={#appname}
VersionInfoCopyright={#RePacker}
VersionInfoDescription={#appname} / RePack by {#RePacker}
WizardImageFile=Files\164x314.bmp
WizardSmallImageFile=Files\55x58.bmp
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
#ifdef Components
[Types]
Name: full; Description: HR textures; Flags: iscustom
[Components]
Name: textures; Description: HR textures; Types: full; ExtraDiskSpaceRequired: 100000000
#endif
#ifdef Registry
[Registry]
Root: HKLM; Subkey: Software\ProFrager; ValueName: path; ValueType: String; ValueData: {app}; Flags: uninsdeletekey; Check: CheckError
Root: HKLM; Subkey: Software\ProFrager; ValueName: name; ValueType: String; ValueData: Data; Flags: uninsdeletekey; Check: CheckError
#endif
[Icons]
Name: "{group}\{#appname}{#appver}"; Filename: "{app}\{#exe}";
Name: "{group}\{cm:UninstallProgram,{#appname}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#appname}"; Filename: "{app}\{#exe}"; Tasks: desktopicon
[Tasks]
Name: desktopicon; Description: Добавить ярлык на рабочий стол; GroupDescription: Создание ярлыков:
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}\Soft\vcredist_x86.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x86...; Flags: skipifdoesntexist; Tasks: Redist\VCCheck; Check: CheckError and not IsWin64
Filename: {src}\Soft\vcredist_x64.exe; Parameters: /q; StatusMsg: Устанавливаем Microsoft Visual C++ Redist x64...; Flags: skipifdoesntexist; Tasks: Redist\VCCheck; Check: CheckError and IsWin64
Filename: {src}\Soft\PhysX.exe; Parameters: /qn; StatusMsg: Устанавливаем Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: Redist\PhysXCheck; Check: CheckError
Filename: {src}\Soft\DXSETUP.exe; Parameters: /silent; StatusMsg: Обновляем DirectX...; Flags: skipifdoesntexist; Tasks: Redist\DirectXCheck; Check: CheckError
[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef MSCInside
Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.42"
Source: Include\precomp042.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
Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#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=Время установки:
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code]
const
PCFonFLY=true;
notPCFonFLY=false;
var
LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
LabelPct2: TLabel;
ISDoneProgressBar2:TNewProgressBar;
#endif
MyCancelButton: TButton;
ISDoneCancel:integer;
ISDoneError:boolean;
PCFVer:double;
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function 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, DeleteDiffFile: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;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
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
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
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 CurPageChanged(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}.
ExtractTemporaryFile('unarc.dll');
#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef MSCInside
ExtractTemporaryFile('CLS-MSC.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#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
#if precomp == "0.42"
ExtractTemporaryFile('precomp042.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
ExtractTemporaryFile('precomp042.exe');
#endif
#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
ExtractTemporaryFile('English.ini');
// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll
// максимум 96 компонентов.
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
if IsComponentSelected('textures') then Comps1:=Comps1+TmpValue; //компонент 1
// .....
// см. справку
#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
// ChangeLanguage('English');
if not FileSearchInit(false) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\skyrim.arc'), ExpandConstant('{app}\'), '', false, '', '', '', notPCFonFLY) then break;
if not ISArcExtract ( 1, 0, ExpandConstant('{src}\textures.arc'), ExpandConstant('{app}\tesxtures\'), '', false, '', '', '', notPCFonFLY) 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, 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" "{app}\"'), ExpandConstant('{tmp}'), '...',false) 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+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
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 InitializeWizard();
begin
WizardForm.Position:=poScreenCenter;
end;
[/more]
И еще один вопрос: как сделать так, чтобы при отсутствии файла компонента, страница с выбором компонентов в инсталляторе не появлялась ? То есть если бы отсутствовал, архив с компонентом, то этой бы страницы:
http://i29.fastpic.ru/big/2012/0302/d5/dab0dee0db4eaeba7f88eb8ba2af97d5.jpg
не было. Заранее спасибо...
R3Pa4eK
может проще есть?
типа модуля фриарка
раньше кажись была unrar.dll,
вот её бы с примером....
может проще есть?
типа модуля фриарка
раньше кажись была unrar.dll,
вот её бы с примером....
Nasgul1987
Цитата:
Это не подходит. Там происходит проверка при переходе на следующую страницу (NextButtonClick), а я бы хотел делать проверку в момент когда пользователь сделал выбор папки по кнопке "Обзор...".
Цитата:
посмотри примеры запрета установки в папку виндовса
http://forum.ru-board.com/topic.cgi?forum=5&topic=30413&start=2562&limit=1&m=8#1
и запрет на русские символы в пути
http://forum.ru-board.com/topic.cgi?forum=5&topic=35848&start=1484&limit=1&m=2#1
Это не подходит. Там происходит проверка при переходе на следующую страницу (NextButtonClick), а я бы хотел делать проверку в момент когда пользователь сделал выбор папки по кнопке "Обзор...".
Страницы: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
Предыдущая тема: поиск
Форум Ru-Board.club — поднят 15-09-2016 числа. Цель - сохранить наследие старого Ru-Board, истории становления российского интернета. Сделано для людей.