使用OpenVR+HTcVive的VR程序,每次部署都需要安装steam平台,再安装steamVR 运行环境,导致部署相对麻烦,尤其是多台主机部署,所以就想研究下有什么办法脱离steam框架。
- 经过反复测试和摸索,发现,Steam下载SteamVR时,会先缓存到本地downloading目录,然后拷贝到制定目录进行注册安装。最终Steam安装目录下的:steamapps\common\SteamVR目录文件得到了更新。
-
找到SteamVR目录,发现vrpathreg.exe比较有嫌疑,命令行下执行:vrpathreg.exe /?
Commands: show - Display the current paths setruntime <path> - Sets the runtime path setthis - Sets the runtime path to the runtime that vrpathreg lives in setconfig <path> - Sets the config path setlog <path> - Sets the log path adddriver <path> - Adds an external driver removedriver <path> - Removes an external driver
-
研究了下参数,发现:setruntime、setlog、setconfig 命令可以执行安装路径设置,明确可以运行VR程序。
-
整理了下,只需写个批处理就可完成Runtime的安装:
vrpathreg.exe setruntime %~dp0\SteamVR vrpathreg.exe setconfig %~dp0\config vrpathreg.exe setlog %~dp0\logs %regApp% show