Skip to content

Mac launcher: unpack a game's zip, Add Update…, Update from Git - #37

Merged
utkuhalis merged 5 commits into
mainfrom
parity/mac
Nov 1, 2026
Merged

utkuhalis merged 5 commits into
mainfrom
parity/mac

Conversation

@utkuhalis

Copy link
Copy Markdown
Collaborator

Launcher parity: the three things only AnyLauncher Port had, on the Mac, with the Port's behaviour, texts and keys.

Unpack a game dumped as .zip (GameArchives.swift, GameFiles.swift)

  • Zips in a games folder or one level below, with no folder of their name yet, are looked into after each scan, away from the interface. One holding a game (eboot.bin and sce_sys/param.json) is offered when nothing else is on screen: Unpack or Not Now.
  • Read with macOS's own libarchive (/usr/lib/libarchive.2.dylib through a system library target, no new dependency). The list of files comes first: size, the one top folder, the dump's title ID and version.
  • Refused before anything is written: absolute paths, drives, .., and names Windows cannot make (the Port's rules). Links are skipped and nothing is written through one (O_NOFOLLOW).
  • Free space is checked first (size + 512 MB). The files go into .<name>.unpacking, renamed when every file is in. Stop or a failure removes it. Leftovers of a stopped launcher are cleared on the next scan.
  • A zip holding a newer version of a game in the library unpacks as that game's -UPDATE folder.

Add Update… in Game Settings (GameUpdates.swift)

  • The Mac already uses the Port's convention: <game folder>-UPDATE or -patch beside the game (GameAddons), passed to the engine as ANYPS5_UPDATE_DIR, and the update's eboot and modules are relinked on the next unlock.
  • Checks the same title ID and a newer version than the game and than any update already there. Moved with rename(2) on the same volume, copied with progress into .<name>.copying otherwise. The game's own folder is never written to.

Update from Git in Settings › Engine (EngineCheckout.swift, EngineGitPanel.swift)

  • Engine Folder now also takes an AnyPS5-ARM checkout. Update from Git: git pull --ff-only, git submodule update --init --recursive, ninja -C <build> relinker libs in its configured build folder (build-mac first, relinker-only builds passed over). Refuses a tree with uncommitted changes. git never prompts (GIT_TERMINAL_PROMPT=0, ssh BatchMode).
  • The build becomes an engine folder (relinker, libs, the checkout's patches, MoltenVK copied from a toolkit the launcher has, version <git describe>-<fingerprint>), kept by version so an unlock in progress keeps its files. It becomes Your Own Build and the default engine, as the engine folder is on the Port. Then Relink All Installed Games for the games made with the build before.
  • Git, CMake, Ninja and the Command Line Tools (or Xcode) are found without starting Apple's installer. When one is missing, the row names it and opens the build guide.

Texts: the Port's keys and English. Turkish from the Port's tr.json, made informal where it used the formal voice. VK's translations carried over where the English is the same (the files and update texts are newer than VK's files, so they show in English there). A few Mac texts of its own where the Port's had a semicolon or a "·" string. README and the guide (English and Turkish) describe all three.

Checks

  • swift build: no warnings in the new files.
  • swift test (all): 1073 core tests pass. Two timing tests (FastInputTests.testTheBackdropFadesOnlyToTheGameTheSelectionRestsOn, SharePlayOpusTests.testAViewerSayingHelloHearsStereoOpus) failed under taskpolicy -b with other builds running, and pass when run again on their own.
  • New tests: GameArchivesTests (hand-made zips with .., absolute paths and links, a ditto-made deflated zip, stop, leftovers), GameUpdatesTests, EngineCheckoutTests (a fake command runner, plus a live check that is skipped unless ANYPS5_LIVE_CHECKOUT and ANYPS5_LIVE_TOOLKIT are set. Run here against a real build-mac, it made a valid engine 0.2.30-arm-4663c74f3057).
  • Offscreen renders (--render-preview, files-*, engine-git*) in English and Arabic.

Not done here: the Port's "Update from Git before playing" toggle.

…ne from a git checkout

GameArchives reads a game's zip with macOS's own libarchive (/usr/lib, linked through a
system library target, no new dependency): its list first (files, size, the one top folder,
the dump's title ID and version), refusing any name that would land outside its folder.
It unpacks into a hidden folder, skips links, never writes through a link, and renames the
folder when every file is in. A stop or a failure leaves nothing.

GameUpdates checks a folder against a game (same title ID, newer than the game and than any
update beside it) and puts it beside the game as <game folder>-UPDATE, the layout GameAddons
already reads. A rename on the same volume, else a copy into a hidden folder with progress.

EngineCheckout and EngineGit pull an AnyPS5-ARM checkout (git pull --ff-only, submodules),
build it with ninja relinker libs in its configured build folder, and make an engine folder
from the build, MoltenVK taken from a toolkit the launcher has. DevTools finds Git, CMake,
Ninja and the Command Line Tools without starting Apple's installer.

The same rules and texts as AnyLauncher Port's game_archives.dart, game_updates.dart and
engine_checkout.dart.
Zips in a games folder (or one below) are looked into after each scan, away from the
interface. One with a game in it is offered in a panel when nothing else is on screen:
Unpack or Not Now, with the room it needs checked first, and progress with Stop. A zip
holding a newer version of a game in the library unpacks as that game's update folder.

Game Settings › Add Update… asks for the update dump's folder, checks it, and moves it
next to the game on the same drive or copies it with progress from another.

Settings › Engine › Engine Folder takes an AnyPS5-ARM checkout too. Update from Git pulls,
builds and makes the engine from it, which becomes Your Own Build and the default engine.
Relink All Installed Games then unlocks again the games made with the build before. When
a tool is missing, the row names it and opens the build guide.

Texts and keys from AnyLauncher Port (Turkish from its tr.json in this launcher's voice),
VK's translations carried over where the English is the same. Offscreen previews of every
state, and the guide in English and Turkish.
Xcode keeps clang in its default toolchain, not in Developer/usr/bin as the Command Line
Tools do, so a Mac with only Xcode was told the tools were missing. Found with the live
check against a real checkout's build-mac.
… stub is not

The CI runner has git in /opt/homebrew/bin, which the search looks in by design.
@utkuhalis
utkuhalis merged commit f656448 into main Nov 1, 2026
10 checks passed
@utkuhalis
utkuhalis deleted the parity/mac branch November 1, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant