VirtualBox

Changeset 39562 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 8, 2011 5:05:52 PM (13 years ago)
Author:
vboxsync
Message:

Windows Guest Additions installer: Also do D3D file verification on uninstall and skip uninstallation when in doubt. Fixed SysWOW64 paths.

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

Legend:

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

    r39561 r39562  
    12601260  StrCpy $g_strSystemDir "$SYSDIR"
    12611261
     1262  ; We need a special directory set to SysWOW64 because some
     1263  ; shell operations don't support file redirection (yet)
     1264  StrCpy $g_strSysWow64 "$WINDIR\SysWOW64"
     1265
    12621266  ; Retrieve Windows version we're running on and store it in $g_strWinVersion
    12631267  Call un.GetWindowsVer
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh

    r39162 r39562  
    577577!if $%VBOX_WITH_CROGL% == "1"
    578578
    579   DetailPrint "Removing 3D graphics support ..."
     579  DetailPrint "Removing Direct3D support ..."
     580
     581  ; Do file validation before we uninstall
     582  Call ${un}ValidateD3DFiles
     583  Pop $0
     584  ${If} $0 == "1" ; D3D files are invalid
     585    DetailPrint "Invalid installation of Direct3D support detected; uninstallation skipped"
     586    Goto d3d_uninstall_end
     587  ${EndIf}
    580588
    581589  Delete /REBOOTOK "$g_strSystemDir\VBoxOGLarrayspu.dll"
     
    594602  Delete /REBOOTOK "$g_strSystemDir\wined3d.dll"
    595603  ; Update DLL cache
    596   IfFileExists "$g_strSystemDir\dllcache\msd3d8.dll" 0 +2
     604  ${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d8.dll"
    597605    Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d8.dll"
    598606    Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d8.dll" "$g_strSystemDir\dllcache\d3d8.dll"
    599   IfFileExists "$g_strSystemDir\dllcache\msd3d9.dll" 0 +2
     607  ${EndIf}
     608  ${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d9.dll"
    600609    Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d9.dll"
    601610    Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d9.dll" "$g_strSystemDir\dllcache\d3d9.dll"
     611  ${EndIf}
    602612  ; Restore original DX DLLs
    603   IfFileExists "$g_strSystemDir\msd3d8.dll" 0 +2
     613  ${If} ${FileExists} "$g_strSystemDir\msd3d8.dll"
    604614    Delete /REBOOTOK "$g_strSystemDir\d3d8.dll"
    605615    Rename /REBOOTOK "$g_strSystemDir\msd3d8.dll" "$g_strSystemDir\d3d8.dll"
    606   IfFileExists "$g_strSystemDir\msd3d9.dll" 0 +2
     616  ${EndIf}
     617  ${If} ${FileExists} "$g_strSystemDir\msd3d9.dll"
    607618    Delete /REBOOTOK "$g_strSystemDir\d3d9.dll"
    608619    Rename /REBOOTOK "$g_strSystemDir\msd3d9.dll" "$g_strSystemDir\d3d9.dll"
     620  ${EndIf}
    609621
    610622  !if $%BUILD_TARGET_ARCH% == "amd64"
    611 
    612623    ; Only 64-bit installer: Also remove 32-bit DLLs on 64-bit target arch in Wow64 node
    613     ${EnableX64FSRedirection}
    614     Delete /REBOOTOK "$SYSDIR\VBoxOGLarrayspu.dll"
    615     Delete /REBOOTOK "$SYSDIR\VBoxOGLcrutil.dll"
    616     Delete /REBOOTOK "$SYSDIR\VBoxOGLerrorspu.dll"
    617     Delete /REBOOTOK "$SYSDIR\VBoxOGLpackspu.dll"
    618     Delete /REBOOTOK "$SYSDIR\VBoxOGLpassthroughspu.dll"
    619     Delete /REBOOTOK "$SYSDIR\VBoxOGLfeedbackspu.dll"
    620     Delete /REBOOTOK "$SYSDIR\VBoxOGL.dll"
     624    Delete /REBOOTOK "$g_strSysWow64\VBoxOGLarrayspu.dll"
     625    Delete /REBOOTOK "$g_strSysWow64\VBoxOGLcrutil.dll"
     626    Delete /REBOOTOK "$g_strSysWow64\VBoxOGLerrorspu.dll"
     627    Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpackspu.dll"
     628    Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpassthroughspu.dll"
     629    Delete /REBOOTOK "$g_strSysWow64\VBoxOGLfeedbackspu.dll"
     630    Delete /REBOOTOK "$g_strSysWow64\VBoxOGL.dll"
    621631
    622632    ; Remove D3D stuff
    623633    ; @todo add a feature flag to only remove if installed explicitly
    624     Delete /REBOOTOK "$SYSDIR\libWine.dll"
    625     Delete /REBOOTOK "$SYSDIR\VBoxD3D8.dll"
    626     Delete /REBOOTOK "$SYSDIR\VBoxD3D9.dll"
    627     Delete /REBOOTOK "$SYSDIR\wined3d.dll"
     634    Delete /REBOOTOK "$g_strSysWow64\libWine.dll"
     635    Delete /REBOOTOK "$g_strSysWow64\VBoxD3D8.dll"
     636    Delete /REBOOTOK "$g_strSysWow64\VBoxD3D9.dll"
     637    Delete /REBOOTOK "$g_strSysWow64\wined3d.dll"
    628638    ; Update DLL cache
    629     IfFileExists "$SYSDIR\dllcache\msd3d8.dll" 0 +2
    630       Delete /REBOOTOK "$SYSDIR\dllcache\d3d8.dll"
    631       Rename /REBOOTOK "$SYSDIR\dllcache\msd3d8.dll" "$SYSDIR\dllcache\d3d8.dll"
    632     IfFileExists "$SYSDIR\dllcache\msd3d9.dll" 0 +2
    633       Delete /REBOOTOK "$SYSDIR\dllcache\d3d9.dll"
    634       Rename /REBOOTOK "$SYSDIR\dllcache\msd3d9.dll" "$SYSDIR\dllcache\d3d9.dll"
     639    ${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d8.dll"
     640      Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d8.dll"
     641      Rename /REBOOTOK "$g_strSysWow64\dllcache\msd3d8.dll" "$g_strSysWow64\dllcache\d3d8.dll"
     642    ${EndIf}
     643    ${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d9.dll"
     644      Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d9.dll"
     645      Rename /REBOOTOK "$g_strSysWow64\dllcache\msd3d9.dll" "$g_strSysWow64\dllcache\d3d9.dll"
     646    ${EndIf}
    635647    ; Restore original DX DLLs
    636     IfFileExists "$SYSDIR\msd3d8.dll" 0 +2
    637       Delete /REBOOTOK "$SYSDIR\d3d8.dll"
    638       Rename /REBOOTOK "$SYSDIR\msd3d8.dll" "$SYSDIR\d3d8.dll"
    639     IfFileExists "$SYSDIR\msd3d9.dll" 0 +2
    640       Delete /REBOOTOK "$SYSDIR\d3d9.dll"
    641       Rename /REBOOTOK "$SYSDIR\msd3d9.dll" "$SYSDIR\d3d9.dll"
     648    ${If} ${FileExists} "$g_strSysWow64\msd3d8.dll"
     649      Delete /REBOOTOK "$g_strSysWow64\d3d8.dll"
     650      Rename /REBOOTOK "$g_strSysWow64\msd3d8.dll" "$g_strSysWow64\d3d8.dll"
     651    ${EndIf}
     652    ${If} ${FileExists} "$g_strSysWow64\msd3d9.dll"
     653      Delete /REBOOTOK "$g_strSysWow64\d3d9.dll"
     654      Rename /REBOOTOK "$g_strSysWow64\msd3d9.dll" "$g_strSysWow64\d3d9.dll"
     655    ${EndIf}
    642656    DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
    643     ${DisableX64FSRedirection}
    644657  !endif ; amd64
    645658
    646659  DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
     660
     661d3d_uninstall_end:
    647662
    648663!endif ; VBOX_WITH_CROGL
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