简体   繁体   中英

App dock icon in wxPython

In wxPython on Mac OS X is it possible to display a custom icon when an application is launched. Right now when I launch the app I wrote, a blank white icon is displayed in the dock. How would I go about changing it?

I have this in my setup file to add an icon:

from setuptools import setup

APP = ['MyApp.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True, 
    'iconfile': 'MyAppIcon.icns' }

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

I think you have to use an icns file. I used img2icns to create one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM