After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634978 - Include proper build scripts for win32 builds of glade
Include proper build scripts for win32 builds of glade
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
: 587282 593971 602812 612922 624187 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-11-16 12:05 UTC by Dieter Verfaillie
Modified: 2011-11-24 22:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix_python_includes.patch (817 bytes, patch)
2010-11-16 12:07 UTC, Dieter Verfaillie
none Details | Review
glade-3.exe.manifest (704 bytes, application/octet-stream)
2010-11-17 11:17 UTC, Dieter Verfaillie
  Details
build_glade.sh for the build/mswindows directory (5.56 KB, application/x-sh)
2011-01-14 19:41 UTC, Dieter Verfaillie
  Details
README for the build/mswindows directory (931 bytes, application/octet-stream)
2011-01-14 19:42 UTC, Dieter Verfaillie
  Details
build_glade.sh for the build/mswindows directory, ironed out some last wrinkles... (5.73 KB, application/x-sh)
2011-01-14 22:04 UTC, Dieter Verfaillie
  Details
build_glade.sh for the build/mswindows directory, ironed out another wrinkle... (5.77 KB, application/x-sh)
2011-01-14 22:57 UTC, Dieter Verfaillie
  Details
build_glade.sh for the build/mswindows directory (6.01 KB, application/x-sh)
2011-01-17 14:28 UTC, Dieter Verfaillie
  Details
README for the build/mswindows directory (1.03 KB, text/plain)
2011-01-17 14:29 UTC, Dieter Verfaillie
  Details
patch for 3.6.7 configure script (880 bytes, application/octet-stream)
2011-01-17 21:05 UTC, Dieter Verfaillie
  Details
build_glade.sh for the build/mswindows directory (6.44 KB, application/x-sh)
2011-01-17 21:36 UTC, Dieter Verfaillie
  Details
Fix glade3-3.7.3 windows build (304 bytes, patch)
2011-03-28 18:05 UTC, Dieter Verfaillie
none Details | Review
Add news for 3.8.1 Windows binaries (1.85 KB, patch)
2011-11-24 22:01 UTC, Dieter Verfaillie
none Details | Review

Description Dieter Verfaillie 2010-11-16 12:05:48 UTC
Hi,

It is currently impossible to build glade3[1] (on mswindows using
MinGW/MSYS) with "Python Widgets support" as python.m4
"hard-codes" a PYTHON_INCLUDES path that does not exist in the
windows version of Python.

For example:
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
    -> result  :"-I${py_prefix}/include/python2.6"
    -> expected:"-I${py_prefix}/include"

Sadly python.m4 does not allow you to override PYTHON_INCLUDES
from an environment variable like it already does for PYTHON_LIBS
and PYTHON_LIB_LOC. I'll attach a patch for python.m4 that allows
one to override the PYTHON_INCLUDES variable, so it becomes possible
to:

PYTHON_INCLUDES="-Id:/Python26/include/" \
PYTHON_LIBS="-Ld:/Python26/libs/ -lpython26" \
PYTHON_LIB_LOC="d:/Python26/libs/" \
./configure
etc...

For future reference: once you have successfully built glade-3
with "Python Widgets support", you still need to create a
glade-3.exe.manifest file next to glade-3.exe with the following:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity 
	 type='win32' 
	 name='Microsoft.VC90.CRT' 
	 version='9.0.21022.8' 
	 processorArchitecture='*' 
	 publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>

If you don't create the manifest file, you'll run into an error[2]
when the embedded python interpreter is loaded. The manifest works
for both Python 2.6 and 2.7.

[1] Tested with 3.6.7, python.m4 from git master has the same problem though...
[2] http://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx
Comment 1 Dieter Verfaillie 2010-11-16 12:07:02 UTC
Created attachment 174597 [details] [review]
fix_python_includes.patch
Comment 2 Dieter Verfaillie 2010-11-17 11:17:52 UTC
Created attachment 174670 [details]
glade-3.exe.manifest

The fragment included in the original bug report was incomplete.
The attached glade-3.exe.manifest fixes that...
Comment 3 Tristan Van Berkom 2010-12-31 04:57:58 UTC
Thanks for looking at this.

I'm committing your patch as it looks harmless in itself.

However I'm not sure what to do with the manifest file.

I've been thinking though, I do have a directory somewhere
on my Mac where I kept a build directory basically containing
"stuff I need to build for OSX".

If you would be willing to put together a 'build/win32' directory
to be added to the glade3 repository, including this manifest file
and anything specifically needed to build on win32, maybe even
adding a README there with some steps for compiling and building
the exec for win32, that would really be helpful (we've had alot
of random win32 builds that just fail for various reasons, would
be nice to finally get it right).

If you did this I could then merge in my OSX stuff as soon as
I make an OSX build and then we would have
 glade3/build/win32/
 glade3/build/osx/

Directories with all the needed stuff and documentation on
how to get it built for either platform.

Ideally I guess the glade3/build/win32 directory should come
with at least a README, a Makefile and the manifest, and possibly
some environment script to setup where to pull the GTK+ from.

Running 'make' after correctly configuring the environment
script according to the details in README should give you
something appropriate to ship onto win32.

Sound like fun ?
Comment 4 Dieter Verfaillie 2010-12-31 10:45:47 UTC
I've written a build_glade.sh script (based on the scripts Tor Lillqvist
uses to build the GTK+ windows binaries on ftp.gnome.org) that does most
of what you describe for the PyGTK All-in-one installer project.
It builds Glade3 with "Python widgets support" for each 32bit Python
interpreter version currently supported:
https://github.com/dieterv/pygtk-installer/blob/master/bin/build_glade.sh
https://github.com/dieterv/pygtk-installer/blob/master/bin/build.conf

First step could be to change it so it can be run from a glade3/build/win32
directory. Then I'd probably need to add another build configured with
--disable-python. The result of the script would then be 3 zip archives:
glade3-3.6.7-0.win32.zip      (without glade-3.exe.manifest)
glade3-3.6.7-0.win32-py26.zip (with glade-3.exe.manifest)
glade3-3.6.7-0.win32-py27.zip (with glade-3.exe.manifest)

The documentation on top of the script could be extracted into a README.win32
file (like is done for the PyGTK/PyGObject/... bindings).

There's only one thing still missing (compared to the zip archives Tor
creates): it does not yet create a manifest/glade-3_3.6.7-0_win32.mft file
in the zip archives created.

I'll be having a go at this somewhere in the coming days, maybe next week (it's
a bit busy here with the new year and all...)

What do you think?
Comment 5 Tristan Van Berkom 2011-01-13 12:59:42 UTC
*** Bug 587282 has been marked as a duplicate of this bug. ***
Comment 6 Dieter Verfaillie 2011-01-14 19:40:32 UTC
I've updated and cleaned the build script I wrote for the PyGTK
All-in-one installer project so it can live in Glade's source tree
in a build/mswindows directory. It now successfully and completely
mimics Tor's build scripts (package manifest, build log and copy
of the build script are included in the created zip archives).
Barring any undiscovered bugs, this is as good as it gets :)
Comment 7 Dieter Verfaillie 2011-01-14 19:41:40 UTC
Created attachment 178346 [details]
build_glade.sh for the build/mswindows directory
Comment 8 Dieter Verfaillie 2011-01-14 19:42:04 UTC
Created attachment 178347 [details]
README for the build/mswindows directory
Comment 9 Dieter Verfaillie 2011-01-14 22:04:17 UTC
Created attachment 178356 [details]
build_glade.sh for the build/mswindows directory, ironed out some last wrinkles...
Comment 10 Dieter Verfaillie 2011-01-14 22:57:25 UTC
Created attachment 178362 [details]
build_glade.sh for the build/mswindows directory, ironed out another wrinkle...

Think I'm done now. Builds are successful, generated .mft file contains
what we'd expect, and the build revision number for a version seems to
start at 1 instead of 0 these days so fixed that too...

I've uploaded the built archives to:
http://www.optionexplicit.be/projects/gnome-windows/20110114/
The glade3 binaries built with Python support will be included in the
next version of the PyGTK All-in-one installer.

It would be great if all 3 glade3 zip archives could be hosted on
ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/

If anything is missing or feels wrong, please contact me :)
Comment 11 Dieter Verfaillie 2011-01-17 14:28:31 UTC
Created attachment 178514 [details]
build_glade.sh for the build/mswindows directory

- remove the need to configure VER, CHECKOUT, TMPDIR and DESTDIR:
    VER: extract version number from configure.ac
    CHECKOUT: top level source directory is now automatically determined
    TMPDIR: used to configure PREFIX is now set to build/mswindows/build
    DESTDIR: now DISTDIR is set to build/mswindows/dist
- fixed name pattern used for .zip, .mft and .log file names

Binaries built by this version are located at http://www.optionexplicit.be/projects/gnome-windows/20110117/ and previous versions have been removed.
Comment 12 Dieter Verfaillie 2011-01-17 14:29:22 UTC
Created attachment 178515 [details]
README for the build/mswindows directory

Updated README accordingly
Comment 13 Dieter Verfaillie 2011-01-17 21:05:50 UTC
Created attachment 178564 [details]
patch for 3.6.7 configure script

This patches the configure script to do the equivalent of the changes
to python.m4 from fix_python_includes.patch (which you already committed
for newer glade versions). This file is manually included in the built
3.6.7 distributable archives under the src/glade3 directory to document
the steps needed to build 3.6.7 (for completeness).
Comment 14 Dieter Verfaillie 2011-01-17 21:36:05 UTC
Created attachment 178565 [details]
build_glade.sh for the build/mswindows directory

More improvements:
- don't set PYTHON vars when building without Python support
- create a 'runzip' and 'devzip' archive, like the other binary packages
  on ftp.gnome.org/pub/GNOME/binaries/win32/

The archives on http://www.optionexplicit.be/projects/gnome-windows/20110117/
have been updated to the version built by this revision of the script. Unless
asked I will no longer change anything for 3.6.7 and those files are final.

On to glade 3.9.1: I won't be able to build what will become glade 3.10 until
GTK+ 3 binaries are provided on ftp.gnome.org. I simply don't have the time
needed to build the whole stack myself, sorry...

And glade 3.7.3: build_glade.sh should work unmodified.
Unfortunately, the build fail with the following error (against
gtk+-bundle_2.22.1-20101227_win32). Any ideas?

  CC     libgladeui_1_la-glade-editable.lo
  CC     libgladeui_1_la-glade-editor-table.lo
  CC     libgladeui_1_la-glade-cell-renderer-icon.lo
windres gladeui.rc gladeui-win32-res.o
  CCLD   libgladeui-1.la
Creating library file: .libs/libgladeui-1.dll.a
  CC     glade_3_previewer-glade-previewer.o
make[2]: *** No rule to make target `glade-previewer.rc', needed by `glade-win32-res.o'.  Stop.
make[2]: Leaving directory `/d/dev/gnome.org/gnome-windows/checkout/glade3-3.7.3/gladeui'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/d/dev/gnome.org/gnome-windows/checkout/glade3-3.7.3/gladeui'
make: *** [install-recursive] Error 1
Comment 15 Tristan Van Berkom 2011-01-22 09:15:32 UTC
*** Bug 624187 has been marked as a duplicate of this bug. ***
Comment 16 Tristan Van Berkom 2011-01-22 09:16:40 UTC
*** Bug 612922 has been marked as a duplicate of this bug. ***
Comment 17 Tristan Van Berkom 2011-01-22 09:19:20 UTC
*** Bug 593971 has been marked as a duplicate of this bug. ***
Comment 18 Tristan Van Berkom 2011-01-22 09:21:02 UTC
*** Bug 602812 has been marked as a duplicate of this bug. ***
Comment 19 Dieter Verfaillie 2011-03-28 18:05:36 UTC
Created attachment 184491 [details] [review]
Fix glade3-3.7.3 windows build

Good news: applying this patch and running 'autoreconf' (from a Linux machine) fixes the "No rule to make target `glade-previewer.rc'" error when building with MinGW/MSYS on Windows (reported in comment 14) and enables glade3-3.7.3 to build with the build_glade.sh script.

build_glade.sh did not need any modifications, except I pointed the GTKBUNDLE variable to a GTK+ runtime (the 2.22 bundle) with GLib 2.28 and GTK+ 2.24 applied on top (all from http://ftp.gnome.org/pub/GNOME/binaries/win32/).

I've uploaded this 3.7.3 build to http://www.optionexplicit.be/projects/gnome-windows/20110328/ :)
Comment 20 Dieter Verfaillie 2011-04-05 20:30:00 UTC
Comment on attachment 184491 [details] [review]
Fix glade3-3.7.3 windows build

glade-previewer has been pulled from glade 3.8.0 and the master branch already does the right thing, so this patch is no longer needed.
Comment 21 Dieter Verfaillie 2011-04-05 20:34:35 UTC
Comment on attachment 178564 [details]
patch for 3.6.7 configure script

This patch has been included in the built 3.6.7 windows archives (see comment 14) and other than that is no longer of any use.
Comment 22 Dieter Verfaillie 2011-04-05 20:49:04 UTC
Think I might have set a record here :)
Glade 3.8.0 windows binaries are now available on:
http://www.optionexplicit.be/projects/gnome-windows/20110405/.
These have been built with the attached build_glade.sh script.

build_glade.sh did not need any modifications, except I pointed the
GTKBUNDLE variable to a GTK+ runtime (gtk+-bundle_2.22.1-20101227_win32)
with GLib 2.28 and GTK+ 2.24 packages applied on top (all from
http://ftp.gnome.org/pub/GNOME/binaries/win32/) as there is no
gtk+-bundle_2.24 (and there is little hope of Tor providing it, see
http://tml-blog.blogspot.com/2011/03/gtk-on-windows-i-am-not-really-doing-it.html)

Until I can find some time to construct a sane installer (like I did for
PyGTK) I've additionally provided a glade3-bundle_3.8.0-1-20110405_win32.zip
bundle that contains all dependencies necessary to run glade, so others
don't have to hunt them down. Simply extract the zip somewhere, go into
the bin directory and run glade-3.exe. The contents of this bundle is
documented in share/doc/glade3-bundle_3.8.0-1-20110405_win32/components.lst
(analogous to gtk+-bundle).

Also wanted to say thanks to all involved in this great new Glade release!

Also a small request: the files on my personal site
(http://www.optionexplicit.be/projects/gnome-windows/) are to be considered
as temporary as sadly I'm sometimes forced to remove older directories due
to resource constraints. It would be great if these could eventually find
a more permanent home. Thanks!
Comment 23 Dieter Verfaillie 2011-04-05 20:54:11 UTC
Forgot to mention that fooling around with the PATH environment variable
should *never* be needed when using glade3-bundle (or any other well constructed
gtk+ environment on windows for that matter). Doing so is even to be discouraged!
Comment 24 Tristan Van Berkom 2011-04-05 22:12:00 UTC
Thanks for tidying up the obsolete files here.

I've been very busy and thus did not add this build directory yet but
I have not forgotten at all, this is very valuable since it's frequent
that someone new ends up building win32 binaries and everyone has to 
start from scratch.

Also... I'll be happy to post your binaries up on download.gnome.org
where I've posted previous binaries (they are linked from the
glade.gnome.org website).
Comment 25 Dieter Verfaillie 2011-04-05 22:52:28 UTC
Don't worry, I understand very well how things go (we've
all got lives to live after all) and over the years have
learned to be patient with these kinds of things :)

Also, having the binaries on download.gnome.org would be
great, thanks!

About Glade-3.10 Windows binaries, I'm not really sure
what direction will be taken within the GNOME project with
regards to future "official" Windows binaries of the GTK+-3
stack. Tor's work has always been the reference for us Windows
users and the openSUSE Build Service he refers to is
as of yet mostly uncharted territory for myself. It will
take me some time to figure these things out (I fail to see
how it could support cross-compiling glade with Python support
for various Python versions for example) but I'm sure we'll
get there eventually :)
Comment 26 Tristan Van Berkom 2011-11-23 11:36:53 UTC
Ok I created the directory and pushed this to all branches.

Even though it's only valid currently in Glade 3.8, we will just
consider it 'currently broken' for now.

Thanks a lot for taking on this task :)
Comment 27 Dieter Verfaillie 2011-11-24 22:01:17 UTC
Created attachment 202099 [details] [review]
Add news for 3.8.1 Windows binaries

Updated GTK+ 2.24.8 bundle and dependencies binaries have been released to
http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.8-20111122_win32.zip
The bundle is available at http://ftp.gnome.org/pub/GNOME/binaries/win32/.

Updated Glade3 3.8.1 binaries and bundle (using said GTK+ 2.24.8 release)
have been released and are available at
http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.8/

This patch adds a news item to glade.gnome.org and updates the
"Older Windows Binaries" link.