Если добавить if Installer.Checked then или if Portable.Checked then скрипт компилируется, но при запуске инсталлятора выдаёт ошибку
Потому что вы обращаетесь к Installer и Portable до того, как они создаются.
[/spoiler]Код: Выделить всё
[Setup]
AppName=Apps
AppVersion=1.0
DefaultDirName={pf}\Apps
[Components]
Name: Mode; Description: mode; Types: custom; flags: fixed
Name: Mode/SPOnly; Description: SPOnly; Flags: disablenouninstallwarning
Name: Mode/MPOnly; Description: MPOnly; Flags: disablenouninstallwarning
Name: Mode2; Description: mode; Types: custom; flags: fixed
Name: Mode2/SPOnly2; Description: SPOnly2; Flags: disablenouninstallwarning
Name: Mode2/MPOnly2; Description: MPOnly2; Flags: disablenouninstallwarning
[UninstallDelete]
Type: files; Name: "{app}\components.txt"
[Code]
procedure CreateComponentListDone();
begin
if WizardForm.ComponentsList.Checked[1] then
SaveStringToFile(ExpandConstant('{app}\components.txt'), 'SPOnly' + #13#10, False);
if WizardForm.ComponentsList.Checked[2] then
SaveStringToFile(ExpandConstant('{app}\components.txt'), 'MPOnly' + #13#10, True);
if WizardForm.ComponentsList.Checked[4] then
SaveStringToFile(ExpandConstant('{app}\components.txt'), 'SPOnly2' + #13#10, True);
if WizardForm.ComponentsList.Checked[5] then
SaveStringToFile(ExpandConstant('{app}\components.txt'), 'MPOnly2' + #13#10, True);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssDone then
begin
CreateComponentListDone();
end;
end;Код: Выделить всё
[messages]
DiskSpaceMBLabel=Требуется как минимум 10.2 Гб свободного дискового пространства.Код: Выделить всё
WizardForm.DiskSpaceLabel.Caption := 'бла-бла';