Skip to content

Commit 39688b6

Browse files
authored
build: Allow importing FXML files with javascript (#795)
1 parent 00dd138 commit 39688b6

File tree

6 files changed

+7
-2
lines changed

6 files changed

+7
-2
lines changed

.github/scripts/jpackage.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ REM set MODULES=java.desktop,java.logging,java.naming,java.prefs,java.security.j
2323
--runtime-image app/target/runtime ^
2424
--dest %INSTALL_DIR% ^
2525
--type msi ^
26+
--java-options "-Djavafx.allowjs=true" ^
2627
--java-options "--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED" ^
2728
--java-options "-Djava.library.path=runtime\bin;runtime\lib" ^
2829
--icon app/assets/windows/icon-windows.ico ^

.github/workflows/bundles-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
.github/scripts/jpackage.sh \
7878
--icon app/assets/linux/icon-linux.png \
7979
--java-options '"-Djdk.gtk.version=2"' \
80+
--java-options '"-Djavafx.allowjs=true"' \
8081
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
8182
--java-options '"-Djava.library.path=/opt/scenebuilder/lib/runtime/bin:/opt/scenebuilder/lib/runtime/lib"' \
8283
--linux-menu-group '"Development;Building;GUIDesigner;Java;"' \

.github/workflows/bundles-mac.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
run: |
8989
.github/scripts/jpackage.sh \
9090
--icon app/assets/osx/icon-mac.icns \
91+
--java-options '"-Djavafx.allowjs=true"' \
9192
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
9293
--type dmg \
9394
--mac-package-identifier com.gluonhq.scenebuilder \

.github/workflows/bundles-mac_aarch64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ jobs:
8989
run: |
9090
.github/scripts/jpackage.sh \
9191
--icon app/assets/osx/icon-mac.icns \
92+
--java-options '"-Djavafx.allowjs=true"' \
9293
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \
9394
--type dmg \
9495
--mac-package-identifier com.gluonhq.scenebuilder \

kit/src/test/resources/com/oracle/javafx/scenebuilder/kit/fxom/HeaderWithNotOnlyImports.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<?language nameOfScriptLanguage?>
3+
<?language javascript?>
44

55
<!-- This could be a license header -->
66

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<configuration>
8181
<mainClass>${main.class.name}</mainClass>
8282
<options>
83+
<option>-Djavafx.allowjs=true</option>
8384
<option>--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.app</option>
8485
<option>--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit</option>
8586
<option>--add-opens=javafx.controls/com.sun.javafx.scene.control.skin.caspian=com.gluonhq.scenebuilder.kit</option>
@@ -139,7 +140,7 @@
139140
<configuration>
140141
<reuseForks>false</reuseForks>
141142
<forkCount>1</forkCount>
142-
<argLine>--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit</argLine>
143+
<argLine>--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit -Djavafx.allowjs=true</argLine>
143144
</configuration>
144145
</plugin>
145146
</plugins>

0 commit comments

Comments
 (0)