Skip to content

Conversation

@JanisErdmanis
Copy link

This PR demonstrates the feasibility of bundling BonitoBook as a standalone installer using AppBundler. I only needed to address relocation issues with BonitoBook itself with hardcoded paths @__DIR__. I replaced them with pkgdir(@__MODULE__), which makes them relocatable while not requiring them to be instantiated from the compilation cache at runtime, which doesn’t sit well with me.

Since BonitoBook itself does not depend on Electron, it made sense to create a submodule, BonitoBookGUI, that references the parent project using the new [sources] entry within Project'.toml. I added the dependencies to Project.toml that I spotted in the examples, and loaded them into BonitoBookGUI for precompilation. That will be unnecessary in the future as I plan to make all project dependencies compile by default, with the option to opt out.

The build can be run with Build Release Assets under GitHub actions or locally with:

julia --project=BonitoBookGUI/meta BonitoBookGUI/meta/build.jl —build-dir=build

I tested the GitHub-generated builds for macOS, Linux, and Windows and can report that installation works and that the installed applications are running on all platforms.

The startup time is currently not great, being around 12s on my M1 Pro laptop. I plan to add sysimage generation and replacement as an alternative to the precompilation cache distribution to AppBundler over the next month, which will also address this. Another issue is that examples themselves have a significant startup time. That could be addressed by adding precompilation statements to the BonitoBookGUI application with PrecompileTools or manually.

Further improvements, like a custom icon, name, description, or starting Julia with multiple threads, can be implemented with overrides in the BonitoBook/meta/ folder, which take precedence over defaults in the AppBundler/recipes/ folder.

@SimonDanisch SimonDanisch marked this pull request as ready for review November 17, 2025 13:23
@SimonDanisch SimonDanisch merged commit ad8944b into SimonDanisch:sd/welcome-page Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants