From c0daca3a978aac70ffe065e37c15a3b94265bf26 Mon Sep 17 00:00:00 2001 From: "jose.pereda" Date: Tue, 12 Nov 2024 17:33:47 +0100 Subject: [PATCH] Allow importing FXML files with javascript --- .github/scripts/jpackage.bat | 1 + .github/workflows/bundles-linux.yml | 1 + .github/workflows/bundles-mac.yml | 1 + .github/workflows/bundles-mac_aarch64.yml | 1 + .../javafx/scenebuilder/kit/fxom/HeaderWithNotOnlyImports.fxml | 2 +- pom.xml | 3 ++- 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/scripts/jpackage.bat b/.github/scripts/jpackage.bat index 523980368..50e94687c 100644 --- a/.github/scripts/jpackage.bat +++ b/.github/scripts/jpackage.bat @@ -23,6 +23,7 @@ REM set MODULES=java.desktop,java.logging,java.naming,java.prefs,java.security.j --runtime-image app/target/runtime ^ --dest %INSTALL_DIR% ^ --type msi ^ +--java-options "-Djavafx.allowjs=true" ^ --java-options "--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED" ^ --java-options "-Djava.library.path=runtime\bin;runtime\lib" ^ --icon app/assets/windows/icon-windows.ico ^ diff --git a/.github/workflows/bundles-linux.yml b/.github/workflows/bundles-linux.yml index 68dfce3ce..6de65e811 100644 --- a/.github/workflows/bundles-linux.yml +++ b/.github/workflows/bundles-linux.yml @@ -77,6 +77,7 @@ jobs: .github/scripts/jpackage.sh \ --icon app/assets/linux/icon-linux.png \ --java-options '"-Djdk.gtk.version=2"' \ + --java-options '"-Djavafx.allowjs=true"' \ --java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ --java-options '"-Djava.library.path=/opt/scenebuilder/lib/runtime/bin:/opt/scenebuilder/lib/runtime/lib"' \ --linux-menu-group '"Development;Building;GUIDesigner;Java;"' \ diff --git a/.github/workflows/bundles-mac.yml b/.github/workflows/bundles-mac.yml index ce8e5ccad..8105623ac 100644 --- a/.github/workflows/bundles-mac.yml +++ b/.github/workflows/bundles-mac.yml @@ -88,6 +88,7 @@ jobs: run: | .github/scripts/jpackage.sh \ --icon app/assets/osx/icon-mac.icns \ + --java-options '"-Djavafx.allowjs=true"' \ --java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ --type dmg \ --mac-package-identifier com.gluonhq.scenebuilder \ diff --git a/.github/workflows/bundles-mac_aarch64.yml b/.github/workflows/bundles-mac_aarch64.yml index 253b7a3a8..9feb23aec 100644 --- a/.github/workflows/bundles-mac_aarch64.yml +++ b/.github/workflows/bundles-mac_aarch64.yml @@ -89,6 +89,7 @@ jobs: run: | .github/scripts/jpackage.sh \ --icon app/assets/osx/icon-mac.icns \ + --java-options '"-Djavafx.allowjs=true"' \ --java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ --type dmg \ --mac-package-identifier com.gluonhq.scenebuilder \ diff --git a/kit/src/test/resources/com/oracle/javafx/scenebuilder/kit/fxom/HeaderWithNotOnlyImports.fxml b/kit/src/test/resources/com/oracle/javafx/scenebuilder/kit/fxom/HeaderWithNotOnlyImports.fxml index 9c1dc611d..913bc2d0f 100644 --- a/kit/src/test/resources/com/oracle/javafx/scenebuilder/kit/fxom/HeaderWithNotOnlyImports.fxml +++ b/kit/src/test/resources/com/oracle/javafx/scenebuilder/kit/fxom/HeaderWithNotOnlyImports.fxml @@ -1,6 +1,6 @@ - + diff --git a/pom.xml b/pom.xml index 3cd024869..f34de7467 100644 --- a/pom.xml +++ b/pom.xml @@ -80,6 +80,7 @@ ${main.class.name} + @@ -139,7 +140,7 @@ false 1 - --add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit + --add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit -Djavafx.allowjs=true