Fix JavaFX media: extract native libs from jar to temp dir

The 'media type not supported' error occurs because the JavaFX native
codec .dylib files aren't extracted when loading from classpath.
extractJavafxNativeLibs() finds the javafx-media jar, extracts the
.dylib files to a temp dir, and adds it to java.library.path.

Also remove --add-modules JVM args (caused boot layer init failure).
This commit is contained in:
Kyle Bolen
2026-07-30 06:20:03 +00:00
parent d128835c0d
commit 3c2ec07bdb
2 changed files with 59 additions and 7 deletions

View File

@@ -53,11 +53,6 @@ compose.desktop {
application {
mainClass = "com.bolenpad.photophetch.MainKt"
jvmArgs(
"--add-modules", "javafx.media,javafx.swing,javafx.graphics",
"--add-opens", "javafx.graphics/com.sun.javafx.application=ALL-UNNAMED",
)
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "PhotoPhetch"