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 https://archive.panda3d.org/ panda3d – I installed 1.11.0.dev1736 now installed on my local mac, which I can confirm includes the pull request https://github.com/panda3d/panda3d/pull/917 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: https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing

# setup.py
from setuptools import setup

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': 'https://archive.panda3d.org/',
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
            ],
            'gui_apps': {
                'cool_game': 'main.py',
            },
            'log_filename': '$USER_APPDATA/CoolGame/output.log',
            'log_append': True,
            'plugins': [
                'pandagl',
                'pandadx9',
                'p3openal_audio',
            ],
        }
    }
)````

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 FreezeTool.py 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!

Thanks