Цитата: Потом после этого создать новую страницу для установки DirectX
Цитата: Если пользователь отметит не устанавливать DirectX и нажмет Далее должно появится такое сообщение
[more=Код]
Код: [CustomMessages]
Text1=Vampire: The Masquerade Bloodlines requires Microsoft DriectX 9.0c drivers to run properly. These drivers may not be compatible 'with some video cards and certain display modes.
Text2=DirectX 9.0c will be installed over any previous versions of Dir'ectX, after which you may be instructed to restart your computer'.
YesRadio=Yes, I want to install DirectX now.
NoRadio=No, I do not want to install DirectX at this time.
Text3=Do you want to install DirectX 9.0c?
[Code]
var
Bevel: TBevel;
Text1: TNewStaticText;
Text2: TNewStaticText;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Text3: TNewStaticText;
function Form_NextButtonClick(Page: TWizardPage): Boolean;
var ResultCode: Integer;
begin
Result:=True
if RadioButton1.Checked then
Exec(ExpandConstant('{src}\DirectX\DXSETUP.EXE'), '/silent', '', SW_SHOW,
ewWaitUntilTerminated, ResultCode)
if RadioButton2.Checked then
begin
if MsgBox('If you do not have DirectX 9.0c or highter, the game will not run properly.'#13+
+'Are you sure you do not want to install DirectX 9.0c at this time?', mbConfirmation,MB_YESNO)=IDNO then
Result:=False
end
end;
function DirectxPage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
begin
Page := CreateCustomPage(PreviousPageId,'DirectX','');
Bevel := TBevel.Create(Page);
with Bevel do
begin
Parent := Page.Surface;
Left := ScaleX(8);
Top := ScaleY(136);
Width := ScaleX(385);
Height := ScaleY(73);
Shape := bsFrame;
end;
Text1 := TNewStaticText.Create(Page);
with Text1 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:Text1}');
Left := ScaleX(8);
Top := ScaleY(8);
Width := ScaleX(389);
Height := ScaleY(38);
AutoSize := False;
TabOrder := 0;
WordWrap := True;
end;
Text2 := TNewStaticText.Create(Page);
with Text2 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:Text2}');
Left := ScaleX(8);
Top := ScaleY(64);
Width := ScaleX(389);
Height := ScaleY(30);
AutoSize := False;
TabOrder := 1;
WordWrap := True;
end;
RadioButton1 := TRadioButton.Create(Page);
with RadioButton1 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:YesRadio}');
Left := ScaleX(24);
Top := ScaleY(152);
Width := ScaleX(345);
Height := ScaleY(17);
TabOrder := 2;
Checked := True;
end;
RadioButton2 := TRadioButton.Create(Page);
with RadioButton2 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:NoRadio}');
Left := ScaleX(24);
Top := ScaleY(176);
Width := ScaleX(337);
Height := ScaleY(17);
TabOrder := 3;
end;
Text3 := TNewStaticText.Create(Page);
with Text3 do
begin
Parent := Page.Surface;
Caption :=
ExpandConstant('{cm:Text3}');
Left := ScaleX(8);
Top := ScaleY(104);
Width := ScaleX(381);
Height := ScaleY(14);
AutoSize := False;
TabOrder := 4;
WordWrap := True;
end;
with Page do
begin
OnNextButtonClick := @Form_NextButtonClick;
end;
Result := Page.ID;
end;
procedure InitializeWizard();
begin
DirectxPage(wpLicense);
end;