Build offline OpenPrestige release bundles
Rename the injector and package it with an embedded payload for Windows, Linux, and macOS x64/ARM64. Add a core-only ImGui native build, multi-platform CI and release packaging, and shared per-user storage with legacy config migration.
This commit is contained in:
1 parent
5152e6e0a6
commit
2d6b2a3cd1
37 files changed
+1284
-451
No files matched your search
@@ -0,0 +1,42 @@
|
||||
package dev.zprestige.prestige.client;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public final class AppPaths {
|
||||
private static final Path ROOT = root();
|
||||
|
||||
private AppPaths() {}
|
||||
|
||||
public static Path configs() {
|
||||
return ROOT.resolve("configs");
|
||||
}
|
||||
|
||||
public static Path runtime() {
|
||||
return ROOT.resolve("runtime");
|
||||
}
|
||||
|
||||
private static Path root() {
|
||||
String os = System.getProperty("os.name", "");
|
||||
Path base;
|
||||
if (os.startsWith("Windows")) {
|
||||
base = env("APPDATA");
|
||||
Path home = env("USERPROFILE");
|
||||
if (base == null && home != null) base = home.resolve("AppData").resolve("Roaming");
|
||||
} else {
|
||||
Path home = env("HOME");
|
||||
if (os.startsWith("Mac")) {
|
||||
base = home == null ? null : home.resolve("Library").resolve("Application Support");
|
||||
} else {
|
||||
base = env("XDG_DATA_HOME");
|
||||
if (base == null || !base.isAbsolute()) base = home == null ? null : home.resolve(".local").resolve("share");
|
||||
}
|
||||
}
|
||||
if (base == null) base = Path.of(System.getProperty("java.io.tmpdir"));
|
||||
return base.resolve(".openprestige");
|
||||
}
|
||||
|
||||
private static Path env(String name) {
|
||||
String value = System.getenv(name);
|
||||
return value == null || value.isEmpty() ? null : Path.of(value);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user