[pygtk] Packaging PyGTK applications for Windows

John Pye john.pye at student.unsw.edu.au
Fri Mar 17 11:40:35 WST 2006


Hi all

I wonder if anyone can offer any advice on the best practices for
package PyGTK applications for Windows?

Recently while trying to get GAIM (which relies on a GTK+ runtime) to
run on my windows machine, I realised I had to uninstall my GTK+
runtimes (as required for my PyGTK application, ASCEND) and reinstall
another version. Even then I failed to get GAIM to run.

On the other hand, today I installed Inkscape on my windows machine and
I was much more impressed by how it worked. It includes its own GTK+ as
DLLs (not as a separate installer, which seems to me to be the wrong
approach).

GAIM includes the GTK+ installer as a separate sub-install. Inkscape
just includes the DLLs it needs, no separate sub-install: no risk of
breaking the dependencies, and only one entry on the windows add/remove
programs list. Meanwhile PyGTK's installer doesn't even include the GTK+
libraries; it seems to be up to the user to ensure that they install the
right version.

It seems that a fundamental mistake when writing Windows ports of Linux
software is to assume that Windows users are able to keep track of the
dependencies between different bits of software. They can't -- you can
easily mess up your system by upgrading something like GTK+ that other
libraries/progs depend on, and you get no warning. So if you are going
to create distributable software, you better include all the
dependencies in your installer.

I think that PyGTK's windows installer should include the GTK+
libraries, somehow.

If anyone has a good example of how they go about this for their
particular application, (py2exe, etc?) I'd really like to hear about it.

Cheers
JP

PS Inkscape's installer script, using NSIS:
http://svn.sourceforge.net/viewcvs.cgi/inkscape/inkscape/trunk/packaging/win32/inkscape.nsi?view=markup&rev=10643

-- 
John Pye
School of Mechanical and Manufacturing Engineering
The University of New South Wales
Sydney  NSW 2052  Australia
t +61 2 9385 5127
f +61 2 9663 1222
mailto:john.pye_AT_student_DOT_unsw.edu.au
http://pye.dyndns.org/



More information about the pygtk mailing list