Cemu icon indicating copy to clipboard operation
Cemu copied to clipboard

Create Cemu .app bundle for macOS

Open emiyl opened this issue 2 years ago • 11 comments

This PR:

  • Creates a .dmg file when building releases, containing a Cemu.app bundle and an alias to /Applications
  • Disables portable mode when compiling for macOS, using ~/Application Support/Cemu instead, and Cemu.app/Contents/SharedSupport for default game profiles and langauge files
  • Copies the MoltenVK dylib from the macOS build VM to the bundle, so it can be ran without installing anything from brew

This brings the macOS releases more in line with most other macOS apps.

emiyl avatar Oct 13 '22 15:10 emiyl

While this does work, it's very sub-optimal because it relies on GitHub Actions to build the bundle. In addition, the built bundle does not include an Info.plist file. macOS expects all apps to have this file and for it to be populated with metadata.

Please consider using CMake build options instead.

Also, I don't believe you need to include MoltenVKShaderConverter.

OatmealDome avatar Oct 13 '22 20:10 OatmealDome

Something along the lines of this, I don't have the iconset but it should be easy to create one based on a high quality base icon.

I also fixed working with resource files when using app bundles with this.

I'm not quite sure how this should all be put together, but this are small changes you can take as reference

Tillsunset avatar Oct 13 '22 20:10 Tillsunset

Thank you for the feedback, I'm now using the CMake build system to generate the app bundle and I created this icon, which I think fits in pretty well with macOS. It uses Helvetica Neue instead of the original font.

cemu icon

emiyl avatar Oct 14 '22 16:10 emiyl

hi Emiyl, thanks for your effort/work for bundling Cemu into Mac app. Probably you are aware of it, but a brief feedback: I still manually need to chmod Cemu app in Contents in order to run it. (at least on my Studio) Other than that I can not give the app permission to be able to read the folder where I store my game dump, the app is simply not showing up in data security settings where I can give the folder permission to it. (this could be because due to my lack of knowledge :-))

DTibor1986 avatar Oct 15 '22 19:10 DTibor1986

I still manually need to chmod Cemu app in Contents in order to run it.

This should now be fixed.

Other than that I can not give the app permission to be able to read the folder where I store my game dump

Hmm that's odd. I get the prompt when opening to access my folders when opening the app, but not when I directly open the binary from the MacOS folder. Are you opening the .app bundle?

emiyl avatar Oct 16 '22 10:10 emiyl

Accessing the games folder is OK now, just needed to update my keys.txt in Application Support library. (sorry my mistake) As for the chmod, still necessary even with the latest build, compiled less than an hour ago.

DTibor1986 avatar Oct 16 '22 11:10 DTibor1986

It would be great to have the .app file into a .dmg like any other third party app for MacOS

AndreaCicca avatar Oct 16 '22 17:10 AndreaCicca

For releases, it will be packaged in .dmg

emiyl avatar Oct 16 '22 18:10 emiyl

As for the chmod, still necessary even with the latest build, compiled less than an hour ago.

I see the issue :( Unfortunately I'm not sure. It's definitely running chmod on the binary before it's released as an artifact, but it doesn't seem to carry across.

emiyl avatar Oct 16 '22 20:10 emiyl

It seems when using zip, file permissions are not preserved. Some other format must be used, I’ve seen good results with tar. Link

Tillsunset avatar Oct 16 '22 21:10 Tillsunset

To create a zip that keeps all the right macOS bits you can use:

ditto -c -k --sequesterRsrc --keepParent

galad87 avatar Oct 17 '22 06:10 galad87

I've worked around the permissions issue by just packaging the artifact in a dmg, and then mounting the dmg in the release actions.

emiyl avatar Oct 23 '22 13:10 emiyl

Hi Emiyl,

the dmg in latest nightly is working great, thank you!! :-) If it not a big request could you please make an app bundle with moltenVK 1.2 included?

DTibor1986 avatar Oct 23 '22 21:10 DTibor1986

moltenvk 1.2 should already be included

emiyl avatar Oct 23 '22 21:10 emiyl