Skip to content

Mac app updates keep the right program and survive case-only renames; links out of a game still reach their file after a move - #377

Merged
elripalda merged 3 commits into
elripalda:mainfrom
Xarishark:fix/mac-app-update-review
Nov 20, 2026
Merged

elripalda merged 3 commits into
elripalda:mainfrom
Xarishark:fix/mac-app-update-review

Conversation

@Xarishark

Copy link
Copy Markdown
Collaborator

Follow-up to #361: the three edge cases @thehobbit85 reproduced on an Apple Silicon Mac in their review. #361 merged before they were fixed, so here they are, one commit each.

An update of an imported Mac app starts the program its new Info.plist names (install.rs, lib.rs)

  • The old app's files the new one lacks were added to the update's list of files to take away only after the program to keep was chosen. A release that renamed its program (Engine to Engine2) left the game starting the deleted Engine.
  • They're counted first now, and the choice moved into install::kept_exe. For a game imported as an app, the program the launcher found is dropped, so after the update it's found again from the new app's CFBundleExecutable. That also covers an old program that stays on as a helper. A program the player picked stays while the update keeps it.

An app update that only changes a file name's case goes in on a Mac (install.rs)

  • Artwork.txt in the old app and artwork.txt in the new one: on a Mac's usual drive (case-insensitive APFS) that's one file the update already replaces, so taking the old spelling away too made the update fail ("couldn't move … No such file"; rolled back, nothing lost).
  • An old file is now left out of the files to take away when the drive says it's the same file as one the new app ships (same device and inode). On a drive that tells case apart they're two files, and the old one still goes.

A link out of the game still reaches its file after a move to another drive (manage.rs, Mac and Linux)

  • A relative link out of the game (asset.dat -> ../Shared/asset.dat) was recreated as it was, so at the new place it pointed at a Shared folder that isn't there. Before Mac apps move, import and update whole; links survive a move to another drive #361 the move copied the file's data.
  • It now points at the same place by full path. A relative link that stays inside the game (a Mac app's frameworks, ../data/level.pak from a subfolder) stays relative and moves with it. .. is worked out from the game's real path, without asking the drive, so a link that points nowhere is copied too.

Testing

  • Bazzite (Linux) VM, at each of the three commits on current main: cargo test and, at the last, node --test tests/*.test.cjs. Rust: 955, 957 and 960 passed, 0 failed; UI: 632 passed.
  • The two tests of a link out of the game fail with the old behavior and pass with the fix.
  • The case-only rename test does its real check only on a case-insensitive drive, so on CI's macos-15 runner (Linux tells the two names apart, and there the old spelling must go, which the other test checks).
  • Not tested on a real Mac beyond CI.

Patch notes (Beta 67)

None of its own: these finish #361, whose line already says Mac apps update and move properly.

For the website (SDK guide): none.

@Xarishark
Xarishark marked this pull request as ready for review November 20, 2026 22:09
@elripalda
elripalda merged commit f733200 into elripalda:main Nov 20, 2026
6 checks passed
@Xarishark
Xarishark deleted the fix/mac-app-update-review branch November 23, 2026 23:56
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.

2 participants