diff --git a/Readme.md b/Readme.md index 6db8990..3d99e5b 100644 --- a/Readme.md +++ b/Readme.md @@ -101,4 +101,28 @@ mvn clean package mvn -Pnative clean package ``` +### GitHub Actions & Release Process + +The repository includes automated build workflows: + +* **CI Build** (`.github/workflows/ci-build.yml`): Runs on every push/PR to test both JAR and native builds for Linux and macOS +* **Release Builds** (`.github/workflows/release-builds.yml`): Automatically creates distribution packages on GitHub releases + +**To create a new release:** +1. Create a new tag: `git tag v0.3.2` +2. Push the tag: `git push origin v0.3.2` +3. Create a GitHub release from the tag +4. The workflow will automatically build and attach: + - `SpriteLab-Linux-amd64.tar.gz` (Linux native binary + FFmpeg) + - `SpriteLab-macOS-arm64.tar.gz` (macOS ARM64 native binary + FFmpeg) + +**GraalVM Native Image Configuration:** + +JavaFX applications require special configuration for GraalVM native-image. The configuration files are located in: +- `src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/` + - `reflect-config.json` - Reflection configuration for JavaFX internal classes + - `jni-config.json` - JNI configuration for native JavaFX components + - `resource-config.json` - Resource includes for FXML, CSS, and images + - `native-image.properties` - Build arguments and class initialization settings + Developed by **FedeiaTech**. \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1942d4f..2fe9e11 100644 --- a/pom.xml +++ b/pom.xml @@ -105,6 +105,9 @@ SpriteLab ${exec.mainClass} + + --verbose + diff --git a/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/jni-config.json b/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/jni-config.json new file mode 100644 index 0000000..25cb329 --- /dev/null +++ b/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/jni-config.json @@ -0,0 +1,26 @@ +[ + { + "name": "com.sun.glass.ui.mac.MacApplication" + }, + { + "name": "com.sun.glass.ui.mac.MacView" + }, + { + "name": "com.sun.glass.ui.gtk.GtkApplication" + }, + { + "name": "com.sun.glass.ui.gtk.GtkView" + }, + { + "name": "com.sun.prism.es2.GLContext" + }, + { + "name": "com.sun.prism.es2.GLDrawable" + }, + { + "name": "com.sun.prism.es2.GLFactory" + }, + { + "name": "com.sun.prism.es2.GLPixelFormat" + } +] diff --git a/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/native-image.properties b/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/native-image.properties index a20862a..9104a07 100644 --- a/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/native-image.properties +++ b/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/native-image.properties @@ -1,4 +1,5 @@ Args = --no-fallback \ --report-unsupported-elements-at-runtime \ -H:+ReportExceptionStackTraces \ - --initialize-at-run-time=com.sun.javafx.application.PlatformImpl,org.controlsfx + --initialize-at-build-time=org.slf4j \ + --initialize-at-run-time=com.sun.javafx.application.PlatformImpl,org.controlsfx,com.sun.glass.ui.Application,com.sun.glass.ui.gtk.GtkApplication,com.sun.glass.ui.mac.MacApplication diff --git a/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/reflect-config.json b/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/reflect-config.json index 00e758c..13c75b7 100644 --- a/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/reflect-config.json +++ b/src/main/resources/META-INF/native-image/com.fedeiatech.spritelab/SpriteLab/reflect-config.json @@ -35,5 +35,79 @@ "allPublicConstructors": true, "allDeclaredMethods": true, "allPublicMethods": true + }, + { + "name": "com.sun.javafx.tk.quantum.QuantumToolkit", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.glass.ui.mac.MacApplication", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.glass.ui.mac.MacPlatformFactory", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.glass.ui.gtk.GtkApplication", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.glass.ui.gtk.GtkPlatformFactory", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.prism.es2.ES2Pipeline", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.prism.sw.SWPipeline", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer", + "allDeclaredConstructors": true, + "allPublicConstructors": true + }, + { + "name": "com.sun.scenario.effect.impl.sw.sse.SSEBoxBlurPeer", + "allDeclaredConstructors": true, + "allPublicConstructors": true + }, + { + "name": "com.sun.scenario.effect.impl.sw.sse.SSEBoxShadowPeer", + "allDeclaredConstructors": true, + "allPublicConstructors": true + }, + { + "name": "com.sun.scenario.effect.impl.sw.sse.SSEGaussianBlurPeer", + "allDeclaredConstructors": true, + "allPublicConstructors": true + }, + { + "name": "com.sun.scenario.effect.impl.sw.sse.SSEMotionBlurPeer", + "allDeclaredConstructors": true, + "allPublicConstructors": true } ]