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) ' 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); wpCheckBox.Enabled := not(UninstallState = uiDone);
wpButton.Enabled := not(UninstallState = uiDone); wpButton.Enabled := not(UninstallState = uiDone);
end; end;

View File

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