Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't seem to install on MacOS #1359

Open
ziaddemir opened this issue May 4, 2024 · 4 comments
Open

Can't seem to install on MacOS #1359

ziaddemir opened this issue May 4, 2024 · 4 comments
Labels
Priority: high This has a high impact on the core gameplay, or blocks other work. TR1X bug A bug with TR1X

Comments

@ziaddemir
Copy link

ziaddemir commented May 4, 2024

Followed the instructions but get an error message when I try to launch the application. I do seem to be missing some files (I unpacked the Steam version's GAME.GOG using The Unarchiver) but I assumed those were specifically for the Expansion Pack.) See screenshots for the error message and my folder structure. I'm on an M2 Pro Macbook Pro and MacOS 14.4.1. Using the latest .dmg (tested the pre-release and a couple older versions as well, same result.)

image
image
image

@walkawayy
Copy link
Collaborator

I also had this issue. We will have to investigate what's broken. Sorry about that.

@walkawayy walkawayy added TR1X bug A bug with TR1X Priority: high This has a high impact on the core gameplay, or blocks other work. labels May 5, 2024
@ziaddemir
Copy link
Author

I'm not sure why this worked, but I was able to install with the following steps:

  1. Mount the installer
  2. Before dragging into the Applications folder, first double-click the app and open it. It will launch, then quit by itself after the Eidos logo since the game data hasn't been inserted yet.
  3. Right-click the app, click "Show Package Contents," navigate to Content -> Resources. You don't have to do anything here, just opening the folder is enough.
  4. Drag the app into the Applications folder, then add your game files following the instructions on Github. The game should launch fine now.

I'm suspecting this has something to do with MacOS permissions? Hope this helps in narrowing down a possible fix.

@eikehein
Copy link
Contributor

eikehein commented May 6, 2024

So the reason for this is going to be roughly something like this:

  1. When you download a file from the internet, macOS automatically attaches a hidden attribute to the file (the com.apple.quarantine xattr)
  2. When you try to open the file, the macOS Gatekeeper feature steps in an does two things:
    • Show you a warning dialog about # 1 which you can OK
    • If the file is code-signed and notarized (which our .dmg and app bundle are), it verifies that the signature is correct and matches the file contents
  3. If # 2 is successful, the xattr is removed

That probably means if you modify the app bundle before running it for the first time, the signature verification will fail and the quarantine attrib doesn't get removed. If you run it first and the xattr gets dropped, you can modify the bundle afterwards. There's also ways to override Gatekeeper if your user account has admin privs, etc.

We have to change the install instructions accordingly. However, a better long-term solution is supporting to find & access the game data from outside the .app bundle to avoid the need to modify it, which of course would also make updating much easier and cleaner.

@eikehein
Copy link
Contributor

eikehein commented May 6, 2024

I've now confirmed the above experimentally - running first before copying in the data is fine, copying in before first run causes the verification to fail and the "app is damaged" popup.

eikehein added a commit to eikehein/TR1X that referenced this issue May 6, 2024
This allows Gatekeeper verification to pass and makes it drop
the quarantine filesystem xattrs, making it safe to copy over
the game data afterward.

If it's not done in this error, the OS will report the app
bundle as damaged instead.

Helps with issue LostArtefacts#1359, however a more robust solution would
be to support loading game data from other locations.
rr- pushed a commit that referenced this issue May 6, 2024
This allows Gatekeeper verification to pass and makes it drop
the quarantine filesystem xattrs, making it safe to copy over
the game data afterward.

If it's not done in this error, the OS will report the app
bundle as damaged instead.

Helps with issue #1359, however a more robust solution would
be to support loading game data from other locations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: high This has a high impact on the core gameplay, or blocks other work. TR1X bug A bug with TR1X
Projects
None yet
Development

No branches or pull requests

3 participants