MacOS build_apps and code signing, fails with main executable failed strict validation errors

I’m working on a cool game prototype, and before I get too far I wanted to make sure that I can build and distribute binaries. I have a registered Apple Developer account, and was able to make a wildcard identifer for my Panda3d app, to use for code signing.

I’m on MacOS Mojave, and installed the latest development version of panda3d using pip install --pre --extra-index-url panda3d – I installed 1.11.0.dev1736 now installed on my local mac, which I can confirm includes the pull request which is supposed to fix any issues with Apple’s codesign tool.

However I’m still getting main executable failed strict validation errors when running codesign against panda’s ‘build_apps’ setuptool output.

Any ideas what I’m doing wrong? Hard to find the correct way to do this… I found this which seemed helpful:

from setuptools import setup

    name="Cool Game",
    options = {
        'py2app': {
            'plist': "Info.plist"
        'build_apps': {
            'build_base': 'out',
        	'platforms': ['macosx_10_15_x86_64'],
            'use_optimized_wheels': True,
            'optimized_wheel_index': '',
            'include_patterns': [
            'gui_apps': {
                'cool_game': '',
            'log_filename': '$USER_APPDATA/CoolGame/output.log',
            'log_append': True,
            'plugins': [

Thanks for any help!

Hi, welcome to the forums!

@treamous any ideas?

1 Like

I’m looking at this again today. I was adding some debug print statements to and it seems like the ‘deploy-stub’ is not getting the ‘__PANDA’ segment that it’s supposed to, according to the code changes from @treamous

It’s supposed to get this deploy stub from the compiled wheel? Not sure where to go next, but will keep digging. I assume that someone somewhere has distributed signed MacOS apps? Especially since this issue was worked on!