diff --git a/README-MERGED.md b/README-MERGED.md
index 6ce0366..5ab0d3b 100644
--- a/README-MERGED.md
+++ b/README-MERGED.md
@@ -51,9 +51,11 @@ NotProton remembers where the app lives, so keep it in Applications.
checked to apply cleanly to the real 1.2.6 source, but nothing has been compiled or run. If `./build.sh`
stops with a compiler error, copy the red text and send it to me; it should be a quick fix.
- **Steam client version.** This macSteam accepts Steam builds 1792618285 and 1794424036. 1794424036 is also NotProton's stable build, so it is the one that suits both. If Steam is on any other build, Install offers to switch it.
-- **Updates are off** in this build (macSteam's updater would replace this app with plain macSteam).
- To update either project, rebuild from newer sources. The patch in `patches/` is tied to NotProton 1.2.6
- and may need updating for other versions.
+- **Automatic updates** come from this repo's own `appcast.xml`, never from plain macSteam's feed.
+ They are on once `SPARKLE_PUBLIC_KEY` in `build.sh` holds this repo's Sparkle key; until then builds
+ don't update, as before. For each release: build, upload the DMG to the GitHub release, then run
+ `./scripts/appcast-add.sh dist/macSteam-X.Y.Z.dmg X.Y.Z` and push `appcast.xml`.
+ The patch in `patches/` is tied to NotProton 1.2.6 and may need updating for other versions.
- **NotProton's menu-bar items** (Setup, Prefix menus, keyboard shortcuts) aren't in this app. The same
actions are buttons inside the NotProton pages. Its Refresh and prefix buttons are in a bar at the top of
each page.
diff --git a/appcast.xml b/appcast.xml
index 6abf0ee..7478bfb 100644
--- a/appcast.xml
+++ b/appcast.xml
@@ -1,92 +1,8 @@
- macSteam Config
- Most recent changes for macSteam Config.
+ macSteam
+ Combined macSteam + NotProton releases. Add each one with scripts/appcast-add.sh.
en
- -
- Version 0.8.2
- Thu, 23 Oct 2026 04:38:12 +0000
- 13
- 0.8.2
- 13.0
- Support Steam build 1792618285Anchor-based signature resolution survives Steam updates]]>
-
-
- -
- Version 0.8.0
- Wed, 23 Sep 2026 11:46:16 -0400
- 11
- 0.8.0
- 13.0
-
-
-
- -
- Version 0.7.1
- Sat, 05 Sep 2026 00:15:45 -0400
- 10
- 0.7.1
- 13.0
- Adds support for SteamStubSome correctness changesFixed a bug that zero users encountered that would cause failed downloads in some cases]]>
-
-
- -
- Version 0.7.0
- Thu, 03 Sep 2026 00:17:49 -0400
- 9
- 0.7.0
- 13.0
- Bounded the Store reviews fetch with an 8s timeout so a hung endpoint can no longer stall stat lookupsTrimmed the signature database to only the entries actually used at runtime]]>
-
-
- -
- Version 0.6.0
- Tue, 02 Sep 2026 16:00:00 +0000
- 8
- 0.6.0
- 13.0
- Initial Public Release]]>
-
-
- -
- Version 0.5.6
- Tue, 02 Sep 2026 15:30:00 +0000
- 7
- 0.5.6
- 13.0
- Removed config.yaml header comment]]>
-
-
- -
- Version 0.5.5
- Tue, 02 Sep 2026 15:20:00 +0000
- 6
- 0.5.5
- 13.0
- Multi-gen zip import (multiple games per zip)Folder drag-and-drop importSparkle auto-update support]]>
-
-
diff --git a/build.sh b/build.sh
index c7deca9..75cbf65 100755
--- a/build.sh
+++ b/build.sh
@@ -169,7 +169,7 @@ say "Building CloudRedirect's cloud runtime"
"$ROOT/scripts/build-onlinefix.sh" "$APP"
-# Sparkle (needed to launch; automatic updating is switched off in this build)
+# Sparkle: the updater framework (feed and key are set in Info.plist below)
if [ -d "$BIN_DIR/Sparkle.framework" ]; then
ditto "$BIN_DIR/Sparkle.framework" "$APP/Contents/Frameworks/Sparkle.framework"
else
@@ -179,6 +179,19 @@ else
fi
NP_APP_VERSION="$(sed -n 's/^#define NOTPROTON_VERSION "\(.*\)"/\1/p' "$NP_DIR/dylib/version.h")"
+# Automatic updates (Sparkle). The app checks this repo's appcast.xml, and only
+# installs an update signed with the private key whose public half is below
+# (the app is ad-hoc signed, so this key is what proves an update is ours).
+# Until the key is pasted after ":-" below, builds leave updates off, as before.
+# Set MACSTEAM_FEED_URL="" to build a copy that never updates.
+SPARKLE_FEED_URL="${MACSTEAM_FEED_URL-https://raw.githubusercontent.com/Falhoo/macsteam/main/appcast.xml}"
+SPARKLE_PUBLIC_KEY="${MACSTEAM_SPARKLE_PUBLIC_KEY:-}"
+SPARKLE_PLIST=""
+if [ -n "$SPARKLE_FEED_URL" ] && [ -n "$SPARKLE_PUBLIC_KEY" ]; then
+ SPARKLE_PLIST="SUFeedURL $SPARKLE_FEED_URL
+ SUPublicEDKey $SPARKLE_PUBLIC_KEY
+ SUEnableAutomaticChecks "
+fi
cat > "$APP/Contents/Info.plist" <
@@ -194,7 +207,8 @@ cat > "$APP/Contents/Info.plist" <CFBundleLocalizations
endefritzh-Hans
CFBundleShortVersionString $MS_VERSION
- CFBundleVersion 19
+ CFBundleVersion $MS_VERSION
+ $SPARKLE_PLIST
NotProtonVersion $NP_APP_VERSION
LSMinimumSystemVersion 26.0
LSApplicationCategoryType public.app-category.utilities
diff --git a/macsteam-app/Info.plist b/macsteam-app/Info.plist
index b5347ba..803545c 100644
--- a/macsteam-app/Info.plist
+++ b/macsteam-app/Info.plist
@@ -47,8 +47,8 @@
NSPrincipalClass
NSApplication
SUFeedURL
- https://raw.githubusercontent.com/Selectively11/macsteam/main/appcast.xml
+ https://raw.githubusercontent.com/Falhoo/macsteam/main/appcast.xml
SUPublicEDKey
- rDOXzJ+vt12aWeu9hATgvz6q46MlRcgR4gbTfj5YuWQ=
+
diff --git a/macsteam-app/Sources/MacsteamApp/UpdaterManager.swift b/macsteam-app/Sources/MacsteamApp/UpdaterManager.swift
index 3c4f8a4..36906de 100644
--- a/macsteam-app/Sources/MacsteamApp/UpdaterManager.swift
+++ b/macsteam-app/Sources/MacsteamApp/UpdaterManager.swift
@@ -3,6 +3,9 @@ import AppKit
import Combine
import Sparkle
+/// Updates come from the combined macSteam + NotProton feed named by `SUFeedURL` in the
+/// app's Info.plist (build.sh writes it). Each update is checked against `SUPublicEDKey`
+/// before it is installed, because the app itself is only ad-hoc signed.
@MainActor
final class UpdaterManager: NSObject, ObservableObject {
static let shared = UpdaterManager()
@@ -11,9 +14,21 @@ final class UpdaterManager: NSObject, ObservableObject {
@Published var canCheckForUpdates = false
+ /// A build without a feed or a key (a `swift run` dev build, or an older build.sh)
+ /// cannot update; starting Sparkle there would only show an error.
+ let isConfigured: Bool = {
+ let info = Bundle.main.infoDictionary ?? [:]
+ let feed = (info["SUFeedURL"] as? String) ?? ""
+ let key = (info["SUPublicEDKey"] as? String) ?? ""
+ return !feed.isEmpty && !key.isEmpty
+ }()
+
var automaticallyChecksForUpdates: Bool {
- get { controller.updater.automaticallyChecksForUpdates }
- set { controller.updater.automaticallyChecksForUpdates = newValue }
+ get { isConfigured && controller.updater.automaticallyChecksForUpdates }
+ set {
+ guard isConfigured else { return }
+ controller.updater.automaticallyChecksForUpdates = newValue
+ }
}
private override init() {
@@ -28,16 +43,21 @@ final class UpdaterManager: NSObject, ObservableObject {
.assign(to: &$canCheckForUpdates)
}
- // Combined macSteam + NotProton build: automatic updates are switched off on purpose. The
- // stock macSteam update feed would replace this app with plain macSteam (no NotProton).
- func start() {}
+ func start() {
+ guard isConfigured else { return }
+ controller.startUpdater()
+ }
func checkForUpdates() {
- let alert = NSAlert()
- alert.messageText = "Updates are turned off in this combined build"
- alert.informativeText = "macSteam and NotProton are built together, so the built-in updater "
- + "(which only knows about plain macSteam) is disabled. To update, rebuild from newer sources."
- alert.addButton(withTitle: "OK")
- alert.runModal()
+ guard isConfigured else {
+ let alert = NSAlert()
+ alert.messageText = "This build can't update itself"
+ alert.informativeText = "It was built without an update feed or signing key. "
+ + "To update, download and install a newer macSteam release."
+ alert.addButton(withTitle: "OK")
+ alert.runModal()
+ return
+ }
+ controller.checkForUpdates(nil)
}
}
diff --git a/scripts/appcast-add.sh b/scripts/appcast-add.sh
new file mode 100755
index 0000000..135b29e
--- /dev/null
+++ b/scripts/appcast-add.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+# Sign a release DMG for Sparkle and put it at the top of appcast.xml, the feed
+# the app checks for automatic updates.
+#
+# ./scripts/appcast-add.sh DMG VERSION [DOWNLOAD_URL] [NOTES_FILE]
+#
+# Run it after uploading the DMG to the GitHub release, then commit and push
+# appcast.xml; installed copies see the update on their next check.
+#
+# DOWNLOAD_URL defaults to the DMG on this repo's v release. The private
+# key comes from $SPARKLE_KEY_FILE when set, otherwise from your login Keychain
+# (Sparkle's generate_keys puts it there; $SPARKLE_ACCOUNT picks another account).
+# NOTES_FILE is plain text or Markdown; it is shown as-is in the update window.
+set -euo pipefail
+
+ROOT="$(cd "$(dirname "$0")/.." && pwd)"
+DMG="${1:?DMG path}"
+VERSION="${2:?version, e.g. 0.8.10}"
+URL="${3:-https://github.com/Falhoo/macsteam/releases/download/v$VERSION/$(basename "$DMG")}"
+NOTES_FILE="${4:-}"
+APPCAST="${APPCAST:-$ROOT/appcast.xml}"
+
+SIGN_UPDATE="${SIGN_UPDATE:-$(find "$ROOT/macsteam-app/.build/artifacts" -path '*Sparkle/bin/sign_update' -type f 2>/dev/null | head -1)}"
+[ -x "$SIGN_UPDATE" ] || { echo "error: Sparkle's sign_update not found; run ./build.sh first or set SIGN_UPDATE" >&2; exit 1; }
+[ -f "$DMG" ] || { echo "error: $DMG is missing" >&2; exit 1; }
+
+if [ -n "${SPARKLE_KEY_FILE:-}" ]; then
+ SIG_ATTRS="$("$SIGN_UPDATE" --ed-key-file "$SPARKLE_KEY_FILE" "$DMG")"
+else
+ SIG_ATTRS="$("$SIGN_UPDATE" --account "${SPARKLE_ACCOUNT:-ed25519}" "$DMG")"
+fi
+# sign_update prints: sparkle:edSignature="..." length="..."
+SIGNATURE="$(printf '%s' "$SIG_ATTRS" | sed -n 's/.*sparkle:edSignature="\([^"]*\)".*/\1/p')"
+LENGTH="$(printf '%s' "$SIG_ATTRS" | sed -n 's/.*length="\([0-9]*\)".*/\1/p')"
+[ -n "$SIGNATURE" ] && [ -n "$LENGTH" ] || { echo "error: sign_update gave no signature: $SIG_ATTRS" >&2; exit 1; }
+
+python3 -I - "$APPCAST" "$VERSION" "$URL" "$SIGNATURE" "$LENGTH" "$NOTES_FILE" <<'PY'
+import html, sys
+from email.utils import formatdate
+
+appcast, version, url, signature, length, notes_file = sys.argv[1:7]
+notes = open(notes_file, encoding="utf-8").read().strip() if notes_file else ""
+notes = notes or f"macSteam {version}"
+body = f'{html.escape(notes)}
'
+
+text = open(appcast, encoding="utf-8").read()
+if f"{version}" in text:
+ sys.exit(f"appcast.xml already lists {version}")
+
+item = f""" -
+ Version {html.escape(version)}
+ {formatdate(usegmt=True)}
+ {html.escape(version)}
+ {html.escape(version)}
+ 26.0
+
+
+
+"""
+anchor = text.find(" - ")
+if anchor < 0:
+ anchor = text.find(" ")
+if anchor < 0:
+ sys.exit("appcast.xml has no ")
+open(appcast, "w", encoding="utf-8").write(text[:anchor] + item + text[anchor:])
+print(f"appcast.xml: added {version}")
+PY