SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
fix(macos): package the app as SolidCraft (#347) (#354)
Nathan Dane4eaadf3099fa
diff --git a/.github/release-notes.md b/.github/release-notes.mdindex d819ab7dea..4224aca05a 100644--- a/.github/release-notes.md+++ b/.github/release-notes.md@@ -13,7 +13,7 @@ SolidCraft project Pages URLs; old-name Pages addresses are not permanent aliase**Which file?**- **Windows:** `SolveCraft-{version}-windows-x64.exe` runs as is. Or install the `.msi`, or unzip the`-portable.zip` (x64, x86 and arm64).-- **macOS 11+** (Apple silicon and Intel): open the `.dmg` and drag `SolveCraft.app` onto Applications.+- **macOS 11+** (Apple silicon and Intel): open the `.dmg` and drag `SolidCraft.app` onto Applications.The CLI is in `solvecraft-cli-{version}-macos-universal.zip`.- **Linux** (x86_64 and aarch64, glibc 2.35+): the `.AppImage` (`chmod +x`, then run it), the`.deb` or `.rpm`, the `.flatpak` (`flatpak install --user <file>`), or the `.tar.gz`.@@ -21,6 +21,12 @@ SolidCraft project Pages URLs; old-name Pages addresses are not permanent aliase- **Web:** `solvecraft-web-{version}.zip` is a static site to host yourself.- `SHA256SUMS.txt`: `sha256sum -c SHA256SUMS.txt --ignore-missing`.+**Updating macOS from SolveCraft.app:** quit the app, rename the existing app in+Applications to `SolidCraft.app`, then drag the new app from the DMG onto Applications+and choose **Replace**. If both names are already installed, move the old `SolveCraft.app`+to the Trash. Remove any Dock shortcut with the old name and pin the new app. Designs,+settings and the bundle identifier are unchanged. The DMG includes these instructions.+For Flatpak feed installation and updates, add Flathub for the required runtime beforeinstalling SolidCraft; keep both remotes in the same user installation:@@ -34,8 +40,8 @@ flatpak run ai.storyteller.solvecraftSingle-file `.flatpak` bundles include the runtime repository address; missing runtimesstill need an internet connection. [Linux installation details](https://bherbruck.github.io/solidcraft/guide/getting-started.html#linux-flatpak).-The builds aren't signed yet. On macOS, right-click `SolveCraft.app` in Applications and choose-**Open** the first time (or run `xattr -dr com.apple.quarantine /Applications/SolveCraft.app`).+The builds aren't signed yet. On macOS, right-click `SolidCraft.app` in Applications and choose+**Open** the first time (or run `xattr -dr com.apple.quarantine /Applications/SolidCraft.app`).On Windows, SmartScreen may say "Windows protected your PC": **More info**, then **Run anyway**.Licences are built in (Help ▸ About ▸ Licences, `solvecraft-cli licences`); the packages alsoinstall `THIRD-PARTY-LICENSES.txt`. Known limitations:diff --git a/README.md b/README.mdindex 35e530420a..781c523d9c 100644--- a/README.md+++ b/README.md@@ -33,6 +33,9 @@ Cargo package names, settings/recovery locations and package IDs keep their exisPublished 0.2.0 and 0.2.1 packages and demo recordings retain their original SolveCraft brandingand filenames.+On macOS, the DMG contains `SolidCraft.app`. To replace an older `SolveCraft.app`+without installing a second copy, follow the [macOS upgrade instructions](https://bherbruck.github.io/solidcraft/guide/getting-started.html#macos).+Use the SolidCraft documentation and web-app URLs above. GitHub redirects links to therenamed repository; old-name Pages and Flatpak URLs are not maintained as permanent aliases.diff --git a/docs/book/src/guide/getting-started.md b/docs/book/src/guide/getting-started.mdindex 7a7b123df5..848e5805e9 100644--- a/docs/book/src/guide/getting-started.md+++ b/docs/book/src/guide/getting-started.md@@ -19,6 +19,17 @@ cargo run --release -p solvecraft -- --sample # opens with a sample part`solvecraft design.solvecraft` opens a saved design. Windows builds cross-compile from Linux with`cargo xwin build --release --target x86_64-pc-windows-msvc -p solvecraft`.+### macOS++Open the release `.dmg` and drag `SolidCraft.app` onto Applications.++When updating from an older `SolveCraft.app`, quit the app and rename the existing+app in Applications to `SolidCraft.app` first. Then drag the new app onto Applications+and choose **Replace**. If you already have both names installed, move the old+`SolveCraft.app` to the Trash. The DMG does not remove old installations automatically.+Remove any Dock shortcut with the old name, open the new app from Applications, and+choose **Options > Keep in Dock**. Designs, settings and the bundle ID are unchanged.+### Linux FlatpakInstall Flatpak using your distribution's package manager. For an installation that receivesdiff --git a/docs/nix.md b/docs/nix.mdindex 7ea73a69aa..84b5fb00da 100644--- a/docs/nix.md+++ b/docs/nix.md@@ -37,7 +37,7 @@ solidcraft --sampleOn Linux, this installs the SolidCraft desktop entry, MIME definition and generated iconsizes alongside the commands. On macOS the package contains the binaries only; for a bundled-`SolveCraft.app`, use the release `.dmg`. NixOS/Home Manager can instead put the flake's+`SolidCraft.app`, use the release `.dmg`. NixOS/Home Manager can instead put the flake's`packages.${system}.solidcraft` in `environment.systemPackages`/`home.packages`.If a non-NixOS desktop does not discover profile-installed launchers, ensure thatits session includes `~/.nix-profile/share` in `XDG_DATA_DIRS`, then log out anddiff --git a/docs/releasing.md b/docs/releasing.mdindex 28276f8c78..f1bdc15335 100644--- a/docs/releasing.md+++ b/docs/releasing.md@@ -9,8 +9,12 @@ version bump and no patch release for every merge.## Compatibility names and deploymentSolidCraft is the product display name. Keep existing release asset filenames, including-`SolveCraft-{version}-windows-x64.exe`, `SolveCraft.app` and `solvecraft-cli` archives, together-with installed package IDs and settings paths. Do not rewrite published 0.2.0 or 0.2.1 assets,+`SolveCraft-{version}-windows-x64.exe` and `solvecraft-cli` archives, together+with installed package IDs and settings paths. The macOS DMG now contains `SolidCraft.app`+with a `SolidCraft` bundle executable and icon; its bundle ID remains+`ai.storyteller.solvecraft`. Include the one-time macOS upgrade instructions from+`.github/release-notes.md` so users replace an existing `SolveCraft.app` rather than+installing a second copy. Do not rewrite published 0.2.0 or 0.2.1 assets,checksums, tags or historical release notes.Project Pages publishes the documentation, browser app and published-release Flatpakdiff --git a/packaging/macos/Info.plist.in b/packaging/macos/Info.plist.inindex 448406aebe..d2111bab94 100644--- a/packaging/macos/Info.plist.in+++ b/packaging/macos/Info.plist.in@@ -11,7 +11,7 @@<key>CFBundleName</key><string>SolidCraft</string><key>CFBundleExecutable</key>- <string>SolveCraft</string>+ <string>SolidCraft</string><key>CFBundleIdentifier</key><string>ai.storyteller.solvecraft</string><key>CFBundleInfoDictionaryVersion</key>@@ -27,7 +27,7 @@<key>SolveCraftVersion</key><string>@VERSION@</string><key>CFBundleIconFile</key>- <string>SolveCraft</string>+ <string>SolidCraft</string><key>LSApplicationCategoryType</key><string>public.app-category.graphics-design</string><!-- Must match MACOSX_DEPLOYMENT_TARGET in package.sh. -->diff --git a/packaging/macos/README.txt b/packaging/macos/README.txtnew file mode 100644index 0000000000..73ab679730--- /dev/null+++ b/packaging/macos/README.txt@@ -0,0 +1,17 @@+Install SolidCraft++Drag SolidCraft.app onto Applications.++Updating an older SolveCraft.app installation++1. Quit the app.+2. In Applications, rename the existing SolveCraft.app to SolidCraft.app.+3. Drag SolidCraft.app from this disk image onto Applications and choose Replace.++If both names are already present, keep SolidCraft.app and move the old+SolveCraft.app to the Trash. The disk image does not remove old installations.+If your Dock shortcut still uses the old name, remove it from the Dock, then+open SolidCraft.app from Applications and choose Options > Keep in Dock.++Your designs and settings keep their existing locations. The bundle identifier+remains ai.storyteller.solvecraft; saved designs still use .solvecraft.diff --git a/packaging/macos/package.sh b/packaging/macos/package.shindex 940033eaeb..2daf0a4931 100755--- a/packaging/macos/package.sh+++ b/packaging/macos/package.sh@@ -1,7 +1,7 @@#!/usr/bin/env bash# Build and package SolidCraft for macOS:#-# $DIST/solvecraft-<version>-macos-<arch>.dmg SolveCraft.app on a drag-to-Applications DMG+# $DIST/solvecraft-<version>-macos-<arch>.dmg SolidCraft.app on a drag-to-Applications DMG# $DIST/solvecraft-cli-<version>-macos-<arch>.zip the headless CLI with the licence files## Usage: packaging/macos/package.sh [--arch universal|aarch64|x86_64] [--skip-build]@@ -34,7 +34,7 @@ esacexport MACOSX_DEPLOYMENT_TARGET=11.0SHORT_VERSION="${VERSION%%-*}"WORK="$CARGO_TARGET_DIR/macos-package"-APP="$WORK/SolveCraft.app"+APP="$WORK/SolidCraft.app"DMG="$DIST/solvecraft-$VERSION-macos-$ARCH.dmg"CLI_ZIP="$DIST/solvecraft-cli-$VERSION-macos-$ARCH.zip"@@ -54,18 +54,18 @@ for bin in solvecraft solvecraft-cli; dolipo -info "$WORK/bin/$bin"done-# ---- SolveCraft.app ----------------------------------------------------------------------------+# ---- SolidCraft.app ----------------------------------------------------------------------------echo "==> assembling $APP"mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"-cp "$WORK/bin/solvecraft" "$APP/Contents/MacOS/SolveCraft"+cp "$WORK/bin/solvecraft" "$APP/Contents/MacOS/SolidCraft"# The icon, drawn by the CLI (no image files are committed).-SET="$WORK/SolveCraft.iconset"+SET="$WORK/SolidCraft.iconset"mkdir -p "$SET"for s in 16 32 128 256 512; do"$WORK/bin/solvecraft-cli" icon --size "$s" --out "$SET/icon_${s}x${s}.png" >/dev/null"$WORK/bin/solvecraft-cli" icon --size $((s * 2)) --out "$SET/icon_${s}x${s}@2x.png" >/dev/nulldone-iconutil -c icns -o "$APP/Contents/Resources/SolveCraft.icns" "$SET"+iconutil -c icns -o "$APP/Contents/Resources/SolidCraft.icns" "$SET"mkdir -p "$APP/Contents/Resources/Licenses"copy_docs "$APP/Contents/Resources/Licenses"sed -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/$SHORT_VERSION/g" "$HERE/Info.plist.in" >"$APP/Contents/Info.plist"@@ -79,8 +79,9 @@ codesign --verify --strict --deep --verbose=2 "$APP"echo "==> building $DMG"STAGE="$WORK/dmg"mkdir -p "$STAGE"-ditto "$APP" "$STAGE/SolveCraft.app"+ditto "$APP" "$STAGE/SolidCraft.app"ln -s /Applications "$STAGE/Applications"+cp "$HERE/README.txt" "$STAGE/README.txt"rm -f "$DMG" "$WORK/raw.dmg"# makehybrid + convert builds the image without attaching a device, unlike `create -srcfolder`,# which is flaky on CI runners ("Resource busy").@@ -91,15 +92,25 @@ rm -f "$WORK/raw.dmg"# Check the image as a user gets it: mount it and look inside.MNT="$(mktemp -d)"hdiutil attach -readonly -nobrowse -mountpoint "$MNT" "$DMG"-ls -la "$MNT" "$MNT/SolveCraft.app/Contents" "$MNT/SolveCraft.app/Contents/MacOS" "$MNT/SolveCraft.app/Contents/Resources"+ls -la "$MNT" "$MNT/SolidCraft.app/Contents" "$MNT/SolidCraft.app/Contents/MacOS" "$MNT/SolidCraft.app/Contents/Resources"test -L "$MNT/Applications" && test "$(readlink "$MNT/Applications")" = /Applications-plutil -lint "$MNT/SolveCraft.app/Contents/Info.plist"+plutil -lint "$MNT/SolidCraft.app/Contents/Info.plist"+# Check the names Finder/LaunchServices actually use, as well as compatibility identity.+for key in CFBundleName CFBundleDisplayName CFBundleExecutable CFBundleIconFile; do+ test "$(/usr/libexec/PlistBuddy -c "Print :$key" "$MNT/SolidCraft.app/Contents/Info.plist")" = SolidCraft+done+test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$MNT/SolidCraft.app/Contents/Info.plist")" = "$APP_ID"+test ! -e "$MNT/SolveCraft.app"+test -s "$MNT/SolidCraft.app/Contents/Resources/SolidCraft.icns"+cmp "$HERE/README.txt" "$MNT/README.txt"case "$ARCH" in universal) WANT=(arm64 x86_64) ;; aarch64) WANT=(arm64) ;; *) WANT=(x86_64) ;; esac-lipo "$MNT/SolveCraft.app/Contents/MacOS/SolveCraft" -verify_arch "${WANT[@]}"-test -s "$MNT/SolveCraft.app/Contents/Resources/Licenses/THIRD-PARTY-LICENSES.txt"+for arch in "${WANT[@]}"; do+ lipo "$MNT/SolidCraft.app/Contents/MacOS/SolidCraft" -verify_arch "$arch"+done+test -s "$MNT/SolidCraft.app/Contents/Resources/Licenses/THIRD-PARTY-LICENSES.txt"# Not --strict: the mounted HFS volume adds Finder info, which strict verification rejects.-codesign --verify --deep --verbose=2 "$MNT/SolveCraft.app"-"$MNT/SolveCraft.app/Contents/MacOS/SolveCraft" --version+codesign --verify --deep --verbose=2 "$MNT/SolidCraft.app"+"$MNT/SolidCraft.app/Contents/MacOS/SolidCraft" --versionhdiutil detach "$MNT"# ---- CLI ---------------------------------------------------------------------------------------