Repository navigation
The launcher walks a new player through setup with the real detection and installs (guided first run) - #120
Merged
Merged
Conversation
v0lumehi
force-pushed
the
onboarding
branch
3 times, most recently
from
October 28, 2026 12:27
2b91728 to
38a61e1
Compare
v0lumehi
added a commit
to v0lumehi/NX2Apple
that referenced
this pull request
Oct 28, 2026
…sk figures in the mock The release workflow copies only the executable into the .app, so a resource bundle would be missing there and Bundle.module would abort. The welcome icon is now the app's own icon (a symbol under swift run), and the default Welcome state carries no invented free/needed GB.
…ze across states The welcome header with the icon and name is gone (with its helper and string). The two Xcode cards are equally wide and share one fixed height for every state, scrolling inside instead of growing; the background note uses the card's full width. The platform cards align their titles, and the keys and games cards keep a minimum height between states.
… footer The block sits in the middle of the space and starts at the top and scrolls when it is taller than the window. The disk warning keeps its place on Welcome so the block does not shift.
… and installs The first-run flow now runs over BuildModel and GameLibrary through LiveOnboardingDriver: Xcode (one administrator prompt, then the Metal Toolchain and, for iPhone, the iOS platform), the tools queued behind it, the keys and the games folder. A player whose setup is complete never sees it, Settings can run it again, and Set up later resumes where it stopped. A Mac-only choice no longer requires the iOS SDK for Mac builds.
…and Xcode counts as installed only when xcodebuild works NSAppleScript is not thread-safe, so the script now goes to /usr/bin/osascript as one argument and its exit status and stderr give the result (-128 is a cancelled prompt). The App Store creates Xcode.app while it is still downloading, so the poll waits for xcodebuild -version to exit 0 and the step stays on downloading until then.
…leaving a trace The forced run starts from Welcome with real detection, keeps its preference writes (step, platform, target, completed) in memory until the player finishes or sets up later, and installs nothing until an install action is pressed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #119.
New players now get a guided first-run setup instead of the eight-row tool panel. It is the view from #119, driven by a real
LiveOnboardingDriverover the launcher's ownBuildModelandGameLibrary.What a player sees:
onboarding.completed) and setup is incomplete (a tool missing, no keys known, or no games folder). A player whose setup is already complete never sees it and it is marked done silently.neededGB).xcrun --sdk iphoneos); with no stored choice, or builds aimed at an iPhone, the requirement is as before (BuildModel.needsIOSPlatform).macappstore://apps.apple.com/app/id497799835and/Applicationsis polled every three seconds for an Xcode until the step is left. When Xcode needs setup ("Finish setup"), there is one administrator prompt, then the Metal Toolchain and (iPhone or both) the iOS platform download without it, with progress parsed fromxcodebuildoutput. Failures become a short localized message with the command output under details. A cancelled prompt goes back to the button.BuildModel.installDep, one at a time. Homebrew and the formulas wait until Xcode is ready.~/.switch/prod.keys,~/Downloads/prod.keysand the games folder, checked byKeyCheck, and only the path goes into the same keys slot as the Builds page. After the games are found, the keys are checked against the game and a mismatch sends the player back with the reason.The administrator prompt runs one script (
OnboardingAdmin.source, passed to osascript as an argument), with the path quoted by AppleScript'squoted form of:Testing on a set-up Mac:
NSPB_ONBOARDING_FORCE=1shows the real flow with real detection. It writes nothing (completed flag, step, platform, build target) until the player finishes or picks Set up later, and installs nothing until an install action is pressed (documented infrontend/Onboarding.md).Changes to existing code: the xcode row's iOS requirement and the shared Xcode download commands in
ContentView.swift,updateSlotno longer private, the Settings row,ContentView'sonRunSetupparameter, and the window's root view (RootViewholds the model and library for both).Tests:
LiveOnboardingDriverTests(27) run over injected fakes, noxcodebuild, sudo or network: state mapping from the probe, the platform-dependent iOS requirement, resume and revalidation, a complete setup never shown, admin cancel back toneedsSetup, one admin call then the downloads, queued installs and failures, keys and games slots.swift build -c releaseandswift testpass (202 tests).Not verified on a fresh Mac: the real flow was not run (no admin prompt,
xcode-select, App Store or installs). In particular unverified:xcodebuild -versionto exit 0; tested with stub tools only);xcodebuild -downloadComponent/-downloadPlatformprogress output (the parser takes the last percentage, else the bar stays indeterminate);/usr/bin/osascript -e <script>as a child process off the main thread, and the exit status and stderr map to ok, cancelled (-128) or failed (mapping tested);Smoke test on a set-up Mac: the app launches and marks setup done without showing it.
Screenshots
Settings has the new "Run setup again" row (English; the Xcode step uses the same wording and layout as the preview in #119, so it is not repeated here):