VBoxGuestAdditionsCommon.nsh revision d0318084c32279bf313f47358242cd61ada858d6
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!ifndef UNINSTALLER_ONLY
f3220f54126b25e1cf93cc26c17177b7aef850fdfieldingFunction ExtractFiles
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; @todo: Use a define for all the file specs to group the files per module
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe ; and keep the redundancy low
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe StrCpy "$0" "$INSTDIR\$%BUILD_TARGET_ARCH%"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%VBOX_WITH_LICENSE_INSTALL_RTF% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "/oname=$0\${LICENSE_FILE_RTF}" "$%VBOX_BRAND_LICENSE_RTF%"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; Video driver
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxVideo"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxVideo.inf"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!ifdef VBOX_SIGN_ADDITIONS
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxVideo.cat"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%VBOX_WITH_CROGL% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxVideo\OpenGL"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\d3d8.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\d3d9.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !if $%BUILD_TARGET_ARCH% == "x86"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; libWine is used for 32bit d3d only
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; @todo: remove it for 32bit as well
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\libWine.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxD3D8.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxD3D9.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\wined3d.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !if $%BUILD_TARGET_ARCH% == "amd64"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; Only 64-bit installer: Also copy 32-bit DLLs on 64-bit target
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxVideo\OpenGL\SysWow64"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d8.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d9.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\libWine.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLarrayspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLcrutil.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLerrorspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpackspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpassthroughspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLfeedbackspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGL.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D8.dll"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D9.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\wined3d.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%VBOX_WITH_WDDM% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; WDDM Video driver
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxVideoWddm"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !ifdef VBOX_SIGN_ADDITIONS
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe !if $%VBOX_WITH_CROGL% == "1"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !endif ; $%VBOX_WITH_CROGL% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !if $%BUILD_TARGET_ARCH% == "amd64"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !if $%VBOX_WITH_CROGL% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !endif ; $%VBOX_WITH_CROGL% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding !endif ; $%BUILD_TARGET_ARCH% == "amd64"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!endif ; $%VBOX_WITH_WDDM% == "1"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; Mouse driver
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxMouse"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxMouse.sys"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxMouse.inf"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!ifdef VBOX_SIGN_ADDITIONS
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxMouse.cat"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%BUILD_TARGET_ARCH% == "x86"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxMouse\NT4"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxMouseNT.sys"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; Guest driver
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxGuest"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxGuest.sys"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxGuest.inf"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!ifdef VBOX_SIGN_ADDITIONS
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxGuest.cat"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBCoInst.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxHook.dll"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%BUILD_TARGET_ARCH% == "x86"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxGuest\NT4"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxGuestNT.sys"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; VBoxService
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\Bin"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxService.exe"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%BUILD_TARGET_ARCH% == "x86"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxServiceNT.exe"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; Shared Folders
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\VBoxSF"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxSF.sys"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe ; Auto-Logon
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\AutoLogon"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxGINA.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxCredProv.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding ; Misc tools
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\Tools"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding!if $%BUILD_TARGET_ARCH% == "x86"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding SetOutPath "$0\Tools\NT4"
f3220f54126b25e1cf93cc26c17177b7aef850fdfielding FILE "$%PATH_OUT%\bin\additions\VBoxGuestDrvInst.exe"
2eb3de8d636fcf3c45aa4d5dbbe6bcafc5cbef9fwrowe FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
StrCpy $0 "$INSTDIR\${un}install_ui.log"
; For other windows versions (>XP) it may be necessary to change winver.nsh
; Ok we know it is NT. Must be a string like NT X.XX
ReadRegStr $g_strAddVerRev HKLM "SOFTWARE\$%VBOX_VENDOR_SHORT%\VirtualBox Guest Additions" "Revision"
Pop $1 ; Got first part (e.g. "1.5")
Pop $g_strAddVerMin ; Extracted second part (e.g. "5" from "1.5")
nsExec::Exec '"$SYSDIR\net.exe" stop VBoxService'
nsExec::Exec '"$SYSDIR\SC.exe" stop VBoxService'
StrCpy $2 "VBoxServiceNT.exe"
StrCpy $2 "VBoxService.exe"
${nsProcess::FindProcess} "VBoxTray.exe" $0
${nsProcess::KillProcess} "VBoxTray.exe" $0
nsExec::ExecToLog '"$g_strSystemDir\shutdown.exe" -a' $0