PyFLTK - an underrated gem for GUI projects

Bugs dont at spam.me
Mon Nov 7 00:10:31 EST 2005


Hi Peter,
I just used the setup.py that comes in the singlefile/gui sample. 
However, py2exe does still also require the msvcr71.dll runtime as well, 
which is 340kb.  Here it is, it's a bit lengthy:

# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
     sys.argv.append("py2exe")
     sys.argv.append("-q")

class Target:
     def __init__(self, **kw):
         self.__dict__.update(kw)
         # for the versioninfo resources
         self.version = "0.6.1"
         self.company_name = "No Company"
         self.copyright = "no copyright"
         self.name = "py2exe sample files"

################################################################
# A program using wxPython

# The manifest will be inserted as resource into test_wx.exe.  This
# gives the controls the Windows XP appearance (if run on XP ;-)
#
# Another option would be to store it in a file named
# test_wx.exe.manifest, and copy it with the data_files option into
# the dist-dir.
#
manifest_template = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
     version="5.0.0.0"
     processorArchitecture="x86"
     name="%(prog)s"
     type="win32"
/>
<description>%(prog)s Program</description>
<dependency>
     <dependentAssembly>
         <assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             processorArchitecture="X86"
             publicKeyToken="6595b64144ccf1df"
             language="*"
         />
     </dependentAssembly>
</dependency>
</assembly>
'''

RT_MANIFEST = 24

test_wx = Target(
     # used for the versioninfo resource
     description = "A sample GUI app",

     # what to build
     script = "test_wx.py",
     other_resources = [(RT_MANIFEST, 1, manifest_template % 
dict(prog="test_wx"))],
##    icon_resources = [(1, "icon.ico")],
     dest_base = "test_wx")

################################################################

setup(
     options = {"py2exe": {"compressed": 1,
                           "optimize": 2,
                           "ascii": 1,
                           "bundle_files": 1}},
     zipfile = None,
     windows = [test_wx],
     )



More information about the Python-list mailing list