Skip to content

Packages for Linux and macOS - #2

Merged
IPedrax merged 1 commit into
IPedrax:mainfrom
dansity:linux-macos-packaging
Oct 19, 2026
Merged

IPedrax merged 1 commit into
IPedrax:mainfrom
dansity:linux-macos-packaging

Conversation

@dansity

@dansity dansity commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

The roadmap's packaging for Linux and macOS, after CADCraft's packaging/ (the one PhotoCraft and SolidCraft share through craft-common-actions), less what BIMCraft has none of: cross builds, craft-fonts, FreeBSD, the web.

What it builds

Platform Files
Linux x86_64, aarch64 bimcraft-<ver>-linux-<arch>.AppImage (+ .zsync), .deb, .rpm, .tar.gz
macOS universal (11+) bimcraft-<ver>-macos-universal.dmg, bimcraft-cli-<ver>-macos-universal.zip
  • Linux (packaging/linux/package.sh): built on Ubuntu 22.04, so the packages run on glibc 2.35 and later. The AppImage carries update information for AppImageUpdate. The deb and the rpm add the menu entry, the icon, AppStream metadata and MIME types for .bimcraft and .ifc. Their dependencies are the libraries the binary loads at run time (EGL, xkbcommon, X11 and Wayland).
  • macOS (packaging/macos/package.sh): .bimcraft opens in BIMCraft, and .ifc is offered under Open With at Alternate rank, so it doesn't take IFC from another app. With the APPLE_* secrets it's signed and notarized; without them it's signed ad hoc.
  • Release workflow: Windows, Linux and macOS each upload their packages. On a tag, a final job publishes them all with a SHA256SUMS file.

App changes

  • bimcraft --version and bimcraft-cli --version, which the scripts and CI use as a smoke test.
  • The window's app id is io.github.ipedrax.bimcraft (APP_ID), the same as in the desktop file, AppStream and the bundle. Linux desktops use it to match the window to its menu entry and icon.
  • macOS delivers Finder's double-click, Open With and Dock drops as Apple events, not as arguments. fmv-macos-events, the crate PhotoCraft uses, handles them behind a safe API, so the workspace still forbids unsafe. It's 168 lines; I read all of it, and it's pinned exactly. BimApp::os_events brings them into the UI: a file opens the way File > Open does, and Quit closes the way the window's close button does, both asking about unsaved changes first.
  • Icons: packaging/icons.sh writes the hicolor PNGs and bimcraft.icns. The macOS icon is shrunk to the size Apple's other app icons use.
  • Also one needless borrow in import.rs that clippy 1.99 rejects (e is Copy).

Testing

  • New tests, each seen failing first: the CLI's --version, and a UI test for files the system opens (it asks first when there are unsaved changes, and still works after the project is replaced) and for Quit asking first.
  • In Ubuntu 22.04: fmt, clippy -D warnings on Linux and on both Apple targets, and all tests (cli 7, core 315, ui 143). Shellcheck passes on every script.
  • package.sh runs end to end, and desktop-file-validate and appstreamcli validate pass.
  • The deb installs on clean Ubuntu 22.04 and the rpm on clean Fedora. On both, the apps run and both file types register.
  • The AppImage opens the sample house under Xvfb, and its window's WM_CLASS is io.github.ipedrax.bimcraft.
  • Not run: the macOS script, which needs a Mac. The first Release run (Actions > Release > Run workflow) on this branch is its test, along with the ubuntu-22.04-arm job.

Signing needs these secrets: APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, KEYCHAIN_PASSWORD, APPLE_ID, APPLE_PASSWORD, APPLE_TEAM_ID.

The roadmap's packaging for Linux and macOS, after CADCraft's packaging/ (as PhotoCraft's and SolidCraft's, through craft-common-actions), less what BIMCraft has none of: cross builds, craft-fonts, FreeBSD, the web.

Linux (packaging/linux/package.sh): an AppImage, a deb, an rpm and a tarball for x86_64 and aarch64, built on Ubuntu 22.04 so they run on glibc 2.35 and later. The AppImage carries update information for AppImageUpdate, with its .zsync beside it; the deb and the rpm add the menu entry, the icon, AppStream metadata and MIME types for .bimcraft (application/x-bimcraft, as the Windows installer registers it) and .ifc (application/x-ifc), which shared-mime-info has neither of. Their dependencies are the libraries the binary opens while it runs (strings on it: EGL on Wayland and X11, xkbcommon, Xcursor, Xi, X11-xcb, wayland-egl, dbus), not CADCraft's list.

macOS (packaging/macos/package.sh): a universal DMG of BIMCraft.app and a zip of the CLI. Info.plist exports the .bimcraft type as BIMCraft's own and imports .ifc at Alternate rank, so it is offered under Open With without taking IFC from another app. Signing and notarization are CADCraft's: with the APPLE_* secrets they run, without them the app is signed ad hoc.

The app: bimcraft and bimcraft-cli say --version, which the scripts and CI run as a smoke test. The window carries the app id io.github.ipedrax.bimcraft (APP_ID), which the desktop file, AppStream and the bundle use too, so a Linux desktop matches the window to its entry and its icon. Finder's double-click, Open With and drops on the Dock come as Apple events, not arguments: fmv-macos-events, the small crate PhotoCraft uses (read whole, pinned), takes them behind a safe API, and BimApp reads them through os_events each frame, a file opening as File > Open does and Quit closing as the window does, both asking first about unsaved changes. reopened keeps the source.

The icons: packaging/icons.sh writes the hicolor PNGs and bimcraft.icns from bimcraft-1024.png with ImageMagick and Pillow, on any OS; the macOS one is the tile shrunk to Apple's 824 px body.

The Release workflow: Windows, Linux and macOS each upload their packages, and on a tag a last job publishes them all with a SHA256SUMS.

Also: one needless borrow in import.rs that clippy 1.99 refuses (e is Copy).

Tests: the CLI's version, and a file the system opens (with unsaved changes it asks first; a second one opens after the first replaced the app) and Quit asking first; each failed first. Checked in Ubuntu 22.04: fmt, clippy -D warnings on Linux and on both Apple targets, the tests (cli 7, core 315, ui 143), shellcheck, package.sh through with desktop-file-validate and appstreamcli passing; the deb installed in a clean Ubuntu 22.04 and the rpm in a clean Fedora, both apps running and both types registered; the AppImage opening the sample house under Xvfb, its window's class io.github.ipedrax.bimcraft. Not run: the macOS script, which needs a Mac, so the workflow's first macOS run is its test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@IPedrax
IPedrax merged commit d8622c7 into IPedrax:main Oct 19, 2026
@IPedrax

IPedrax commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Thanks for this, @dansity. It's merged into main (f976ef8), with your commit and your authorship in the history.

Before merging I added the rest of CADCraft's Linux formats on top of it:

  • Flatpak bundles (x86_64, aarch64), repackaging the Linux job's tarball on the freedesktop 26.08 runtime;
  • Arch packages (x86_64, aarch64), built with makepkg in an Arch container;
  • riscv64 deb, rpm and tarball, cross-built on Ubuntu 24.04 (they need glibc 2.39).

nfpm is now installed against its published SHA-256, two actionlint findings in the existing steps are fixed, and the README, CLAUDE.md and the release job's needs are updated.

I ran the Release workflow by hand on a branch twice, the second time on the final commit, and every job passed, macOS and Windows included. The release step is skipped without a tag. I also installed the CI-built packages in clean environments and ran them: the deb and the AppImage on Ubuntu 22.04, the tarball on Debian 12, the rpm on Fedora, the Arch package on Arch, the riscv64 deb on Ubuntu 24.04 under QEMU and the Flatpak on a host. Each printed its version and rendered the sample plan, and the x86_64 ones opened their window under Xvfb. That found one bug in the new work: the Arch package opened no window under X11 because the X11 libraries were optional dependencies. They are dependencies now.

Not tested: the macOS DMG on a real Mac, a riscv64 window, the Flatpak window, and the release step itself, which needs a tag.

If you'd like to take any of these as a follow-up PR, I left them as they were:

  • permissions: contents: read by default, with write only on the release job, and persist-credentials: false on the checkouts;
  • appimagetool pinned and verified instead of the moving continuous release, and actions pinned by SHA;
  • a draft release that a person publishes, instead of publishing on the tag;
  • the macOS job failing, not warning, when the signing secrets are missing on a tag.

IPedrax added a commit that referenced this pull request Oct 19, 2026
@dansity
dansity deleted the linux-macos-packaging branch November 4, 2026 19:03
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