Parcourir la source

Fix: Event attributes for uninstall event functions now actually work.

Martijn Laan il y a 5 ans
Parent
commit
3fa5282038
3 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 3 1
      Projects/Main.pas
  2. 1 0
      Projects/Uninstall.pas
  3. 1 0
      whatsnew.htm

+ 3 - 1
Projects/Main.pas

@@ -88,6 +88,8 @@ const
   ecPrepareToInstallFailedRestartNeeded = 8;
   ecPrepareToInstallFailedRestartNeeded = 8;
                                  { Stopped on Preparing to Install page;
                                  { Stopped on Preparing to Install page;
                                    restart needed. }
                                    restart needed. }
+                                   
+  CodeRunnerNamingAttribute = 'Event';
 
 
 var
 var
   MainForm: TMainForm;
   MainForm: TMainForm;
@@ -3343,7 +3345,7 @@ begin
   if SetupHeader.CompiledCodeText <> '' then begin
   if SetupHeader.CompiledCodeText <> '' then begin
     CodeRunner := TScriptRunner.Create();
     CodeRunner := TScriptRunner.Create();
     try
     try
-      CodeRunner.NamingAttribute := 'Event';
+      CodeRunner.NamingAttribute := CodeRunnerNamingAttribute;
       CodeRunner.OnLog := CodeRunnerOnLog;
       CodeRunner.OnLog := CodeRunnerOnLog;
       CodeRunner.OnLogFmt := CodeRunnerOnLogFmt;
       CodeRunner.OnLogFmt := CodeRunnerOnLogFmt;
       CodeRunner.OnDllImport := CodeRunnerOnDllImport;
       CodeRunner.OnDllImport := CodeRunnerOnDllImport;

+ 1 - 0
Projects/Uninstall.pas

@@ -591,6 +591,7 @@ begin
       AssignCustomMessages(Pointer(CompiledCodeData[6]), Length(CompiledCodeData[6])*SizeOf(CompiledCodeData[6][1]));
       AssignCustomMessages(Pointer(CompiledCodeData[6]), Length(CompiledCodeData[6])*SizeOf(CompiledCodeData[6][1]));
 
 
       CodeRunner := TScriptRunner.Create();
       CodeRunner := TScriptRunner.Create();
+      CodeRunner.NamingAttribute := CodeRunnerNamingAttribute;
       CodeRunner.OnLog := CodeRunnerOnLog;
       CodeRunner.OnLog := CodeRunnerOnLog;
       CodeRunner.OnLogFmt := CodeRunnerOnLogFmt;
       CodeRunner.OnLogFmt := CodeRunnerOnLogFmt;
       CodeRunner.OnDllImport := CodeRunnerOnDllImport;
       CodeRunner.OnDllImport := CodeRunnerOnDllImport;

+ 1 - 0
whatsnew.htm

@@ -28,6 +28,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 
 
 <p><a name="6.0.4"></a><span class="ver">6.0.4-dev </span><span class="date">(?)</span></p>
 <p><a name="6.0.4"></a><span class="ver">6.0.4-dev </span><span class="date">(?)</span></p>
 <ul>
 <ul>
+  <li><i>Fix:</i> Event attributes for uninstall event functions now actually work.</li>
   <li>Minor tweaks.</li>
   <li>Minor tweaks.</li>
 </ul>
 </ul>