The current vr runtime path is now passed as argument to
restartvrserver.bat instead of being hardcoded.
This commit is contained in:
@@ -1,5 +1,15 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
REM First (optional) parameter is the vr runtime path
|
||||||
|
REM When no parameter given use default steam install location
|
||||||
|
IF [%1] == [] (
|
||||||
|
SET "steamVRPath=C:\Program Files (x86)\Steam\steamapps\common\SteamVR\"
|
||||||
|
) ELSE (
|
||||||
|
SET "steamVRPath=%~1"
|
||||||
|
)
|
||||||
|
echo VR Runtime Path: %steamVRPath%
|
||||||
|
echo.
|
||||||
|
|
||||||
REM Kill vrmonitor.exe and give SteamVR some time for a graceful shutdown
|
REM Kill vrmonitor.exe and give SteamVR some time for a graceful shutdown
|
||||||
REM When no process was killed then exit (helps to prevent the taskkill clone bug)
|
REM When no process was killed then exit (helps to prevent the taskkill clone bug)
|
||||||
(taskkill /im vrmonitor.exe /f >nul 2>nul && echo Give SteamVR some time for a graceful shutdown ... && timeout /t 20) || exit
|
(taskkill /im vrmonitor.exe /f >nul 2>nul && echo Give SteamVR some time for a graceful shutdown ... && timeout /t 20) || exit
|
||||||
@@ -10,4 +20,4 @@ taskkill /im vrdashboard.exe /f >nul 2>nul
|
|||||||
taskkill /im vrserver.exe /f >nul 2>nul
|
taskkill /im vrserver.exe /f >nul 2>nul
|
||||||
|
|
||||||
REM Start vrmonitor.exe
|
REM Start vrmonitor.exe
|
||||||
start "" "C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\bin\win32\vrmonitor.exe"
|
start "" "%steamVRPath%\tools\bin\win32\vrmonitor.exe"
|
||||||
|
|||||||
@@ -143,7 +143,9 @@ void SteamVRTabController::setForceReprojection(bool value, bool notify) {
|
|||||||
|
|
||||||
|
|
||||||
void SteamVRTabController::restartSteamVR() {
|
void SteamVRTabController::restartSteamVR() {
|
||||||
QProcess::startDetached("cmd.exe /C restartvrserver.bat");
|
QString cmd = QString("cmd.exe /C restartvrserver.bat \"") + parent->getVRRuntimePathUrl().toLocalFile() + QString("\"");
|
||||||
|
LOG(INFO) << "SteamVR Restart Command: " << cmd;
|
||||||
|
QProcess::startDetached(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user