GTK+ (and PyGTK) on win32

30 enero, 2008 (13:18) | english, gnome, software-libre

GTK+ logoThese days, some people on the PyGTK mailing list have showed their disappointment with the apparent lack of support for GTK+ on the win32 platform.

As far as I can tell, the main problem lies in the lack of a convenient packaging due to lack of manpower, as the platform seems to build fine and win32 binaries are being offered, including all its dependencies.

The lack of good packaging probably hits harder on the bindings users, like the PyGTK ones, as they don’t need a C development chain but depend on a working GTK+ runtime and already have their own deployment problems to solve.

As either there’s not enough people interested in helping out with a more convenient packaging or the potentially interested ones don’t have the information, skills or time to join the effort, this post will try to gather some information that’s currently scattered around blogs, wiki pages or mailing lists in the hope that lowering the barrier to getting started can improve that situation:

Alberto thinks the ideal solution would be the creation of msi installers. This allows easy mass deployments and gets good operating system integration, but while some of the needed tools (WiX) are open source, the toolchain isn’t (AFAIK), and being able to create the packages on a GNU/Linux box using cross-compilation and other native tools (wine/Mono/mingw) would be a great plus that would let GTK+ developers build their own win32 packages or the creation of GTK+ runtime packages using GNOME’s infrastructure.

We are sure that having a few motivated people willing to document the building and packaging process of gtk+ on windows can make a great difference here. Anyone is willing to scratch this itch?

Update: Alexander Shaduri is currently publishing an updated gtk+ runtime installer, a theme selector and a collection of themes within the gtk-win project on sourceforge. It can be downloaded here, as well as the NSIS configuration packages.

Update 2: Ali Sabil‘s buildows script is based on jhbuild. It fully works on a GNU/Linux box except for the last packaging step as WiX runs native code and he hasn’t got it to work using wine (he tried using a native dll under wine but couldn’t get it to work).

Update 3: There’s now a wiki page on live.gnome.org to collect all the relevant information about windows GTK+ packaging and the desired goals and a new chat room on gimpnet called #win32.

Comments

Comment from Mishail
Date: 01/30/2008, 2:55 pm

http://gtk-win.sourceforge.net/home/index.php?title=Downloads&lang=en (2.12.5)

Comment from Brett
Date: 01/30/2008, 6:09 pm

Here is a simple Python script to download and install GTK+, it’s dependencies and PyGTK. It doesn’t build anything and only downloads the binaries that are already provided on http://ftp.gnome.org

bzr cat http://bazaar.launchpad.net/~bauble/bauble/trunk/scripts/install_gtk.py

Comment from pachi
Date: 01/30/2008, 6:27 pm

Thanks Mishail and Brett for your comments!

Comment from pachi
Date: 01/30/2008, 6:48 pm

I’ve also added Bauble to the pygtk.org applications list. I didn’t know about it, but it’s a really interesting project.

Comment from Peter
Date: 01/30/2008, 7:06 pm

A similar installer for MacOSX would be great as well

Comment from sdfsd
Date: 01/30/2008, 8:30 pm

I wonder why the win32 installer is a separate project. It should really be part of Gtk and have the same release cycle.

Comment from oleavr
Date: 01/30/2008, 11:54 pm

There’s also OABuild, although slightly outdated:
http://people.collabora.co.uk/~oleavr/OABuild/

(Requires you to fiddle with the bootstrap.py script to make it check out earlier revisions of GStreamer etc. instead of HEAD.)

Comment from George
Date: 01/31/2008, 12:27 am

GTK+ should be completely cross platform, just like QT4. We really need to be able to just compile an app under gtk-win32 or gtk-linux. Also all apps such as GIMP,Inkscape, Pidgin etc need to use the same prefix and set of libraries.

My comments for the GTK team.

Lets not fall behind folks.

Oh and thanks for all the hard work…

Comment from pachi
Date: 01/31/2008, 2:10 am

oleavr, thanks for pointing to OABuild, it has been added to the wiki page for reference, though we’re concentrating on a toolchain that can be used from a GNU/Linx box, and Buildows has more potential for achieving this.

George, GTK+ is completely cross platform, but the windows packaging issues need to be improved, indeed.

Comment from Dan Kegel
Date: 01/31/2008, 9:07 am

OK, here’s a wine bug report for one of the WiX problems:

http://bugs.winehq.org/show_bug.cgi?id=11411

Comment from Marco Bonifazi
Date: 04/06/2008, 10:36 am

I realized a PyGtk all in one installer for Windows.

You can download it from here:
http://www.bonifazi.eu/appunti/pygtk_windows_installer.exe

It is simply an assembling of all the different installers I
previously downloaded (which are executed step by step), and you can
choose.

I realized this installer using EclipseNSIS and compiling the script
generated by NSIS.
Then, the script I created and that you can compile and modify using
NSIS is the following:

http://www.bonifazi.eu/appunti/pygtk_windows_installer.nsi

I give also the link of the webpages where I got the different
installers:
http://www.bonifazi.eu/appunti/2008/04/pygtk-all-in-one-installer.html

I’ll try to keep update this installer.

I hope it could be useful to someone.

Bye.

Marco Bonifazi

Comment from Stu
Date: 03/06/2010, 4:54 pm

Using python 2.6:

The python based installed of bazaar complains about invalid interpreter (the windows path leaks out of the bzr script and it doesn’t know what to do with it).

Using the standalone installer gets a little further, but complains that os.uname() doesn’t exist:

$ mkdir windows-build; cd windows-build;bzr branch http://people.collabora.co.u
k/~asabil/bzr/buildows ;cd buildows; ./buildows
Format for http://people.collabora.co.uk/~asabil/bzr/bui
ldows/.bzr/ is deprecated – please use ‘bzr upgrade’ to get better performance
Branched 2 revision(s).
Traceback (most recent call last):
File «C:\msys\1.0\home\stu\windows-build\buildows\windows-build\buildows\jhbui
ld\config.py», line 88, in __init__
execfile(_defaults_file, config)
File «C:\msys\1.0\home\stu\windows-build\buildows\windows-build\buildows\jhbui
ld\defaults.jhbuildrc», line 55, in
uname = os.uname()
AttributeError: ‘module’ object has no attribute ‘uname’
jhbuild: could not load config defaults

Comment from Stu
Date: 03/06/2010, 5:59 pm

The problem is that defaults.jhbuildrc uses os.uname() it should use platform.uname() as thats available on all platforms.

I’m not sure where to report the issue though.

Comment from Pachi
Date: 03/06/2010, 6:06 pm

Stu, you should probably try to post the bug in the jhbuild product of GNOME’s bugzilla: https://bugzilla.gnome.org/browse.cgi?product=jhbuild

Write a comment