[PyQt] QSystemTrayIcon not working with py2exe
Sebastian Elsner
sebastianelsner at freenet.de
Tue Apr 27 14:50:16 BST 2010
Hello Nick,
my setup.py is autogenerated by GUI2exe. Find the contents below. As you
can see, I included the icon as data and icon file (even if I did not have
to when I was using ressources). both ways work when not compiled with
py2exe. I also tried several combinations with optimize, compressed and
bundle. also the QtCore and QtGui pyds and dlls get copied correctly... I
searched the web and the py2exe homepage, but it seems they do not have a
mailing list.
I'd appreciate all suggestions.
Sebastian
from distutils.core import setup
import shutil
class Target(object):
""" A simple class that holds information on our executable file. """
def __init__(self, **kw):
""" Default class constructor. Update as you need. """
self.__dict__.update(kw)
data_files = [('', ['X:\\hermes\\src\\icon.ico'])]
includes = ['sip']
excludes = []
packages = []
dll_excludes = []
icon_resources = [(1, 'X:\\hermes\\src\\icon.ico')]
bitmap_resources = []
other_resources = []
GUI2Exe_Target_1 = Target(
script = "HermesServerSysTray.py",
icon_resources = icon_resources,
bitmap_resources = bitmap_resources,
other_resources = other_resources,
dest_base = "HermesServerSysTray",
version = "0.1",
company_name = "No Company",
copyright = "No Copyrights",
name = "Py2Exe Sample File",
)
setup(
data_files = data_files,
options = {"py2exe": {"compressed": 0,
"optimize": 0,
"includes": includes,
"excludes": excludes,
"packages": packages,
"dll_excludes": dll_excludes,
"bundle_files": 3,
"dist_dir": "dist",
"xref": False,
"skip_archive": False,
"ascii": False,
"custom_boot_script": '',
}
},
zipfile = None,
console = [],
windows = [GUI2Exe_Target_1],
service = [],
com_server = [],
ctypes_com_server = []
)
On Tue, 27 Apr 2010 15:05:31 +0200, Nick Gaens <mail at nickgaens.com> wrote:
> Without insight to your setup.py, it's a lot of guessing ;-).
>
> You might have forgotten to add the icon itself as a resource to
> setup.py?
>
> On Tue, Apr 27, 2010 at 1:33 PM, Sebastian Elsner <
> sebastianelsner at freenet.de> wrote:
>
>> Hello,
>>
>> My application has a system tray icon, which gets its data from a
>> ressource
>> compiled via pyrcc. When started via double click on the .py script the
>> icon
>> shows up as expected. But when I compile with py2exe It does not. I also
>> tried not using pyrcc, same result. Is this a known problem? Any ideas
>> why
>> this would happen?
>>
>> Thanks
>>
>> Sebastian
>>
>>
>> --
>> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>> _______________________________________________
>> PyQt mailing list PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>
>
>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the PyQt
mailing list