openmoh / openmohaa

Open re-implementation of Medal of Honor: Allied Assault with modern features and bugfixes from ioquake3 with cross-platform support
https://www.openmohaa.org
GNU General Public License v2.0
332 stars 24 forks source link

macOS .app binary containers #508

Open KevDoy opened 2 weeks ago

KevDoy commented 2 weeks ago

Describe the bug The Game is difficult for an average user to run due to the macOS security protocols. Each binary and (.arm64/.x86_64) and .dylib need to be manually approved several times through the System Settings app and password or TouchID authentication before the game runs as intended.

These processes need to be repeated every time the OpenMoHAA files are updated.

A Possible Solution, from https://github.com/openmoh/openmohaa/issues/123

Given that each file within openmohaa needs to go through permissions repeatedly, bundling everything into a .app may help with this. Curious on everyones thoughts on appify.

https://github.com/machinebox/appify

Another mac user from the Discord contacting me some time ago. I walked him through testing the current binaries. There was a bit of a struggle to bypass all of the 20(?) security warnings for each component of the binaries in the Mac build when first launching the game or joining a match.

I'm going to try and bundling them into a proper macOS app with appify, mentioned above, to see if that reduces those notices.

Edit:

Used a fresh openmohaa.arm64 file to make the .app file. Only 1 pop up to allow the game to interact with the local network. Solves the endless firewall messages.

Screen.Recording.2024.10.19.at.8.49.31.PM.mp4 So follow up question: Can GitHub Actions automate this? If not, would it be worth having a maintainer that builds the macOS app for each major release? I am open to do that if necessary.

It can and must be automated but it needs the exact commands used to appify apps

appify -name "openMoHAA [version]" -icon "/misc/openmohaa.icns" [path-to-binary]/openmohaa.arm64

This results the inside of the .app's structure to look like this: image

Then the other files from the release need to be copied to the openMoHAA [version].app/Contents/MacOS/ folder.

image

Then the instructions for the user are to copy their game files into the same place and you're good to go:

image
KevDoy commented 2 weeks ago

Discussion on this topic on Discord: https://discord.com/channels/596049712579215361/596049712579215363/1303090868164628542