Py2exe make wxPython window looks bad

Jonathan Harris noone at nowhere
Tue Jul 4 07:34:48 EDT 2006


Ray wrote:
> http://wiki.wxpython.org/index.cgi/FAQ#head-4cc058aed6216dd200d55a6e4c077ccbe82bd142


Here's a trick that embeds the manifest into the executable (which is a 
little cleaner) and adds meta info.


1. Add this to the top of your setup.py. Supply your application's name, 
version number and description as appname, appversion and appdescrip:

manifest=('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n'+
           '<assembly xmlns="urn:schemas-microsoft-com:asm.v1" 
manifestVersion="1.0">\n'+
           '<assemblyIdentity\n'+
           '    version="%4.2f.0.0"\n' % appversion +
           '    processorArchitecture="X86"\n'+
           '    name="%s"\n' % appname +
           '    type="win32"\n'+
           '/>\n'+
           '<description>%s.</description>\n' % appdescrip +
           '<dependency>\n'+
           '    <dependentAssembly>\n'+
           '        <assemblyIdentity\n'+
           '            type="win32"\n'+
           '            name="Microsoft.Windows.Common-Controls"\n'+
           '            version="6.0.0.0"\n'+
           '            processorArchitecture="X86"\n'+
           '            publicKeyToken="6595b64144ccf1df"\n'+
           '            language="*"\n'+
           '        />\n'+
           '    </dependentAssembly>\n'+
           '</dependency>\n'+
           '</assembly>\n')


2. Within your setup routine, change your 'windows' entry to:

windows = [{'script': 'mainframe.py',
             'other_resources': [(24,1,manifest)],
             }],


Jonathan.



More information about the Python-list mailing list