Update paths for steam releaase on macos

This commit is contained in:
HannahPadd
2026-04-02 12:31:00 +02:00
parent 22319a5c7e
commit 9717d052f6
2 changed files with 12 additions and 4 deletions

View File

@@ -50,14 +50,19 @@ export const getLogsFolder = () => {
export const getExeFolder = () => {
return path.dirname(app.getPath('exe'));
}
};
export const getWindowStateFile = () =>
join(getServerDataFolder(), '.window-state.json');
const localJavaBin = (sharedDir: string) => {
const jre = join(sharedDir, 'jre/bin', javaBin);
return jre;
const platform = getPlatform();
switch (platform) {
case 'macos':
return join(sharedDir, '../../../../jre/Contents/Home/bin', javaBin);
default:
return join(sharedDir, 'jre/bin', javaBin);
}
};
const javaHomeBin = () => {
@@ -116,6 +121,9 @@ export const findServerJar = () => {
// For flatpack container
path.resolve('/app/share/slimevr/'),
path.resolve('/usr/share/slimevr/'),
// For macos on steam
path.resolve(`${app.getPath('exe')}/../../../../`),
];
return paths
.filter((p) => !!p)