Conversation
Co-authored-by: Sapphire <imsapphire0@gmail.com>
Co-authored-by: Sapphire <imsapphire0@gmail.com>
… into llelievr/electron
server/core/src/main/java/dev/slimevr/protocol/rpc/installinfo/RPCInstallInfoHandler.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Windows.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/games/vrchat/RegEdit.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/games/vrchat/RegEdit.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Windows.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/games/vrchat/RegEdit.kt
Outdated
Show resolved
Hide resolved
server/core/src/main/java/dev/slimevr/protocol/rpc/installinfo/RPCInstallInfoHandler.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Linux.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/install/drivers/Linux.kt
Outdated
Show resolved
Hide resolved
| val parser: CommandLineParser = DefaultParser() | ||
| val formatter = HelpFormatter() | ||
| val options = Options() | ||
| val isLinux = System.getProperty("os.name").lowercase().contains("linux") |
There was a problem hiding this comment.
| val isLinux = System.getProperty("os.name").lowercase().contains("linux") | |
| val isLinux = OperatingSystem.currentPlatform == OperatingSystem.LINUX |
| val 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 | ||
| val isPressureVessel = System.getenv("PRESSURE_VESSEL_RUNTIME")?.isNotEmpty() | ||
| if (isPressureVessel == true) { | ||
| System.getenv("HOME")?.let { Path(it, ".local", "share", "dev.slimevr.SlimeVR") } | ||
| } else { | ||
| val runtimeDir = System.getenv("XDG_RUNTIME_DIR") | ||
| return if (!runtimeDir.isNullOrBlank()) { | ||
| runtimeDir | ||
| } else { | ||
| System.getProperty("java.io.tmpdir") | ||
| } | ||
| } |
There was a problem hiding this comment.
I feel like the previous way of re-assigning to dir is more readable. There's also a missing return statement, and XDG_DATA_HOME is not being handled
| val 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 | |
| val isPressureVessel = System.getenv("PRESSURE_VESSEL_RUNTIME")?.isNotEmpty() | |
| if (isPressureVessel == true) { | |
| System.getenv("HOME")?.let { Path(it, ".local", "share", "dev.slimevr.SlimeVR") } | |
| } else { | |
| val runtimeDir = System.getenv("XDG_RUNTIME_DIR") | |
| return if (!runtimeDir.isNullOrBlank()) { | |
| runtimeDir | |
| } else { | |
| System.getProperty("java.io.tmpdir") | |
| } | |
| } | |
| var dir = System.getenv("SLIMEVR_SOCKET_DIR") | |
| if (dir != null) return dir | |
| if (currentPlatform == LINUX) { | |
| val isPressureVessel = System.getenv("PRESSURE_VESSEL_RUNTIME")?.isNotEmpty() == true | |
| if (isPressureVessel) { | |
| dir = System.getenv("XDG_DATA_HOME")?.let { Path(it, CONFIG_IDENTIFIER) } | |
| ?: System.getenv("HOME")?.let { Path(it, ".local", "share", CONFIG_IDENTIFIER) } | |
| if (dir != null) return dir | |
| } | |
| dir = System.getenv("XDG_RUNTIME_DIR") | |
| if (dir != null) return dir |
There was a problem hiding this comment.
I don't think putting them in the config folder is correct.
There was a problem hiding this comment.
i dont like ra-assigning. Split it in a smaller function
There was a problem hiding this comment.
I don't think putting them in the config folder is correct.
It doesn't put them in the config folder, CONFIG_IDENTIFIER is just a const that is defined as dev.slimevr.SlimeVR. It's used for the folder in .local/share as well, look at resolveLogDirectory
|
I agree with all the proposed changes except the last one. Once this is ready we can merge once v19 is out |
This pr contains changes needed for the steam release to run.
Changes include:
This PR relies on this PR from solarXR SlimeVR/SolarXR-Protocol#198