build a binary for Windows on Linux, Solaris or Mac OSX?
Christopher T King
squirrel at WPI.EDU
Tue Jul 6 20:52:02 CEST 2004
On Tue, 6 Jul 2004, Skip Montanaro wrote:
> I'd like to package up my typing watcher script in a bundled form (no
> separate Python install required) for use on Windows. (Un)fortunately, I
> don't have access to a Windows computer. Do any of the packaging tools
> (py2exe, MacMillan's Installer, etc) allow cross-platform bundling?
I've gotten py2exe to work under Wine. It takes a little bit of work,
though, mostly downloading real Windows DLLs (if you don't have copies
lying around). The process is more or less like this:
1) Install Win32 Python under Wine. (Good for cross-platform testing,
2) Install py2exe under Win32 Python. Run your setup script using Win32
3) Point Wine to a real copy of imagehlp.dll -- functions needed by py2exe
are stubs in the Wine version.
4) py2exe should now run, but will complain about not being able to find a
DLL. Find the DLL, and dump in in your Wine system directory. If you can't
find the DLL, use the dll_exclude option (not sure what the actual command
line arg is) to tell py2exe to skip it.
5) Repeat step 4 until py2exe doesn't complain.
6) If all goes well, you should have a happy Win32 binary waiting for you.
Note: I've only tested the resulting binary under Wine; I'm not sure if it
actually works in Windows or not! ;)
More information about the Python-list