Skip to content

Commit

Permalink
installer: add 64-bit support for ARM64
Browse files Browse the repository at this point in the history
The Git for Windows ARM64 installation ideally should be installed in
the 64-bit Program Files folder. Inno Setup 6.0 added support for 64-bit
on Windows ARM64. This commit leverages this support.

Signed-off-by: Dennis Ameling <[email protected]>
  • Loading branch information
dennisameling committed Apr 19, 2021
1 parent 4dfcae5 commit 13466bf
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#define DEFAULT_BRANCH_NAME 'master'
#endif

#ifndef INSTALLER_FILENAME_SUFFIX
#define INSTALLER_FILENAME_SUFFIX ''
#endif

[Setup]
; Compiler-related
Compression=lzma2/ultra64
Expand All @@ -34,7 +38,7 @@ LZMAUseSeparateProcess=yes
OutputBaseFilename={#FILENAME_VERSION}
OutputDir={#GetEnv('TEMP')}
#else
#ifdef INSTALLER_FILENAME_SUFFIX
#if INSTALLER_FILENAME_SUFFIX!=''
OutputBaseFilename={#APP_NAME+'-'+FILENAME_VERSION+'-'+INSTALLER_FILENAME_SUFFIX}
#else
OutputBaseFilename={#APP_NAME+'-'+FILENAME_VERSION}-{#BITNESS}-bit
Expand All @@ -50,8 +54,8 @@ SolidCompression=yes
#define SOURCE_DIR SourcePath+'\..\..\..\..'
#endif
SourceDir={#SOURCE_DIR}
#if BITNESS=='64'
ArchitecturesInstallIn64BitMode=x64
#if BITNESS=='64' || INSTALLER_FILENAME_SUFFIX=='arm64'
ArchitecturesInstallIn64BitMode=x64 arm64
#endif
#ifdef SIGNTOOL
SignTool=signtool
Expand Down Expand Up @@ -1078,9 +1082,17 @@ function DetectNetFxVersion:Cardinal;
begin
// We are only interested in version v4.5.1 or later, therefore it
// is enough to only use the 4.5 method described in
// https://msdn.microsoft.com/en-us/library/hh925568
if not RegQueryDWordValue(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full','Release',Result) then
Result:=0;
// https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
if IsWin64 then begin
if (
not RegQueryDWordValue(HKLM64,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full','Release',Result)
and not RegQueryDWordValue(HKLM32,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full','Release',Result)
) then
Result:=0;
end else begin
if not RegQueryDWordValue(HKLM32,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full','Release',Result) then
Result:=0;
end;
end;
procedure OpenHyperlink(Sender:TObject);
Expand Down

0 comments on commit 13466bf

Please sign in to comment.