Войти

Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 3]


Страниц : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 [99] 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188

No4noylis
20-06-2011, 16:13
LinkOFF спасибо большое, но я так уже делал, все одно и тоже, доходит до установки directx, инсталлятор зависает секунд на 40 и потом переходит на следующую страницу!!! помоги, плиз!!((((((

R.i.m.s.k.y.
20-06-2011, 16:22
блин как же народ обленился, ведь такие простые вопросы в шапке - в примерах скриптов, примерах инсталлеров игр, народ ленится даже тупо скачать и посмотреть! ведь в шапке даже учебник переведенный лежит! :read:

а сердобольные камрады это рас***во поощряют!

я вообще в инно с нуля сделал скрипт мастером, покурил его, потом из шапки скачал коллекцию скриптов, покурил их, что-то уже начало получаться копи-пастой, что-то само-собой
ну а когда не получалось - спрашивал уже тут, вопросы задавал предметные а не общие "у меня не работает срочно F1"

ну ведь какое-то самообразование должно быть?

тот же дирекс спрашивают каждые 2-3 страницы

insombia
20-06-2011, 17:11
LinkOFF http://rghost.ru/11721671

No4noylis так и надо ведь установка direct'a идет в тихом режиме вот тебе и кажеться что инсталятор завис

serhio
20-06-2011, 18:21
Добрый день всем! Ребят подскажите кто в курсе что писать в батнике.
См. картинку.

R.i.m.s.k.y.
20-06-2011, 18:37
Добрый день всем! Ребят подскажите кто в курсе что писать в батнике. »
а что он должен сделать?

serhio
20-06-2011, 18:44
R.i.m.s.k.y., насколько я знаю, то сжать какой либо фаил!

R.i.m.s.k.y.
20-06-2011, 18:47
насколько я знаю, то сжать какой либо фаил »
каким архиватором? где лежат файлы и сам архиватор? нельзя ли этот файл просмотреть и содержимое сюда положить?

serhio
20-06-2011, 19:01
каким архиватором? где лежат файлы и сам архиватор? нельзя ли этот файл просмотреть и содержимое сюда положить? »
FreeArc архив. Файл(ы) кладутся в папку rep. Rep типо srep'а, вот только что в батнике прописывать незнаю.

R.i.m.s.k.y.
20-06-2011, 19:07
freearc я тоже не знаю

leshcat
20-06-2011, 19:26
Помогите пожалуйста объединить код.

Первая часть из гейм скриптора.


[Setup]
SourceDir=.
OutputDir=Setup
AppName=FEAR2
AppVerName=FEAR2
AppVersion=FEAR2
DefaultDirName={pf}\FEAR2
DefaultGroupName=FEAR2
AllowNoIcons=yes
OutputBaseFilename=setup
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/normal
DiskSpanning=yes
DiskSliceSize=2100000000
SlicesPerDisk=1

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

[Files]
Source: "C:\Users\admin\Desktop\Project2\parts\Slides\slide1.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\admin\Desktop\Project2\parts\Slides\slide2.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\admin\Desktop\Project2\parts\Slides\slide3.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\admin\Desktop\Project2\parts\Branding_map.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "isgsg.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression

Source: "C:\Games\FEAR2\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension

[Icons]
Name: "{group}\{cm:UninstallProgram,FEAR2}"; Filename: "{uninstallexe}"

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

[_Code]
const
Indent=25;

function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boo lean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload';
procedure ssAddImage(FileName:PChar); external 'ssAddImage@files:isgsg.dll stdcall delayload';
procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload';
procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload';
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';

procedure InitializeWizard;
begin
ExtractTemporaryFile('FEAR.jpg');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\FEAR.jpg',1000,3000,1000,0,255,False,$F FFFFF,10);
ssInitialize(GetWindowLong(MainForm.Handle,-8),10,False,1,$FF000000);
ExtractTemporaryFile('FEAR.jpg');
ssSetBkgImage(ExpandConstant('{tmp}')+'\FEAR.jpg');
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssInstall then begin
ExtractTemporaryFile('slide1.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\slide1.jpg');
ExtractTemporaryFile('slide2.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\slide2.jpg');
ExtractTemporaryFile('slide3.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\slide3.jpg');
ssStartShow;
end;
if CurStep=ssPostInstall then ssStopShow;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpInstalling then begin
WizardForm.MainPanel.Visible:=False;
WizardForm.Bevel1.Visible:=False;
WizardForm.Width:=ScaleX(395);
WizardForm.Height:=ScaleY(142);
WizardForm.Left:=ScaleX(GetSystemMetrics(0)-WizardForm.Width-Indent);
WizardForm.Top:=ScaleY(GetSystemMetrics(1)-WizardForm.Height-Indent);
WizardForm.InnerNotebook.Left:=ScaleX(10);
WizardForm.InnerNotebook.Top:=ScaleY(10);
WizardForm.InnerNotebook.Width:=ScaleX(370);
WizardForm.StatusLabel.Left:=ScaleX(0);
WizardForm.StatusLabel.Top:=ScaleY(0);
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.FileNameLabel.Left:=ScaleX(0);
WizardForm.FileNameLabel.Top:=ScaleY(20);
WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.ProgressGauge.Top:=ScaleY(40);
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
WizardForm.CancelButton.Left:=ScaleX(154);
WizardForm.CancelButton.Top:=ScaleY(80);
end;
if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then begin
if WizardForm.Width<>502 then begin
WizardForm.Visible:=False;
WizardForm.Width:=ScaleX(502);
WizardForm.Height:=ScaleY(392);
WizardForm.Left:=(GetSystemMetrics(0)-WizardForm.Width) div 2;
WizardForm.Top:=(GetSystemMetrics(1)-WizardForm.Height) div 2;
WizardForm.MainPanel.Visible:=True;
WizardForm.Bevel1.Visible:=True;
WizardForm.InnerNotebook.Left:=ScaleX(40);
WizardForm.InnerNotebook.Top:=ScaleY(72);
WizardForm.InnerNotebook.Width:=ScaleX(417);
WizardForm.Visible:=True;
end;
end;
end;

procedure DeinitializeSetup;
begin
ssDeInitialize;
end;


Вторая часть взята из архива скриптов.

Отображает проценты и байты прогрессбара:


[Setup]
AppName=AppName
AppVerName=AppVerName
DefaultDirName={pf}\My Program

[Files]
Source: Files\*; DestDir: {app}; AfterInstall: Progress()

[_Code]
var
ProgressLabel, SizeLabel: TLabel;

procedure Progress();
var
size: integer;

begin
with WizardForm.ProgressGauge do
ProgressLabel.Caption:= IntToStr((Position-Min)/((Max - Min)/100)) + '%';
FileSize(ExpandConstant(CurrentFileName), size);
SizeLabel.Caption:= IntToStr(size) + ' bytes';
end;

procedure InitializeWizard();
begin
ProgressLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
ProgressLabel.Top := Top + Height + ScaleY(8);
ProgressLabel.Left:= Left + Width/2 - ScaleX(8);
ProgressLabel.AutoSize := True;
ProgressLabel.Parent := WizardForm.InstallingPage;
end;

SizeLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
SizeLabel.Top := Top + Height + ScaleY(8);
SizeLabel.Left:= Left;
SizeLabel.AutoSize := True;
SizeLabel.Parent := WizardForm.InstallingPage;
end;
end;


Так вот, было бы здорово получить у гейм прогрессбара % и время.

Dark_Delphin
20-06-2011, 20:57
Всем добрый день!
Я вот разделил игру на два диска:
DiskSpanning=true
SlicesPerDisk=2
DiskSliceSize=2100000000

И когда я запускаю Setup.exe , то сразу же требует второй диск.
Как это исправить?

Gnom_aka_Lexander
20-06-2011, 21:10
ntrx, SlicesPerDisk - количество частей на диск, а не количество дисков. Инно не может разбить на какоето количество дисков, потому, что только господь бог ведает, какой объем получится у тебя после компиляции. что еще ты сделал, кроме добавления строчек? как записал на диск получившиеся бин-файлы?

insombia
20-06-2011, 22:11
leshcat смотри это делать легко я сам недавно узнал вобщем

[Code]
const
Indent=25;

function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boo lean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload';
procedure ssAddImage(FileName:PChar); external 'ssAddImage@files:isgsg.dll stdcall delayload';
procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload';
procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload';
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';

procedure InitializeWizard1();
begin
ExtractTemporaryFile('FEAR.jpg');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\FEAR.jpg',1000,3000,1000,0,255,False,$F FFFFF,10);
ssInitialize(GetWindowLong(MainForm.Handle,-8),10,False,1,$FF000000);
ExtractTemporaryFile('FEAR.jpg');
ssSetBkgImage(ExpandConstant('{tmp}')+'\FEAR.jpg');
end;

procedure CurPageChanged(CurStep: TSetupStep);
begin
if CurStep=ssInstall then begin
ExtractTemporaryFile('slide1.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\slide1.jpg');
ExtractTemporaryFile('slide2.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\slide2.jpg');
ExtractTemporaryFile('slide3.jpg');
ssAddImage(ExpandConstant('{tmp}')+'\slide3.jpg');
ssStartShow;
end;
if CurStep=ssPostInstall then ssStopShow;
end;

procedure CurPageChanged1(CurPageID: Integer);
begin
if CurPageID=wpInstalling then begin
WizardForm.MainPanel.Visible:=False;
WizardForm.Bevel1.Visible:=False;
WizardForm.Width:=ScaleX(395);
WizardForm.Height:=ScaleY(142);
WizardForm.Left:=ScaleX(GetSystemMetrics(0)-WizardForm.Width-Indent);
WizardForm.Top:=ScaleY(GetSystemMetrics(1)-WizardForm.Height-Indent);
WizardForm.InnerNotebook.Left:=ScaleX(10);
WizardForm.InnerNotebook.Top:=ScaleY(10);
WizardForm.InnerNotebook.Width:=ScaleX(370);
WizardForm.StatusLabel.Left:=ScaleX(0);
WizardForm.StatusLabel.Top:=ScaleY(0);
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.FileNameLabel.Left:=ScaleX(0);
WizardForm.FileNameLabel.Top:=ScaleY(20);
WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.ProgressGauge.Top:=ScaleY(40);
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
WizardForm.CancelButton.Left:=ScaleX(154);
WizardForm.CancelButton.Top:=ScaleY(80);
end;
if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then begin
if WizardForm.Width<>502 then begin
WizardForm.Visible:=False;
WizardForm.Width:=ScaleX(502);
WizardForm.Height:=ScaleY(392);
WizardForm.Left:=(GetSystemMetrics(0)-WizardForm.Width) div 2;
WizardForm.Top:=(GetSystemMetrics(1)-WizardForm.Height) div 2;
WizardForm.MainPanel.Visible:=True;
WizardForm.Bevel1.Visible:=True;
WizardForm.InnerNotebook.Left:=ScaleX(40);
WizardForm.InnerNotebook.Top:=ScaleY(72);
WizardForm.InnerNotebook.Width:=ScaleX(417);
WizardForm.Visible:=True;
end;
end;
end;

procedure DeinitializeSetup;
begin
ssDeInitialize;
end;
////////////////////////////////////////////////////////
var
ProgressLabel, SizeLabel: TLabel;

procedure Progress();
var
size: integer;

begin
with WizardForm.ProgressGauge do
ProgressLabel.Caption:= IntToStr((Position-Min)/((Max - Min)/100)) + '%';
FileSize(ExpandConstant(CurrentFileName), size);
SizeLabel.Caption:= IntToStr(size) + ' bytes';
end;

procedure InitializeWizard2();
begin
ProgressLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
ProgressLabel.Top := Top + Height + ScaleY(8);
ProgressLabel.Left:= Left + Width/2 - ScaleX(8);
ProgressLabel.AutoSize := True;
ProgressLabel.Parent := WizardForm.InstallingPage;
end;

SizeLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
SizeLabel.Top := Top + Height + ScaleY(8);
SizeLabel.Left:= Left;
SizeLabel.AutoSize := True;
SizeLabel.Parent := WizardForm.InstallingPage;
end;
end;
///////////////////////////////////////////////////
procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
end;

Procedure CurPageChanged(CurPageID: Integer);
Begin
CurPageChanged1(CurPageID);
end;

Gnom_aka_Lexander
21-06-2011, 00:30
Neutron, собственно, даже этот список не обязателен, просто любую процедуру(абсолютно любую) можно неоднократно дублировать, главное давать им разные названия и под самой нижней собрать их все в одной с оригинальным названием, каковая и отработает, учтя все остальные, которые будт в ней указаны. функции дублировать нельзя.

nik1967
21-06-2011, 09:21
ведь в шапке даже учебник переведенный лежит! »
Эээ... Блин, даже в 4 глаза не вижу :cool: Тыкни мне, пожалуйста!

R.i.m.s.k.y.
21-06-2011, 09:39
в шапке "Русская справка" http://sabbathblacklab.narod.ru/rus2/is5hlp.rar
открываешь и читаешь по порядку

вот еще
Инструкция по Inno Setup - Инструкция по Inno Setup в формате PDF для начинающих от sjwrec. http://ifolder.ru/20364329

nik1967
21-06-2011, 10:03
R.i.m.s.k.y., а, это всё есть. Я то думал учебник » настоящий.

R.i.m.s.k.y.
21-06-2011, 10:25
а, это всё есть. »
мне и это не понадобилось, самодуром допер до простых вещей

nik1967
21-06-2011, 11:30
мне и это не понадобилось, самодуром допер до простых вещей »
Ага, аналогично. Но хелп тоже здорово помогает. Пардон за :off: Заканчиваем флуд :flood:

El Sanchez
21-06-2011, 13:33
Доброго времени суток!
1) Подскажите, как сделать такое?
Скрин »
Neutron, только инсталлер. Требует китайского компилятора. Деинсталлятор мне банально лень рисовать :).


;5.4.2
#ifndef IS_ENHANCED
#error Enhanced edition of Inno Setup (restools) is required to compile this script
#endif

#define AppName "Test"
#define AppVerName "Test"


[Setup]
AppName={#AppName}
AppVerName={#AppVerName}
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}
OutputBaseFilename=test
Compression=lzma
LicenseFile={app}\test.txt
InfoBeforeFile={app}\test.txt
InfoAfterFile={app}\test.txt
AllowNoIcons=yes
AlwaysRestart=yes
BitmapResource=bgnd:embedded\background.bmp|bar:embedded\bar.bmp|pic1:embedded\pic-1.bmp|pic2:embedded\pic-2.bmp|pic3:embedded\pic-3.bmp|pic4:embedded\pic-4.bmp

[Files]
Source: {app}\test.txt; DestDir: {app}

[Icons]
Name: {group}\Test; Filename: {app}\test.txt

[Components]
Name: a; Description: a; Types: test custom
Name: b; Description: b; Types: custom

[Types]
Name: custom; Description: custom; Flags: iscustom
Name: test; Description: test

[Tasks]
Name: test; Description: test; GroupDescription: test

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

[Code]
var
x, y, y1: Integer;
i: Byte;

procedure InitializeWizard();
begin
with WizardForm do
begin
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WizardBitmapImage.Hide;
WizardBitmapImage2.Hide;
WizardSmallBitmapImage.Hide;
MainPanel.Hide;
Bevel1.Hide;
WelcomePage.Hide;
LicenseLabel1.Hide;
LicenseAcceptedRadio.Hide;
LicenseNotAcceptedRadio.Hide;

ClientHeight := ScaleY(480);
ClientWidth := ScaleX(640);

//WizardBitmapImage
with TBitmapImage.Create(WizardForm) do
begin
Parent := WizardForm;
Bitmap.LoadFromResourceName(HInstance, '_IS_BGND');
Align := alClient;
SendToBack;
end;

//WizardSmallBitmapImage
with TBitmapImage.Create(WizardForm) do
begin
Parent := WizardForm;
Bitmap.LoadFromResourceName(HInstance, '_IS_BAR');
Width := Bitmap.Width;
Height := Bitmap.Height;
Name := 'Bar';
end;

//PageNameLabel
with TLabel.Create(WizardForm) do
begin
Parent := WizardForm;
Font.Size := TBitmapImage(WizardForm.FindComponent('Bar')).Height div 2 - TBitmapImage(WizardForm.FindComponent('Bar')).Height div 20;
Font.Name := 'Arial';
Font.Color := clWhite;
Left := TBitmapImage(WizardForm.FindComponent('Bar')).Width div 30;
Top := (TBitmapImage(WizardForm.FindComponent('Bar')).Height - Height) div 2;
Transparent := True;
Caption := ExpandConstant('{#AppVerName}');
end;

//Buttons
NextButton.Left := ClientWidth - NextButton.Width - NextButton.Width div 4;
NextButton.Top := ClientHeight - NextButton.Height - NextButton.Height div 4;
BackButton.Left := NextButton.Left - NextButton.Width - NextButton.Width div 8;
BackButton.Top := NextButton.Top;
CancelButton.Left := BackButton.Left - BackButton.Width - BackButton.Width div 8;
CancelButton.Top := NextButton.Top;

//Bevel
with TBevel.Create(WizardForm) do
begin
Parent := WizardForm;
SetBounds(Bevel1.Left, TBitmapImage(WizardForm.FindComponent('Bar')).Height, WizardForm.ClientWidth, Bevel1.Height);
Shape := bsFrame;
Style := Bevel1.Style;
end;
Bevel.Top := NextButton.Top - NextButton.Height div 4;
Bevel.Width := ClientWidth;
Bevel.Shape := bsFrame;
BeveledLabel.Top := Bevel.Top - BeveledLabel.Height div 2;

//Notebook
x := InnerNotebook.Width;
y := InnerNotebook.Height - ClientHeight + Bevel.Top;
y1 := Bevel.Top - TBitmapImage(WizardForm.FindComponent('Bar')).Height - TBitmapImage(WizardForm.FindComponent('Bar')).Height div 4;
InnerPage.Color := clWhite;
InnerNotebook.ScaleBy(x - x div 15, x);

//Pics
with TBitmapImage.Create(WizardForm) do
begin
Parent := WizardForm;
Bitmap.LoadFromResourceName(HInstance, '_IS_PIC1');
SetBounds(WizardForm.ClientWidth div 3, TBitmapImage(WizardForm.FindComponent('Bar')).Height + TBitmapImage(WizardForm.FindComponent('Bar')).Height div 6, x, Bitmap.Height);
Name := 'Bmp';
end;

//ListBox
for i := 1 to 14 do
begin
with TLabel.Create(WizardForm) do
begin
Parent := WizardForm;
AutoSize := False;
WordWrap := True;
Height := 26;
Left := WizardForm.ClientWidth div 50;
Top := (i-1)*((Bevel.Top - Bevel1.Top - WizardForm.ClientHeight div 25)/13) + Bevel1.Top + WizardForm.ClientHeight div 75;
Width := WizardForm.ClientWidth div 3 - WizardForm.ClientWidth div 25;
case i of
1: Caption := 'Добро пожаловать!';
2: Caption := SetupMessage(msgWizardLicense);
3: Caption := SetupMessage(msgWizardPassword);
4: Caption := SetupMessage(msgWizardInfoBefore)
5: Caption := SetupMessage(msgWizardUserInfo)
6: Caption := SetupMessage(msgWizardSelectDir)
7: Caption := SetupMessage(msgWizardSelectComponents)
8: Caption := SetupMessage(msgWizardSelectProgramGroup)
9: Caption := SetupMessage(msgWizardSelectTasks)
10: Caption := SetupMessage(msgWizardReady)
11: Caption := SetupMessage(msgWizardPreparing)
12: Caption := SetupMessage(msgWizardUninstalling)
13: Caption := SetupMessage(msgWizardInfoAfter)
14: Caption := 'Окончание';
end;
Transparent := True;
Font.Color := clWhite;
Name := '_Label_' + IntToStr(i);
end;
end;

//Other
WelcomeLabel1.Left := x div 40;
WelcomeLabel1.Width := x - 2*WelcomeLabel1.Left;
WelcomeLabel2.Left := x div 40;
WelcomeLabel2.Width := x - 2*WelcomeLabel2.Left;
LicenseAcceptedRadio.Checked := True;
LicenseMemo.Align := alClient;
FinishedHeadingLabel.Left := x div 40;
FinishedHeadingLabel.Width := x - FinishedHeadingLabel.Left;
FinishedLabel.Left := x div 40;
FinishedLabel.Width := x - FinishedLabel.Left;
ComponentsList.Color := clWhite;
TasksList.Color := clWhite;
ReadyMemo.Color := clWhite;
RunList.Left := x div 40;
RunList.Width := x - RunList.Left;
YesRadio.Left := x div 40;
NoRadio.Left := x div 40;
end;
end;

procedure CurPageChanged(CurPageID: Integer);
var
i: Byte;
begin
if CurPageID = wpLicense then
with WizardForm do
begin
OuterNotebook.SetBounds(ClientWidth div 3, TBitmapImage(WizardForm.FindComponent('Bar')).Height + TBitmapImage(WizardForm.FindComponent('Bar')).Height div 6, x, y1);
InnerNotebook.Align := alClient;
NextButton.Caption := 'Согласен';
end;
//
if CurPageID <> wpLicense then
with WizardForm do
begin
OuterNotebook.SetBounds(WizardForm.ClientWidth div 3, WizardForm.ClientHeight div 2, x, y);
InnerNotebook.Align := alNone;
end;
//
if CurPageID mod 4 = 0 then
TBitmapImage(WizardForm.FindComponent('Bmp')).Bitmap.LoadFromResourceName(HInstance, '_IS_PIC4')
else
TBitmapImage(WizardForm.FindComponent('Bmp')).Bitmap.LoadFromResourceName(HInstance, '_IS_PIC' + IntToStr(CurPageID mod 4));
//
for i := wpWelcome to wpFinished do
begin
if i = CurPageID then
begin
TLabel(WizardForm.FindComponent('_Label_' + IntToStr(CurPageID))).Font.Style := [fsBold];
TLabel(WizardForm.FindComponent('_Label_' + IntToStr(CurPageID))).Font.Color := clBlack;
end
else
begin
TLabel(WizardForm.FindComponent('_Label_' + IntToStr(i))).Font.Style := [];
TLabel(WizardForm.FindComponent('_Label_' + IntToStr(i))).Font.Color := clWhite;
end;
end;
//
with WizardForm do
begin
OuterNotebook.ActivePage.Color := clWhite;
InnerNotebook.SetBounds(x div 30, y div 20, x - x div 15, y - y div 10);
InnerNotebook.ActivePage.Color := clWhite;
InfoBeforeMemo.Height := InnerNotebook.Height - InnerNotebook.Height div 8;
DiskSpaceLabel.Top := InnerNotebook.Height - InnerNotebook.Height div 10;
ComponentsList.Height := InnerNotebook.Height div 2;
ComponentsDiskSpaceLabel.Top := InnerNotebook.Height - InnerNotebook.Height div 10;
NoIconsCheck.Top := InnerNotebook.Height - InnerNotebook.Height div 10;
TasksList.Height := InnerNotebook.Height - InnerNotebook.Height div 5;
ReadyMemo.Height := InnerNotebook.Height - InnerNotebook.Height div 5;
InfoAfterMemo.Height := InnerNotebook.Height - InnerNotebook.Height div 8;
end;
end;



2all, как определить сколько страниц инсталлятора будет показано? Пробовал по-всякому, самый простой вариант - считать страницы по свойству Visible - не подходит, врет это свойство. Временно решил через препроцессор, обрабатывая текст скрипта на предмет директив, отключающих страницы, но считать нужно и кастомные страницы.




© OSzone.net 2001-2012