VirtualBox

Changeset 44864 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 28, 2013 12:18:42 PM (12 years ago)
Author:
vboxsync
Message:

VBoxMMR: ported from 4.2 to trunk (not enabled).

Location:
trunk/src/VBox/Additions/WINNT
Files:
12 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r42280 r44864  
    170170 endif
    171171endif
     172ifdef VBOX_WITH_MMR
     173DRIVER_FILES += \
     174        $(PATH_STAGE_BIN)/additions/VBoxMMR.exe \
     175        $(PATH_STAGE_BIN)/additions/VBoxMMRHook.dll
     176  ifeq ($(KBUILD_TARGET_ARCH),amd64)
     177        DRIVER_FILES += \
     178                $(PATH_STAGE_BIN)/additions/VBoxMMR-x86.exe \
     179                $(PATH_STAGE_BIN)/additions/VBoxMMRHook-x86.dll
     180  endif
     181endif
     182
    172183
    173184VB_WIN_ADD_NSIS_ENV := \
     
    194205        -E 'VBOX_WITH_WDDM=$(if $(VBOX_WITH_WDDM),1,0)' \
    195206        -E 'VBOX_WITH_WDDM_W8=$(if $(VBOX_WITH_WDDM_W8),1,0)' \
     207        -E 'VBOX_WITH_MMR=$(if $(VBOX_WITH_MMR),1,0)' \
    196208        -E 'VBOX_BRAND_WIN_ADD_INST_DLGBMP=$(subst /,\,$(VBOX_BRAND_WIN_ADD_INST_DLGBMP))' \
    197209        -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi

    r44659 r44864  
    235235Var g_bNoMouseDrv                       ; Cmd line: Do not install the VBoxMouse driver
    236236Var g_bWithAutoLogon                    ; Cmd line: Install VBoxGINA / VBoxCredProv for auto logon support
     237Var g_bWithVBoxMMR                      ; Cmd line: Install VBoxMMR for media redirection support
    237238Var g_bWithD3D                          ; Cmd line: Install Direct3D support
    238239Var g_bOnlyExtract                      ; Cmd line: Only extract all files, do *not* install them. Only valid with param "/D" (target directory)
     
    381382        StrCpy $g_bWithAutoLogon "true"
    382383        ${Break}
     384
     385!if $%VBOX_WITH_MMR% == "1"
     386      ${Case} '/with_vboxmmr'
     387        StrCpy $g_bWithVBoxMMR "true"
     388        ${Break}
     389!endif
    383390
    384391    !if $%VBOX_WITH_CROGL% == "1"
     
    432439                    /with_autologon$\tInstalls auto-logon support$\r$\n \
    433440                    /with_d3d$\tInstalls D3D support$\r$\n \
     441                    /with_vboxmmr$\tInstalls multimedia redirection support$\r$\n \
    434442                    /xres=X$\t$\tSets the guest's display resolution (width in pixels)$\r$\n \
    435443                    /yres=Y$\t$\tSets the guest's display resolution (height in pixels)$\r$\n \
     
    11161124  StrCpy $g_bNoMouseDrv "false"
    11171125  StrCpy $g_bWithAutoLogon "false"
     1126  StrCpy $g_bWithVBoxMMR "false"
    11181127  StrCpy $g_bWithD3D "false"
    11191128  StrCpy $g_bOnlyExtract "false"
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r44493 r44864  
    484484!insertmacro StopVBoxTray "un."
    485485
     486!macro StopVBoxMMR un
     487Function ${un}StopVBoxMMR
     488
     489  Push $0   ; Temp results
     490  Push $1   ; Safety counter
     491
     492  StrCpy $1 "0" ; Init counter
     493  DetailPrint "Stopping VBoxMMR ..."
     494
     495exe_stop:
     496
     497  IntCmp $1 10 exit      ; Only try this loop 10 times max
     498  IntOp  $1 $1 + 1       ; Increment
     499
     500  ${nsProcess::FindProcess} "VBoxMMR.exe" $0
     501  StrCmp $0 0 0 exit
     502
     503  ${nsProcess::KillProcess} "VBoxMMR.exe" $0
     504  Sleep "1000"           ; Wait a bit
     505  Goto exe_stop
     506
     507exit:
     508
     509  DetailPrint "Stopping VBoxMMR done."
     510
     511  Pop $1
     512  Pop $0
     513
     514FunctionEnd
     515!macroend
     516!insertmacro StopVBoxMMR ""
     517!insertmacro StopVBoxMMR "un."
     518
    486519!macro WriteRegBinR ROOT KEY NAME VALUE
    487520  WriteRegBin "${ROOT}" "${KEY}" "${NAME}" "${VALUE}"
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsVista.nsh

    r44417 r44864  
    6565FunctionEnd
    6666
     67Function Vista_Prepare
     68
     69  ${If} $g_bWithVBoxMMR == "true"
     70     Call StopVBoxMMR
     71  ${Else}
     72     Call VBoxMMR_Uninstall
     73  ${EndIf}
     74
     75FunctionEnd
     76
    6777Function Vista_CopyFiles
    6878
     
    7686  ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.sys"
    7787
    78 !ifdef VBOX_WITH_MMR
    79   FILE "$%PATH_OUT%\bin\additions\VBoxMMRHook.dll"
     88!if $%VBOX_WITH_MMR% == "1"
     89  ${If} $g_bWithVBoxMMR == "true"
     90    !if $%BUILD_TARGET_ARCH% == "amd64"
     91      FILE "$%PATH_OUT%\bin\additions\VBoxMMR-x86.exe"
     92      FILE "$%PATH_OUT%\bin\additions\VBoxMMRHook-x86.dll"
     93    !else
     94      FILE "$%PATH_OUT%\bin\additions\VBoxMMR.exe"
     95      FILE "$%PATH_OUT%\bin\additions\VBoxMMRHook.dll"
     96    !endif
     97  ${EndIf}
    8098!endif
    8199
     
    89107  ; Nothing here yet
    90108
    91 !ifdef VBOX_WITH_MMR
    92   !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMMRHook.dll" "$g_strSystemDir\VBoxMMRHook.dll" "$INSTDIR"
    93   AccessControl::GrantOnFile "$g_strSystemDir\VBoxMMRHook.dll" "(BU)" "GenericRead"
     109!if $%VBOX_WITH_MMR% == "1"
     110
     111  ${If} $g_bWithVBoxMMR == "true"
     112
     113    !if $%BUILD_TARGET_ARCH% == "amd64"
     114
     115      !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMMR-x86.exe" "$g_strSystemDir\VBoxMMR.exe" "$INSTDIR"
     116      !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMMRHook-x86.dll" "$g_strSysWow64\VBoxMMRHook.dll" "$INSTDIR"
     117      AccessControl::GrantOnFile "$g_strSysWow64\VBoxMMRHook.dll" "(BU)" "GenericRead"
     118
     119    !else
     120
     121      !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMMR.exe" "$g_strSystemDir\VBoxMMR.exe" "$INSTDIR"
     122      !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMMRHook.dll" "$g_strSystemDir\VBoxMMRHook.dll" "$INSTDIR"
     123      AccessControl::GrantOnFile "$g_strSystemDir\VBoxMMRHook.dll" "(BU)" "GenericRead"
     124
     125    !endif
     126
     127    AccessControl::GrantOnFile "$g_strSystemDir\VBoxMMR.exe" "(BU)" "GenericRead"
     128
     129    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxMMR" '"$SYSDIR\VBoxMMR.exe"'
     130
     131  ${EndIf}
     132
    94133!endif
    95134
     
    106145Function Vista_Main
    107146
     147  Call Vista_Prepare
    108148  Call Vista_CopyFiles
    109149  Call Vista_InstallFiles
     
    134174   Delete /REBOOTOK "$g_strSystemDir\VBoxCredProv.dll"
    135175
    136 !ifdef VBOX_WITH_MMR
    137    Delete /REBOOTOK "$g_strSystemDir\VBoxMMRHook.dll"
    138    Delete /REBOOTOK "$INSTDIR\VBoxMMRHook.dll"
    139 !endif
     176   Call ${un}VBoxMMR_Uninstall
    140177
    141178FunctionEnd
     
    143180!insertmacro Vista_Uninstall ""
    144181!insertmacro Vista_Uninstall "un."
     182
     183!macro VBoxMMR_Uninstall un
     184Function ${un}VBoxMMR_Uninstall
     185
     186  ; Remove VBoxMMR even if VBOX_WITH_MMR is not defined
     187
     188  DetailPrint "Uninstalling VBoxMMR."
     189  Call ${un}StopVBoxMMR
     190
     191  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxMMR"
     192
     193  Delete /REBOOTOK "$g_strSystemDir\VBoxMMR.exe"
     194
     195  !if $%BUILD_TARGET_ARCH% == "amd64"
     196    Delete /REBOOTOK "$g_strSysWow64\VBoxMMRHook.dll"
     197    Delete /REBOOTOK "$INSTDIR\VBoxMMR-x86.exe"
     198    Delete /REBOOTOK "$INSTDIR\VBoxMMRHook-x86.dll"
     199  !else
     200    Delete /REBOOTOK "$g_strSystemDir\VBoxMMRHook.dll"
     201    Delete /REBOOTOK "$INSTDIR\VBoxMMR.exe"
     202    Delete /REBOOTOK "$INSTDIR\VBoxMMRHook.dll"
     203  !endif
     204
     205FunctionEnd
     206!macroend
     207!insertmacro VBoxMMR_Uninstall ""
     208!insertmacro VBoxMMR_Uninstall "un."
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