PR feedback

This commit is contained in:
HannahPadd
2026-03-16 14:24:56 +01:00
parent 1b299c499d
commit 3fbe64b0c3
4 changed files with 15 additions and 29 deletions

View File

@@ -244,7 +244,6 @@ fun provideBridges(
)
yield(linuxBridge)
}
LogManager.info("Socket Dir ${OperatingSystem.socketDirectory}")
yield(
UnixSocketBridge(
server,

View File

@@ -84,7 +84,7 @@ class RegEditWindows : AbstractRegEdit() {
keysMap[it.key.replace("""_h\d+$""".toRegex(), "")] = it.value.toString()
}
} catch (e: Exception) {
LogManager.severe("[RegEdit] Error reading Values from registry: ${e.message}")
LogManager.severe("[RegEdit] Error reading values from registry", e)
}
return keysMap
}

View File

@@ -11,6 +11,6 @@ fun executeShellCommand(vararg command: String): String? = try {
process.waitFor()
}
} catch (e: IOException) {
LogManager.warning("Error executing shell command: ${e.message}")
LogManager.warning("Error executing shell command", e)
null
}

View File

@@ -30,41 +30,28 @@ class Windows {
val regEdit = RegEditWindows()
val regQuery = regEdit.getKeyByPath(WinReg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 250820")
val steamVRLocation = regQuery["InstallLocation"]
if (steamVRLocation == null) {
LogManager.warning("Error installing SteamVR driver.")
if (steamVRLocation == null || !steamVRLocation.contains("SteamVR")) {
LogManager.warning("Can't find SteamVR, unable to install SteamVR driver")
return
}
if (!steamVRLocation.contains("SteamVR")) {
LogManager.warning("SteamVR not installed, cannot install SlimeVR Steam driver.")
return
}
var vrPathRegContents = executeShellCommand("${steamVRLocation}\\bin\\win64\\vrpathreg.exe", "finddriver", "slimevr")
val pathRegPath = "${steamVRLocation}\\bin\\win64\\vrpathreg.exe"
val vrPathRegContents = executeShellCommand(pathRegPath, "finddriver", "slimevr")
if (vrPathRegContents == null) {
LogManager.warning("Error installing SteamVR driver.")
LogManager.warning("Error installing SteamVR driver")
return
}
var isDriverRegistered = vrPathRegContents.contains("slimevr")
if (isDriverRegistered) {
LogManager.info("steamVR driver is already registered. Skipping...")
if (vrPathRegContents.contains("slimevr")) {
return
}
LogManager.info("Installing SteamVR Driver")
executeShellCommand(
"${steamVRLocation}\\bin\\win64\\vrpathreg.exe",
"adddriver",
"${path}\\${WINDOWS_STEAMVR_DRIVER_DIRECTORY}",
)
vrPathRegContents = executeShellCommand("${steamVRLocation}\\bin\\win64\\vrpathreg.exe", "finddriver", "slimevr")
if (vrPathRegContents == null) {
LogManager.warning("Error installing SteamVR driver.")
executeShellCommand(pathRegPath, "adddriver", "${path}\\${WINDOWS_STEAMVR_DRIVER_DIRECTORY}")
if (executeShellCommand(pathRegPath, "finddriver", "slimevr")?.contains("slimevr") != true) {
LogManager.warning("Failed to install SlimeVR driver")
return
}
isDriverRegistered = vrPathRegContents.contains("slimevr")
if (!isDriverRegistered) {
LogManager.warning("Server couldn't install SlimeVR driver.")
return
}
LogManager.info("SteamVR driver successfully installed.")
LogManager.info("SteamVR driver successfully installed")
}
companion object {