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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user