I'm trying to package this example PySide systray Application with py2app.
The app accesses a number of images to display as the systray icon's graphic, in a directory called images
. The images are loaded with simple paths as shown below:
self.iconComboBox.addItem(QtGui.QIcon(':/images/bad.svg'), "Bad")
self.iconComboBox.addItem(QtGui.QIcon(':/images/heart.svg'), "Heart")
self.iconComboBox.addItem(QtGui.QIcon(':/images/trash.svg'), "Trash")
This of course works in development, but will not work when bundled as an application.
How can I make sure resources are loaded from the correct paths when using py2app?