2 Commits
REPL ... main

Author SHA1 Message Date
Brendan Robert
93faf14815 Add missing JavaFX reflection configuration for native build
- Add javafx.scene.layout.GridPane and related methods
- Add javafx.scene.layout.ColumnConstraints
- Add javafx.scene.layout.RowConstraints
- Add javafx.geometry.HPos and VPos enums
- Add TilePane.setPrefColumns and setPrefRows methods

These reflection entries are required for FXML loading in native builds
to access JavaFX layout properties via reflection.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 15:57:50 -05:00
Brendan Robert
c2cacbac17 Fix GluonFX configuration for Windows native executable build
- Add <target>host</target> to build executable instead of shared library
- Add <executable>Jace</executable> to specify output name
- Add <appIdentifier>jace</appIdentifier> for application ID
- Fix resourcesList XML syntax error (removed "ceAppl" typo)
- Add nativeImageArgs with --no-fallback flag
- Document Windows-specific PATH requirement for Visual Studio linker

The key issue was that Git's link command was found before Visual Studio's
link.exe in PATH, causing the native image linking to fail. Users must now
prepend the VS tools directory to PATH before building.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 15:42:16 -05:00
3 changed files with 87 additions and 10 deletions

View File

@@ -48,6 +48,17 @@ The Gluon documentation provides a compatibility matrix for each OS platform and
All other native dependencies are automatically downloaded as needed by Maven for the various LWJGL libraries.
### Windows-specific build notes:
On Windows, the Visual Studio linker must be in your PATH before Git's linker. The easiest way to build is to use Git Bash with the Visual Studio tools directory prepended to PATH:
```bash
export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64:$PATH"
mvn clean gluonfx:build
```
The native executable will be created at `target\gluonfx\x86_64-windows\Jace.exe`. Note: You may need to adjust the MSVC version number (14.41.34120) to match your installed Visual Studio version.
### First time build note:
Because Jace provides an annotation processor for compilation, there is a chicken-and-egg problem when building the first time. Currently, this means the first time you compile, run `mvn install` twice. You don't have to do this step again as long as Maven is able to find a previously build version of Jace to provide this annotation processor. I tried to set up the profiles in the pom.xml so that it disables the annotation processor the first time you compile to avoid any issues. If running in a CICD environment, keep in mind you will likely always need to run the "mvn install" step twice, but only if your goal is to build the entire application including the annotations (should not be needed for just running unit tests.)

View File

@@ -31,14 +31,20 @@
<artifactId>gluonfx-maven-plugin</artifactId>
<version>1.0.23</version>
<configuration>
<target>host</target>
<mainClass>jace.JaceApplication</mainClass>
<resourcesList>ceAppl
<executable>Jace</executable>
<appIdentifier>jace</appIdentifier>
<resourcesList>
<resource>.*</resource>
</resourcesList>
<releaseConfiguration>
<vendor>org.badvision</vendor>
<skipSigning>true</skipSigning>
</releaseConfiguration>
<nativeImageArgs>
<arg>--no-fallback</arg>
</nativeImageArgs>
</configuration>
</plugin>
<plugin>

View File

@@ -571,10 +571,18 @@
"name":"javafx.geometry.NodeOrientation",
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"name":"javafx.geometry.HPos",
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"name":"javafx.geometry.Pos",
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"name":"javafx.geometry.VPos",
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"name":"javafx.scene.Camera"
},
@@ -852,15 +860,65 @@
],
"queriedMethods":[{"name":"getAlignment","parameterTypes":["javafx.scene.Node"] }]
},
{
"name":"javafx.scene.layout.ColumnConstraints",
"queryAllDeclaredMethods":true,
"queryAllPublicConstructors":true,
"methods":[
{"name":"<init>","parameterTypes":[] },
{"name":"setHalignment","parameterTypes":["javafx.geometry.HPos"] },
{"name":"setHgrow","parameterTypes":["javafx.scene.layout.Priority"] },
{"name":"setMinWidth","parameterTypes":["double"] },
{"name":"setMaxWidth","parameterTypes":["double"] },
{"name":"setPrefWidth","parameterTypes":["double"] }
]
},
{
"name":"javafx.scene.layout.RowConstraints",
"queryAllDeclaredMethods":true,
"queryAllPublicConstructors":true,
"methods":[
{"name":"<init>","parameterTypes":[] },
{"name":"setValignment","parameterTypes":["javafx.geometry.VPos"] },
{"name":"setVgrow","parameterTypes":["javafx.scene.layout.Priority"] },
{"name":"setMinHeight","parameterTypes":["double"] },
{"name":"setMaxHeight","parameterTypes":["double"] },
{"name":"setPrefHeight","parameterTypes":["double"] }
]
},
{
"name":"javafx.scene.layout.GridPane",
"queryAllDeclaredMethods":true,
"queryAllPublicConstructors":true,
"methods":[
{"name":"<init>","parameterTypes":[] },
{"name":"getColumnConstraints","parameterTypes":[] },
{"name":"getRowConstraints","parameterTypes":[] },
{"name":"setAlignment","parameterTypes":["javafx.geometry.Pos"] },
{"name":"setAlignment","parameterTypes":["javafx.scene.Node","javafx.geometry.Pos"] },
{"name":"setColumnIndex","parameterTypes":["javafx.scene.Node","java.lang.Integer"] },
{"name":"setRowIndex","parameterTypes":["javafx.scene.Node","java.lang.Integer"] },
{"name":"setColumnSpan","parameterTypes":["javafx.scene.Node","java.lang.Integer"] },
{"name":"setRowSpan","parameterTypes":["javafx.scene.Node","java.lang.Integer"] },
{"name":"setHalignment","parameterTypes":["javafx.scene.Node","javafx.geometry.HPos"] },
{"name":"setValignment","parameterTypes":["javafx.scene.Node","javafx.geometry.VPos"] },
{"name":"setMargin","parameterTypes":["javafx.scene.Node","javafx.geometry.Insets"] }
],
"queriedMethods":[
{"name":"getAlignment","parameterTypes":["javafx.scene.Node"] },
{"name":"getColumnIndex","parameterTypes":["javafx.scene.Node"] },
{"name":"getRowIndex","parameterTypes":["javafx.scene.Node"] }
]
},
{
"name":"javafx.scene.layout.HBox",
"queryAllDeclaredMethods":true,
"queryAllPublicConstructors":true,
"methods":[
{"name":"<init>","parameterTypes":[] },
{"name":"setAlignment","parameterTypes":["javafx.geometry.Pos"] },
{"name":"setFillHeight","parameterTypes":["boolean"] },
{"name":"setHgrow","parameterTypes":["javafx.scene.Node","javafx.scene.layout.Priority"] },
{"name":"<init>","parameterTypes":[] },
{"name":"setAlignment","parameterTypes":["javafx.geometry.Pos"] },
{"name":"setFillHeight","parameterTypes":["boolean"] },
{"name":"setHgrow","parameterTypes":["javafx.scene.Node","javafx.scene.layout.Priority"] },
{"name":"setMargin","parameterTypes":["javafx.scene.Node","javafx.geometry.Insets"] }
],
"queriedMethods":[{"name":"getHgrow","parameterTypes":["javafx.scene.Node"] }]
@@ -905,11 +963,13 @@
"queryAllDeclaredMethods":true,
"queryAllPublicConstructors":true,
"methods":[
{"name":"<init>","parameterTypes":[] },
{"name":"setAlignment","parameterTypes":["javafx.geometry.Pos"] },
{"name":"setAlignment","parameterTypes":["javafx.scene.Node","javafx.geometry.Pos"] },
{"name":"setHgap","parameterTypes":["double"] },
{"name":"setVgap","parameterTypes":["double"] }
{"name":"<init>","parameterTypes":[] },
{"name":"setAlignment","parameterTypes":["javafx.geometry.Pos"] },
{"name":"setAlignment","parameterTypes":["javafx.scene.Node","javafx.geometry.Pos"] },
{"name":"setHgap","parameterTypes":["double"] },
{"name":"setVgap","parameterTypes":["double"] },
{"name":"setPrefColumns","parameterTypes":["int"] },
{"name":"setPrefRows","parameterTypes":["int"] }
],
"queriedMethods":[{"name":"getAlignment","parameterTypes":["javafx.scene.Node"] }]
},