mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-27 20:36:31 -08:00
Remove feeder from Steam install code
This commit is contained in:
4 files changed
+6
-44
No files matched your search
@@ -46,14 +46,14 @@ fun main(args: Array<String>) = runBlocking<Unit> {
|
||||
for (arg in args) {
|
||||
when (arg) {
|
||||
"--steam", "-s" -> featureFlags.steam = true
|
||||
"--install", "-i" -> { runInstaller(featureFlags); return@runBlocking }
|
||||
"--install", "-i" -> { runInstaller(); return@runBlocking }
|
||||
"--no-udev", "-u" -> featureFlags.skipCheckUdev = true
|
||||
}
|
||||
}
|
||||
if (CURRENT_PLATFORM != Platform.LINUX) featureFlags.skipCheckUdev = true
|
||||
|
||||
val isInstallDisabled = System.getenv("SLIME_SERVER_DISABLE_INSTALLER")?.toIntOrNull()
|
||||
if (featureFlags.steam && isInstallDisabled != 1) runInstaller(featureFlags)
|
||||
if (featureFlags.steam && isInstallDisabled != 1) runInstaller()
|
||||
|
||||
if (!featureFlags.skipCheckUdev) {
|
||||
val command = if (featureFlags.steam) {
|
||||
|
||||
@@ -8,9 +8,9 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.IOException
|
||||
|
||||
suspend fun runInstaller(featureFlags: FeatureFlags) {
|
||||
suspend fun runInstaller() {
|
||||
when (CURRENT_PLATFORM) {
|
||||
Platform.LINUX -> installLinux(featureFlags)
|
||||
Platform.LINUX -> installLinux()
|
||||
Platform.WINDOWS -> installWindows()
|
||||
else -> AppLogger.install.warn("Updater doesn't support operating system '$CURRENT_PLATFORM'")
|
||||
}
|
||||
@@ -28,4 +28,4 @@ suspend fun executeShellCommand(vararg command: String): String? = try {
|
||||
} catch (e: IOException) {
|
||||
AppLogger.install.warn("Error executing shell command: ${e.message}")
|
||||
null
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,9 @@ import dev.slimevr.AppLogger
|
||||
import dev.slimevr.FeatureFlags
|
||||
|
||||
private const val LINUX_STEAM_DRIVER_DIRECTORY = "slimevr-openvr-driver-x64-linux"
|
||||
private const val LINUX_FEEDER_DIRECTORY = "SlimeVR-Feeder-App-Linux"
|
||||
|
||||
suspend fun installLinux(featureFlags: FeatureFlags) {
|
||||
suspend fun installLinux() {
|
||||
installLinuxSteamVRDriver()
|
||||
installLinuxFeeder(featureFlags)
|
||||
}
|
||||
|
||||
private suspend fun installLinuxSteamVRDriver() {
|
||||
@@ -30,23 +28,3 @@ private suspend fun installLinuxSteamVRDriver() {
|
||||
}
|
||||
AppLogger.install.info("SteamVR driver successfully installed")
|
||||
}
|
||||
|
||||
private suspend fun installLinuxFeeder(featureFlags: FeatureFlags) {
|
||||
val path = System.getProperty("user.dir")
|
||||
executeShellCommand("chmod", "+x", "$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App")
|
||||
val command = if (featureFlags.steam) {
|
||||
arrayOf("steam-runtime-launch-client", "--alongside-steam", "--", "$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App", "--install")
|
||||
} else {
|
||||
arrayOf("$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App", "--install")
|
||||
}
|
||||
val output = executeShellCommand(*command)
|
||||
if (output == null) {
|
||||
AppLogger.install.warn("Error installing feeder")
|
||||
return
|
||||
}
|
||||
if (output.lowercase().contains("manifest is not installed")) {
|
||||
AppLogger.install.warn("Could not install feeder application")
|
||||
} else {
|
||||
AppLogger.install.info("Successfully installed feeder application")
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,9 @@ import com.sun.jna.platform.win32.WinReg
|
||||
import dev.slimevr.AppLogger
|
||||
|
||||
private const val WINDOWS_STEAMVR_DRIVER_DIRECTORY = "slimevr-openvr-driver-win64"
|
||||
private const val WINDOWS_FEEDER_DIRECTORY = "SlimeVR-Feeder-App-win64"
|
||||
|
||||
suspend fun installWindows() {
|
||||
installWindowsSteamVRDriver()
|
||||
installWindowsFeeder()
|
||||
}
|
||||
|
||||
private suspend fun getKeyByPath(hkey: WinReg.HKEY, path: String): Map<String, String> {
|
||||
@@ -49,17 +47,3 @@ private suspend fun installWindowsSteamVRDriver() {
|
||||
}
|
||||
AppLogger.install.info("SteamVR driver successfully installed")
|
||||
}
|
||||
|
||||
private suspend fun installWindowsFeeder() {
|
||||
val path = System.getProperty("user.dir")
|
||||
val output = executeShellCommand("${path}\\${WINDOWS_FEEDER_DIRECTORY}\\SlimeVR-Feeder-App.exe", "--install")
|
||||
if (output == null) {
|
||||
AppLogger.install.warn("Error installing feeder")
|
||||
return
|
||||
}
|
||||
if (output.lowercase().contains("manifest is not installed")) {
|
||||
AppLogger.install.warn("Could not install feeder application")
|
||||
} else {
|
||||
AppLogger.install.info("Successfully installed feeder application")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user