mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Update unix socket directory to be /tmp/ instead of user home.
This commit is contained in:
@@ -38,8 +38,8 @@ enum class OperatingSystem(
|
||||
var dir = System.getenv("SLIMEVR_SOCKET_DIR")
|
||||
if (dir != null) return dir
|
||||
if (currentPlatform == LINUX) {
|
||||
dir = System.getenv("XDG_RUNTIME_DIR")
|
||||
if (dir != null) return dir
|
||||
dir = "/tmp/"
|
||||
return dir
|
||||
}
|
||||
return System.getProperty("java.io.tmpdir")
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ val VERSION =
|
||||
(GIT_VERSION_TAG.ifEmpty { GIT_COMMIT_HASH }) +
|
||||
if (GIT_CLEAN) "" else "-dirty"
|
||||
|
||||
val featureFlags = FeatureFlags()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("awt.useSystemAAFontSettings", "on")
|
||||
System.setProperty("swing.aatext", "true")
|
||||
@@ -53,7 +55,6 @@ fun main(args: Array<String>) {
|
||||
val formatter = HelpFormatter()
|
||||
val options = Options()
|
||||
val isLinux = System.getProperty("os.name").lowercase().contains("linux")
|
||||
val featureFlags = FeatureFlags()
|
||||
options.addOption("h", "help", false, "Show help")
|
||||
options.addOption("V", "version", false, "Show version")
|
||||
options.addOption("i", "install", true, "Run the driver install")
|
||||
@@ -243,7 +244,7 @@ fun provideBridges(
|
||||
)
|
||||
yield(linuxBridge)
|
||||
}
|
||||
|
||||
LogManager.info("Socket Dir ${OperatingSystem.socketDirectory}")
|
||||
yield(
|
||||
UnixSocketBridge(
|
||||
server,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package dev.slimevr.desktop.install.drivers
|
||||
|
||||
import dev.slimevr.desktop.featureFlags
|
||||
import io.eiren.util.logging.LogManager
|
||||
|
||||
class Linux {
|
||||
@@ -33,6 +34,13 @@ class Linux {
|
||||
|
||||
fun feeder() {
|
||||
executeShellCommand("chmod", "+x", "$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App")
|
||||
|
||||
val command = if (featureFlags.steam) {
|
||||
arrayOf("steam-runtime-launch-client", "--alongside-steam", "--", "udevadm", "cat")
|
||||
} else {
|
||||
arrayOf("udevadm", "cat")
|
||||
}
|
||||
val udevResponse = executeShellCommand(*command)
|
||||
val feederOutput = executeShellCommand("$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App", "--install")
|
||||
if (feederOutput == null) {
|
||||
LogManager.warning("Error installing feeder")
|
||||
|
||||
Reference in New Issue
Block a user