Added the GetNativeProcessorArchitecture helper macro in case you really really need to know the true native CPU type

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6981 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-02-01 21:34:37 +00:00
parent 0b01a969e4
commit 696a317eca
3 changed files with 33 additions and 0 deletions

View file

@ -47,6 +47,23 @@
!macroend
!define GetNativeProcessorArchitecture "!insertmacro GetNativeProcessorArchitecture "
!macro GetNativeProcessorArchitecture outvar
!if ${outvar} != $1
Push $1
!endif
!if "${NSIS_PTR_SIZE}" <= 4
System::Call 'KERNEL32::GetSystemInfo(@r1)' ; < XP
!endif
System::Call 'KERNEL32::GetNativeSystemInfo(@r1)'
System::Call '*$1(&i2.s)' ; Extract wProcessorArchitecture (PROCESSOR_ARCHITECTURE_*)
Pop ${outvar}
!if ${outvar} != $1
Pop $1
!endif
!macroend
!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"
!macro DisableX64FSRedirection
System::Call kernel32::Wow64EnableWow64FsRedirection(i0)