Packaging
Musa CAD ships as four packages. Each one is made by a script in the packaging/ folder, and CI runs the same scripts. All the app’s own files, such as ribbon icons, the logo and the hatch patterns, are compiled into the program, so a package only has to carry the program, its Qt libraries and the desktop integration.
No package includes a DWG converter. DWG support works by running a separate converter program that you install yourself, which keeps every package under the LGPL. See DWG files.
Linux AppImage
Section titled “Linux AppImage”packaging/linux/build_appimage.sh 0.8.0The script builds the release preset, downloads linuxdeploy, its Qt plugin and appimagetool into packaging/linux/.tools/, assembles an AppDir, and writes MusaCAD-0.8.0-x86_64.AppImage in the repository root. It needs qmake6 on your PATH (Debian and Ubuntu: qt6-base-dev) and a network connection the first time.
The AppImage bundles Qt and these plugins:
| Plugin | Why |
|---|---|
qsvg, qsvgicon | the ribbon icons and the logo are SVG |
xcb | X11 sessions |
| Wayland platform plugins | runs natively on Wayland, which saves a frame of pointer delay compared with XWayland |
offscreen, minimal | --plot, --check and other headless runs |
Check it from a folder the build never touched. Start it once with a display, then once without one:
cp MusaCAD-0.8.0-x86_64.AppImage /tmp && cd /tmp./MusaCAD-0.8.0-x86_64.AppImageenv -u DISPLAY -u WAYLAND_DISPLAY APPIMAGE_EXTRACT_AND_RUN=1 \ ./MusaCAD-0.8.0-x86_64.AppImage --plot drawing.musa out.pdf --paper A4To check that Wayland is used on a Wayland session, run the self-test from the extracted AppImage and look for overall: PASS:
QT_QPA_PLATFORM=wayland MUSACAD_SELFTEST=1 ./squashfs-root/AppRunFlatpak and Flathub
Section titled “Flatpak and Flathub”flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepoflatpak install --user -y flathub org.kde.Platform//6.11 org.kde.Sdk//6.11 org.flatpak.Builderpackaging/flatpak/build_flatpak.sh 0.8.0The Flatpak builds against the KDE 6.11 runtime, which provides Qt 6. The script copies a clean tree into packaging/flatpak/.src, builds it with flatpak-builder, and writes the single-file bundle packaging/flatpak/MusaCAD-0.8.0.flatpak. Install and run it with:
flatpak install --user -y packaging/flatpak/MusaCAD-0.8.0.flatpakflatpak run org.musacad.MusaCADWhat the sandbox allows
Section titled “What the sandbox allows”- No file access of its own. Every file dialog is the desktop’s own, through the file chooser portal, so the app only sees the files you pick. When a drawing has external references or images beside it, Musa CAD asks to open its folder instead, so the relative paths still work. A DXF export with images asks for a folder for the same reason.
- The graphics card (
--device=dri) for the drawing area, and the X11 and Wayland display sockets. - The network, for the update check and for downloading the ODA File Converter from DWG Setup.
The ODA converter needs an X11 display. On a Wayland session it runs outside the sandbox through flatpak-spawn --host, which you allow once:
flatpak override --user --talk-name=org.freedesktop.Flatpak org.musacad.MusaCADFlathub
Section titled “Flathub”Musa CAD is on Flathub as org.musacad.MusaCAD. The Flathub manifest lives in flathub/org.musacad.MusaCAD. The copy in packaging/flatpak/flathub/ is the same manifest, pinned to the release tag and its commit. Flathub verifies the app id through https://musacad.org/.well-known/org.flathub.VerifiedApps.txt.
A new release reaches Flathub through a pull request on that repository, opened by the engine’s Flathub workflow or by Flathub’s own checker. Both are described in Releasing. Before proposing a manifest by hand, lint it:
flatpak run --filesystem="$PWD" --command=flatpak-builder-lint org.flatpak.Builder \ --exceptions --exceptions-repo stable manifest "$PWD/packaging/flatpak/flathub/org.musacad.MusaCAD.yml"flatpak run --filesystem="$PWD" --command=flatpak-builder-lint org.flatpak.Builder \ appstream "$PWD/packaging/flatpak/org.musacad.MusaCAD.metainfo.xml"Windows installer
Section titled “Windows installer”The Windows workflow builds on a Windows runner and packages the result with NSIS, from packaging/windows/musacad.nsi. It writes MusaCAD-<version>-x86_64-setup.exe and its .sha256.
The installer:
- installs into
Program Files\Musa CADand asks for administrator rights to do so; - installs two programs:
musacad_app.exe, the app, which opens with no console window, andmusacad.exe, for the command line, which waits and returns an exit code; - offers, unticked by default, to open
.musafiles with Musa CAD and to add Musa CAD to the Open with list for.dxfand.dwg, without taking those over from another program; - upgrades an existing installation in the same folder and keeps your file type choice.
A person tests every installer on a real Windows PC before it is published. See Releasing.
macOS disk image
Section titled “macOS disk image”The macOS workflow builds on an Apple silicon runner, assembles MusaCAD.app with packaging/macos/build_app.sh and macdeployqt, checks that --check and --plot work, and writes MusaCAD-<version>-arm64.dmg.
The drawing area does not work on macOS yet. It needs OpenGL 4.5, and macOS stops at 4.1. The app says so when it starts and exits with code 2. The command line works. Support needs a second render backend, Metal or a reduced OpenGL 4.1 path, and is tracked in issue #2.
To build it on your own Mac:
brew install ninja librsvgcmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_SANITIZERS=OFF -DENABLE_TSAN=OFFcmake --build build --target musacad_appQT_ROOT_DIR=~/Qt/6.8.1/macos packaging/macos/build_app.sh 0.8.0 build/bin/musacad_apphdiutil create -volname "Musa CAD" -srcfolder MusaCAD.app -ov -format UDZO MusaCAD-0.8.0-arm64.dmgThe workflow signs and notarizes the disk image when the Apple signing secrets are set. Without them the image is unsigned, and macOS asks once before opening it.