Re: wxpython: visual effects missing after py2exe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leo Lee

    Re: wxpython: visual effects missing after py2exe

    Hi, I think I have already solved this problem while I am digging into the
    installation sources.
    I found this:

    C:\Python25\Lib \site-packages\py2exe \samples\single file\gui\setup. py

    # Requires wxPython. This sample demonstrates:
    #
    # - single file exe using wxPython as GUI.

    from distutils.core import setup
    import py2exe
    import sys

    # 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__.u pdate(kw)
    # for the versioninfo resources
    self.version = "0.6.1"
    self.company_na me = "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.man ifest, and copy it with the data_files option into
    # the dist-dir.
    #
    manifest_templa te = '''
    <?xml version="1.0" encoding="UTF-8" standalone="yes "?>
    <assembly xmlns="urn:sche mas-microsoft-com:asm.v1" manifestVersion ="1.0">
    <assemblyIdenti ty
    version="5.0.0. 0"
    processorArchit ecture="x86"
    name="%(prog)s"
    type="win32"
    />
    <description>%( prog)s Program</description>
    <dependency>
    <dependentAssem bly>
    <assemblyIdenti ty
    type="win32"
    name="Microsoft .Windows.Common-Controls"
    version="6.0.0. 0"
    processorArchit ecture="X86"
    publicKeyToken= "6595b64144ccf1 df"
    language="*"
    />
    </dependentAssemb ly>
    </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_templa te %
    dict(prog="test _wx"))],
    ## icon_resources = [(1, "icon.ico")],
    dest_base = "test_wx")

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

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


    "Leo Lee" <lxz3002@yahoo. com.cnдÈëÏûϢРÂÎÅ:g5m9bv$f60$ 1@aioe.org...
    Please take close look at the details of the two snapshots.
    I need explanation and correcting this problem.
    >
    >

Working...