From 020eeefcaea833495252db7d8b48090a7101a371 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Sat, 14 Oct 2023 13:29:15 +0900 Subject: [PATCH] Fix ForgeInstallerCLI path for cross-platform. --- app/assets/js/scripts/landing.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index d2c2c89a..bf3690ad 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -558,10 +558,11 @@ async function dlAsync(login = true) { if(isDev) { wrapperPath = join(process.cwd(), 'libraries', 'java', 'ForgeInstallerCLI.jar') } else { + const exePath = remote.app.getPath('exe') if(process.platform === 'darwin'){ - wrapperPath = join(process.cwd(), 'Contents', 'Resources', 'libraries', 'java', 'ForgeInstallerCLI.jar') + wrapperPath = join(exePath, '..', '..', 'Contents', 'Resources', 'libraries', 'java', 'ForgeInstallerCLI.jar') } else { - wrapperPath = join(process.cwd(), 'resources', 'libraries', 'java', 'ForgeInstallerCLI.jar') + wrapperPath = join(exePath, '..', 'resources', 'libraries', 'java', 'ForgeInstallerCLI.jar') } }