[ANN] AppBundler.jl - Bundle Your Julia GUI Application

AppBundler v0.2

AppBundler.jl can now create DMG installers for Julia applications using only open-source tools. This new version eliminates host system dependencies by distributing everything as binary JLL components.

I’ve focused on making the bundling process work reliably across Julia-supported POSIX systems without requiring additional software installation. This approach makes AppBundler much easier to test and deploy in various environments.

The new DMG functionality is simple to use through the AppBundler.build_dmg function:

import AppBundler
import Pkg.BinaryPlatforms: MacOS

# Create a .app bundle
AppBundler.build_app(MacOS(:x86_64), "MyApp", "build/MyApp.app")

# Create a .dmg installer with automatic LZMA compression
AppBundler.build_app(MacOS(:x86_64), "MyApp", "build/MyApp.dmg")

These commands work with any example from the AppBundler.jl/examples directory. Your project only needs a main.jl file and a Manifest.toml file so dependencies can be properly tracked.

By default, AppBundler precompiles your application and checks compatibility with the target system. You can set precompile=false to build MacOS applications on Linux and FreeBSD, with precompilation happening on first launch instead. In the future, Julia’s cross-compilation capabilities may allow building installers for all platforms from a single Linux host.

For application signing, you can provide your own certificate in meta/macos/certificate.pfx, protected by a password set in the MACOS_PFX_PASSWORD environment variable. Without a custom certificate, AppBundler generates a self-signing certificate automatically, making the process more accessible for testing.

All code signing is validated in CI with codesign -v MyApp.app to ensure compatibility with standard GUI applications. Note that recent MacOS updates require additional steps to open self-signed applications, involving the Settings/Privacy & Security section.

For advanced users building non-Julia applications or requiring custom layouts, the AppBundler.DMGPack.pac2dmgfunction handles code signing and bundling using rcodesign, xorriso, libdmg_hfsplus, and ds_store utilities.

The next development phase will focus on similar MSIX packaging for Windows applications using open-source tools. I’ve already made progress repurposing makemsix and osslsigncode, though fixing the CMake project for makemsix to use Yggradsil-built dependencies remains a challenge.

Once MSIX support is complete, we’ll develop CI integration pipelines that automatically compile applications for each platform and bundle them as native installers upon GitHub release tagging. This will showcase Julia’s potential for GUI application development.

More details are available in our recent pull request: Replace MacOS SDK with cross-platform open-source alternatives for DMG creation by JanisErdmanis · Pull Request #16 · PeaceFounder/AppBundler.jl · GitHub