Changeset 96686 in vbox for trunk/src/VBox
- Timestamp:
- Sep 10, 2022 11:36:01 PM (2 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Installer
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi
r96656 r96686 604 604 FunctionEnd 605 605 606 ; 606 607 ; Main Files 608 ; 607 609 Section $(VBOX_COMPONENT_MAIN) SEC01 608 610 … … 649 651 ; Which OS are we using? 650 652 ; @todo Use logic lib here 651 !if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit652 StrCmp $g_strWinVersion "NT4" nt4; Windows NT 4.0653 !endif 654 StrCmp $g_strWinVersion "2000" w2k; Windows 2000655 StrCmp $g_strWinVersion "XP" w2k; Windows XP656 StrCmp $g_strWinVersion "2003" w2k; Windows 2003 Server657 StrCmp $g_strWinVersion "Vista" vista ; Windows Vista658 StrCmp $g_strWinVersion "7" vista; Windows 7659 StrCmp $g_strWinVersion "8" vista; Windows 8660 StrCmp $g_strWinVersion "8_1" vista; Windows 8.1 / Windows 2012 Server R2661 StrCmp $g_strWinVersion "10" vista; Windows 10653 !if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit 654 StrCmp $g_strWinVersion "NT4" nt4 ; Windows NT 4.0 655 !endif 656 StrCmp $g_strWinVersion "2000" w2k_xp_w2k3 ; Windows 2000 657 StrCmp $g_strWinVersion "XP" w2k_xp_w2k3 ; Windows XP 658 StrCmp $g_strWinVersion "2003" w2k_xp_w2k3 ; Windows 2003 Server 659 StrCmp $g_strWinVersion "Vista" vista_and_later ; Windows Vista 660 StrCmp $g_strWinVersion "7" vista_and_later ; Windows 7 661 StrCmp $g_strWinVersion "8" vista_and_later ; Windows 8 662 StrCmp $g_strWinVersion "8_1" vista_and_later ; Windows 8.1 / Windows 2012 Server R2 663 StrCmp $g_strWinVersion "10" vista_and_later ; Windows 10 662 664 663 665 ${If} $g_bForceInstall == "true" 664 Goto vista ; Assume newer OS than we know of ... 665 ${EndIf} 666 667 Goto notsupported 666 Goto vista_and_later ; Assume newer OS than we know of ... 667 ${EndIf} 668 669 MessageBox MB_ICONSTOP $(VBOX_PLATFORM_UNSUPPORTED) /SD IDOK 670 goto exit 668 671 669 672 !if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit … … 687 690 !endif 688 691 689 w2k: ; Windows 2000 and XP ... 692 ; 693 ; Windows 2000, XP and Windows Server 2003 / XP64 694 ; 695 w2k_xp_w2k3: 690 696 691 697 ; Copy some common files ... … … 695 701 goto success 696 702 697 vista: ; Windows Vista / Windows 7 / Windows 8(.1) 703 ; 704 ; Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 and related server products. 705 ; 706 vista_and_later: 698 707 699 708 ; Check requirments; this function can abort the installation if necessary! … … 703 712 Call Common_CopyFiles 704 713 705 Call W2K_Main ; First install stuff f rom Windows 2000 / XP706 Call Vista_Main ; ... and some specific stuff for Vista / Windows 7714 Call W2K_Main ; First install stuff for Windows 2000, XP, W2K3/XP64 ... 715 Call Vista_Main ; ... and some specific stuff for Vista and later. 707 716 goto success 708 709 notsupported:710 711 MessageBox MB_ICONSTOP $(VBOX_PLATFORM_UNSUPPORTED) /SD IDOK712 goto exit713 717 714 718 success: … … 728 732 SectionEnd 729 733 734 ;; 730 735 ; Auto-logon support (section is hidden at the moment -- only can be enabled via command line switch) 736 ; 731 737 Section /o -$(VBOX_COMPONENT_AUTOLOGON) SEC02 732 738 … … 872 878 ${If} $g_bCapWDDM == "true" 873 879 StrCpy $g_bWithWDDM "true" 874 Goto exit875 880 ${EndIf} 876 881 … … 886 891 887 892 ${EndIf} 888 Goto exit889 890 exit:891 893 892 894 Pop $0 … … 930 932 FunctionEnd 931 933 934 ;; 932 935 ; This function is called at the very beginning of installer execution 936 ; 933 937 Function .onInit 934 938 -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh
r96605 r96686 53 53 54 54 !ifndef UNINSTALLER_ONLY 55 ;; 56 ; Extract files to the install dir + arch. 57 ; 55 58 Function ExtractFiles 56 59 … … 185 188 !endif ; UNINSTALLER_ONLY 186 189 190 ;; 191 ; Checks that the installer target architecture matches the host, 192 ; i.e. that we're not trying to install 32-bit binaries on a 64-bit 193 ; host from WOW64 mode. 194 ; 187 195 !macro CheckArchitecture un 188 196 Function ${un}CheckArchitecture 189 197 190 Push $0 198 Push $0 ;; @todo r=bird: Why ?? 191 199 192 200 System::Call "kernel32::GetCurrentProcess() i .s" … … 343 351 nsExec::Exec '"$SYSDIR\net.exe" stop VBoxService' 344 352 ${Else} 345 nsExec::Exec '"$SYSDIR\ SC.exe" stop VBoxService'353 nsExec::Exec '"$SYSDIR\sc.exe" stop VBoxService' 346 354 ${EndIf} 347 355 Sleep "1000" ; Wait a bit … … 470 478 !insertmacro AbortShutdown "un." 471 479 480 ;; 481 ; Sets $g_bCapDllCache, $g_bCapXPDM, $g_bWithWDDM and $g_bCapWDDM. 482 ; 472 483 !macro CheckForCapabilities un 473 484 Function ${un}CheckForCapabilities … … 480 491 481 492 ; Does the guest have a DLL cache? 482 ${If} $g_strWinVersion == "NT4" 493 ${If} $g_strWinVersion == "NT4" ; bird: NT4 doesn't have a DLL cache, WTP is 5.0 <= NtVersion < 6.0. 483 494 ${OrIf} $g_strWinVersion == "2000" 484 495 ${OrIf} $g_strWinVersion == "XP" -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsExternal.nsh
r96407 r96686 26 26 ; 27 27 28 ;; 29 ; Macro for executing external applications. 28 30 ; 29 ; Macro for executing external applications. Uses the nsExec plugin 30 ; in different styles, depending on whether this installer runs in silent mode 31 ; or not. If the external program reports an exit code other than 0 the installer 32 ; will be aborted. 31 ; Uses the nsExec plugin in different styles, depending on whether this 32 ; installer runs in silent mode or not. If the external program reports an exit 33 ; code other than 0 the installer will be aborted. 33 34 ; 34 35 ; @param Command line (full qualified and quoted). … … 38 39 ; 39 40 !macro _cmdExecute cmdline optional 40 41 ; Save $0 & $1 41 42 Push $0 42 43 Push $1 43 44 44 !define _macroLoc ${__LINE__} 45 45 ; 46 ; Execute the command, putting the exit code in $0 when done. 47 ; 46 48 ${LogVerbose} "Executing: ${cmdline}" 47 IfSilent silent_${_macroLoc} +1 49 ${If} ${Silent} 50 nsExec::ExecToStack "${cmdline}" 51 Pop $0 ; Return value (exit code) 52 Pop $1 ; Stdout/stderr output (up to ${NSIS_MAX_STRLEN}) 53 ${LogVerbose} "$1" 54 ${Else} 48 55 nsExec::ExecToLog "${cmdline}" 49 56 Pop $0 ; Return value (exit code) 50 goto done_${_macroLoc} 51 52 silent_${_macroLoc}: 53 54 nsExec::ExecToStack "${cmdline}" 55 Pop $0 ; Return value (exit code) 56 Pop $1 ; Stdout/stderr output (up to ${NSIS_MAX_STRLEN}) 57 ${LogVerbose} "$1" 58 goto done_${_macroLoc} 59 60 done_${_macroLoc}: 57 ${EndIf} 61 58 62 59 ${LogVerbose} "Execution returned exit code: $0" 63 IntCmp $0 0 +1 error_${_macroLoc} error_${_macroLoc} ; Check ret value (0=OK, 1=Error)64 goto return_${_macroLoc}65 60 66 error_${_macroLoc}: 61 ; 62 ; Check if it failed and take action according to the 2nd argument. 63 ; 64 ${If} $0 <> 0 65 ${If} ${optional} == "false" 66 ${LogVerbose} "Error excuting $\"${cmdline}$\" (exit code: $0) -- aborting installation" 67 Abort "Error excuting $\"${cmdline}$\" (exit code: $0) -- aborting installation" 68 ${Else} 69 ${LogVerbose} "Warning: Executing $\"${cmdline}$\" returned with exit code $0" 70 ${EndIf} 71 ${EndIf} 67 72 68 ${If} ${optional} == "false" 69 ${LogVerbose} "Error excuting $\"${cmdline}$\" (exit code: $0) -- aborting installation" 70 Abort "Error excuting $\"${cmdline}$\" (exit code: $0) -- aborting installation" 71 ${Else} 72 ${LogVerbose} "Warning: Executing $\"${cmdline}$\" returned with exit code $0" 73 ${EndIf} 74 goto return_${_macroLoc} 75 76 return_${_macroLoc}: 77 73 ; Restore $0 and $1. 78 74 Pop $1 79 75 Pop $0 80 81 !undef _macroLoc82 83 76 !macroend 84 77 !define CmdExecute "!insertmacro _cmdExecute" -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh
r96407 r96686 238 238 ; Guest driver files 239 239 FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe" 240 FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe" ; Not used by W2K and up, but required by the .INF file 241 240 FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe" 241 242 ; Misc 242 243 !ifdef VBOX_WITH_ADDITIONS_SHIPPING_AUDIO_TEST 243 244 FILE "$%PATH_OUT%\bin\additions\VBoxAudioTest.exe" … … 307 308 !endif ; $%KBUILD_TARGET_ARCH% == "amd64" 308 309 309 Goto doneCr310 310 ${EndIf} 311 311 !endif ; $%VBOX_WITH_WDDM% == "1" 312 313 doneCr:314 312 315 313 Pop $0 … … 373 371 ${EndIf} 374 372 373 ; 374 ; Mouse driver. 375 ; 375 376 ${If} $g_bNoMouseDrv == "false" 376 377 ${LogVerbose} "Installing mouse driver ..." … … 383 384 ${EndIf} 384 385 386 ; 385 387 ; Create the VBoxService service 386 388 ; No need to stop/remove the service here! Do this only on uninstallation! 389 ; 387 390 ${LogVerbose} "Installing VirtualBox service ..." 388 391 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"%SystemRoot%\System32\VBoxService.exe$\" $\"Base$\"" "false" … … 391 394 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxService" "Description" "Manages VM runtime information, time synchronization, remote sysprep execution and miscellaneous utilities for guest operating systems." 392 395 393 sf: 394 396 397 ; 398 ; Shared folders. 399 ; 395 400 ${LogVerbose} "Installing Shared Folders service ..." 396 401 … … 413 418 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add VBoxSF $g_iSfOrder" "false" 414 419 415 Goto done416 417 done:418 420 419 421 Pop $0
Note:
See TracChangeset
for help on using the changeset viewer.