Need some help deploying Blender/UPBGE on macOS

So I’ve been banging my head against the wall for the past week trying to help the UPBGE developers port their program to macOS. For a little background, UPBGE is a fork of Blender that adds the old game engine back in with major improvements. The build process is entirely the same and at least 90% of the code is the same.

I’ve been having issues though. I followed the Blender Wiki 100% and made builds with both make and Xcode and neither work on anybody else’s macs. They run perfectly fine on my system when using the account they were built on, but fail on other user accounts or different machines. I did make release and make full and tried every build flag in Xcode (Release, MinSizeRel, Debug) and they all work fine on my system but they appear as broken on everyone else’s computers. Inspecting the files closely within the compiled Blender.app package and comparing it to the official ones, it seems as though they have the same number of files.

I believe that Xcode and make aren’t linking libraries properly but I have no idea how to do this. The -WITH_INSTALL_PORTABLE=YES and -WITH_STATIC_LIBS=YES Cmake flags don’t seem to exist on macOS so I can only assume this is done by default. Again, I’ve followed the instructions every step of the way and have tried messing with Cmake and I just don’t have any luck. I am building arm64 builds from my M1 machine and Intel builds through Rosetta 2 on my M1 machine. Both modes compile without errors. I have also tried compiling on an Intel mac and it’s the same story.

Any Blender devs, what are your exact steps to produce the final macOS release image and what can I do to ensure it is as compatible with other peoples’ systems as possible? Please help I’m losing too much sleep over this lol

If you give the exact error message that other users are seeing, it would help to figure out the problem.

But probably the main thing you are missing is code signing and notarization. macOS requires that to be done when distributing applications, unless users explicitly disable that system. For that you need an Apple developer account. Typically this would be an account owned by the project so it can be signed under that name.

For official Blender builds this is currently done as part of the buildbot infrastructure and not so simple to extract. But you can see this older version of that system here as a shell script that is easier to run. The README has details about how all this is set up.
https://developer.blender.org/diffusion/B/browse/blender-v2.93-release/release/darwin/

2 Likes

Thank you for taking the time to respond! I didn’t realize programs needed this to run on macOS. This is my error btw:

There are no errors in the terminal and nothing related to Blender so it probably just doesn’t even run the executable. Apple can be so useless when it comes to giving useful technical information :man_facepalming:

That’s indeed the error you get when the application is not code signed

2 Likes

Removing the quarantine attribute may be a temporary workaround https://apple.stackexchange.com/a/102358/

Thank you! Works perfectly now!