Вот пример Confirm на странице выбора папки установки.
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID = wpSelectDir then
begin
Confirm:= False;
end;
end;
Код: Выделить всё
[Setup]
AppName=My Program
AppVerName=My Program
DefaultDirName={pf}\My Program
[Components]
Name: a; Description: a; Types: full compact custom;
Name: a\1; Description: a1; Types: full compact custom;
Name: a\2; Description: a2; Types: full compact custom;
Name: b; Description: b; Types: full compact custom;
Name: b\1; Description: b1; Types: full compact custom;
Name: b\2; Description: b2; Types: full compact custom;
Name: b\3; Description: b3; Types: full compact custom;
Name: b\4; Description: b4; Types: full compact custom;
[code]
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
if (CurPageID = wpSelectComponents) and (IsComponentSelected('b') = False)
and (IsComponentSelected('b\1') = False) and (IsComponentSelected('b\2') = False)
and (IsComponentSelected('b\3') = False) and (IsComponentSelected('b\4') = False) then
begin
MsgBox('Не выбрано ни одиного из компонентов "b"!', mbInformation, MB_OK);
Result := False;
end;
end;
Код: Выделить всё
[Settings]
Chislo="значение выбранной константы"Код: Выделить всё
#define Const1 "5"
#define Const2 "8"
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
OutputDir=.
Compression=lzma/ultra
InternalCompressLevel=ultra
SolidCompression=yes
[Types]
Name: "Const1"; Description: "{#Const1} -> data.ini";
Name: "Const2"; Description: "{#Const2} -> data.ini";
[Components]
Name: "Const1"; Description: "{#Const1} -> data.ini"; Types: "Const1";
Name: "Const2"; Description: "{#Const2} -> data.ini"; Types: "Const2";
[Ini]
filename: {app}\Data.ini; section: Settings; key: Chislo; string: {#Const1}; Components: Const1;
filename: {app}\Data.ini; section: Settings; key: Chislo; string: {#Const2}; Components: Const2;
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl