This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Functional Cygwin GTK with native win32 backend


Hi!

I compiled GTK with the native win32 backend, and it is functional.
Brief demo: http://i.imgur.com/PAWyLdW.gif

I would like to bring up discussion about the possibility of including
a native windows build of GTK in the Cygwin package list as well,
since it turns out that the steps that I took weren't so bad.

The general strategy I used was to build the GTK dependencies with
native Windows backends where possible. Just getting those to compile
was half the battle. The other half of the battle was to make some
win32 API symbols from GLIB be exported in libglib-2.0.dll.a to be
visible to the build of GTK.

Caveat: I have not had a chance to test my build extensively yet,
since it *is* holiday break for me, but so far it seems to work. If
you're wondering why I did this, I did this because I was bored and
felt festive.

Happy holidays!

***
Addendum:

If you would like to reproduce my work, you can refer to
https://gist.github.com/lyze/a4f53f8fadac1068a994

If certain details are unclear or do not work, I apologize in advance
for that; I'd be happy to help clarify things.

Outline:

1) Build cairo-1.15.2 with the windows backend (with
--enable-win32=yes passed to ./configure). No patches necessary here.
We need the newer version because it gives us the needed symbol
cairo_win32_surface_create_with_format. This gives us the cairo-win32 package.

2) Build pango-1.39.0 from source. I just used the source release from
their website. You probably will have to specify PKG_CONFIG_PATH as
well to find the new cairo-win32 package.

3) Build epoxy-1.3.1 with the windows backend. I got the release from
the GitHub repository. Patch the release with the attached epoxy
patches, then run ./configure, which should prepare epoxy for EGL,
GLX, and WGL backends.

3) Build glib2.0-2.46.2-1. Here, I obtained the source from the Cygwin
package setup executable. Run cygport prep as usual, and then apply my
patches.

4) Finally, build gtk+-3.18.6. I obtained the source release from the
GNOME website. Apply patches, then configure with
--enable-win32-backend. The invocation I used:

./autogen.sh WINDRES=/usr/bin/windres
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LDFLAGS='-L/usr/local/lib
-L/usr/lib/w32api' --enable-win32-backend

Gotchas:
You will probably have to specify PKG_CONFIG_PATH at every step, or
else you might pick up your existing library files instead of the
newly built ones. Same goes for LDFLAGS as well.

Apologies in advance if this email is in the wrong list, or if
specific discussion about these build details don't belong here.

-- 
David Xu

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]