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

[Bug] [macOS arm64] Creating launchpad shortcuts is broken in numerous ways #16017

Open
schm1dtxbox opened this issue Aug 29, 2024 · 2 comments

Comments

@schm1dtxbox
Copy link
Contributor

schm1dtxbox commented Aug 29, 2024

Quick summary

Here's a quick list of the issues:
1-It tries to create the shortcut in the per-user ~/Applications folder, one that doesn't exist on fresh macOS installs since only the global system-wide /Applications folder is present, but doesn't attempt to create said folder and bails.
2-The shortcut fails to create an icon on the game I tested, God of War: Ghost of Sparta PSN.
3-The shortcut demands Rosetta to be installed despite being a simple launch script, due to errors in the generated Info.plist file.

Details

Point 1 (issues with per-user Applications directory) was well described as before, I needn't elaborate further beyond saying that installing in the global Applications folder may make more sense by default, and to only install to the per-user Applications folder if, say, RPCS3 is launched from there and not the global folder most people will place it in.

Point 2 (icon creation failure) I am unsure about the cause of, but log complains that the image format is unsupported so I assume it's some weird issue relating to that.

Point 3 (prompts for Rosetta 2 wrongly) is simple enough to resolve, Info.plist lacks these entries, adding them will ensure native execution on arm64 without unnecessarily prompting for Rosetta 2 installation purely to launch what is merely a shell script:

        <key>CFBundleIdentifier</key>
    	<string>net.rpcs3.GAMEID</string>
    	<key>LSArchitecturePriority</key>
    	<array>
        	<string>arm64</string>
    	</array>
    	<key>LSRequiresNativeExecution</key>
    	<true/>

GAMEID should be filled out appropriately per game, e.g. NPEA00309 and whatnot, so each shortcut app bundle remains unique per-game. A bundle identifier is necessary for macOS to view the bundle as 'valid' enough to launch without prompting for Rosetta 2, so there's no skipping it.

Attach a log file

RPCS3.log

Log above is in plaintext since it's small enough, contains an attempted shortcut creation with ~/Applications (the per user one) not present, and an attempted one with it present (latter demonstrates icon creation failure, but the shortcut bundle still creates successfully otherwise despite what log says).

Attach capture files for visual issues

No response

System configuration

OS: macOS Sequoia 15.0
Hardware: MacBook Air M2
RPCS3 version: Local compile of latest master as of issue creation, commit 4d193ec.
Compiled using a relatively modified fork of shinra-electric's build script, I just tweaked it to work with GH Actions, be more consistent with how x86-64 is currently built on CI and ensure the resultant bundle is portable and independent of Homebrew. Link to said edited script is here: https://github.com/schm1dtxbox/RPCS3-Arm-Build-Script/blob/main/build_rpcs3.sh

Other details

No response

@kd-11
Copy link
Contributor

kd-11 commented Sep 1, 2024

No idea who implemented the macos shortcuts. Maybe @nastys ?

@schm1dtxbox
Copy link
Contributor Author

No idea who implemented the macos shortcuts. Maybe @nastys ?

Yup, I had a quick look and found that they implemented it a while back or so here #11564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants