From cde6d5500f99568cf822fdcd4435b41d0936e680 Mon Sep 17 00:00:00 2001 From: anders_k Date: Mon, 9 Apr 2018 21:34:50 +0000 Subject: [PATCH] Renamed IsNativeProcessorArchitecture helpers git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6990 212acab6-be3b-0410-9dea-997c60f758d6 --- Include/x64.nsh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Include/x64.nsh b/Include/x64.nsh index ed626319..7212f3a0 100644 --- a/Include/x64.nsh +++ b/Include/x64.nsh @@ -8,7 +8,19 @@ ; IsWow64 checks if the installer is a 32-bit application running on a 64-bit OS. ; ; ${If} ${RunningX64} -; MessageBox MB_OK "running on x64" +; MessageBox MB_OK "Running on 64-bit Windows" +; ${EndIf} +; +; IsNative* checks the OS native CPU architecture. +; +; ${If} ${IsNativeAMD64} +; ; Install AMD64 64-bit driver/library +; ${ElseIf} ${IsNativeARM64} +; ; Install ARM64 64-bit driver/library +; ${ElseIf} ${IsNativeIA32} +; ; Install i386 32-bit driver/library +; ${Else} +; Abort "Unsupported CPU architecture!" ; ${EndIf} ; ; DisableX64FSRedirection disables file system redirection. @@ -16,9 +28,9 @@ ; ; SetOutPath $SYSDIR ; ${DisableX64FSRedirection} -; File some.dll # extracts to C:\Windows\System32 +; File something.bin # extracts to C:\Windows\System32 ; ${EnableX64FSRedirection} -; File some.dll # extracts to C:\Windows\SysWOW64 +; File something.bin # extracts to C:\Windows\SysWOW64 ; !ifndef ___X64__NSH___ @@ -69,9 +81,9 @@ ${GetNativeProcessorArchitecture} $_LOGICLIB_TEMP !insertmacro _= $_LOGICLIB_TEMP ${_arc} `${_t}` `${_f}` !macroend -!define IsNativeProcessorArchitectureIA32 '${IsNativeProcessorArchitecture} 0' ; Intel x86 -!define IsNativeProcessorArchitectureAMD64 '${IsNativeProcessorArchitecture} 9' ; x86-64/x64 -!define IsNativeProcessorArchitectureARM64 '${IsNativeProcessorArchitecture} 12' +!define IsNativeIA32 '${IsNativeProcessorArchitecture} 0' ; Intel x86 +!define IsNativeAMD64 '${IsNativeProcessorArchitecture} 9' ; x86-64/x64 +!define IsNativeARM64 '${IsNativeProcessorArchitecture} 12' !define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"