Skip to content

Commit 3f9f97d

Browse files
committed
Release v1.2.13.1 background Steam setup
Signed-off-by: moontheripper <moontheripper@users.noreply.github.com>
1 parent 73cff05 commit 3f9f97d

22 files changed

Lines changed: 262 additions & 54 deletions

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ Install Windows Steam during bootstrap:
148148
./install.zsh --install-steam
149149
```
150150

151+
That foreground command validates Steam and closes it after install. Open the Steam profile later when you are ready to sign in.
152+
153+
For app-style first-run setup, start Steam in the background so users can configure game folders and cover art while Steam finishes:
154+
155+
```zsh
156+
./install.zsh --install-steam-background
157+
```
158+
151159
See [docs/commands.md](docs/commands.md) for the full command reference.
152160

153161
Run the SwiftUI launcher:

Sources/RipperMoonKitLauncher/RipperMoonKitLauncherApp.swift

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ private struct GameDetailScreen: View {
19581958
title: model.steamReady ? "Repair Steam" : "Install Steam") {
19591959
model.installSteam()
19601960
}
1961-
.help("Downloads SteamSetup.exe if needed, runs it in the Steam prefix, then validates that steam.exe exists.")
1961+
.help("Downloads SteamSetup.exe if needed, starts Steam installation in the background, then validates that steam.exe exists.")
19621962
}
19631963
RMKButton(kind: .primary, icon: "gamecontroller.fill",
19641964
title: profile.isSteamApp ? "Launch Steam" : (profile.useModEngine == true ? "Launch Modded" : "Launch"),
@@ -2064,7 +2064,7 @@ private struct GameDetailScreen: View {
20642064
if profile.isSteamApp {
20652065
CommandPreview(title: model.steamReady ? "Repair Steam" : "Install Steam",
20662066
command: model.previewInstallSteamCommand())
2067-
.help("Runs the Steam installer in the Steam prefix and validates steam.exe after the installer exits.")
2067+
.help("Starts Steam installation in the background and validates steam.exe when it appears.")
20682068
}
20692069
CommandPreview(title: profile.isSteamApp ? "Launch Steam" : "Launch From Steam",
20702070
command: model.previewSteamManagedLaunchCommand(for: profile))
@@ -2793,7 +2793,11 @@ private struct SetupGuideView: View {
27932793
Text("You're all set")
27942794
.font(.system(size: 22, weight: .bold))
27952795
.foregroundStyle(Onyx.text)
2796-
Text("Every required piece is installed. The Mac is ready to reap — go play something.")
2796+
Text(model.steamReady
2797+
? "Steam is installed and RipperMoonKit is ready. Sign into Steam when a game needs it, then add copied Windows game folders and cover art."
2798+
: model.steamInstallPending
2799+
? "RipperMoonKit is ready. Steam is installing in the background, so you can set game folders and cover art while it finishes."
2800+
: "Core setup is ready. Install Steam from the Steam profile before Steam-dependent games, then add copied Windows game folders and cover art.")
27972801
.font(.system(size: 12.5))
27982802
.foregroundStyle(Onyx.textDim)
27992803
.multilineTextAlignment(.center)
@@ -2805,12 +2809,26 @@ private struct SetupGuideView: View {
28052809
}
28062810

28072811
VStack(alignment: .leading, spacing: 10) {
2808-
Text("OPTIONAL — YOU MIGHT ALSO WANT TO:")
2812+
Text("NEXT STEPS")
28092813
.font(.system(size: 10, weight: .bold))
28102814
.foregroundStyle(Onyx.textMute)
28112815
.frame(maxWidth: .infinity, alignment: .leading)
28122816

2813-
if !model.steamReady {
2817+
if model.steamReady {
2818+
optionalCard(
2819+
icon: "person.crop.circle.badge.checkmark",
2820+
title: "Sign into Steam",
2821+
detail: "Open the Steam profile when you need Steam, sign in, and keep it running for Steam-dependent games.",
2822+
action: "Steam Profile"
2823+
) { model.goToSteamSetup() }
2824+
} else if model.steamInstallPending {
2825+
optionalCard(
2826+
icon: "clock.arrow.circlepath",
2827+
title: "Steam is installing",
2828+
detail: "Leave the background install alone. In the meantime, set paths, add game profiles, and add cover art.",
2829+
action: "Steam Profile"
2830+
) { model.goToSteamSetup() }
2831+
} else {
28142832
optionalCard(
28152833
icon: "arrow.down.app.fill",
28162834
title: "Finish Steam setup",
@@ -2821,7 +2839,7 @@ private struct SetupGuideView: View {
28212839
optionalCard(
28222840
icon: "folder.fill",
28232841
title: "Set your games folder",
2824-
detail: "Tell RipperMoonKit where your game files live so it can find and launch them.",
2842+
detail: "Use a copied, already-installed Windows game folder. Do not point the app at installer files.",
28252843
action: "Settings"
28262844
) { model.openSetupRelatedSettings() }
28272845
optionalCard(
@@ -3368,10 +3386,18 @@ private final class LauncherModel: ObservableObject {
33683386
FileManager.default.fileExists(atPath: steamInstallerPath)
33693387
}
33703388

3389+
var steamInstallPendingPath: String {
3390+
"\(config.gptkHome)/state/steam-install.pending"
3391+
}
3392+
33713393
var steamReady: Bool {
33723394
steamExecutableExists(in: steamProfile)
33733395
}
33743396

3397+
var steamInstallPending: Bool {
3398+
!steamReady && FileManager.default.fileExists(atPath: steamInstallPendingPath)
3399+
}
3400+
33753401
var setupChecks: [SetupCheck] {
33763402
[
33773403
SetupCheck(
@@ -3438,6 +3464,7 @@ private final class LauncherModel: ObservableObject {
34383464
if !config.hasToolkitScripts || !config.exists { return "Install Toolkit" }
34393465
if !config.hasLocalGPTK { return "Begin GPTK Install" }
34403466
if !steamInstallerReady { return "Download Steam" }
3467+
if steamInstallPending { return "Steam Installing" }
34413468
if !steamReady { return "Install Steam" }
34423469
return "Refresh Setup"
34433470
}
@@ -3854,6 +3881,9 @@ private final class LauncherModel: ObservableObject {
38543881
config.hasGPTKInstallMedia ? beginGPTKInstall() : showGPTKDownloadStep(openBrowser: true)
38553882
} else if !steamInstallerReady {
38563883
downloadSteamInstaller()
3884+
} else if steamInstallPending {
3885+
reload()
3886+
commandOutput = "Steam is still installing in the background. You can set game folders and cover art while it finishes.\n"
38573887
} else if !steamReady {
38583888
installSteam()
38593889
} else {
@@ -3914,9 +3944,12 @@ private final class LauncherModel: ObservableObject {
39143944
}
39153945
39163946
echo
3917-
echo "➡️ Step 3 of 3 — installing Windows Steam…"
3947+
echo "➡️ Step 3 of 3 — starting Windows Steam install in the background"
39183948
if [[ "$setup_status" -eq 0 ]]; then
3919-
./install.zsh --install-steam || echo "⚠️ Steam step incomplete — install it later from the Steam profile."
3949+
echo " Steam can take several minutes, but you do not need to wait here."
3950+
echo " RipperMoonKit will move on while Steam installs in the background."
3951+
echo " In the meantime, set your game folders and cover art API from the app."
3952+
./install.zsh --install-steam-background || echo "⚠️ Steam background install did not start — use the Steam profile's Install Steam action later."
39203953
else
39213954
echo "⏭️ Skipping Steam until the required toolkit pieces are installed."
39223955
fi
@@ -3945,7 +3978,7 @@ private final class LauncherModel: ObservableObject {
39453978
func installSteam() {
39463979
runShell(
39473980
title: steamReady ? "Repair Steam Install" : "Install Steam",
3948-
command: "\(toolkitSourceBootstrapCommand)\n./install.zsh --no-homebrew-bootstrap --skip-gptk --install-steam",
3981+
command: "\(toolkitSourceBootstrapCommand)\n./install.zsh --no-homebrew-bootstrap --skip-gptk --install-steam-background",
39493982
completion: { [weak self] in self?.reload() }
39503983
)
39513984
}
@@ -4325,7 +4358,7 @@ private final class LauncherModel: ObservableObject {
43254358
}
43264359

43274360
func previewInstallSteamCommand() -> String {
4328-
"\(toolkitSourceBootstrapCommand)\n./install.zsh --no-homebrew-bootstrap --skip-gptk --install-steam"
4361+
"\(toolkitSourceBootstrapCommand)\n./install.zsh --no-homebrew-bootstrap --skip-gptk --install-steam-background"
43294362
}
43304363

43314364
func previewStopSteamCommand() -> String {

VERSION

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

bin/gptk-steam

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Host folders are exposed inside Wine through GPTK_DRIVE_MAPS.
1717
1818
Options:
1919
--install [SteamSetup.exe] Install or repair Windows Steam
20+
--install-only Install or repair Steam, validate steam.exe, then exit without launching Steam
21+
--wait-for-steam-exe SECONDS After installer exit, wait for steam.exe to appear
2022
--kill Stop the Steam Wine prefix
2123
--repair-compat Reapply Steam CEF compatibility registry entries
2224
--install-spacewar Launch AppID 480 once so Steam installs Spacewar
@@ -36,6 +38,8 @@ USAGE
3638
prefix="${GPTK_STEAM_PREFIX:-Steam}"
3739
installer=""
3840
install=0
41+
install_only=0
42+
install_wait_seconds="${GPTK_STEAM_INSTALL_WAIT_SECONDS:-0}"
3943
kill_only=0
4044
repair_compat_only=0
4145
install_spacewar=0
@@ -54,6 +58,15 @@ while [[ $# -gt 0 ]]; do
5458
shift
5559
fi
5660
;;
61+
--install-only)
62+
install_only=1
63+
shift
64+
;;
65+
--wait-for-steam-exe)
66+
[[ $# -ge 2 ]] || gptk_die "--wait-for-steam-exe requires a number of seconds"
67+
install_wait_seconds="$2"
68+
shift 2
69+
;;
5770
--kill)
5871
kill_only=1
5972
shift
@@ -135,6 +148,12 @@ if [[ "${install}" == "1" ]]; then
135148
[[ -n "${installer}" ]] || installer="${STEAM_SETUP_PATH:-${HOME}/Library/Application Support/RipperMoonKit/Downloads/SteamSetup.exe}"
136149
[[ -f "${installer}" ]] || gptk_die "Steam installer not found: ${installer}"
137150
"${launcher}" --prefix "${prefix}" --init --set-winver "${GPTK_DEFAULT_WINVER}" -- "${installer}" /S
151+
if [[ ! -f "${steam_exe}" && "${install_wait_seconds}" == <-> && "${install_wait_seconds}" -gt 0 ]]; then
152+
deadline=$(( SECONDS + install_wait_seconds ))
153+
while [[ ! -f "${steam_exe}" && "${SECONDS}" -lt "${deadline}" ]]; do
154+
sleep 2
155+
done
156+
fi
138157
[[ -f "${steam_exe}" ]] || gptk_die "Steam installer finished, but steam.exe was not created at ${steam_exe}"
139158
fi
140159

@@ -144,6 +163,11 @@ if [[ "${legacy_cef}" == "1" ]]; then
144163
apply_steam_compat
145164
fi
146165

166+
if [[ "${install_only}" == "1" ]]; then
167+
"${launcher}" --prefix "${prefix}" --no-log -- wineserver -k >/dev/null 2>&1 || true
168+
exit 0
169+
fi
170+
147171
if [[ "${repair_compat_only}" == "1" ]]; then
148172
exit 0
149173
fi

docs/commands.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ <h2>Start And Stop Steam</h2>
6767
<pre><code>gptk-steam --log
6868
gptk-steam --kill</code></pre>
6969

70+
<h2>Install Steam Without Launching It</h2>
71+
<p>Use this during setup so Steam is validated and then closed instead of opening the Steam UI.</p>
72+
<pre><code>gptk-steam --install-only --install "$GPTK_EXTERNAL_ROOT/Installers/SteamSetup.exe"</code></pre>
73+
74+
<h2>Start Steam Install In Background</h2>
75+
<p>Use this app-style setup command so users can set paths and cover art while Steam installs.</p>
76+
<pre><code>./install.zsh --install-steam-background</code></pre>
77+
7078
<h2>Install Spacewar / AppID 480</h2>
7179
<p>Run this once from the Steam prefix when a co-op Steamworks test path needs Spacewar initialized. Let Steam finish installing Spacewar, then close Spacewar before launching the game profile.</p>
7280
<pre><code>gptk-steam --log --install-spacewar</code></pre>

docs/commands.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Install Windows Steam during bootstrap:
1414
./install.zsh --install-steam
1515
```
1616

17+
Start Windows Steam installation in the background during app-style setup:
18+
19+
```zsh
20+
./install.zsh --install-steam-background
21+
```
22+
1723
Use a specific mounted GPTK source:
1824

1925
```zsh
@@ -127,9 +133,11 @@ gptk-launch --prefix MyGame --no-esync -- ./MyGame.exe
127133
Install Steam:
128134

129135
```zsh
130-
gptk-steam --install "$GPTK_EXTERNAL_ROOT/Installers/SteamSetup.exe"
136+
gptk-steam --install-only --install "$GPTK_EXTERNAL_ROOT/Installers/SteamSetup.exe"
131137
```
132138

139+
Use `--install-only` during setup so Steam is validated and then closed instead of launched.
140+
133141
Start Steam:
134142

135143
```zsh

docs/dependencies.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,22 @@ For the randomizer GUI, RipperMoonKit prefers Wine Staging 11.8 when available.
128128

129129
## Installing Windows Steam
130130

131-
The default install downloads `SteamSetup.exe` but does not run the Windows Steam installer, because that creates or modifies the Steam Wine prefix.
131+
The default source install downloads `SteamSetup.exe` but does not run the Windows Steam installer, because that creates or modifies the Steam Wine prefix.
132+
133+
The guided app setup starts Steam installation in the background. The user can move to the finished screen, set game folders, and add cover art while Steam validates `steam.exe`. After validation, Steam is closed instead of launched.
132134

133135
To install Steam during bootstrap:
134136

135137
```zsh
136138
./install.zsh --install-steam
137139
```
138140

141+
To start Steam installation in the background:
142+
143+
```zsh
144+
./install.zsh --install-steam-background
145+
```
146+
139147
## Apple Game Porting Toolkit
140148

141149
Apple Game Porting Toolkit is not redistributed by this project. Download **Game Porting Toolkit 3** from Apple Developer, mount the DMG, then run:

docs/faq.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ <h2>Can I close the game without closing Steam?</h2>
7373
<h2>Why install Visual C++ runtime per prefix?</h2>
7474
<p>Wine prefixes behave like separate Windows environments. Installing the runtime into the prefix that launches the game avoids many runtime popups and early exits.</p>
7575

76+
<h2>Why does source setup download SteamSetup but not always install Steam?</h2>
77+
<p>Downloading SteamSetup.exe is safe and repeatable. Installing Windows Steam creates or modifies the Steam prefix. The guided app setup starts Steam installation in the background, moves to the finished screen, and closes Steam after validation. The source installer only installs Steam when requested with <code>./install.zsh --install-steam</code>.</p>
78+
7679
<h2>Will updates delete saves?</h2>
7780
<p>Normal updates are designed to avoid saves, Wine prefixes, Steam data, games, and GPTK runtime folders. The installer backs up small toolkit files before replacing them.</p>
7881

docs/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Steam API access depends on Steam client IPC. If Steam is running in one prefix
4545

4646
For the documented ERSC workflow, Steam and ERSC run from the same `Steam` prefix.
4747

48-
## Why Does The Installer Download SteamSetup But Not Always Install Steam?
48+
## Why Does The Source Installer Download SteamSetup But Not Always Install Steam?
4949

50-
Downloading `SteamSetup.exe` is safe and repeatable. Installing Windows Steam creates/modifies the `Steam` prefix and may open UI. The installer only does that when requested:
50+
Downloading `SteamSetup.exe` is safe and repeatable. Installing Windows Steam creates/modifies the `Steam` prefix. The guided app setup starts Steam installation in the background, moves to the finished screen, and closes Steam after validation. The source installer only installs Steam when requested:
5151

5252
```zsh
5353
./install.zsh --install-steam

docs/gui.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ <h1>One page per game.</h1>
7272
<h2>Library</h2>
7373
<p>The sidebar opens a library view with a grid of games and apps. Steam appears as its own app tile, and it can still be started automatically by profiles that depend on Steam. Profile pages now collapse large advanced sections so new users can stay focused while technical users can still inspect exact commands.</p>
7474

75+
<h2>First-Run Setup</h2>
76+
<p>The first-run setup keeps required GPTK work separate from optional Steam waiting time. It prepares the bundled toolkit source, installs helper scripts, pauses for Apple GPTK 3.0 when needed, verifies the local GPTK runner/runtime, then starts Windows Steam installation in the background.</p>
77+
<p>The app can move to <strong>You're all set</strong> while Steam continues installing. That finished screen tells users they can sign into Steam later from the Steam profile, set paths, add copied already-installed Windows game folders, and add a TheGamesDB API key for cover art.</p>
78+
<p>While Steam is still installing, the app shows that state instead of claiming Steam is ready. The background log is written under <code>$GPTK_HOME/logs/steam-install-background-YYYYmmdd-HHMMSS.log</code>.</p>
79+
7580
<h2>Profiles</h2>
7681
<p>Use <strong>Add Game</strong> to create a profile. Set the display name, icon, prefix, game folder, executable, and any game-specific runner. The square icon in the page header belongs to the selected game.</p>
7782

0 commit comments

Comments
 (0)