瀏覽代碼

Added new [Setup] section directive ArchitecturesAllowed value: arm64.

Martijn Laan 7 年之前
父節點
當前提交
52d1e597c5
共有 6 個文件被更改,包括 20 次插入10 次删除
  1. 3 1
      ISHelp/isetup.xml
  2. 2 1
      ISHelp/isxfunc.xml
  3. 5 1
      Projects/Compile.pas
  4. 5 3
      Projects/Main.pas
  5. 4 4
      Projects/Struct.pas
  6. 1 0
      whatsnew.htm

+ 3 - 1
ISHelp/isetup.xml

@@ -4824,7 +4824,8 @@ DiskSliceSize=1457664
 <keyword value="x64" />
 <keyword value="IA-64" />
 <keyword value="Itanium" />
-<setupvalid>One or more of the following, separated by spaces: <br/><tt>x86</tt> <br/><tt>x64</tt> <br/><tt>ia64</tt></setupvalid>
+<keyword value="ARM64" />
+<setupvalid>One or more of the following, separated by spaces: <br/><tt>x86</tt> <br/><tt>x64</tt> <br/><tt>ia64</tt> <br/><tt>arm64</tt></setupvalid>
 <setupdefault><i>(blank)</i></setupdefault>
 <body>
 <p>Specifies which processor architecture(s) Setup is allowed to run on. If this directive is not specified or is blank, Setup will be allowed to run on all processor architectures capable of executing its 32-bit code (including ones it doesn't recognize). Otherwise, if a user's processor architecture is not one of those specified in this directive, Setup will display an error message and exit.</p>
@@ -4851,6 +4852,7 @@ DiskSliceSize=1457664
 <p>Be sure you have read the <link topic="64bitlimitations">64-bit Installation Limitations</link> topic before setting this directive.</p>
 <p>If your application runs only on 64-bit processor architectures, you should set <link topic="setup_architecturesallowed">ArchitecturesAllowed</link> to the same value as this directive to prevent Setup from running on 32-bit Windows.</p>
 <p>Setup can only run in 64-bit mode on versions of Windows that provide the API support Inno Setup requires (e.g. RegDeleteKeyEx). All x64 editions provide the necessary APIs, however Itanium editions prior to Windows Server 2003 SP1 do not. If the user is running an older Itanium version of Windows, Setup will display a message (<tt>MissingWOW64APIs</tt>) recommending that the user install a service pack, and exit.</p>
+<p><i>Note:</i> Windows 10 on ARM64 only supports 32-bit (x86) binaries. Therefore Setup will never install in <link topic="32vs64bitinstalls">64-bit mode</link> on Windows 10 on ARM64.</p>
 <p><b>See also:</b><br/>
 <link topic="setup_architecturesallowed">ArchitecturesAllowed</link></p>
 </body>

+ 2 - 1
ISHelp/isxfunc.xml

@@ -500,7 +500,7 @@ end;</pre></example>
         <prototype>function ProcessorArchitecture: TSetupProcessorArchitecture;</prototype>
         <description><p>Returns the native processor architecture of the current system.</p>
 <p>TSetupProcessorArchitecture is defined as:</p>
-<p><tt>TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paIA64);</tt></p></description>
+<p><tt>TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paIA64, paARM64);</tt></p></description>
         <remarks><p>A 64-bit processor architecture will never be returned on 32-bit versions of Windows. Hence, you cannot use this function to detect a 64-bit AMD CPU on a 32-bit version of Windows; you'll just get back <tt>paX86</tt> if you try.</p>
 <p><tt>paUnknown</tt> is returned if Setup/Uninstall does not recognize the processor architecture. It can be assumed that an "unknown" architecture is at least capable of executing 32-bit code, or Setup/Uninstall wouldn't be running at all.</p>
 <p>If <tt>paIA64</tt> is returned, and <tt>ia64</tt> is <i>not</i> included in the value of the <link topic="setup_architecturesinstallin64bitmode">ArchitecturesInstallIn64BitMode</link> [Setup] section directive, you should not assume that Inno Setup's 64-bit-only features are available -- for example, the <tt>{pf64}</tt> constant. Those features only work when <link topic="isxfunc_IsWin64">IsWin64</link> returns True, and as documented, it may not return True on older Itanium versions of Windows that lack certain APIs Inno Setup requires.</p>
@@ -530,6 +530,7 @@ begin
     paX86: S := 'x86';
     paX64: S := 'x64';
     paIA64: S := 'Itanium';
+    paARM64: S := 'ARM64';
   else
     S := 'Unrecognized';
   end;

+ 5 - 1
Projects/Compile.pas

@@ -3549,7 +3549,7 @@ var
 
   function StrToArchitectures(S: String; const Only64Bit: Boolean): TSetupProcessorArchitectures;
   const
-    ProcessorFlags: array[0..2] of PChar = ('x86', 'x64', 'ia64');
+    ProcessorFlags: array[0..3] of PChar = ('x86', 'x64', 'ia64', 'arm64');
   begin
     Result := [];
     while True do
@@ -3562,6 +3562,10 @@ var
              Include(Result, paX86);
         1: Include(Result, paX64);
         2: Include(Result, paIA64);
+        3: if Only64Bit then
+             Invalid //ARM64 can actually only run x86 binaries
+           else
+             Include(Result, paARM64);
       end;
   end;
 

+ 5 - 3
Projects/Main.pas

@@ -179,7 +179,7 @@ var
 {$ENDIF}
 
   CodeRunner: TScriptRunner;
-
+  
 function CodeRunnerOnDebug(const Position: LongInt;
   var ContinueStepOver: Boolean): Boolean;
 function CodeRunnerOnDebugIntermediate(const Position: LongInt;
@@ -4193,6 +4193,7 @@ const
   PROCESSOR_ARCHITECTURE_INTEL = 0;
   PROCESSOR_ARCHITECTURE_IA64 = 6;
   PROCESSOR_ARCHITECTURE_AMD64 = 9;
+  PROCESSOR_ARCHITECTURE_ARM64 = 12;
 var
   KernelModule: HMODULE;
   GetNativeSystemInfoFunc: procedure(var lpSystemInfo: TSystemInfo); stdcall;
@@ -4219,10 +4220,10 @@ begin
     IsWow64ProcessFunc := GetProcAddress(KernelModule, 'IsWow64Process');
     if Assigned(IsWow64ProcessFunc) and
        IsWow64ProcessFunc(GetCurrentProcess, Wow64Process) and
-       Wow64Process then begin
+      Wow64Process then begin
       if AreFsRedirectionFunctionsAvailable and
          (GetProcAddress(KernelModule, 'GetSystemWow64DirectoryA') <> nil) and
-         (GetProcAddress(GetModuleHandle(advapi32), 'RegDeleteKeyExA') <> nil) then
+        (GetProcAddress(GetModuleHandle(advapi32), 'RegDeleteKeyExA') <> nil) then
         IsWin64 := True;
     end;
   end
@@ -4233,6 +4234,7 @@ begin
     PROCESSOR_ARCHITECTURE_INTEL: ProcessorArchitecture := paX86;
     PROCESSOR_ARCHITECTURE_IA64: ProcessorArchitecture := paIA64;
     PROCESSOR_ARCHITECTURE_AMD64: ProcessorArchitecture := paX64;
+    PROCESSOR_ARCHITECTURE_ARM64: ProcessorArchitecture := paARM64;
   else
     ProcessorArchitecture := paUnknown;
   end;

+ 4 - 4
Projects/Struct.pas

@@ -17,8 +17,8 @@ uses
 
 const
   SetupTitle = 'Inno Setup';
-  SetupVersion = '5.5.9 '{$IFDEF UNICODE}+'(u)'{$ELSE}+'(a)'{$ENDIF};
-  SetupBinVersion = (5 shl 24) + (5 shl 16) + (9 shl 8) + 0;
+  SetupVersion = '5.5.10 '{$IFDEF UNICODE}+'(u)'{$ELSE}+'(a)'{$ENDIF};
+  SetupBinVersion = (5 shl 24) + (5 shl 16) + (10 shl 8) + 0;
 
 type
   TSetupID = array[0..63] of AnsiChar;
@@ -70,12 +70,12 @@ type
   TSetupLanguageDetectionMethod = (ldUILanguage, ldLocale, ldNone);
   TSetupCompressMethod = (cmStored, cmZip, cmBzip, cmLZMA, cmLZMA2);
   TSetupSalt = array[0..7] of Byte;
-  TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paIA64);
+  TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paIA64, paARM64);
   TSetupProcessorArchitectures = set of TSetupProcessorArchitecture;
   TSetupDisablePage = (dpAuto, dpNo, dpYes);
 const
   SetupProcessorArchitectureNames: array[TSetupProcessorArchitecture] of String =
-    ('Unknown', 'x86', 'x64', 'Itanium');
+    ('Unknown', 'x86', 'x64', 'Itanium', 'ARM64');
 
 const
   SetupHeaderStrings = 28;

+ 1 - 0
whatsnew.htm

@@ -28,6 +28,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 
 <p><a name="5.5.10"></a><span class="ver">5.5.10 </span><span class="date">(?)</span></p>
 <ul>
+<li>Added new [Setup] section directive <tt>ArchitecturesAllowed</tt> value: <tt>arm64</tt>. Can be used to not allow Setup to run on Windows 10 on ARM64. Note that Windows 10 on ARM64 only supports 32-bit (x86) binaries and therefore Setup (even in older versions) will never install in 64-bit mode on Windows 10 on ARM64.</li>
 <li><i>Fix:</i>In 5.5.9 it was no longer possible to include a drive colon in [Setup] section directive <tt>OutputManifestFile</tt>.</li>
 <li>Minor tweaks.</li>
 </ul>