Compiling wxPython app for Windows; Single EXE

Tim N. van der Leeuw tim.leeuwvander at nl.unisys.com
Sun Aug 13 16:46:14 EDT 2006


Vincent Delporte wrote:
> Hi
>
> I browsed the archives, but since some messages date back a bit, I
> wanted to make sure that
>
> - py2exe is still the best tool in town to compile Python scripts to
> run on a Windows host that doesn't have Python installed, including
> wxWidgets/wxPython
>
> - there's no way to build a single EXE, to make deployment easier (if
> multiple files, I need to build an installer with eg. NSIS or
> InnoSetup)?
>
> Thank you.

Hi,

I have a wxPython app, which I compile into one EXE file. Then there's
just 1 support file needed: a MS DLL (which, once distributed, you will
not need to update).
Oh, and for w9x support there's an extra file, popenw9x.exe (or
something like that) which you can probably forget about if you don't
wish to support that.

Well, OK, that makes 3 files... Icons for windows are extra too, and
any other setup/ini/datafiles you wish to add and that are opened as
'normal' files too.

So what I do then is bundle it up as an self-extracting-archives, using
7-zip, which by default extracts into a sub-directory of the directory
where you copy the SEA-exe.

Voila, simple and easy, no installer required.

Works for me; dunno if it's good enough for your needs as well. (Oh,
and creating the SEA-exe you can probably automate if from the setup.py
but I haven't bothered yet)

Cheers and good luck,

--Tim




More information about the Python-list mailing list