Repository navigation
Mac launcher: unpack a game's zip, Add Update…, Update from Git - #37
Merged
Merged
Conversation
…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.
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.
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)/usr/lib/libarchive.2.dylibthrough 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..., and names Windows cannot make (the Port's rules). Links are skipped and nothing is written through one (O_NOFOLLOW)..<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.-UPDATEfolder.Add Update… in Game Settings (
GameUpdates.swift)<game folder>-UPDATEor-patchbeside the game (GameAddons), passed to the engine asANYPS5_UPDATE_DIR, and the update's eboot and modules are relinked on the next unlock.rename(2)on the same volume, copied with progress into.<name>.copyingotherwise. The game's own folder is never written to.Update from Git in Settings › Engine (
EngineCheckout.swift,EngineGitPanel.swift)git pull --ff-only,git submodule update --init --recursive,ninja -C <build> relinker libsin 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).<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.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 undertaskpolicy -bwith other builds running, and pass when run again on their own..., absolute paths and links, a ditto-made deflated zip, stop, leftovers), GameUpdatesTests, EngineCheckoutTests (a fake command runner, plus a live check that is skipped unlessANYPS5_LIVE_CHECKOUTandANYPS5_LIVE_TOOLKITare set. Run here against a realbuild-mac, it made a valid engine0.2.30-arm-4663c74f3057).--render-preview,files-*,engine-git*) in English and Arabic.Not done here: the Port's "Update from Git before playing" toggle.