Repository navigation
Packages for Linux and macOS - #2
Conversation
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]>
|
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:
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 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:
|
The roadmap's packaging for Linux and macOS, after CADCraft's
packaging/(the one PhotoCraft and SolidCraft share throughcraft-common-actions), less what BIMCraft has none of: cross builds, craft-fonts, FreeBSD, the web.What it builds
bimcraft-<ver>-linux-<arch>.AppImage(+.zsync),.deb,.rpm,.tar.gzbimcraft-<ver>-macos-universal.dmg,bimcraft-cli-<ver>-macos-universal.zippackaging/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.bimcraftand.ifc. Their dependencies are the libraries the binary loads at run time (EGL, xkbcommon, X11 and Wayland).packaging/macos/package.sh):.bimcraftopens in BIMCraft, and.ifcis offered under Open With at Alternate rank, so it doesn't take IFC from another app. With theAPPLE_*secrets it's signed and notarized; without them it's signed ad hoc.SHA256SUMSfile.App changes
bimcraft --versionandbimcraft-cli --version, which the scripts and CI use as a smoke test.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.fmv-macos-events, the crate PhotoCraft uses, handles them behind a safe API, so the workspace still forbidsunsafe. It's 168 lines; I read all of it, and it's pinned exactly.BimApp::os_eventsbrings 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.packaging/icons.shwrites the hicolor PNGs andbimcraft.icns. The macOS icon is shrunk to the size Apple's other app icons use.import.rsthat clippy 1.99 rejects (eisCopy).Testing
--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.-D warningson Linux and on both Apple targets, and all tests (cli 7, core 315, ui 143). Shellcheck passes on every script.package.shruns end to end, anddesktop-file-validateandappstreamcli validatepass.WM_CLASSisio.github.ipedrax.bimcraft.ubuntu-22.04-armjob.Signing needs these secrets:
APPLE_CERTIFICATE,APPLE_CERTIFICATE_PASSWORD,KEYCHAIN_PASSWORD,APPLE_ID,APPLE_PASSWORD,APPLE_TEAM_ID.