Martijn Laan 7 місяців тому
батько
коміт
b9c15a28f1
1 змінених файлів з 5 додано та 7 видалено
  1. 5 7
      Projects/Src/Setup.MainForm.pas

+ 5 - 7
Projects/Src/Setup.MainForm.pas

@@ -24,12 +24,12 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Close;
     procedure Close;
     procedure Finish(const FromPreparingPage: Boolean);
     procedure Finish(const FromPreparingPage: Boolean);
-    procedure InitializeWizard;
+    class procedure InitializeWizard;
     function Install: Boolean;
     function Install: Boolean;
     procedure SetStep(const AStep: TSetupStep; const HandleExceptions: Boolean);
     procedure SetStep(const AStep: TSetupStep; const HandleExceptions: Boolean);
     class procedure ShowException(Sender: TObject; E: Exception);
     class procedure ShowException(Sender: TObject; E: Exception);
     class procedure ShowExceptionMsg(const S: String);
     class procedure ShowExceptionMsg(const S: String);
-    procedure ShowAboutBox;
+    class procedure ShowAboutBox;
   end;
   end;
 
 
 var
 var
@@ -49,15 +49,13 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-procedure TMainForm.ShowAboutBox;
-var
-  S: String;
+class procedure TMainForm.ShowAboutBox;
 begin
 begin
   { Removing the About box or modifying any existing text inside it is a
   { Removing the About box or modifying any existing text inside it is a
     violation of the Inno Setup license agreement; see LICENSE.TXT.
     violation of the Inno Setup license agreement; see LICENSE.TXT.
     However, adding additional lines to the end of the About box is
     However, adding additional lines to the end of the About box is
     permitted. }
     permitted. }
-  S := SetupTitle + ' version ' + SetupVersion + SNewLine;
+  var S := SetupTitle + ' version ' + SetupVersion + SNewLine;
   if SetupTitle <> 'Inno Setup' then
   if SetupTitle <> 'Inno Setup' then
     S := S + (SNewLine + 'Based on Inno Setup' + SNewLine);
     S := S + (SNewLine + 'Based on Inno Setup' + SNewLine);
   S := S + ('Copyright (C) 1997-2025 Jordan Russell' + SNewLine +
   S := S + ('Copyright (C) 1997-2025 Jordan Russell' + SNewLine +
@@ -105,7 +103,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TMainForm.InitializeWizard;
+class procedure TMainForm.InitializeWizard;
 begin
 begin
   WizardForm := AppCreateForm(TWizardForm) as TWizardForm;
   WizardForm := AppCreateForm(TWizardForm) as TWizardForm;
   if CodeRunner <> nil then begin
   if CodeRunner <> nil then begin