[wxPython-users] Two exe's in one py2exe dist?

Jorgen Bodde jorgen.maillist at gmail.com
Sun Feb 10 06:35:41 PST 2008


Roee and Werner,

Thank you very much for those solutions! I was going nuts trying to
figure it out! :-)
I will try the zipfile solution, as that seems to be the only file
that is different.

With regards,
- Jorgen

On Feb 10, 2008 3:26 PM, Werner F. Bruhin <werner.bruhin at free.fr> wrote:
> Hi Jorgen,
>
>
> Jorgen Bodde wrote:
> > Hi all,
> >
> > I am writing an app that has a wxPython front end, but also a GUI-less
> > back end. On windows I would like to have the console and GUI both
> > compiled to one dir. The problem however is that calling two setup()
> > functions in a py2exe session, makes it overwrite the "library.zip"
> > file in which all the files are located for each individual exe. Is
> > there a way to generate two exe's in one directory with py2exe ?
> >
> > I can't generate two seperate dirs because:
> > - The overhead will be 10+ Mb for the user
> > - Shared files are needed in both apps
> >
> > I was thinking that perhaps I could merge library.zip from the console
> > and the GUI, I did some investigation and all "imported" modules are
> > binary compatble.
> >
> > Did anyone succeed in attempting what I want?
> >
> Just have one setup.py generating both exe's, some code snippets from my
> setup.py:
> # options for py2exe
> options = {"py2exe": {"compressed": 1,
>                       "optimize": 2,
>                       "packages": ["encodings",
>                                    "kinterbasdb",
>                                    "pytz.zoneinfo.UTC",
> "matplotlib.numerix",
>                                    "email",
>                                    ],
>                       "excludes": ["MySQLdb", "Tkconstants", "Tkinter",
> "tcl",
>                                    "ormUnicode.adapters.pgsql",
> "ormUnicode.adapters.mysql",
>                       ],
>                       "dll_excludes": ["tcl84.dll", "tk84.dll",
> "wxmsw26uh_vc.dll"]
>                       }
>           }
> zipfile = r"lib\library.zip"
>
> exe1 = MetaBase(
>             script = "script1.py",
>             other_resources = [(RT_MANIFEST, 1, manifest_template %
> dict(prog="whatever name"))],
>             icon_resources = [(1, r"images/exe1.ico")],
>             dest_base = r"prog\exe1")
>
> exe2 = MetaBase(
>             script = "script2.py",
>             other_resources = [(RT_MANIFEST, 1, manifest_template %
> dict(prog="whatever name 1"))],
>             icon_resources = [(1, r"images/exe2.ico")],
>             dest_base = r"prog\exe2")
>
> setup(
>       classifiers = ["Copyright:: whoever",
> ...
>       windows = [exe1, exe2],
>       #console = [exe1],
>       options = options,
>       zipfile = zipfile,
> ...                    ]
>     )
>
> Werner
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>




More information about the wxpython-users mailing list