Juliacon 2024

AppBundler.jl - Bundle your Julia GUI Application
07-10, 12:00–12:30 (Europe/Amsterdam), For Loop (3.2)

AppBundler is a versatile tool that simplifies the bundling of Julia GUI applications across different desktop platforms, including Linux, MacOS, and Windows. This talk discusses its capabilities and showcases the bundling and post-processing steps required to create a double-click installer for each platform.


Julia's ecosystem has a comprehensive range of GUI framework bindings, remarkably compatible across all major desktop platforms. Deploying Julia applications is straightforward for those with technical know-how, particularly in terms of instantiating the project's manifest file. However, the average user typically anticipates a more streamlined installation process. This includes a double-click installer, with easy access from the system menu, complete with an icon. They also expect a clean uninstallation process that doesn't leave residual files and returns the system to its prior state.

In the current digital landscape, major desktop platforms have adopted the concept of self-contained applications running in confined environments. For instance, Windows utilizes the MSIX package format, Linux employs flatpacks and snaps, while MacOS favors app bundles. Each format has unique organizational requirements for application directories, configuration files, and inherent functionalities. This poses a challenge to beginners aiming to package their Julia GUI applications.

The introduction of AppBundler marks a significant advancement in simplifying desktop application bundling for Julia. It relies on main.jl as the entry point and the project's Manifest.toml file to encapsulate all the necessary dependencies, including Julia itself. AppBundler uses a scratch space for caching artifacts, which streamlines the bundling process. It makes it quick, predictable, and convenient for rapid iteration. While it offers cross-platform bundling support for MacOS and Linux, AppBundler necessitates additional postprocessing for Windows and MacOS bundles. However, this is simplified through bundled helper scripts, accompanied by comprehensive documentation to assist developers. Additionally, AppBundler facilitates platform-specific customisation via a recipe system.

During the hands-on portion of the talk, we will explore application packaging strategies for Linux, MacOS, and Windows. For Linux, I will demonstrate creating a snap package, showcasing installation, user data storage, and debugging techniques. In MacOS, the focus will be on post-installation procedures, including precompilation, launcher creation, code signing, and .dmg file packaging, supplemented by a demonstration video. For Windows, we'll delve into the intricacies of packaging, such as precompilation, the makemsix command, and debugging, also accompanied by a video demonstration.

The talk will also cover customization options, starting with Project.toml variables under the [bundle] section. Here, application display names, summaries, and descriptions are defined for user visibility upon installation. We'll then discuss individual bundle configurations using the meta directory as the primary source for overriding the bundle recipe. A practical example will feature a GTK application bundled with strict confinement, detailing the specification of plugs in the snap.yaml file. We'll include the inclusion of a custom icon, and the redirection of standard output using init.jl, along with a custom precompile.jl file. Furthermore, we will explore the AppBundler.jl recipe system, demonstrating its utility in creating bundling recipes for uncovered platforms and packaging formats.

Finally, the talk will conclude with a discussion on the future directions of AppBundler.jl. The session will briefly address the current state of application confinement issues, which are crucial for being able to distribute applications in marketplaces, which I have stumbled upon. Finally, I will propose potential hackathon projects, such as developing a GitHub action script and integrating PackageCompiler.jl into the bundling pipeline.

See also:

I am a full-stack Julia developer with a Ph.D. in physics from TU Delft, and I enjoy simplifying complex concepts and making the impossible possible. I have thorough experience in Julia, HTTP, QML, cryptographic protocols, and system architectures. Find more about me on janiserdmanis.org.

This speaker also appears in: