Skip to content

Commit

Permalink
changed installer and uninstaller to allow manualy setting paths to s…
Browse files Browse the repository at this point in the history
…teamvr
  • Loading branch information
ju1ce committed Aug 6, 2022
1 parent 9ccb02e commit 079cbab
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
27 changes: 24 additions & 3 deletions install_driver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ set VRPATH=%VRPATH:"=%
set VRPATHREG_EXE=!VRPATH!\\bin\\win64\\vrpathreg.exe

IF "%1"=="help" (
ECHO Usage: install_driver.bat ^[^<driver path^>^] ^[^<path to vrpathreg.exe^>^]
ECHO Usage: install_driver.bat ^[^<driver path^>^] ^[^<path to vrpathreg.exe^>^ ^[^<path to steamvr.vrsettings^>^]
ECHO ^<driver path^> defaults to "%DRIVER_PATH%"
ECHO ^<path to vrpathreg.exe^> defaults to "%VRPATHREG_EXE%"
GOTO end
Expand All @@ -54,12 +54,15 @@ IF NOT EXIST "%DRIVER_PATH%" (
echo(
GOTO end
)

IF NOT EXIST "%VRPATHREG_EXE%" (
ECHO vrpathreg.exe not found: "%VRPATHREG_EXE%"
echo(
echo This usualy means an error with your SteamVR installation.
echo This usualy means an error with your SteamVR installation, or if you have multiple installations of SteamVR.
echo You can also try to locate the vrpathreg.exe file yourself and input it below. The file is inside SteamVR\bin\win64.
echo(
GOTO end

set /p "VRPATHREG_EXE=Enter full path to vrpathreg.exe: "
)

REM remove driver from older versions
Expand Down Expand Up @@ -117,6 +120,22 @@ set VRCONFIG=%VRCONFIG:"=%

set VRSETTINGS=!VRCONFIG!\\steamvr.vrsettings

IF NOT "%3"=="" (
SET "VRSETTINGS=%3"
)

IF NOT EXIST "%VRSETTINGS%" (
ECHO steamvr.vrsettings not found: "%VRSETTINGS%"
echo(
echo This usualy means an error with your SteamVR installation, or if you have multiple installations of SteamVR.
echo You can also try to locate the steamvr.vrsettings file yourself and input it below. The file is inside Steam/config.
echo(

set /p "VRSETTINGS=Enter full path to steamvr.vrsettings:"
)

REM we search for the steamvr section, and add the line to it

set search="steamvr" : {
set replace="steamvr" : { "activateMultipleDrivers" : true,

Expand All @@ -129,6 +148,8 @@ set VRSETTINGS=!VRCONFIG!\\steamvr.vrsettings
endlocal
)

REM if activateMultipleDrivers is already set to false, set it to true. SteamVR will fix up the config and remove duplicates

set search="activateMultipleDrivers" : false,
set replace="activateMultipleDrivers" : true,

Expand Down
7 changes: 6 additions & 1 deletion uninstall_driver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ REM remove driver from older versions

IF NOT EXIST "%VRPATHREG_EXE%" (
ECHO vrpathreg.exe not found: "%VRPATHREG_EXE%"
GOTO end
echo(
echo This usualy means an error with your SteamVR installation, or if you have multiple installations of SteamVR.
echo You can also try to locate the vrpathreg.exe file yourself and input it below. The file is inside SteamVR\bin\win64.
echo(

set /p "VRPATHREG_EXE=Enter full path to vrpathreg.exe: "
)

IF EXIST "!VRPATH!\\drivers\\apriltagtrackers" (
Expand Down

0 comments on commit 079cbab

Please sign in to comment.