VirtualBox

Changeset 106847 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 6, 2024 3:07:27 AM (3 months ago)
Author:
vboxsync
Message:

Add/Nt/Installer: Use x64.nsh for determing the native host platform more accurately than our CheckArchitecture (removed). jiraref:VBP-1253

Location:
trunk/src/VBox/Additions/WINNT/Installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi

    r106846 r106847  
    10681068
    10691069  ; Check for correct architecture
    1070   Call CheckArchitecture
    1071   Pop $0
    1072   ${If} $0 <> 0 ; Wrong architecture? Tell the world
    10731070  !if $%KBUILD_TARGET_ARCH% == "amd64"
    1074     MessageBox MB_ICONSTOP $(VBOX_NOTICE_ARCH_AMD64) /SD IDOK
     1071    ${IfNot} ${IsNativeAMD64}
     1072      MessageBox MB_ICONSTOP $(VBOX_NOTICE_ARCH_AMD64) /SD IDOK
     1073      Abort "$(VBOX_NOTICE_ARCH_AMD64)"
     1074    ${EndIf}
    10751075  !else if $%KBUILD_TARGET_ARCH% == "arm64"
    1076     MessageBox MB_ICONSTOP $(VBOX_NOTICE_ARCH_ARM64) /SD IDOK
     1076    ${IfNot} ${IsNativeARM64}
     1077      MessageBox MB_ICONSTOP $(VBOX_NOTICE_ARCH_ARM64) /SD IDOK
     1078      Abort "$(VBOX_NOTICE_ARCH_ARM64)"
     1079    ${EndIf}
    10771080  !else
    1078     MessageBox MB_ICONSTOP $(VBOX_NOTICE_ARCH_X86) /SD IDOK
     1081    ${IfNot} ${IsNativeIA32}
     1082      MessageBox MB_ICONSTOP $(VBOX_NOTICE_ARCH_X86) /SD IDOK
     1083      Abort "$(VBOX_NOTICE_ARCH_X86)"
     1084    ${EndIf}
    10791085  !endif
    1080     Abort "$(VBOX_NOTICE_ARCH_AMD64)"
    1081   ${EndIf}
    10821086
    10831087  ; Has the user who calls us admin rights?
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r106844 r106847  
    251251FunctionEnd
    252252!endif ; UNINSTALLER_ONLY
    253 
    254 ;;
    255 ; Checks that the installer target architecture matches the host,
    256 ; i.e. that we're not trying to install 32-bit binaries on a 64-bit
    257 ; host from WOW64 mode.
    258 ;
    259 !macro CheckArchitecture un
    260 Function ${un}CheckArchitecture
    261 
    262   Push $0   ;; @todo r=bird: Why ??
    263 
    264   System::Call "kernel32::GetCurrentProcess() i .s"
    265   System::Call "kernel32::IsWow64Process(i s, *i .r0)"
    266   ; R0 now contains 1 if we're a 64-bit process, or 0 if not
    267 
    268 !if $%KBUILD_TARGET_ARCH% == "amd64"
    269   IntCmp $0 0 wrong_platform
    270 !else ; 32-bit
    271   IntCmp $0 1 wrong_platform
    272 !endif
    273 
    274   Push 0
    275   Goto exit
    276 
    277 wrong_platform:
    278 
    279   Push 1
    280   Goto exit
    281 
    282 exit:
    283 
    284 FunctionEnd
    285 !macroend
    286 !ifndef UNINSTALLER_ONLY
    287   !insertmacro CheckArchitecture ""
    288   !insertmacro CheckArchitecture "un."
    289 !endif
    290253
    291254;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette