فهرست منبع

Fixed XE compilation errors. For some changes had to make a guess about which XE version introduced the change. Only tested compilation with XE8 and only did very basic run time test using the resulting Setup. Todo: fix XE compilation warnings.

Resulting Setup size:
-Delphi 2009: 2.3 mb
-Delphi 2010: 2.6 mb
-Delphi XE8: 3.5 mb

Do not intend to switch from Delphi 2009 to something newer for the main unicode compile because of the significant size increase.
Martijn Laan 10 سال پیش
والد
کامیت
063b58cc97
7فایلهای تغییر یافته به همراه59 افزوده شده و 20 حذف شده
  1. 6 10
      Components/FolderTreeView.pas
  2. 1 1
      Components/UniPs
  3. 6 6
      Projects/ScriptFunc_R.pas
  4. 12 0
      Projects/Version.inc
  5. 3 0
      README.md
  6. 30 3
      compile-unicode.bat
  7. 1 0
      whatsnew.htm

+ 6 - 10
Components/FolderTreeView.pas

@@ -2,20 +2,16 @@ unit FolderTreeView;
 
 {
   Inno Setup
-  Copyright (C) 1997-2008 Jordan Russell
+  Copyright (C) 1997-2015 Jordan Russell
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
 
   TFolderTreeView component
-
-  $jrsoftware: issrc/Components/FolderTreeView.pas,v 1.42 2009/03/25 11:47:32 mlaan Exp $
 }
 
 interface
 
-{$IFDEF VER200}
-  {$DEFINE DELPHI2009}
-{$ENDIF}
+{$I VERSION.INC}
 
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, CommCtrl;
@@ -139,7 +135,7 @@ implementation
 }
 
 uses
-  PathFunc, ShellApi, UxThemeISX{$IFDEF DELPHI2009}, Types{$ENDIF};
+  PathFunc, ShellApi, UxThemeISX{$IFDEF IS_D12}, Types{$ENDIF};
 
 const
   SHPPFW_NONE = $00000000;
@@ -676,7 +672,7 @@ begin
             TVItem.hItem := DispItem.hItem;
             TVItem.pszText := PChar(S);
             TreeView_SetItem(Handle, TVItem);
-            TreeView_SortChildren(Handle, TreeView_GetParent(Handle, DispItem.hItem), 0);
+            TreeView_SortChildren(Handle, TreeView_GetParent(Handle, DispItem.hItem), {$IFDEF IS_DXE}False{$ELSE}0{$ENDIF});
             Change;
           end;
         end;
@@ -1033,7 +1029,7 @@ begin
     if Result then begin
       { When a text callback is used, sorting after all items are inserted is
         exponentially faster than using hInsertAfter=TVI_SORT }
-      TreeView_SortChildren(Handle, Item, 0);
+      TreeView_SortChildren(Handle, Item, {$IFDEF IS_DXE}False{$ELSE}0{$ENDIF});
     end;
   end;
 end;
@@ -1171,7 +1167,7 @@ begin
       AddSubfolders(Item, AddBackslash(FCommonPrograms) + Path, FCommonStartup);
     if FUserPrograms <> '' then
       AddSubfolders(Item, AddBackslash(FUserPrograms) + Path, FUserStartup);
-    TreeView_SortChildren(Handle, Item, 0);
+    TreeView_SortChildren(Handle, Item, {$IFDEF IS_DXE}False{$ELSE}0{$ENDIF});
   end;
 end;
 

+ 1 - 1
Components/UniPs

@@ -1 +1 @@
-Subproject commit db0d6f521113a31b34a76aeefd79fb148a9c4bfd
+Subproject commit bfc1255636eb959f102d0279721b05ba85fbe7da

+ 6 - 6
Projects/ScriptFunc_R.pas

@@ -1271,19 +1271,19 @@ begin
   end else if Proc.Name = 'COMPARETEXT' then begin
     Stack.SetInt(PStart, CompareText(Stack.GetString(PStart-1), Stack.GetString(PStart-2)));
   end else if Proc.Name = 'GETDATETIMESTRING' then begin
-    OldDateSeparator := DateSeparator;
-    OldTimeSeparator := TimeSeparator;
+    OldDateSeparator := {$IFDEF IS_DXE6}FormatSettings.{$ENDIF}DateSeparator;
+    OldTimeSeparator := {$IFDEF IS_DXE6}FormatSettings.{$ENDIF}TimeSeparator;
     try
       NewDateSeparator := Stack.GetString(PStart-2)[1];
       NewTimeSeparator := Stack.GetString(PStart-3)[1];
       if NewDateSeparator <> #0 then
-        DateSeparator := NewDateSeparator;
+        {$IFDEF IS_DXE6}FormatSettings.{$ENDIF}DateSeparator := NewDateSeparator;
       if NewTimeSeparator <> #0 then
-        TimeSeparator := NewTimeSeparator;
+        {$IFDEF IS_DXE6}FormatSettings.{$ENDIF}TimeSeparator := NewTimeSeparator;
       Stack.SetString(PStart, FormatDateTime(Stack.GetString(PStart-1), Now()));
     finally
-      TimeSeparator := OldTimeSeparator;
-      DateSeparator := OldDateSeparator;
+      {$IFDEF IS_DXE6}FormatSettings.{$ENDIF}TimeSeparator := OldTimeSeparator;
+      {$IFDEF IS_DXE6}FormatSettings.{$ENDIF}DateSeparator := OldDateSeparator;
     end;
   end else if Proc.Name = 'SYSERRORMESSAGE' then begin
     Stack.SetString(PStart, Win32ErrorString(Stack.GetInt(PStart-1)));

+ 12 - 0
Projects/Version.inc

@@ -43,6 +43,18 @@
                                 {$DEFINE IS_DXE3}  { then it must be at least Delphi XE3 }
                                 {$IFNDEF VER240}  { if it's not Delphi XE3 }
                                   {$DEFINE IS_DXE4}  { then it must be at least Delphi XE4 }
+                                  {$IFNDEF VER250}  { if it's not Delphi XE4 }
+                                    {$DEFINE IS_DXE5}  { then it must be at least Delphi XE5 }
+                                    {$IFNDEF VER260}  { if it's not Delphi XE5 }
+                                      {$DEFINE IS_DXE6}  { then it must be at least Delphi XE6 }
+                                      {$IFNDEF VER270}  { if it's not Delphi XE6 }
+                                        {$DEFINE IS_DXE7}  { then it must be at least Delphi XE7 }
+                                        {$IFNDEF VER280}  { if it's not Delphi XE7 }
+                                          {$DEFINE IS_DXE8}  { then it must be at least Delphi XE8 }
+                                        {$ENDIF}
+                                      {$ENDIF}
+                                    {$ENDIF}
+                                  {$ENDIF}
                                 {$ENDIF}
                               {$ENDIF}
                             {$ENDIF}

+ 3 - 0
README.md

@@ -40,6 +40,9 @@ Source code README
   Unicode Inno Setup:
 
   We compile all of Inno Setup's projects under Delphi 2009 with Update 3.
+  
+  Newer Delphi versions should also work but will lead to significantly larger
+  files.
 
   Non Unicode Inno Setup:
 

+ 30 - 3
compile-unicode.bat

@@ -12,15 +12,18 @@ setlocal
 if exist compilesettings.bat goto compilesettingsfound
 :compilesettingserror
 echo compilesettings.bat is missing or incomplete. It needs to be created
-echo with the following lines, adjusted for your system:
+echo with either of the following lines, adjusted for your system:
 echo.
-echo   set DELPHI2009ROOT=C:\Program Files\CodeGear\RAD Studio\6.0   [Path to Delphi 2009 (or later)]
+echo   set DELPHI2009ROOT=C:\Program Files\CodeGear\RAD Studio\6.0  [Path to Delphi 2009 (or 2010)]
+echo or
+echo   set DELPHIXEROOT=C:\Program Files\Embarcadero\RAD Studio\8.0 [Path to Delphi XE (or later)]
 goto failed2
 
 :compilesettingsfound
 set DELPHI2009ROOT=
+set DELPHIXEROOT=
 call .\compilesettings.bat
-if "%DELPHI2009ROOT%"=="" goto compilesettingserror
+if "%DELPHI2009ROOT%"=="" if "%DELPHIXEROOT%"=="" goto compilesettingserror
 
 rem -------------------------------------------------------------------------
 
@@ -35,29 +38,53 @@ cd ISPP
 if errorlevel 1 goto failed
 
 echo - ISPP.dpr
+if "%DELPHIXEROOT%"=="" (
 "%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib" -E..\..\Files ISPP.dpr
+) else (
+"%DELPHIXEROOT%\bin\dcc32.exe" --no-config -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release" -E..\..\Files ISPP.dpr
+)
 if errorlevel 1 goto failed
 
 cd ..
 
 echo - Compil32.dpr
+if "%DELPHIXEROOT%"=="" (
 "%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Compil32.dpr
+) else (
+"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi;vcl -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Compil32.dpr
+)
 if errorlevel 1 goto failed
 
 echo - ISCC.dpr
+if "%DELPHIXEROOT%"=="" (
 "%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCC.dpr
+) else (
+"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCC.dpr
+)
 if errorlevel 1 goto failed
 
 echo - ISCmplr.dpr
+if "%DELPHIXEROOT%"=="" (
 "%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCmplr.dpr
+) else (
+"%DELPHIXEROOT%\bin\dcc32.exe" --no-config -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCmplr.dpr
+)
 if errorlevel 1 goto failed
 
 echo - SetupLdr.dpr
+if "%DELPHIXEROOT%"=="" (
 "%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components" -E..\Files SetupLdr.dpr
+) else (
+"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components" -E..\Files SetupLdr.dpr
+)
 if errorlevel 1 goto failed
 
 echo - Setup.dpr
+if "%DELPHIXEROOT%"=="" (
 "%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Setup.dpr
+) else (
+"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi;vcl -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Setup.dpr
+)
 if errorlevel 1 goto failed
 
 echo - Renaming files

+ 1 - 0
whatsnew.htm

@@ -31,6 +31,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 <li>The <tt>Attribs</tt> parameter of a [Files] or [Dir] entry may now also include <tt>notcontentindexed</tt> to specify that the file or directory is not to be indexed by the content indexing service.</li>
 <li>Pascal Scripting change: function <tt>RegQueryBinaryValue</tt> can now be used to query any type of registry value and not just <tt>REG_BINARY</tt>-type values.</li>
 <li>The Setup and Uninstall programs are now marked as DEP and ASLR compatible.</li>
+<li>Unicode [Code] based on RemObjects Pascal Script Git commit bfc1255636eb959f102d0279721b05ba85fbe7da.</li>
 <li>Minor tweaks.</li>
 </ul>