Skip to content

Commit a764642

Browse files
committed
Release v1.2.13.2 updater version fix
Signed-off-by: moontheripper <moontheripper@users.noreply.github.com>
1 parent 3f9f97d commit a764642

5 files changed

Lines changed: 49 additions & 7 deletions

File tree

Sources/RipperMoonKitLauncher/RipperMoonKitLauncherApp.swift

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,21 @@ private enum SidebarSelection: Hashable {
2626
case settings
2727
}
2828

29-
private let rmkAppVersion: String =
30-
(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String) ?? "1.0"
29+
private let rmkAppVersion: String = resolvedRipperMoonKitVersion()
3130

3231
private let rmkRepositoryURL = "https://github.com/MoonTheRipper/RipperMoonKit.git"
3332

33+
private func resolvedRipperMoonKitVersion() -> String {
34+
let bundledVersion = Bundle.main.bundleURL
35+
.appendingPathComponent("Contents/Resources/toolkit/VERSION")
36+
if let raw = try? String(contentsOf: bundledVersion, encoding: .utf8) {
37+
let version = raw.trimmingCharacters(in: .whitespacesAndNewlines)
38+
if !version.isEmpty { return version }
39+
}
40+
41+
return (Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String) ?? "1.0"
42+
}
43+
3444
private struct UpdateNotice: Identifiable, Equatable {
3545
let version: String
3646
let url: URL
@@ -4052,13 +4062,35 @@ private final class LauncherModel: ObservableObject {
40524062
}
40534063

40544064
func updateFromGitHub() {
4065+
let source = toolkitSourceFolder.shellQuoted
4066+
let repo = rmkRepositoryURL.shellQuoted
40554067
let command = """
40564068
\(toolkitSourceBootstrapCommand)
4057-
if [[ -d .git ]]; then
4069+
src=\(source)
4070+
repo=\(repo)
4071+
if [[ -d "$src/.git" ]]; then
4072+
cd "$src"
40584073
git fetch --tags origin && \
40594074
if [[ "$(git rev-parse HEAD)" != "$(git rev-parse origin/main)" ]]; then git pull --ff-only origin main; else echo "Already up to date."; fi
40604075
else
4061-
echo "Toolkit source exists without Git metadata; using installed source as-is."
4076+
echo "Toolkit source has no Git metadata; replacing it with a fresh GitHub checkout."
4077+
parent="$(dirname "$src")"
4078+
stamp="$(date +%Y%m%d-%H%M%S)"
4079+
mkdir -p "$parent"
4080+
rm -rf "$src.update" "$src.update.zip"
4081+
if git --version >/dev/null 2>&1; then
4082+
git clone --depth 1 "$repo" "$src.update"
4083+
else
4084+
curl -fL "https://github.com/MoonTheRipper/RipperMoonKit/archive/refs/heads/main.zip" -o "$src.update.zip"
4085+
unzip -q "$src.update.zip" -d "$parent"
4086+
mv "$parent/RipperMoonKit-main" "$src.update"
4087+
rm -f "$src.update.zip"
4088+
fi
4089+
if [[ -e "$src" ]]; then
4090+
mv "$src" "$src.previous-$stamp"
4091+
fi
4092+
mv "$src.update" "$src"
4093+
cd "$src"
40624094
fi
40634095
./install.zsh --skip-deps && \
40644096
zsh scripts/install-gui-app.zsh

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.13.1
1+
1.2.13.2

docs/troubleshooting.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ <h2>macOS Says The App Is Damaged Or Cannot Be Opened</h2>
6363
<p>Download the newest DMG from GitHub releases first. Older packages before <code>v1.2.3</code> could contain an app bundle whose internal resources were not sealed correctly, so a fresh macOS user account could reject the app even when the developer account opened it.</p>
6464
<p>If the newest DMG still fails, remove the old copy from Applications, drag the app from the DMG into Applications again, then open <strong>System Settings &gt; Privacy &amp; Security</strong> and allow the app if macOS asks. RipperMoonKit is ad-hoc signed for now, not Apple Developer ID notarized.</p>
6565

66+
<h2>Update Banner Still Appears After Updating</h2>
67+
<p>If the app says an update is available, runs <strong>Update From GitHub</strong>, relaunches, and still shows the same update, install the newest DMG from GitHub releases.</p>
68+
<p>The <code>v1.2.13.1</code> app could rebuild from its bundled support source when the local support folder was not a Git checkout. That made the app relaunch the old build even though GitHub had a newer release. <code>v1.2.13.2</code> fixes this by replacing a non-Git support source with a fresh GitHub checkout before rebuilding, and by reading the installed app version from the bundled <code>VERSION</code> file.</p>
69+
6670
<h2>GPTK Shows Missing</h2>
6771
<p>Make sure Game Porting Toolkit is installed or mounted. The launcher accepts configured GPTK paths, the Apple app in <code>/Applications</code>, and patched runners under <code>$GPTK_HOME/runners</code>.</p>
6872

docs/troubleshooting.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Download the newest DMG from GitHub releases first. Older packages before `v1.2.
66

77
If the newest DMG still fails, remove the old copy from Applications, drag the app from the DMG into Applications again, then open **System Settings > Privacy & Security** and allow the app if macOS asks. RipperMoonKit is ad-hoc signed for now, not Apple Developer ID notarized.
88

9+
## Update Banner Still Appears After Updating
10+
11+
If the app says an update is available, runs **Update From GitHub**, relaunches, and still shows the same update, install the newest DMG from GitHub releases.
12+
13+
The `v1.2.13.1` app could rebuild from its bundled support source when the local support folder was not a Git checkout. That made the app relaunch the old build even though GitHub had a newer release. `v1.2.13.2` fixes this by replacing a non-Git support source with a fresh GitHub checkout before rebuilding, and by reading the installed app version from the bundled `VERSION` file.
14+
915
## Steam Starts But Webhelper Times Out
1016

1117
Repair Steam compatibility:

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@
490490
<img src="docs/assets/rippermoonlogo.png" alt="RipperMoonKit">
491491
<span class="brand-name">RipperMoonKit</span>
492492
</a>
493-
<span class="pill mono" data-release-version>v1.2.13.1</span>
493+
<span class="pill mono" data-release-version>v1.2.13.2</span>
494494
<div class="nav-links">
495495
<a href="#features">Features</a>
496496
<a href="#games">Games</a>
@@ -530,7 +530,7 @@ <h1>Reap the wine prefix.<br><span class="dim">Run Windows games clean on macOS.
530530
</a>
531531
<span class="ship">
532532
<span class="pulse"></span>
533-
<span><strong data-release-version>v1.2.13.1</strong> · free personal use · source available</span>
533+
<span><strong data-release-version>v1.2.13.2</strong> · free personal use · source available</span>
534534
</span>
535535
</div>
536536
</header>

0 commit comments

Comments
 (0)