diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 588bfbe..597a05d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -449,7 +449,7 @@ jobs: --mainExe "$mainexe" \ -o release/velopack \ --signAppIdentity "$APPLE_SIGNING_IDENTITY" \ - --signEntitlements "$PWD/resources/entitlements.mac.plist" \ + --signEntitlements "$PWD/resources/entitlements.mac.entitlements" \ --notaryProfile "velopack-notary" fi diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 999243b..561ccf5 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -304,7 +304,7 @@ jobs: --mainExe "$mainexe" \ -o release/velopack \ --signAppIdentity "$APPLE_SIGNING_IDENTITY" \ - --signEntitlements "$PWD/resources/entitlements.mac.plist" \ + --signEntitlements "$PWD/resources/entitlements.mac.entitlements" \ --notaryProfile "velopack-notary" fi diff --git a/package.json b/package.json index c60a750..83bac93 100644 --- a/package.json +++ b/package.json @@ -111,8 +111,8 @@ "icon": "resources/icons/icon.icns", "hardenedRuntime": true, "gatekeeperAssess": false, - "entitlements": "resources/entitlements.mac.plist", - "entitlementsInherit": "resources/entitlements.mac.plist", + "entitlements": "resources/entitlements.mac.entitlements", + "entitlementsInherit": "resources/entitlements.mac.entitlements", "notarize": true, "extendInfo": { "NSMicrophoneUsageDescription": "fee[dB]ack needs microphone access for guitar input and note detection." diff --git a/resources/entitlements.mac.plist b/resources/entitlements.mac.entitlements similarity index 100% rename from resources/entitlements.mac.plist rename to resources/entitlements.mac.entitlements diff --git a/scripts/bundle-slopsmith.sh b/scripts/bundle-slopsmith.sh index 97b8887..38255ea 100755 --- a/scripts/bundle-slopsmith.sh +++ b/scripts/bundle-slopsmith.sh @@ -47,11 +47,26 @@ echo " Source: $SLOPSMITH_DIR" rm -rf "$BUNDLE_DIR" mkdir -p "$BUNDLE_DIR/static" "$BUNDLE_DIR/plugins" -# Server + lib -cp "$SLOPSMITH_DIR/server.py" "$BUNDLE_DIR/" +# Server + lib. Copy ALL top-level .py modules, not just server.py — core +# grows sibling modules (e.g. appstate.py, added in core#833) and a stale +# whitelist here ships a server.py whose imports are missing, crashing the +# packaged backend with ModuleNotFoundError on startup. +cp "$SLOPSMITH_DIR"/*.py "$BUNDLE_DIR/" cp "$SLOPSMITH_DIR/VERSION" "$BUNDLE_DIR/" +# Copy every top-level python package (dir with __init__.py), not a hardcoded +# list — core's R3 refactor keeps adding packages (routers/ in core#834, lib +# extractions in #830/#831) and each miss ships a backend that dies on import. +# plugins/ is bundled selectively further down; tests/ must never ship. +for pkg in "$SLOPSMITH_DIR"/*/__init__.py; do + [ -f "$pkg" ] || continue + pkg_dir="$(dirname "$pkg")" + case "$(basename "$pkg_dir")" in + plugins|tests) continue ;; + esac + cp -r "$pkg_dir" "$BUNDLE_DIR/" +done cp -r "$SLOPSMITH_DIR/lib" "$BUNDLE_DIR/" -rm -rf "$BUNDLE_DIR/lib/__pycache__" +find "$BUNDLE_DIR" -type d -name '__pycache__' -prune -exec rm -rf {} + # Bundled content (progression paths, quests, shop definitions) [ -d "$SLOPSMITH_DIR/data" ] && cp -r "$SLOPSMITH_DIR/data" "$BUNDLE_DIR/" diff --git a/scripts/sign-macos-binaries.sh b/scripts/sign-macos-binaries.sh index f8a368e..b537ef1 100755 --- a/scripts/sign-macos-binaries.sh +++ b/scripts/sign-macos-binaries.sh @@ -29,7 +29,7 @@ fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_DIR="$(dirname "$SCRIPT_DIR")" -ENTITLEMENTS="$PROJECT_DIR/resources/entitlements.mac.plist" +ENTITLEMENTS="$PROJECT_DIR/resources/entitlements.mac.entitlements" if [[ ! -f "$ENTITLEMENTS" ]]; then echo "[sign-macos] entitlements file missing: $ENTITLEMENTS" >&2