From 4631eced386756f9413e2b312cc566485a2afccc Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Mon, 19 Dec 2022 21:33:10 +0100 Subject: [PATCH] Configure jpackage to launch JVM with cwd set to Contents/Resources --- build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2c23fc5..7a8a3f6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -192,7 +192,10 @@ runtime { jpackage { imageName = "openrndr-application" skipInstaller = true - if (OperatingSystem.current() == OperatingSystem.MAC_OS) jvmArgs.add("-XstartOnFirstThread") + if (OperatingSystem.current() == OperatingSystem.MAC_OS) { + jvmArgs.add("-XstartOnFirstThread") + jvmArgs.add("-Duser.dir=${"$"}APPDIR/../Resources") + } } options.set(listOf("--strip-debug", "--compress", "1", "--no-header-files", "--no-man-pages")) modules.set(listOf("jdk.unsupported", "java.management"))