2
0
Эх сурвалжийг харах

Added modern support for Uninstall.

Martijn Laan 6 жил өмнө
parent
commit
d9b0ac8aca

+ 1 - 1
ISHelp/isetup.xml

@@ -4775,7 +4775,7 @@ DiskSliceSize=1457664
 <setupvalid><tt>classic</tt> or <tt>modern</tt></setupvalid>
 <setupdefault><tt>classic</tt></setupdefault>
 <body>
-<p>If this directive is set to <tt>modern</tt>, Setup will show a more modern look and also the defaults for <link topic="setup_wizardresizable">WizardResizable</link> and <link topic="setup_wizardsizepercent">WizardSizePercent</link> change to respectively <tt>yes</tt> and <tt>120,120</tt>.</p>
+<p>If this directive is set to <tt>modern</tt>, Setup and Uninstall will show a more modern look and also the defaults for <link topic="setup_wizardresizable">WizardResizable</link> and <link topic="setup_wizardsizepercent">WizardSizePercent</link> change to respectively <tt>yes</tt> and <tt>120,120</tt>.</p>
 <p>Use <tt>Anchors</tt> properties to add full support for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> to all your custom controls and wizard pages if you have any. See the <i>CodeClasses.iss</i> example script for an example.</p>
 </body>
 </setuptopic>

+ 2 - 1
Projects/Install.pas

@@ -3037,7 +3037,8 @@ begin
       else if IsPowerUserOrAdmin then
         { Note: This flag is only set in 5.1.9 and later }
         Include(UninstLog.Flags, ufPowerUserInstalled);
-      Include(UninstLog.Flags, ufModernStyle);
+      if SetupHeader.WizardStyle = wsModern then
+        Include(UninstLog.Flags, ufModernStyle);
       if shUninstallRestartComputer in SetupHeader.Options then
         Include(UninstLog.Flags, ufAlwaysRestart);
       if ChangesEnvironment then

+ 3 - 2
Projects/Undo.pas

@@ -106,8 +106,9 @@ type
   TDeleteUninstallDataFilesProc = procedure;
 
   TUninstallLogFlags = set of (ufAdminInstalled, ufDontCheckRecCRCs,
-    ufModernStyle, ufAlwaysRestart, ufChangesEnvironment, ufWin64,
-    ufPowerUserInstalled);
+    ufModernStyleOld { pre 6.0.0 - was always set so can't reuse it },
+    ufAlwaysRestart, ufChangesEnvironment, ufWin64, ufPowerUserInstalled,
+    ufModernStyle);
 
   TUninstallLog = class
   private

+ 7 - 2
Projects/UninstProgressForm.pas

@@ -44,7 +44,7 @@ type
     { Public declarations }
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
-    procedure Initialize(const ATitle, AAppName: String);
+    procedure Initialize(const ATitle, AAppName: String; const AModernStyle: Boolean);
     procedure UpdateProgress(const AProgress, ARange: Integer);
   end;
 
@@ -118,11 +118,16 @@ begin
   inherited;
 end;
 
-procedure TUninstallProgressForm.Initialize(const ATitle, AAppName: String);
+procedure TUninstallProgressForm.Initialize(const ATitle, AAppName: String; const AModernStyle: Boolean);
 begin
   Caption := ATitle;
   PageDescriptionLabel.Caption := FmtSetupMessage1(msgUninstallStatusLabel, AAppName);
   StatusLabel.Caption := FmtSetupMessage1(msgStatusUninstalling, AAppName);
+  
+  if AModernStyle then begin
+    OuterNotebook.Color := clWindow;
+    Bevel1.Visible := False;
+  end;
 end;
 
 procedure TUninstallProgressForm.CreateParams(var Params: TCreateParams);

+ 1 - 1
Projects/Uninstall.pas

@@ -95,7 +95,7 @@ end;
 procedure InitializeUninstallProgressForm;
 begin
   UninstallProgressForm := TUninstallProgressForm.Create(nil);
-  UninstallProgressForm.Initialize(Title, UninstLog.AppName);
+  UninstallProgressForm.Initialize(Title, UninstLog.AppName, ufModernStyle in UninstLog.Flags);
   if CodeRunner <> nil then begin
     try
       CodeRunner.RunProcedures('InitializeUninstallProgressForm', [''], False);

+ 1 - 1
whatsnew.htm

@@ -84,7 +84,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 <p><span class="head2">New modern wizard style</span></p>
 <p>The wizard window now supports a more modern look:</p>
 <ul>
-  <li>Added new [Setup] section directive: <tt>WizardStyle</tt>. If this directive is set to <tt>modern</tt>, Setup will show a more modern look and also the defaults for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> change to respectively <tt>yes</tt> and <tt>120,120</tt>.</li>
+  <li>Added new [Setup] section directive: <tt>WizardStyle</tt>. If this directive is set to <tt>modern</tt>, Setup and Uninstall will show a more modern look and also the defaults for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> change to respectively <tt>yes</tt> and <tt>120,120</tt>.</li>
   <li><b>Change in default behavior:</b> Earlier versions of Inno Setup also supported <tt>WizardStyle</tt> and if you still have <tt>WizardStyle=modern</tt> in your script (which was allowed for backward compatibility but didn't actually change anything) and don't want to new modern look, you should remove this line or change it to <tt>WizardStyle=classic</tt>.</li>
   <li>Updated all examples and the Compiler IDE's New Script Wizard to use <tt>WizardStyle=modern</tt>.</li>
   <li>Pascal Scripting change: Added new <tt>SurfaceColor</tt> property to the <tt>TWizardPage</tt> support class.</li>