Forráskód Böngészése

More IS_ cleanup. Didn't dare remove VERSION.INC includes yet.

Martijn Laan 1 éve
szülő
commit
6975760e81

+ 0 - 76
Projects/CmnFunc.pas

@@ -209,62 +209,10 @@ begin
   end;
   end;
 end;
 end;
 
 
-{$IFNDEF IS_D4}
-function MoveAppWindowToActiveWindowMonitor(var OldRect: TRect): Boolean;
-{ This moves the application window (Application.Handle) to the same monitor
-  as the active window, so that a subsequent call to Application.MessageBox
-  displays the message box on that monitor. Based on code from D4+'s
-  TApplication.MessageBox. }
-type
-  HMONITOR = type THandle;
-  TMonitorInfo = record
-    cbSize: DWORD;
-    rcMonitor: TRect;
-    rcWork: TRect;
-    dwFlags: DWORD;
-  end;
-const
-  MONITOR_DEFAULTTONEAREST = $00000002;
-var
-  ActiveWindow: HWND;
-  Module: HMODULE;
-  MonitorFromWindow: function(hwnd: HWND; dwFlags: DWORD): HMONITOR; stdcall;
-  GetMonitorInfo: function(hMonitor: HMONITOR; var lpmi: TMonitorInfo): BOOL; stdcall;
-  MBMonitor, AppMonitor: HMONITOR;
-  Info: TMonitorInfo;
-begin
-  Result := False;
-  ActiveWindow := GetActiveWindow;
-  if ActiveWindow = 0 then Exit;
-  Module := GetModuleHandle(user32);
-  MonitorFromWindow := GetProcAddress(Module, 'MonitorFromWindow');
-  GetMonitorInfo := GetProcAddress(Module, 'GetMonitorInfoA');
-  if Assigned(MonitorFromWindow) and Assigned(GetMonitorInfo) then begin
-    MBMonitor := MonitorFromWindow(ActiveWindow, MONITOR_DEFAULTTONEAREST);
-    AppMonitor := MonitorFromWindow(Application.Handle, MONITOR_DEFAULTTONEAREST);
-    if MBMonitor <> AppMonitor then begin
-      Info.cbSize := SizeOf(Info);
-      if GetMonitorInfo(MBMonitor, Info) then begin
-        GetWindowRect(Application.Handle, OldRect);
-        SetWindowPos(Application.Handle, 0,
-          Info.rcMonitor.Left + ((Info.rcMonitor.Right - Info.rcMonitor.Left) div 2),
-          Info.rcMonitor.Top + ((Info.rcMonitor.Bottom - Info.rcMonitor.Top) div 2),
-          0, 0, SWP_NOACTIVATE or SWP_NOREDRAW or SWP_NOSIZE or SWP_NOZORDER);
-        Result := True;
-      end;
-    end;
-  end;
-end;
-{$ENDIF}
-
 function AppMessageBox(const Text, Caption: PChar; Flags: Longint): Integer;
 function AppMessageBox(const Text, Caption: PChar; Flags: Longint): Integer;
 var
 var
   ActiveWindow: HWND;
   ActiveWindow: HWND;
   WindowList: Pointer;
   WindowList: Pointer;
-{$IFNDEF IS_D4}
-  DidMove: Boolean;
-  OldRect: TRect;
-{$ENDIF}
 begin
 begin
   if MessageBoxRightToLeft then
   if MessageBoxRightToLeft then
     Flags := Flags or (MB_RTLREADING or MB_RIGHT);
     Flags := Flags or (MB_RTLREADING or MB_RIGHT);
@@ -289,31 +237,7 @@ begin
       Exit;
       Exit;
     end;
     end;
 
 
-{$IFDEF IS_D4}
-    { On Delphi 4+, simply call Application.MessageBox }
     Result := Application.MessageBox(Text, Caption, Flags);
     Result := Application.MessageBox(Text, Caption, Flags);
-{$ELSE}
-    { Use custom implementation on Delphi 2 and 3. The Flags parameter is
-      incorrectly declared as a Word on Delphi 2's Application.MessageBox, and
-      there is no support for multiple monitors. }
-    DidMove := MoveAppWindowToActiveWindowMonitor(OldRect);
-    try
-      ActiveWindow := GetActiveWindow;
-      WindowList := DisableTaskWindows(0);
-      try
-        Result := MessageBox(Application.Handle, Text, Caption, Flags);
-      finally
-        EnableTaskWindows(WindowList);
-        SetActiveWindow(ActiveWindow);
-      end;
-    finally
-      if DidMove then
-        SetWindowPos(Application.Handle, 0,
-          OldRect.Left + ((OldRect.Right - OldRect.Left) div 2),
-          OldRect.Top + ((OldRect.Bottom - OldRect.Top) div 2),
-          0, 0, SWP_NOACTIVATE or SWP_NOREDRAW or SWP_NOSIZE or SWP_NOZORDER);
-    end;
-{$ENDIF}
   finally
   finally
     TriggerMessageBoxCallbackFunc(Flags, True);
     TriggerMessageBoxCallbackFunc(Flags, True);
   end;
   end;

+ 5 - 20
Projects/CompForm.pas

@@ -511,17 +511,13 @@ type
     procedure WMStartNormally(var Message: TMessage); message WM_StartNormally;
     procedure WMStartNormally(var Message: TMessage); message WM_StartNormally;
     procedure WMSettingChange(var Message: TMessage); message WM_SETTINGCHANGE;
     procedure WMSettingChange(var Message: TMessage); message WM_SETTINGCHANGE;
     procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED;
     procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED;
-{$IFDEF IS_D4}
   protected
   protected
     procedure WndProc(var Message: TMessage); override;
     procedure WndProc(var Message: TMessage); override;
-{$ENDIF}
   public
   public
     { Public declarations }
     { Public declarations }
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
-{$IFDEF IS_D5}
     function IsShortCut(var Message: TWMKey): Boolean; override;
     function IsShortCut(var Message: TWMKey): Boolean; override;
-{$ENDIF}
   end;
   end;
 
 
 var
 var
@@ -759,13 +755,6 @@ begin
     editor's autocompletion list }
     editor's autocompletion list }
   SetFakeShortCut(BStopCompile, VK_ESCAPE, []);
   SetFakeShortCut(BStopCompile, VK_ESCAPE, []);
 
 
-{$IFNDEF IS_D103RIO}
-  { TStatusBar needs manual scaling before Delphi 10.3 Rio }
-  StatusBar.Height := ToPPI(StatusBar.Height);
-  for I := 0 to StatusBar.Panels.Count-1 do
-    StatusBar.Panels[I].Width := ToPPI(StatusBar.Panels[I].Width);
-{$ENDIF}
-
   PopupMenu := TCompileFormMemoPopupMenu.Create(Self);
   PopupMenu := TCompileFormMemoPopupMenu.Create(Self);
 
 
   FMemosStyler := TInnoSetupStyler.Create(Self);
   FMemosStyler := TInnoSetupStyler.Create(Self);
@@ -951,7 +940,6 @@ begin
     UpdateStatusPanelHeight(StatusPanel.Height);
     UpdateStatusPanelHeight(StatusPanel.Height);
 end;
 end;
 
 
-{$IFDEF IS_D4}
 procedure TCompileForm.WndProc(var Message: TMessage);
 procedure TCompileForm.WndProc(var Message: TMessage);
 begin
 begin
   { Without this, the status bar's owner drawn panels sometimes get corrupted and show
   { Without this, the status bar's owner drawn panels sometimes get corrupted and show
@@ -964,11 +952,9 @@ begin
           if (CtlType = ODT_MENU) and not IsMenu(hwndItem) then
           if (CtlType = ODT_MENU) and not IsMenu(hwndItem) then
             CtlType := ODT_STATIC;
             CtlType := ODT_STATIC;
     end;
     end;
-  inherited 
+  inherited
 end;
 end;
-{$ENDIF}
 
 
-{$IFDEF IS_D5}
 function TCompileForm.IsShortCut(var Message: TWMKey): Boolean;
 function TCompileForm.IsShortCut(var Message: TWMKey): Boolean;
 begin
 begin
   { Key messages are forwarded by the VCL to the main form for ShortCut
   { Key messages are forwarded by the VCL to the main form for ShortCut
@@ -980,7 +966,6 @@ begin
   else
   else
     Result := False;
     Result := False;
 end;
 end;
-{$ENDIF}
 
 
 procedure TCompileForm.UpdateCaption;
 procedure TCompileForm.UpdateCaption;
 var
 var
@@ -1720,8 +1705,8 @@ begin
     ElapsedTime := GetTickCount - StartTime;
     ElapsedTime := GetTickCount - StartTime;
     ElapsedSeconds := ElapsedTime div 1000;
     ElapsedSeconds := ElapsedTime div 1000;
     StatusMessage(smkStartEnd, Format(SCompilerStatusFinished, [TimeToStr(Time),
     StatusMessage(smkStartEnd, Format(SCompilerStatusFinished, [TimeToStr(Time),
-      Format('%.2u%s%.2u%s%.3u', [ElapsedSeconds div 60, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator,
-        ElapsedSeconds mod 60, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DecimalSeparator, ElapsedTime mod 1000])]));
+      Format('%.2u%s%.2u%s%.3u', [ElapsedSeconds div 60, FormatSettings.TimeSeparator,
+        ElapsedSeconds mod 60, FormatSettings.DecimalSeparator, ElapsedTime mod 1000])]));
   finally
   finally
     AppData.Lines.Free;
     AppData.Lines.Free;
     FCompiling := False;
     FCompiling := False;
@@ -5040,8 +5025,8 @@ begin
     if ASecondsRemaining >= 0 then
     if ASecondsRemaining >= 0 then
       StatusBar.Panels[spExtraStatus].Text := Format(
       StatusBar.Panels[spExtraStatus].Text := Format(
         ' Estimated time remaining: %.2d%s%.2d%s%.2d     Average KB/sec: %.0n',
         ' Estimated time remaining: %.2d%s%.2d%s%.2d     Average KB/sec: %.0n',
-        [(ASecondsRemaining div 60) div 60, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator,
-         (ASecondsRemaining div 60) mod 60, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator,
+        [(ASecondsRemaining div 60) div 60, FormatSettings.TimeSeparator,
+         (ASecondsRemaining div 60) mod 60, FormatSettings.TimeSeparator,
          ASecondsRemaining mod 60, ABytesCompressedPerSecond / 1024])
          ASecondsRemaining mod 60, ABytesCompressedPerSecond / 1024])
     else
     else
       StatusBar.Panels[spExtraStatus].Text := '';
       StatusBar.Panels[spExtraStatus].Text := '';

+ 2 - 2
Projects/CompFunc.pas

@@ -354,8 +354,8 @@ var
         begin
         begin
           if LineNumber = 0 then begin
           if LineNumber = 0 then begin
             { Don't forget about ListBox's DrawItem if you change the format of the following timestamp. }
             { Don't forget about ListBox's DrawItem if you change the format of the following timestamp. }
-            Insert(Format('[%.2u%s%.2u%s%.2u%s%.3u]   ', [ST.wHour, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator,
-              ST.wMinute, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator, ST.wSecond, {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DecimalSeparator,
+            Insert(Format('[%.2u%s%.2u%s%.2u%s%.3u]   ', [ST.wHour, FormatSettings.TimeSeparator,
+              ST.wMinute, FormatSettings.TimeSeparator, ST.wSecond, FormatSettings.DecimalSeparator,
               ST.wMilliseconds]), S, 1);
               ST.wMilliseconds]), S, 1);
           end else begin
           end else begin
             Insert(#9, S, 1); { Not actually painted - just for Ctrl+C }
             Insert(#9, S, 1); { Not actually painted - just for Ctrl+C }

+ 13 - 13
Projects/ISPP/IsppFuncs.pas

@@ -3,7 +3,7 @@
   Copyright (C) 2001-2002 Alex Yackimoff
   Copyright (C) 2001-2002 Alex Yackimoff
 
 
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2020 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 }
 }
@@ -1500,19 +1500,19 @@ begin
   try
   try
     with IInternalFuncParams(Params) do
     with IInternalFuncParams(Params) do
     begin
     begin
-      OldDateSeparator := {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DateSeparator;
-      OldTimeSeparator := {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator;
+      OldDateSeparator := FormatSettings.DateSeparator;
+      OldTimeSeparator := FormatSettings.TimeSeparator;
       try
       try
         NewDateSeparatorString := Get(1).AsStr;
         NewDateSeparatorString := Get(1).AsStr;
         NewTimeSeparatorString := Get(2).AsStr;
         NewTimeSeparatorString := Get(2).AsStr;
         if NewDateSeparatorString <> '' then
         if NewDateSeparatorString <> '' then
-          {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DateSeparator := NewDateSeparatorString[1];
+          FormatSettings.DateSeparator := NewDateSeparatorString[1];
         if NewTimeSeparatorString <> '' then
         if NewTimeSeparatorString <> '' then
-          {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator := NewTimeSeparatorString[1];
+          FormatSettings.TimeSeparator := NewTimeSeparatorString[1];
         MakeStr(ResPtr^, FormatDateTime(Get(0).AsStr, Now()));
         MakeStr(ResPtr^, FormatDateTime(Get(0).AsStr, Now()));
       finally
       finally
-        {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator := OldTimeSeparator;
-        {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DateSeparator := OldDateSeparator;
+        FormatSettings.TimeSeparator := OldTimeSeparator;
+        FormatSettings.DateSeparator := OldDateSeparator;
       end;
       end;
     end;
     end;
   except
   except
@@ -1535,23 +1535,23 @@ begin
   try
   try
     with IInternalFuncParams(Params) do
     with IInternalFuncParams(Params) do
     begin
     begin
-      OldDateSeparator := {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DateSeparator;
-      OldTimeSeparator := {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator;
+      OldDateSeparator := FormatSettings.DateSeparator;
+      OldTimeSeparator := FormatSettings.TimeSeparator;
       try
       try
         NewDateSeparatorString := Get(2).AsStr;
         NewDateSeparatorString := Get(2).AsStr;
         NewTimeSeparatorString := Get(3).AsStr;
         NewTimeSeparatorString := Get(3).AsStr;
         if NewDateSeparatorString <> '' then
         if NewDateSeparatorString <> '' then
-          {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DateSeparator := NewDateSeparatorString[1];
+          FormatSettings.DateSeparator := NewDateSeparatorString[1];
         if NewTimeSeparatorString <> '' then
         if NewTimeSeparatorString <> '' then
-          {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator := NewTimeSeparatorString[1];
+          FormatSettings.TimeSeparator := NewTimeSeparatorString[1];
         if not FileAge(PrependPath(Ext, Get(0).AsStr), Age) then begin
         if not FileAge(PrependPath(Ext, Get(0).AsStr), Age) then begin
           FuncResult.Error('Invalid file name');
           FuncResult.Error('Invalid file name');
           Result.Error := ISPPFUNC_FAIL
           Result.Error := ISPPFUNC_FAIL
         end else
         end else
           MakeStr(ResPtr^, FormatDateTime(Get(1).AsStr, Age));
           MakeStr(ResPtr^, FormatDateTime(Get(1).AsStr, Age));
       finally
       finally
-        {$IFDEF IS_DXE}FormatSettings.{$ENDIF}TimeSeparator := OldTimeSeparator;
-        {$IFDEF IS_DXE}FormatSettings.{$ENDIF}DateSeparator := OldDateSeparator;
+        FormatSettings.TimeSeparator := OldTimeSeparator;
+        FormatSettings.DateSeparator := OldDateSeparator;
       end;
       end;
     end;
     end;
   except
   except

+ 2 - 6
Projects/ISPP/IsppPreprocessor.pas

@@ -3,7 +3,7 @@
   Copyright (C) 2001-2002 Alex Yackimoff
   Copyright (C) 2001-2002 Alex Yackimoff
   
   
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2020 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 }
 }
@@ -859,11 +859,7 @@ function TPreprocessor.ProcessPreprocCommand(Command: TPreprocessorCommand;
       if Windows.GetTempFileName(PChar(Path), PChar(UpperCase(Original)), 0, PChar(Result)) <> 0 then
       if Windows.GetTempFileName(PChar(Path), PChar(UpperCase(Original)), 0, PChar(Result)) <> 0 then
         SetLength(Result, StrLen(PChar(Result)))
         SetLength(Result, StrLen(PChar(Result)))
       else
       else
-        {$IFDEF IS_D7}
-        RaiseLastOSError
-        {$ELSE}
-        RaiseLastWin32Error;
-        {$ENDIF}
+        RaiseLastOSError;
     end;
     end;
 
 
   var
   var

+ 3 - 5
Projects/InstFnc2.pas

@@ -26,9 +26,7 @@ implementation
 
 
 uses
 uses
   Windows, SysUtils, PathFunc, CmnFunc2, InstFunc, Main, Msgs, MsgIDs,
   Windows, SysUtils, PathFunc, CmnFunc2, InstFunc, Main, Msgs, MsgIDs,
-  ActiveX, ComObj,
-  {$IFDEF IS_D14} PropSys, {$ENDIF}
-  ShellAPI, ShlObj;
+  ActiveX, ComObj, PropSys, ShellAPI, ShlObj;
 
 
 function IsWindows8: Boolean;
 function IsWindows8: Boolean;
 { Returns True if running Windows 8 or later }
 { Returns True if running Windows 8 or later }
@@ -134,7 +132,7 @@ var
   OleResult: HRESULT;
   OleResult: HRESULT;
   Obj: IUnknown;
   Obj: IUnknown;
   SL: IShellLink;
   SL: IShellLink;
-  PS: {$IFDEF IS_D14}PropSys.{$ENDIF}IPropertyStore;
+  PS: PropSys.IPropertyStore;
   PV: TPropVariant;
   PV: TPropVariant;
   PF: IPersistFile;
   PF: IPersistFile;
   WideAppUserModelID, WideFilename: WideString;
   WideAppUserModelID, WideFilename: WideString;
@@ -161,7 +159,7 @@ begin
     SL.SetHotKey(HotKey);
     SL.SetHotKey(HotKey);
 
 
   if (AppUserModelID <> '') or (AppUserModelToastActivatorCLSID <> nil) or ExcludeFromShowInNewInstall or PreventPinning then begin
   if (AppUserModelID <> '') or (AppUserModelToastActivatorCLSID <> nil) or ExcludeFromShowInNewInstall or PreventPinning then begin
-    PS := Obj as {$IFDEF IS_D14}PropSys.{$ENDIF}IPropertyStore;
+    PS := Obj as PropSys.IPropertyStore;
     { According to MSDN the PreventPinning property should be set before the ID property. In practice
     { According to MSDN the PreventPinning property should be set before the ID property. In practice
       this doesn't seem to matter - at least not for shortcuts - but do it first anyway. }
       this doesn't seem to matter - at least not for shortcuts - but do it first anyway. }
     if PreventPinning then begin
     if PreventPinning then begin

+ 1 - 7
Projects/Int64em.pas → Projects/Int64Em.pas

@@ -2,7 +2,7 @@ unit Int64Em;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2008 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
@@ -10,8 +10,6 @@ unit Int64Em;
   integer value - and functions for manipulating Integer64's.
   integer value - and functions for manipulating Integer64's.
   (We can't use the Int64 type since it's only available in Delphi 4 and
   (We can't use the Int64 type since it's only available in Delphi 4 and
   later.)
   later.)
-
-  $jrsoftware: issrc/Projects/Int64Em.pas,v 1.14 2008/10/03 19:53:57 jr Exp $
 }
 }
 
 
 interface
 interface
@@ -19,10 +17,6 @@ interface
 {$I VERSION.INC}
 {$I VERSION.INC}
 
 
 type
 type
-  {$IFNDEF IS_D4}
-  LongWord = Cardinal;
-  {$ENDIF}
-
   Integer64 = record
   Integer64 = record
     Lo, Hi: LongWord;
     Lo, Hi: LongWord;
   end;
   end;

+ 1 - 9
Projects/ScriptClasses_C.pas

@@ -571,15 +571,9 @@ end;
 
 
 procedure ScriptClassesLibraryRegister_C(Cl: TPSPascalCompiler);
 procedure ScriptClassesLibraryRegister_C(Cl: TPSPascalCompiler);
 const
 const
-  clSystemColor = {$IFDEF IS_D7} $FF000000 {$ELSE} $80000000 {$ENDIF};
+  clSystemColor = $FF000000;
   COLOR_HOTLIGHT = 26;
   COLOR_HOTLIGHT = 26;
 begin
 begin
-{$IFNDEF UNICODE}
-  { Temporary: Currently used non Unicode ROPS version doesn't define the AnsiString/PAnsiChar types }
-  Cl.AddTypeS('AnsiString', 'String');
-  Cl.AddTypeS('PAnsiChar', 'PChar');
-{$ENDIF}
-
   { Std }
   { Std }
   SIRegister_Std_TypesAndConsts(Cl);
   SIRegister_Std_TypesAndConsts(Cl);
   SIRegisterTObject(Cl);
   SIRegisterTObject(Cl);
@@ -593,9 +587,7 @@ begin
   SIRegisterTStringList(Cl);
   SIRegisterTStringList(Cl);
   SIRegisterTHandleStream(Cl);
   SIRegisterTHandleStream(Cl);
   SIRegisterTFileStream(Cl);
   SIRegisterTFileStream(Cl);
-{$IFDEF UNICODE}
   SIRegisterTStringStream(Cl);
   SIRegisterTStringStream(Cl);
-{$ENDIF}
 
 
   { Graphics }
   { Graphics }
   SIRegister_Graphics_TypesAndConsts(Cl);
   SIRegister_Graphics_TypesAndConsts(Cl);

+ 3 - 3
Projects/ScriptClasses_R.pas

@@ -2,7 +2,7 @@ unit ScriptClasses_R;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2020 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
@@ -33,8 +33,8 @@ uses
 type
 type
   TWinControlAccess = class(TWinControl);
   TWinControlAccess = class(TWinControl);
 
 
-procedure TWinControlParentBackground_R(Self: TWinControl; var T: Boolean); begin {$IFDEF IS_D7} T := TWinControlAccess(Self).ParentBackground {$ELSE} T := False {$ENDIF}; end;
-procedure TWinControlParentBackground_W(Self: TWinControl; const T: Boolean); begin {$IFDEF IS_D7} TWinControlAccess(Self).ParentBackground := T; {$ENDIF} end;
+procedure TWinControlParentBackground_R(Self: TWinControl; var T: Boolean); begin T := TWinControlAccess(Self).ParentBackground; end;
+procedure TWinControlParentBackground_W(Self: TWinControl; const T: Boolean); begin TWinControlAccess(Self).ParentBackground := T; end;
 
 
 procedure RegisterWinControl_R(Cl: TPSRuntimeClassImporter);
 procedure RegisterWinControl_R(Cl: TPSRuntimeClassImporter);
 begin
 begin

+ 0 - 4
Projects/Setup.dpr

@@ -154,7 +154,6 @@ begin
           AcceptedQueryEndSessionInProgress := False;
           AcceptedQueryEndSessionInProgress := False;
         Result := True;
         Result := True;
       end;
       end;
-{$IFDEF IS_D12}
     WM_STYLECHANGING: begin
     WM_STYLECHANGING: begin
         { On Delphi 2009, we must suppress some of the VCL's manipulation of
         { On Delphi 2009, we must suppress some of the VCL's manipulation of
           the application window styles in order to prevent the taskbar button
           the application window styles in order to prevent the taskbar button
@@ -178,7 +177,6 @@ begin
             PStyleStruct(Message.LParam).styleNew and not WS_EX_APPWINDOW;
             PStyleStruct(Message.LParam).styleNew and not WS_EX_APPWINDOW;
         end;
         end;
       end;
       end;
-{$ENDIF}
   end;
   end;
 end;
 end;
 
 
@@ -254,13 +252,11 @@ begin
 end;
 end;
 
 
 begin
 begin
-{$IFDEF IS_D12}
   { Delphi 2009 initially sets WS_EX_TOOLWINDOW on the application window.
   { Delphi 2009 initially sets WS_EX_TOOLWINDOW on the application window.
     That will prevent our ShowWindow(Application.Handle, SW_SHOW) calls from
     That will prevent our ShowWindow(Application.Handle, SW_SHOW) calls from
     actually displaying the taskbar button as intended, so clear it. }
     actually displaying the taskbar button as intended, so clear it. }
   SetWindowLong(Application.Handle, GWL_EXSTYLE,
   SetWindowLong(Application.Handle, GWL_EXSTYLE,
     GetWindowLong(Application.Handle, GWL_EXSTYLE) and not WS_EX_TOOLWINDOW);
     GetWindowLong(Application.Handle, GWL_EXSTYLE) and not WS_EX_TOOLWINDOW);
-{$ENDIF}
 
 
   try
   try
     SetErrorMode(SEM_FAILCRITICALERRORS);
     SetErrorMode(SEM_FAILCRITICALERRORS);

+ 1 - 9
Projects/SetupForm.pas

@@ -2,7 +2,7 @@ unit SetupForm;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2019 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
@@ -42,11 +42,7 @@ type
     procedure WndProc(var Message: TMessage); override;
     procedure WndProc(var Message: TMessage); override;
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
-    {$IFNDEF IS_D4}
-    constructor CreateNew(AOwner: TComponent);
-    {$ELSE}
     constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;
     constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;
-    {$ENDIF}
     function CalculateButtonWidth(const ButtonCaptions: array of String): Integer;
     function CalculateButtonWidth(const ButtonCaptions: array of String): Integer;
     procedure InitializeFont;
     procedure InitializeFont;
     function ScalePixelsX(const N: Integer): Integer;
     function ScalePixelsX(const N: Integer): Integer;
@@ -302,11 +298,7 @@ begin
     Position := poDesigned;
     Position := poDesigned;
 end;
 end;
 
 
-{$IFNDEF IS_D4}
-constructor TSetupForm.CreateNew(AOwner: TComponent);
-{$ELSE}
 constructor TSetupForm.CreateNew(AOwner: TComponent; Dummy: Integer = 0);
 constructor TSetupForm.CreateNew(AOwner: TComponent; Dummy: Integer = 0);
-{$ENDIF}
 begin
 begin
   { Note: On Delphi 2 and 3, CreateNew isn't virtual, so this is only reached
   { Note: On Delphi 2 and 3, CreateNew isn't virtual, so this is only reached
     when TSetupForm.CreateNew is called explicitly }
     when TSetupForm.CreateNew is called explicitly }

+ 0 - 2
Projects/UninstProgressForm.pas

@@ -106,9 +106,7 @@ begin
 
 
   InitializeFont;
   InitializeFont;
 
 
-{$IFDEF IS_D7}
   MainPanel.ParentBackGround := False;
   MainPanel.ParentBackGround := False;
-{$ENDIF}
 
 
   PageNameLabel.Font.Style := [fsBold];
   PageNameLabel.Font.Style := [fsBold];
   PageNameLabel.Caption := SetupMessages[msgWizardUninstalling];
   PageNameLabel.Caption := SetupMessages[msgWizardUninstalling];

+ 1 - 2
Projects/Wizard.pas

@@ -767,9 +767,8 @@ begin
   PrevSelectedTasks := TStringList.Create();
   PrevSelectedTasks := TStringList.Create();
   PrevDeselectedTasks := TStringList.Create();
   PrevDeselectedTasks := TStringList.Create();
 
 
-{$IFDEF IS_D7}
   MainPanel.ParentBackground := False;
   MainPanel.ParentBackground := False;
-{$ENDIF}
+
   { Prior to scaling the form, shrink WizardSmallBitmapImage if it's currently
   { Prior to scaling the form, shrink WizardSmallBitmapImage if it's currently
     larger than WizardSmallImage. This way, stretching will not occur if the
     larger than WizardSmallImage. This way, stretching will not occur if the
     user specifies a smaller-than-default image and WizardImageStretch=yes,
     user specifies a smaller-than-default image and WizardImageStretch=yes,