-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
240b286
commit 7995599
Showing
7 changed files
with
254 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
set MODULE_NAME=EmbeddedSceneBuilderDemo | ||
set MAIN_CLASS=com.gluonhq.scenebuilder.embedded.demo.DemoApplication | ||
|
||
cp target\demo-%APP_VERSION%.jar target\lib\ | ||
|
||
for /F %%i in ('%JAVA_HOME%\bin\jdeps --module-path target\lib --print-module-deps --ignore-missing-deps -m %MODULE_NAME%') do SET JDEPS_MODULES=%%i | ||
|
||
set JAVA_MODULES=javafx.fxml,javafx.media,javafx.swing,javafx.web,java.logging | ||
|
||
%JAVA_HOME%\bin\jlink ^ | ||
--module-path target\lib ^ | ||
--add-modules %JDEPS_MODULES%,%JAVA_MODULES% ^ | ||
--output target\runtime ^ | ||
--strip-debug --compress zip-6 --no-header-files --no-man-pages | ||
|
||
%JPACKAGE_HOME%\bin\jpackage ^ | ||
--module-path target/lib ^ | ||
--runtime-image target/runtime ^ | ||
--dest target/installer ^ | ||
--module %MODULE_NAME%/%MAIN_CLASS% ^ | ||
--name %MODULE_NAME% ^ | ||
--description "Embedded Scene Builder Demo" ^ | ||
--vendor "Gluon" ^ | ||
--copyright "Copyright © 2024 Gluon" ^ | ||
--license-file LICENSE.txt ^ | ||
--app-version %APP_VERSION% ^ | ||
--java-options '"--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit"' ^ | ||
--type msi ^ | ||
--win-dir-chooser ^ | ||
--win-menu ^ | ||
--win-menu-group "Scene Builder" ^ | ||
--win-per-user-install ^ | ||
--win-shortcut | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
MODULE_NAME=EmbeddedSceneBuilderDemo | ||
MAIN_CLASS=com.gluonhq.scenebuilder.embedded.demo.DemoApplication | ||
|
||
cp target/demo-$APP_VERSION.jar target/lib/ | ||
|
||
jdeps_modules=$($JAVA_HOME/bin/jdeps --module-path target/lib --print-module-deps --ignore-missing-deps -m $MODULE_NAME) | ||
JAVA_MODULES=javafx.fxml,javafx.media,javafx.swing,javafx.web,java.logging | ||
|
||
$JAVA_HOME/bin/jlink \ | ||
--module-path target/lib \ | ||
--add-modules $jdeps_modules,$JAVA_MODULES \ | ||
--output target/runtime \ | ||
--strip-debug --compress zip-6 --no-header-files --no-man-pages | ||
|
||
$JPACKAGE_HOME/bin/jpackage \ | ||
--module-path target/lib \ | ||
--runtime-image target/runtime \ | ||
--dest target/installer \ | ||
--module $MODULE_NAME/$MAIN_CLASS \ | ||
--name $MODULE_NAME \ | ||
--description "Embedded Scene Builder Demo" \ | ||
--vendor "Gluon" \ | ||
--copyright "Copyright © 2024 Gluon" \ | ||
--license-file LICENSE.txt \ | ||
--app-version $APP_VERSION \ | ||
--java-options '"--add-opens=javafx.fxml/javafx.fxml=com.gluonhq.scenebuilder.kit"' \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
JAVA_RELEASE: '23' | ||
JAVA_VERSION: '23.0.1' | ||
JAVAFX_VERSION: '23.0.1' | ||
APP_VERSION: '1.0.0' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ macos-13, macos-14, ubuntu-latest, windows-latest ] | ||
include: | ||
- os: macos-13 | ||
ARCH: "-amd64" | ||
PLAT: "macos" | ||
FX: "osx-x64" | ||
- os: macos-14 | ||
ARCH: "-aarch64" | ||
PLAT: "macos" | ||
FX: "osx-aarch64" | ||
- os: ubuntu-latest | ||
ARCH: "" | ||
PLAT: "linux" | ||
FX: "linux-x64" | ||
- os: windows-latest | ||
ARCH: "" | ||
PLAT: "win" | ||
FX: "windows-x64" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: oracle-actions/[email protected] | ||
with: | ||
website: jdk.java.net | ||
release: ${{ env.JAVA_RELEASE }} | ||
version: ${{ env.JAVA_VERSION }} | ||
|
||
- uses: Apple-Actions/import-codesign-certs@v3 | ||
if: github.event_name != 'pull_request' && (matrix.os == 'macos-13' || matrix.os == 'macos-14') | ||
with: | ||
p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} | ||
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }} | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Build and package Jar (non-windows) | ||
if: matrix.os != 'windows-latest' | ||
run: mvn -B -ntp -q clean package -Dmaven.test.skip=true | ||
|
||
- name: Build and package Jar (windows) | ||
if: matrix.os == 'windows-latest' | ||
shell: cmd | ||
run: call mvn -B -ntp package -Dmaven.test.skip=true | ||
|
||
- name: Create Bundle using jpackage for macos | ||
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | ||
id: outputfile_mac | ||
run: | | ||
if [[ ${{ github.event_name }} != 'pull_request' ]]; then | ||
.github/scripts/jpackage.sh \ | ||
--type dmg \ | ||
--mac-package-identifier com.gluonhq.scenebuilder.embedded.Demo \ | ||
--mac-package-name 'Embedded SB Demo' \ | ||
--mac-package-signing-prefix "${{ env.MACSIGN_PREFIX }}" \ | ||
--mac-signing-key-user-name "${{ env.MACSIGN_USER }}" \ | ||
--mac-sign | ||
else | ||
.github/scripts/build_app_mac.sh \ | ||
--type dmg \ | ||
--mac-package-identifier com.gluonhq.scenebuilder.embedded.Demo \ | ||
--mac-package-name 'Embedded SB Demo' | ||
fi | ||
mv target/installer/EmbeddedSceneBuilderDemo-${{ env.APP_VERSION }}.dmg target/installer/EmbeddedSceneBuilderDemo-${{ env.APP_VERSION }}${{ matrix.ARCH }}.dmg | ||
echo path=target/installer/EmbeddedSceneBuilderDemo-${{ env.APP_VERSION }}${{ matrix.ARCH }}.dmg >> $GITHUB_OUTPUT | ||
env: | ||
JPACKAGE_HOME: ${{ env.JAVA_HOME }} | ||
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }} | ||
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }} | ||
APP_VERSION: ${{ env.APP_VERSION }} | ||
|
||
- name: Create Bundle using jpackage for linux | ||
if: matrix.os == 'ubuntu-latest' | ||
id: outputfile_linux | ||
run: | | ||
.github/scripts/jpackage.sh \ | ||
--type deb | ||
echo path_deb=target/installer/embeddedscenebuilderdemo_${{ env.APP_VERSION }}_amd64.deb >> $GITHUB_OUTPUT | ||
.github/scripts/jpackage.sh \ | ||
--type rpm | ||
ls -l target/installer/ | ||
echo path_rpm=target/installer/embeddedscenebuilderdemo-${{ env.APP_VERSION }}-1.x86_64.rpm >> $GITHUB_OUTPUT | ||
env: | ||
JPACKAGE_HOME: ${{ env.JAVA_HOME }} | ||
APP_VERSION: ${{ env.APP_VERSION }} | ||
|
||
- name: Create Bundle using jpackage for windows | ||
if: matrix.os == 'windows-latest' | ||
id: outputfile_win | ||
shell: cmd | ||
run: | | ||
call .github\scripts\jpackage.bat | ||
echo path=target\installer\EmbeddedSceneBuilderDemo-${{ env.APP_VERSION }}.msi >> %GITHUB_OUTPUT% | ||
env: | ||
JPACKAGE_HOME: ${{ env.JAVA_HOME }} | ||
APP_VERSION: ${{ env.APP_VERSION }} | ||
|
||
- name: Notarize Release Build | ||
if: github.event_name != 'pull_request' && (matrix.os == 'macos-13' || matrix.os == 'macos-14') | ||
uses: erwin1/xcode-notarizer@v1 | ||
with: | ||
product-path: ${{ steps.outputfile_mac.outputs.path }} | ||
apple-id: ${{ secrets.NOTARIZATION_USERNAME }} | ||
app-password: ${{ secrets.NOTARIZATION_PASSWORD }} | ||
team-id: ${{ secrets.GLUON_MACSIGN_PREFIX }} | ||
|
||
- name: Archive jpackage for macos | ||
if: matrix.os == 'macos-13' || matrix.os == 'macos-14' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EmbeddedSceneBuilderDemo-${{ matrix.PLAT }}${{ matrix.ARCH }} | ||
path: ${{ steps.outputfile_mac.outputs.path }} | ||
|
||
- name: Archive jpackage for linux deb | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EmbeddedSceneBuilderDemo-${{ matrix.PLAT }}${{ matrix.ARCH }}-deb | ||
path: ${{ steps.outputfile_linux.outputs.path_deb }} | ||
|
||
- name: Archive jpackage for linux rpm | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EmbeddedSceneBuilderDemo-${{ matrix.PLAT }}${{ matrix.ARCH }}-rpm | ||
path: ${{ steps.outputfile_linux.outputs.path_rpm }} | ||
|
||
- name: Archive jpackage for windows | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EmbeddedSceneBuilderDemo-${{ matrix.PLAT }}${{ matrix.ARCH }} | ||
path: ${{ steps.outputfile_win.outputs.path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters