Browse Source

Removed TInstallStep. Improved parameter names in example and help as suggested by TLama. Updated whatsnew. #51.

Martijn Laan 12 years ago
parent
commit
dd8b3c9ac9
7 changed files with 10 additions and 21 deletions
  1. 2 2
      Examples/CodeExample1.iss
  2. 1 1
      Projects/Compile.pas
  3. 1 11
      Projects/Install.pas
  4. 0 1
      Projects/ScriptFunc_C.pas
  5. 0 2
      Projects/SetupTypes.pas
  6. 1 4
      ishelp/isx.xml
  7. 5 0
      whatsnew.htm

+ 2 - 2
Examples/CodeExample1.iss

@@ -56,9 +56,9 @@ begin
     FinishedInstall := True;
     FinishedInstall := True;
 end;
 end;
 
 
-procedure CurInstallProgressChanged(CurrentProgress, MaximumProgress: Integer; CurStep: TInstallStep);
+procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer);
 begin
 begin
-  Log('CurInstallProgressChanged(' + IntToStr(CurrentProgress) + ', ' + IntToStr(MaximumProgress) + ', ' + IntToStr(Ord(CurStep)) + ') called');
+  Log('CurInstallProgressChanged(' + IntToStr(CurProgress) + ', ' + IntToStr(MaxProgress) + ') called');
 end;
 end;
 
 
 function NextButtonClick(CurPageID: Integer): Boolean;
 function NextButtonClick(CurPageID: Integer): Boolean;

+ 1 - 1
Projects/Compile.pas

@@ -7271,7 +7271,7 @@ begin
     CodeCompiler.AddExport('GetCustomSetupExitCode', 'LongInt', False, '', 0);
     CodeCompiler.AddExport('GetCustomSetupExitCode', 'LongInt', False, '', 0);
     CodeCompiler.AddExport('PrepareToInstall', 'String !Boolean', False, '', 0);
     CodeCompiler.AddExport('PrepareToInstall', 'String !Boolean', False, '', 0);
     CodeCompiler.AddExport('RegisterExtraCloseApplicationsResources', '0', False, '', 0);
     CodeCompiler.AddExport('RegisterExtraCloseApplicationsResources', '0', False, '', 0);
-    CodeCompiler.AddExport('CurInstallProgressChanged', '0 @LongInt @LongInt @TInstallStep', False, '', 0);
+    CodeCompiler.AddExport('CurInstallProgressChanged', '0 @LongInt @LongInt', False, '', 0);
 
 
     CodeCompiler.AddExport('InitializeUninstall', 'Boolean', False, '', 0);
     CodeCompiler.AddExport('InitializeUninstall', 'Boolean', False, '', 0);
     CodeCompiler.AddExport('DeinitializeUninstall', '0', False, '', 0);
     CodeCompiler.AddExport('DeinitializeUninstall', '0', False, '', 0);

+ 1 - 11
Projects/Install.pas

@@ -35,7 +35,6 @@ type
 
 
 var
 var
   CurProgress: Integer64;
   CurProgress: Integer64;
-  CurInstallStep: TInstallStep;
   ProgressShiftCount: Cardinal;
   ProgressShiftCount: Cardinal;
 
 
 { TSetupUninstallLog }
 { TSetupUninstallLog }
@@ -137,7 +136,7 @@ begin
   if (CodeRunner <> nil) and CodeRunner.FunctionExists('CurInstallProgressChanged') then begin
   if (CodeRunner <> nil) and CodeRunner.FunctionExists('CurInstallProgressChanged') then begin
     try
     try
       CodeRunner.RunProcedure('CurInstallProgressChanged', [NewPosition.Lo,
       CodeRunner.RunProcedure('CurInstallProgressChanged', [NewPosition.Lo,
-        WizardForm.ProgressGauge.Max, Ord(CurInstallStep)], False);
+        WizardForm.ProgressGauge.Max], False);
     except
     except
       Log('CurInstallProgressChanged raised an exception.');
       Log('CurInstallProgressChanged raised an exception.');
       Application.HandleException(nil);
       Application.HandleException(nil);
@@ -173,11 +172,6 @@ begin
   UpdateProgressGauge;
   UpdateProgressGauge;
 end;
 end;
 
 
-procedure SetInstallStep(const InstallStep: TInstallStep);
-begin
-  CurInstallStep := InstallStep;
-end;
-
 procedure ProcessEvents;
 procedure ProcessEvents;
 { Processes any waiting events. Must call this this periodically or else
 { Processes any waiting events. Must call this this periodically or else
   events like clicking the Cancel button won't be processed.
   events like clicking the Cancel button won't be processed.
@@ -2875,14 +2869,12 @@ begin
       end;
       end;
 
 
       { Copy the files }
       { Copy the files }
-      SetInstallStep(isExtractFiles);
       SetStatusLabelText(SetupMessages[msgStatusExtractFiles]);
       SetStatusLabelText(SetupMessages[msgStatusExtractFiles]);
       CopyFiles(Uninstallable);
       CopyFiles(Uninstallable);
       ProcessEvents;
       ProcessEvents;
 
 
       { Create program icons, if any }
       { Create program icons, if any }
       if HasIcons then begin
       if HasIcons then begin
-        SetInstallStep(isCreateIcons);
         SetStatusLabelText(SetupMessages[msgStatusCreateIcons]);
         SetStatusLabelText(SetupMessages[msgStatusCreateIcons]);
         CreateIcons;
         CreateIcons;
         ProcessEvents;
         ProcessEvents;
@@ -2890,7 +2882,6 @@ begin
 
 
       { Create INI entries, if any }
       { Create INI entries, if any }
       if Entries[seIni].Count <> 0 then begin
       if Entries[seIni].Count <> 0 then begin
-        SetInstallStep(isCreateIniEntries);
         SetStatusLabelText(SetupMessages[msgStatusCreateIniEntries]);
         SetStatusLabelText(SetupMessages[msgStatusCreateIniEntries]);
         CreateIniEntries;
         CreateIniEntries;
         ProcessEvents;
         ProcessEvents;
@@ -2898,7 +2889,6 @@ begin
 
 
       { Create registry entries, if any }
       { Create registry entries, if any }
       if Entries[seRegistry].Count <> 0 then begin
       if Entries[seRegistry].Count <> 0 then begin
-        SetInstallStep(isCreateRegistryEntries);
         SetStatusLabelText(SetupMessages[msgStatusCreateRegistryEntries]);
         SetStatusLabelText(SetupMessages[msgStatusCreateRegistryEntries]);
         CreateRegistryEntries;
         CreateRegistryEntries;
         ProcessEvents;
         ProcessEvents;

+ 0 - 1
Projects/ScriptFunc_C.pas

@@ -110,7 +110,6 @@ begin
   RegisterRealEnum('TShellFolderID', TypeInfo(TShellFolderID));
   RegisterRealEnum('TShellFolderID', TypeInfo(TShellFolderID));
   RegisterRealEnum('TSetupMessageID', TypeInfo(TSetupMessageID));
   RegisterRealEnum('TSetupMessageID', TypeInfo(TSetupMessageID));
   RegisterRealEnum('TSetupStep', TypeInfo(TSetupStep));
   RegisterRealEnum('TSetupStep', TypeInfo(TSetupStep));
-  RegisterRealEnum('TInstallStep', TypeInfo(TInstallStep));
   RegisterRealEnum('TUninstallStep', TypeInfo(TUninstallStep));
   RegisterRealEnum('TUninstallStep', TypeInfo(TUninstallStep));
   RegisterRealEnum('TSetupProcessorArchitecture', TypeInfo(TSetupProcessorArchitecture));
   RegisterRealEnum('TSetupProcessorArchitecture', TypeInfo(TSetupProcessorArchitecture));
 
 

+ 0 - 2
Projects/SetupTypes.pas

@@ -16,8 +16,6 @@ uses
 
 
 type
 type
   TSetupStep = (ssPreInstall, ssInstall, ssPostInstall, ssDone);
   TSetupStep = (ssPreInstall, ssInstall, ssPostInstall, ssDone);
-  TInstallStep = (isExtractFiles, isCreateIcons, isCreateIniEntries,
-    isCreateRegistryEntries);
   TUninstallStep = (usAppMutexCheck, usUninstall, usPostUninstall, usDone);
   TUninstallStep = (usAppMutexCheck, usUninstall, usPostUninstall, usDone);
 
 
 const
 const

+ 1 - 4
ishelp/isx.xml

@@ -157,7 +157,7 @@
 <p>Called with CurStep=ssInstall just before the actual installation starts, with CurStep=ssPostInstall just after the actual installation finishes, and with CurStep=ssDone just before Setup terminates after a successful install.</p>
 <p>Called with CurStep=ssInstall just before the actual installation starts, with CurStep=ssPostInstall just after the actual installation finishes, and with CurStep=ssDone just before Setup terminates after a successful install.</p>
 </dd>
 </dd>
 
 
-<dt><tt>procedure <a name="CurInstallProgressChanged">CurInstallProgressChanged</a>(CurrentProgress, MaximumProgress: Integer; CurStep: <anchorlink name="TInstallStep">TInstallStep</anchorlink>);</tt></dt>
+<dt><tt>procedure <a name="CurInstallProgressChanged">CurInstallProgressChanged</a>(CurProgress, MaxProgress: Integer);</tt></dt>
 <dd>
 <dd>
 <p>You can use this event function to monitor progress while Setup is extracting files, creating shortcuts, creating INI entries, and creating registry entries.</p>
 <p>You can use this event function to monitor progress while Setup is extracting files, creating shortcuts, creating INI entries, and creating registry entries.</p>
 </dd>
 </dd>
@@ -273,9 +273,6 @@
 <li><i><a name="TSetupStep">TSetupStep values</a></i><br />
 <li><i><a name="TSetupStep">TSetupStep values</a></i><br />
 ssInstall, ssPostInstall, ssDone</li>
 ssInstall, ssPostInstall, ssDone</li>
 
 
-<li><i><a name="TInstallStep">TInstallStep values</a></i><br />
-isExtractFiles, isCreateIcons, isCreateIniEntries, isCreateRegistryEntries</li>
-
 <li><i><a name="TUninstallStep">TUninstallStep value</a>s</i><br />
 <li><i><a name="TUninstallStep">TUninstallStep value</a>s</i><br />
 usAppMutexCheck, usUninstall, usPostUninstall, usDone</li>
 usAppMutexCheck, usUninstall, usPostUninstall, usDone</li>
 
 

+ 5 - 0
whatsnew.htm

@@ -26,6 +26,11 @@ Portions Copyright &copy; 2000-2013 Martijn Laan. All rights reserved.<br />
 For conditions of distribution and use, see <a href="http://www.jrsoftware.org/files/is/license.txt">LICENSE.TXT</a>.
 For conditions of distribution and use, see <a href="http://www.jrsoftware.org/files/is/license.txt">LICENSE.TXT</a>.
 </p>
 </p>
 
 
+<p><a name="5.5.4"></a><span class="ver">5.5.4-dev </span><span class="date">(?)</span></p>
+<ul>
+<li>Pascal Scripting: Added new event function <tt>CurInstallProgressChanged</tt>, which you can use to monitor progress while Setup is extracting files, creating shortcuts, creating INI entries, and creating registry entries. See the help file and the <i>CodeExample1.iss</i> example script for more information.</li>
+</ul>
+
 <p><a name="5.5.3"></a><span class="ver">5.5.3 </span><span class="date">(2013-01-30)</span></p>
 <p><a name="5.5.3"></a><span class="ver">5.5.3 </span><span class="date">(2013-01-30)</span></p>
 <ul>
 <ul>
 <li>Windows 8 change: [Icons] section flag <tt>excludefromshowinnewinstall</tt> now additionally prevents the new shortcut from being automatically pinned the Start screen.</li>
 <li>Windows 8 change: [Icons] section flag <tt>excludefromshowinnewinstall</tt> now additionally prevents the new shortcut from being automatically pinned the Start screen.</li>