py2app app works only if launched from terminal

2019-07-25 15:44发布

I have just packaged my app (OSX 10.12.15 - python3.6 - py2app 0.12) and my application works only if launched from the terminal with MyApp.app/Contents/MacOS/MyApp. If I click on the app in the GUI, it doesn't start.

This is my setup.py:

from setuptools import setup

    APP = ['mq.py']
    DATA_FILES = []
    OPTIONS = {
        'iconfile':'icons/mq.icns',
            'plist': {'CFBundleShortVersionString':'0.1.0',}
    }

    setup(
        app=APP,
        name='MyApp',
        data_files=DATA_FILES,
        options={'py2app': OPTIONS},
        setup_requires=['py2app'],
    )- 

0条回答
登录 后发表回答