Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Commit

Permalink
Fix wizard install failing when silent
Browse files Browse the repository at this point in the history
  • Loading branch information
spikespaz committed May 10, 2019
1 parent 20d246a commit 100853d
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions pack/installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -265,33 +265,35 @@ Root: HKCU; \
https://stackoverflow.com/a/40949812/2512078
}
var InfoBeforeCheck: TNewCheckBox;
var InfoBeforeCheckBox: TNewCheckBox;
procedure CheckInfoBeforeRead;
begin
WizardForm.NextButton.Enabled := InfoBeforeCheck.Checked;
WizardForm.NextButton.Enabled := WizardSilent or InfoBeforeCheckBox.Checked;
end;
procedure InfoBeforeCheckClick(Sender: TObject);
procedure InfoBeforeCheckBoxClick(Sender: TObject);
begin
CheckInfoBeforeRead;
end;
procedure InitializeWizard();
begin
InfoBeforeCheck := TNewCheckBox.Create(WizardForm);
InfoBeforeCheck.Parent := WizardForm.InfoBeforePage;
InfoBeforeCheck.Top := WizardForm.LicenseNotAcceptedRadio.Top;
InfoBeforeCheck.Left := WizardForm.LicenseNotAcceptedRadio.Left;
InfoBeforeCheck.Width := WizardForm.LicenseNotAcceptedRadio.Width;
InfoBeforeCheck.Height := WizardForm.LicenseNotAcceptedRadio.Height;
InfoBeforeCheck.Caption := 'I promise that I have read the above information';
InfoBeforeCheck.OnClick := @InfoBeforeCheckClick;
InfoBeforeCheckBox := TNewCheckBox.Create(WizardForm);
InfoBeforeCheckBox.Parent := WizardForm.InfoBeforePage;
InfoBeforeCheckBox.Top := WizardForm.LicenseNotAcceptedRadio.Top;
InfoBeforeCheckBox.Left := WizardForm.LicenseNotAcceptedRadio.Left;
InfoBeforeCheckBox.Width := WizardForm.LicenseNotAcceptedRadio.Width;
InfoBeforeCheckBox.Height := WizardForm.LicenseNotAcceptedRadio.Height;
InfoBeforeCheckBox.Caption := 'I promise that I have read the above information';
InfoBeforeCheckBox.OnClick := @InfoBeforeCheckBoxClick;
WizardForm.InfoBeforeMemo.Height :=
((WizardForm.LicenseMemo.Top + WizardForm.LicenseMemo.Height) -
WizardForm.InfoBeforeMemo.Top) +
(InfoBeforeCheck.Top - WizardForm.LicenseAcceptedRadio.Top);
WizardForm.LicenseMemo.Top +
WizardForm.LicenseMemo.Height -
WizardForm.InfoBeforeMemo.Top -
WizardForm.LicenseAcceptedRadio.Top +
InfoBeforeCheckBox.Top;
end;
procedure CurPageChanged(CurPageID: Integer);
Expand Down

0 comments on commit 100853d

Please sign in to comment.