Installer, Windows: Pascal-script in inno installer, do not query user if Wizard runs silent mode

(cherry picked from commit 10f44cfcff)
This commit is contained in:
Martin 2024-09-12 19:53:26 +02:00
parent 7ec936059f
commit ba9c73cbf6
2 changed files with 4 additions and 1 deletions

View File

@ -185,7 +185,7 @@ begin
' Check='+dbgsBool(IsSecondaryCheckBoxChecked)
);
WizardForm.NextButton.Enabled := (UninstallState = uiDone) or (UninstallState = uiDestNeeded) or wpCheckBox.Checked;
WizardForm.NextButton.Enabled := (UninstallState = uiDone) or (UninstallState = uiDestNeeded) or wpCheckBox.Checked or WizardSilent();
wpCheckBox.Enabled := not(UninstallState = uiDone);
wpButton.Enabled := not(UninstallState = uiDone);
end;

View File

@ -405,6 +405,7 @@ begin
ClearExistingConfigForFolder;
folder := WizardDirValue;
if not WizardSilent() then
if Pos( ' ', folder ) > 0 then
begin
MsgBox(SaveCustomMessage('FolderHasSpaces', 'Selected folder contains spaces, please select a folder without spaces in it.'),
@ -458,6 +459,7 @@ begin
end
else
if not WizardSilent() then
begin
// Dir NOT empty: do not warn, if uiDestNeeded => folder content is updatable lazarus
if ((UninstallState = uiDone) or (UninstallState = UIOtherNeeded)) or
@ -476,6 +478,7 @@ begin
if CurPage = wpAskConfDir.ID then begin
Log('NextButton in AskConfDir');
s := wpAskConfDir.Values[0];
if not WizardSilent() then
if (not IsDirEmpty(s)) then begin
MsgBox(Format(CustomMessage('FolderForConfNotEmpty'), [#13#10]), mbConfirmation, MB_OK);
Result := False;