This directory contains supplemental packaging assets and templates used to produce native installers and portable distributions beyond the default jpackage outputs.
See docs/JPACKAGE.md for detailed jlink / jpackage guidance and cross-architecture runtime image examples.
| File | Purpose |
|---|---|
graph-digitizer.desktop |
Freedesktop desktop entry used for Linux menu integration and AppImage. |
appimage-builder.yml |
Template consumed by appimage-builder to generate an AppImage from jpackage app-image output. |
deb/postinst, deb/prerm |
Maintainer scripts (templates) for Debian packages (install desktop entry & icon caches, cleanup). |
rpm/graph-digitizer.spec |
RPM spec template describing metadata, files, scriptlets. |
../build/icons/ |
Icon assets (copied automatically from repository root icons/ by Maven during prepare-package). |
selected-icon.properties |
Optional generated properties overriding icon.win, icon.mac, icon.linux. Fallback file provided. |
The desktop file declares:
-
Name,Comment: Display metadata -
Exec: Launcher name produced by jpackage (graph-digitizer) -
Icon: Logical icon reference; when installed system-wide place icon underusr/share/icons/hicolor/... -
Categories: Classification for desktop environment menus
For DEB/RPM packaging you may optionally install this file as part of a post-install step. For AppImage it is bundled automatically by the build script.
The template assumes you have run:
mvn -Pnative -Djpackage.type=app-image package
This produces graph-digitizer-java/target/GraphDigitizer which becomes the ingredient for AppImage creation. The template script section:
-
Copies desktop entry into
usr/share/applications -
Installs a 256x256 icon into
usr/share/icons/hicolor/256x256/apps/ -
Leaves remaining runtime contents under
usr/bin
# Install appimage-builder (refer to official docs)
appimage-builder --recipe graph-digitizer-java/packaging/appimage-builder.yml
Resulting artifact: GraphDigitizer-x86_64.AppImage (optionally create a .zsync file for delta updates).
AppImage can support binary delta updates via a companion .zsync file. After building the AppImage:
# Extract update information (optional embedded metadata)
export APPIMAGE=GraphDigitizer-x86_64.AppImage
# Generate .zsync using appimagetool (needs AppImageKit/appimagetool installed)
appimagetool --generate-update-info "$APPIMAGE" > update-info.txt || true
appimagetool --embed-update-information update-info.txt "$APPIMAGE"
appimagetool --create-zsync "$APPIMAGE"
Host both the .AppImage and .AppImage.zsync at a stable URL. Users of AppImage update tools (e.g. AppImageUpdate) can then perform efficient incremental updates.
Icons are maintained in repository root icons/ (multiple sizes .png/.ico). During build:
-
maven-resources-plugincopies them tograph-digitizer-java/build/icons/ -
Optional selection script
scripts/select-icon.ps1chooses best sizes and writesselected-icon.properties -
properties-maven-pluginreads that properties file (if present) atinitializephase overridingicon.win,icon.mac,icon.linux -
macOS specific
.icnsis generated in CI or locally withscripts/create-mac-iconset.sh -
Fallback
selected-icon.propertiesis auto-created if absent so builds never fail; generate a tailored one viascripts/select-icon.ps1 -DesiredSize 512on Windows.
See .github/workflows/ci.yml:
-
Linux job builds JAR, DEB, RPM, AppImage (.AppImage + optional .zsync generation step can be added).
-
macOS job generates
.icnsprior to DMG packaging. -
Windows job runs icon selection script then builds EXE.
Artifacts are uploaded separately (build-linux, build-macos, build-windows). See the workflow file for the AppImage build using appimage-builder.
Integrate signing by inserting steps that invoke:
pwsh scripts/sign-windows.ps1 -PfxPath certs/code_signing.pfx -PasswordEnvVar WINDOWS_CERT_PASS -Files (Get-ChildItem target -Filter *.exe).FullName
./scripts/sign-macos.sh GraphDigitizer.app "Developer ID Application: Your Company" "teamid123" GraphDigitizer.dmg
Provide secrets via CI (e.g. GitHub Actions encrypted secrets) and guard steps with if: startsWith(github.ref, 'refs/tags/') for releases.
sign-macos.sh handles codesign, notarization submission, polling, and stapling. Ensure xcrun altool / notarytool authentication is configured via keychain or environment variables.
-
Add post-install scripts for DEB/RPM: supply maintainer scripts to install
graph-digitizer.desktop, runupdate-desktop-databaseand refresh icon caches (see provideddeb/postinst,deb/prerm). -
Add AppImage update metadata: edit
update-informationfield in template. -
Add additional icon sizes: place new PNGs/ICOs into root
icons/naming patternscatter-plot-SIZE.png. -
Add Windows / macOS code signing: use provided scripts to sign executables / DMG.
-
Add
.zsyncgeneration and publish both.AppImageand.AppImage.zsync.
-
Icons copied to
build/icons -
selected-icon.propertiesloaded (if generated) -
.icnsgenerated on macOS (or provided manually) -
AppImage built and launches
graph-digitizerbinary -
Desktop file present in AppImage (check with
--appimage-extract) -
.zsyncfile generated for AppImage (optional) -
DEB postinst installs desktop entry & icons
-
RPM spec includes desktop file & icon paths
-
Windows EXE signed (optional)
-
macOS DMG / app signed & notarized (optional)
| Issue | Resolution |
|---|---|
| AppImage fails to start | Ensure executable graph-digitizer exists in jpackage app-image output. |
| Icon missing in DEB/RPM menu | Verify icon installed under usr/share/icons/hicolor/256x256/apps/graph-digitizer.png and run update-icon-caches. |
| DMG shows generic icon | Confirm .icns path passed via -Dicon.mac and file contains expected sizes. |
| Properties file not loaded | Ensure selected-icon.properties is at module root graph-digitizer-java/ when Maven runs. |
| AppImage update fails | Verify .AppImage.zsync hosted at correct URL referenced by embedded update info. |
| Unsigned binary warnings | Integrate signing scripts in CI and validate certificate chain. |
| RPM install missing icon | Add %{_datadir}/icons/hicolor/256x256/apps/graph-digitizer.png to %files in spec. |
All packaging assets are distributed under the project Apache 2.0 license unless otherwise noted.