Ver Fonte

Cleanup Compil32 using Shared.SetupTypes since last july: move the required types (TSetupStep and TUninstallStep) into a new unit instead.

Martijn Laan há 1 ano atrás
pai
commit
e955344670

+ 1 - 1
Projects/Compil32.dpr

@@ -62,7 +62,7 @@ uses
   IDE.Wizard.WizardFormRegistryHelper in 'Src\IDE.Wizard.WizardFormRegistryHelper.pas',
   ScintInt.InnoSetup in '..\Components\ScintInt.InnoSetup.pas',
   Shared.ScriptFunc in 'Src\Shared.ScriptFunc.pas',
-  Shared.SetupTypes in 'Src\Shared.SetupTypes.pas',
+  Shared.SetupSteps in 'Src\Shared.SetupSteps.pas',
   Shared.Struct in 'Src\Shared.Struct.pas',
   SHA256 in '..\Components\SHA256.pas',
   Shared.DotNetVersion in 'Src\Shared.DotNetVersion.pas',

+ 1 - 1
Projects/Compil32.dproj

@@ -142,7 +142,7 @@
         <DCCReference Include="Src\IDE.Wizard.WizardFormRegistryHelper.pas"/>
         <DCCReference Include="..\Components\ScintInt.InnoSetup.pas"/>
         <DCCReference Include="Src\Shared.ScriptFunc.pas"/>
-        <DCCReference Include="Src\Shared.SetupTypes.pas"/>
+        <DCCReference Include="Src\Shared.SetupSteps.pas"/>
         <DCCReference Include="Src\Shared.Struct.pas"/>
         <DCCReference Include="..\Components\SHA256.pas"/>
         <DCCReference Include="Src\Shared.DotNetVersion.pas"/>

+ 1 - 0
Projects/ISCmplr.dpr

@@ -45,6 +45,7 @@ uses
   Shared.SetupEntFunc in 'Src\Shared.SetupEntFunc.pas',
   Shared.SetupSectionDirectives in 'Src\Shared.SetupSectionDirectives.pas',
   Shared.SetupTypes in 'Src\Shared.SetupTypes.pas',
+  Shared.SetupSteps in 'Src\Shared.SetupSteps.pas',
   SimpleExpression in '..\Components\SimpleExpression.pas',
   Shared.DotNetVersion in 'Src\Shared.DotNetVersion.pas';
 

+ 1 - 0
Projects/ISCmplr.dproj

@@ -111,6 +111,7 @@
         <DCCReference Include="Src\Shared.SetupEntFunc.pas"/>
         <DCCReference Include="Src\Shared.SetupSectionDirectives.pas"/>
         <DCCReference Include="Src\Shared.SetupTypes.pas"/>
+        <DCCReference Include="Src\Shared.SetupSteps.pas"/>
         <DCCReference Include="..\Components\SimpleExpression.pas"/>
         <DCCReference Include="Src\Shared.DotNetVersion.pas"/>
         <BuildConfiguration Include="Base">

+ 1 - 0
Projects/Setup.dpr

@@ -34,6 +34,7 @@ uses
   Setup.ScriptFunc in 'Src\Setup.ScriptFunc.pas',
   Shared.ScriptFunc in 'Src\Shared.ScriptFunc.pas',
   Shared.SetupTypes in 'Src\Shared.SetupTypes.pas',
+  Shared.SetupSteps in 'Src\Shared.SetupSteps.pas',
   Setup.ScriptRunner in 'Src\Setup.ScriptRunner.pas',
   Setup.ScriptDlg in 'Src\Setup.ScriptDlg.pas',
   Setup.ScriptClasses in 'Src\Setup.ScriptClasses.pas',

+ 1 - 0
Projects/Setup.dproj

@@ -99,6 +99,7 @@
         <DCCReference Include="Src\Setup.ScriptFunc.pas"/>
         <DCCReference Include="Src\Shared.ScriptFunc.pas"/>
         <DCCReference Include="Src\Shared.SetupTypes.pas"/>
+        <DCCReference Include="Src\Shared.SetupSteps.pas"/>
         <DCCReference Include="Src\Setup.ScriptRunner.pas"/>
         <DCCReference Include="Src\Setup.ScriptDlg.pas"/>
         <DCCReference Include="Src\Setup.ScriptClasses.pas"/>

+ 1 - 1
Projects/Src/Compiler.ScriptFunc.pas

@@ -22,7 +22,7 @@ implementation
 uses
   Windows, SysUtils, TypInfo,
   Shared.CommonFunc, Shared.SetupMessageIDs, Shared.Struct,
-  Shared.SetupTypes, Shared.ScriptFunc, Compiler.Messages, Shared.DotNetVersion;
+  Shared.SetupTypes, Shared.SetupSteps, Shared.ScriptFunc, Compiler.Messages, Shared.DotNetVersion;
 
 { This type copied from CmnFunc.pas. We don't actually 'use' CmnFunc since
   it would cause VCL units to be linked in. }

+ 1 - 1
Projects/Src/IDE.ScintStylerInnoSetup.pas

@@ -156,7 +156,7 @@ implementation
 uses
   Generics.Defaults,
   Shared.SetupMessageIDs, ScintInt, Shared.SetupSectionDirectives, Shared.LangOptionsSectionDirectives,
-  Shared.CommonFunc.Vcl, Shared.SetupTypes, Shared.Struct, Shared.DotNetVersion, isxclasses_wordlists_generated;
+  Shared.CommonFunc.Vcl, Shared.SetupSteps, Shared.Struct, Shared.DotNetVersion, isxclasses_wordlists_generated;
 
 type
   { Size must be <= SizeOf(TScintLineState) }

+ 2 - 2
Projects/Src/Setup.MainForm.pas

@@ -13,7 +13,7 @@ interface
 
 uses
   Windows, Messages, SysUtils, Classes,
-  Shared.Struct, Setup.MainFunc, Setup.SetupForm, Shared.SetupTypes;
+  Shared.Struct, Setup.MainFunc, Setup.SetupForm, Shared.SetupSteps;
 
 type
   TMainForm = class(TSetupForm)
@@ -52,7 +52,7 @@ uses
   Forms, Graphics, ShlObj, SHA256, RestartManager,
   Shared.CommonFunc, Shared.CommonFunc.Vcl, Shared.SetupMessageIDs,
   SetupLdrAndSetup.Messages, SetupLdrAndSetup.RedirFunc, Setup.Install,
-  Setup.InstFunc, Setup.WizardForm, Setup.LoggingFunc;
+  Setup.InstFunc, Setup.WizardForm, Setup.LoggingFunc, Shared.SetupTypes;
 
 {$R *.DFM}
 

+ 8 - 6
Projects/Src/Setup.ScriptFunc.pas

@@ -21,13 +21,15 @@ implementation
 uses
   Windows, Shared.ScriptFunc,
   Forms, uPSUtils, SysUtils, Classes, Graphics, Controls, TypInfo, ActiveX,
-  Shared.Struct, Setup.ScriptDlg, Setup.MainForm, Setup.MainFunc, PathFunc, Shared.CommonFunc.Vcl,
+  PathFunc, BrowseFunc, MD5, SHA1, SHA256, ASMInline, BitmapImage,
+  Shared.Struct, Setup.ScriptDlg, Setup.MainForm, Setup.MainFunc, Shared.CommonFunc.Vcl,
   Shared.CommonFunc, Shared.FileClass, SetupLdrAndSetup.RedirFunc,
-  Setup.Install, SetupLdrAndSetup.InstFunc, Setup.InstFunc, Setup.InstFunc.Ole, SetupLdrAndSetup.Messages,
-  Shared.SetupMessageIDs, Setup.NewDiskForm, BrowseFunc, Setup.WizardForm, Shared.VerInfoFunc,
-  Shared.SetupTypes, Shared.Int64Em, MD5, SHA1, SHA256, Setup.LoggingFunc, Setup.SetupForm, Setup.RegDLL, Setup.Helper,
-  Setup.SpawnClient, Setup.UninstallProgressForm, ASMInline, Setup.DotNetFunc,
-  Shared.DotNetVersion, Setup.MsiFunc, BitmapImage;
+  Setup.Install, SetupLdrAndSetup.InstFunc, Setup.InstFunc, Setup.InstFunc.Ole,
+  SetupLdrAndSetup.Messages, Shared.SetupMessageIDs, Setup.NewDiskForm,
+  Setup.WizardForm, Shared.VerInfoFunc, Shared.SetupTypes, Shared.SetupSteps,
+  Shared.Int64Em, Setup.LoggingFunc, Setup.SetupForm, Setup.RegDLL, Setup.Helper,
+  Setup.SpawnClient, Setup.UninstallProgressForm, Setup.DotNetFunc,
+  Shared.DotNetVersion, Setup.MsiFunc;
 
 var
   ScaleBaseUnitsInitialized: Boolean;

+ 1 - 1
Projects/Src/Setup.Uninstall.pas

@@ -21,7 +21,7 @@ uses
   Shared.CommonFunc, Setup.UninstallLog, SetupLdrAndSetup.Messages,
   Shared.SetupMessageIDs, SetupLdrAndSetup.InstFunc, Setup.InstFunc, Shared.Struct,
   Shared.SetupEntFunc, Setup.UninstallProgressForm, Setup.UninstallSharedFileForm,
-  Shared.FileClass, Setup.ScriptRunner, Setup.DebugClient, Shared.SetupTypes,
+  Shared.FileClass, Setup.ScriptRunner, Setup.DebugClient, Shared.SetupSteps,
   Setup.LoggingFunc, Setup.MainFunc, Setup.SpawnServer;
 
 type

+ 6 - 3
Projects/Src/Setup.WizardForm.pas

@@ -15,7 +15,7 @@ uses
   Windows, SysUtils, Messages, Classes, Graphics, Controls,
   Forms, Dialogs, StdCtrls, ExtCtrls,
   Setup.SetupForm, Shared.Struct, Shared.Int64Em, NewCheckListBox, RichEditViewer, NewStaticText,
-  Shared.SetupTypes, NewProgressBar, Shared.SetupMessageIDs, PasswordEdit, FolderTreeView, BitmapImage,
+  NewProgressBar, Shared.SetupMessageIDs, PasswordEdit, FolderTreeView, BitmapImage,
   NewNotebook, BidiCtrls;
 
 type
@@ -342,8 +342,11 @@ function ValidateCustomDirEdit(const AEdit: TEdit;
 implementation
 
 uses
-  ShellApi, ShlObj, Types, SetupLdrAndSetup.Messages, Setup.MainForm, Setup.MainFunc, PathFunc, Shared.CommonFunc.Vcl, Shared.CommonFunc,
-  Setup.InstFunc, Setup.SelectFolderForm, Setup.FileExtractor, Setup.LoggingFunc, RestartManager, Setup.ScriptRunner;
+  ShellApi, ShlObj, Types,
+  PathFunc, RestartManager,
+  SetupLdrAndSetup.Messages, Setup.MainForm, Setup.MainFunc, Shared.CommonFunc.Vcl,
+  Shared.CommonFunc, Setup.InstFunc, Setup.SelectFolderForm, Setup.FileExtractor,
+  Setup.LoggingFunc, Setup.ScriptRunner, Shared.SetupTypes, Shared.SetupSteps;
 
 {$R *.DFM}
 

+ 21 - 0
Projects/Src/Shared.SetupSteps.pas

@@ -0,0 +1,21 @@
+unit Shared.SetupSteps;
+
+{
+  Inno Setup
+  Copyright (C) 1997-2018 Jordan Russell
+  Portions by Martijn Laan
+  For conditions of distribution and use, see LICENSE.TXT.
+
+  Setup steps
+}
+
+interface
+
+type
+  TSetupStep = (ssPreInstall, ssInstall, ssPostInstall, ssDone);
+
+  TUninstallStep = (usAppMutexCheck, usUninstall, usPostUninstall, usDone);
+
+implementation
+
+end.

+ 0 - 7
Projects/Src/Shared.SetupTypes.pas

@@ -7,8 +7,6 @@ unit Shared.SetupTypes;
   For conditions of distribution and use, see LICENSE.TXT.
 
   Types and functions used by both ISCmplr-only and Setup-only units
-
-  Also used by Compil32, for autocompletion only
 }
 
 interface
@@ -16,11 +14,6 @@ interface
 uses
   SysUtils, Classes, Shared.Struct;
 
-type
-  TSetupStep = (ssPreInstall, ssInstall, ssPostInstall, ssDone);
-
-  TUninstallStep = (usAppMutexCheck, usUninstall, usPostUninstall, usDone);
-
 const
   { Predefined page identifiers }
   wpWelcome = 1;