VBoxGuestAdditionsCommon.nsh revision 94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58
077137f1c602268ce62c760701f619a2ae929923vboxsync!ifndef UNINSTALLER_ONLY
077137f1c602268ce62c760701f619a2ae929923vboxsyncFunction ExtractFiles
077137f1c602268ce62c760701f619a2ae929923vboxsync ; @todo: Use a define for all the file specs to group the files per module
077137f1c602268ce62c760701f619a2ae929923vboxsync ; and keep the redundancy low
077137f1c602268ce62c760701f619a2ae929923vboxsync StrCpy "$0" "$INSTDIR\$%BUILD_TARGET_ARCH%"
077137f1c602268ce62c760701f619a2ae929923vboxsync ; Root files
077137f1c602268ce62c760701f619a2ae929923vboxsync SetOutPath "$0"
077137f1c602268ce62c760701f619a2ae929923vboxsync!if $%VBOX_WITH_LICENSE_INSTALL_RTF% == "1"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "/oname=${LICENSE_FILE_RTF}" "$%VBOX_BRAND_LICENSE_RTF%"
077137f1c602268ce62c760701f619a2ae929923vboxsync ; Video driver
077137f1c602268ce62c760701f619a2ae929923vboxsync SetOutPath "$0\VBoxVideo"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.inf"
077137f1c602268ce62c760701f619a2ae929923vboxsync!ifdef VBOX_SIGN_ADDITIONS
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.cat"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync!if $%VBOX_WITH_CROGL% == "1"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
73faa4fdf1520bc23e5ee3ee044781c0aa11a6a0vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync SetOutPath "$0\VBoxVideo\OpenGL"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\d3d8.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\d3d9.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync !if $%BUILD_TARGET_ARCH% == "x86"
077137f1c602268ce62c760701f619a2ae929923vboxsync ; libWine is used for 32bit d3d only
077137f1c602268ce62c760701f619a2ae929923vboxsync ; @todo: remove it for 32bit as well
b6cc4092c1e80655a5bc19dc125e772a8d2b870dvboxsync FILE "$%PATH_OUT%\bin\additions\libWine.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D8.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%PATH_OUT%\bin\additions\wined3d.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
077137f1c602268ce62c760701f619a2ae929923vboxsync ; Only 64-bit installer: Also copy 32-bit DLLs on 64-bit target
077137f1c602268ce62c760701f619a2ae929923vboxsync SetOutPath "$0\VBoxVideo\OpenGL\SysWow64"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d8.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d9.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\libWine.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLarrayspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLcrutil.dll"
1d4b0322a1bef79fc1839445a3712141c5bb3f46vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLerrorspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpackspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpassthroughspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLfeedbackspu.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGL.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D8.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D9.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\wined3d.dll"
077137f1c602268ce62c760701f619a2ae929923vboxsync!if $%VBOX_WITH_WDDM% == "1"
077137f1c602268ce62c760701f619a2ae929923vboxsync ; WDDM Video driver
077137f1c602268ce62c760701f619a2ae929923vboxsync SetOutPath "$0\VBoxVideoWddm"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
FILE "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxMouse.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxMouse.inf"
FILE "$%PATH_OUT%\bin\additions\VBoxMouse.cat"
FILE "$%PATH_OUT%\bin\additions\VBoxMouseNT.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxGuest.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxGuest.inf"
FILE "$%PATH_OUT%\bin\additions\VBoxGuest.cat"
FILE "$%PATH_OUT%\bin\additions\VBCoInst.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxHook.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxGuestNT.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxService.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxServiceNT.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxSF.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxGINA.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxCredProv.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe"
FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxGuestDrvInst.exe"
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