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:
parent
0b01a969e4
commit
696a317eca
3 changed files with 33 additions and 0 deletions
|
@ -203,6 +203,14 @@
|
|||
!define REG_MULTI_SZ 7
|
||||
!endif
|
||||
|
||||
!define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
|
||||
!define PROCESSOR_ARCHITECTURE_INTEL 0 ; x86
|
||||
!define PROCESSOR_ARCHITECTURE_ARM 5
|
||||
!define PROCESSOR_ARCHITECTURE_IA64 6 ; Itanium
|
||||
!define PROCESSOR_ARCHITECTURE_AMD64 9 ; x86-64/x64
|
||||
!define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10
|
||||
!define PROCESSOR_ARCHITECTURE_ARM64 12
|
||||
!define PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 13
|
||||
|
||||
!endif /* __WIN_NOINC_WINNT */
|
||||
!verbose pop
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue