Hi,

On 30/03/2011 19:41, Antoine Martin wrote:
> I thought I would try to build the installer myself, and whilst I was at
> it why not try a 64-bit build?

Thank you so much for looking into a 64-bit build! I'm still without
a 64-bit Windows machine myself, so it's very much appreciated!

> First, it complained about missing WiX, I found version 3.5 here:
> http://wix.codeplex.com/

Yes, build_installer.py relies on WiX's current 3.5 stable
build (WIX_VERSION = '3.5.2519.0')

> (maybe you should add a link to the README and mention which versions
> are meant to work - if not all)

I'll add this to a HACKING.rst file and point to that from the
README.rst file in the "About the pygtk-installer project" section.

> Second, it wasn't really clear where I was meant to get xmllint from
> once it complained about that, after a failed attempt (xmllint.exe from
> googlecode) I ended up downloading a bunch of ZIP files from:
> ftp://ftp.zlatkovic.com/libxml/
> And sticking the contents of the bin/ folder in C:\WINDOWS (for
> simplicity). You may want to add a link and brief explanation to the README.

I've used a GTK+ runtime environment constructed manually from scratch
(basically, it contained everything now included with the 32-bit aio
installer except maybe glade) to bootstrap.

After that, once you've got a complete aio version installed for
the Python version used to run build_installer.py, you have everything
(except WIX) needed (i've always executed build_installer.py with
Python 2.7 + PyGTK All-in-one 2.whatever.-the-latest-build-might-be).
Heh, once you're bootstrapped it's a bit of a self-hosting
environment ;)

A 32-bit xmllint can be found in
http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libxml2-dev_2.7.7-1_win32.zip
And a 64-bit version is included in
http://ftp.gnome.org/pub/GNOME/binaries/win64/dependencies/libxml2-dev_2.7.7-1_win64.zip

Thinking about it, maybe you could use a 32-bit Python 2.7 with a
32-bit PyGTK-All-in-one (complete installation) to run the
build_installer.py script just to bootstrap build_installer for a
64-bit build?

> Then the build stopped complaining about that, but asked me to specify
> the moduleset, looking at the source and looking at the list of
> "PLATFORMS", I figured that I needed to use:
> build_installer.py 2.23.1.win64
> Again, you may want to add one or two lines of text to explain what the
> options are (or how to find that out)

Indeed, documentation on how to configure and run both
build_bindings.sh and build_installer.py would be great. Allow me a
couple of days to come up with the HACKING.rst file (it's extremely
busy here atm).

> What about building 2.22.1? Where can I find the module file for that?

All releases are tagged in git, so you can still check out the state of
the code from that era and even continue from that point in a branch if
that would be needed.

The reason those files no longer exist in current HEAD: build
description files of early releases like 2.22.1 where heavily
connected with the build_installer.py code (the xml schema was evolving
fast). Honestly, current build description files are still heavily
connected to the code...

So I've taken a habbit to for example:
"git mv wix/2.22.6.win32.xml wix/2.23.1.win32.xml"

I agree that's not a good long-term solution[1] , but with 2.24 being
the last PyGTK release ever[2] I won't bother changing build_installer
just yet...

> Finally, here is the build error I stopped at (added a bit of debug to
> try to figure out what filename/URL it was bailing out on):
> 
> * Creating .msi installer targeting Python 2.6
>   * Cleaning build environment...
>   * Preparing build environment...
>   * Preparing feature "PythonExtensionModules"...
>     * Preparing source package "pygtk"
>       * Preparing build environment...
>       * Fetching package sources...
>         * Downloading package sources from filename= URL=/...
> Traceback (most recent call last):
>   File "build_installer.py", line 1001, in <module>
>     main()
>   File "build_installer.py", line 992, in main
>     builder.build()
>   File "build_installer.py", line 259, in build
>     product.merge()
>   File "build_installer.py", line 284, in merge
>     self.do_build()
>   File "build_installer.py", line 323, in do_build
>     self.build_feature(feature)
>   File "build_installer.py", line 328, in build_feature
>     self.build_feature(child)
>   File "build_installer.py", line 335, in build_feature
>     sourcepackage.merge()
>   File "build_installer.py", line 543, in merge
>     self.do_fetch()
>   File "build_installer.py", line 564, in do_fetch
>     response = urlopen(url)
>   File "C:\Python27\lib\urllib2.py", line 126, in urlopen
>     return _opener.open(url, data, timeout)
>   File "C:\Python27\lib\urllib2.py", line 384, in open
>     protocol = req.get_type()
>   File "C:\Python27\lib\urllib2.py", line 245, in get_type
>     raise ValueError, "unknown url type: %s" % self.__original
> ValueError: unknown url type: /

The wix/2.23.1.win64.xml file is a skeleton build description file.
I've maintained it as a mirror of the wix/2.23.1.win32.xml file in
the hopes it would make the life of a contributor (or myself, the
day I get my hands on a 64-bit windows machine) easier. Basically,
all that's left to be done is to fill in the blanks: the url,
msi_26, msi_27, archive and digest (md5) tags of the packages that
need to be included in a 64-bit aio installer. You could use
wix/2.23.1.win32.xml as an example here.

Note that 64-bit pycairo/pygobject/pygtk Python extension modules
will need to be built with the build_bindings.sh script backed by
a 64-bit GTK+ runtime, 64-bit Python and a MinGW64 toolchain. Feel
free to leave out the more exotic parts like glade, pyrsvg,
pygtksourceview, etc in your initial test runs, better start with
the basics and add stuff as you go...

Well, there's also some good news: the WIX templates
(wix/template/PyGTK.wxs and wix/template /WixUI_PyGTK.wxs) should
be fully 64-bit ready to go, although that still needs to be thoroughly
tested.

> I have no idea why it is targetting Python 2.6, I've got Python 2.7.1
> installed... I tried tweaking the constants at the top of the file, but
> that didn't help.

This is defined in the build description file (wix/2.23.1.win64.xml)
under Build/Interpreters (bad name, I know)...

> Apologies if this is all covered somewhere else - I couldn't find it.

Certainly no need for apologies, you are correct to ask for all of this
and point out there's still documentation that needs to be written. The
whole point of the project is to have a repeatable process that (with
some effort) can be reproduced by anyone interested in it. Just imagine
me getting hit by a bus or something...

If you've got more questions, please don't hesitate to ask!

Many thanks,
Dieter

[1] I've been playing with the idea to turn the whole project into a
more generic gnome-windows .msi installer generator. Just think about
the impact a good stand-alone Glade or whatever installer could
have. Guess the build description schema is going to have to evolve
even more! :)

[2] Barring maybe PyGTK point bugfix releases if enough people keep up
maintenance/interest/motivation... And yaay for PyGObject +
GObject Introspection!
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to