This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

There is quite a bit of energy around maintaining Windows ports of Gtk+, GLib and other Gnome apps and libraries but it's currently lacking coordination. This page is supposed to become an overview of the currently active efforts and the reasons for doing things in specific ways. With that in mind we can decide what the best course of action is to support Gtk/Gnome on Windows.

Resources

Motivations/Goals

Compilers

Two options have theoretical support on Windows - mingw/GCC and Microsoft Visual C. We want to support developers using either toolchain to compile their app. In theory the toolchain used to compile Gtk itself is an orthogonal issue.

mingw/GCC (native)

See: Windows/MingwNativeBuild

fedora mingw

Microsoft Visual C

Cygwin

Build system

In theory both compilers can be used with both build systems, but autotools works best with gcc and MSVC requires it's own build files.

autotools / jhbuild

Custom scripts

OpenSUSE Build Service

The windows:mingw project builds packages using mingw64/GCC on virtual hosts, accessible via a web-interface or Linux command line utility. Despite its name, the OBS is very much usable without using openSUSE. It has the following advantages:

Some downsides are:

mgwport

mingw.org have recently introduced mgwport which aims to automate building of packages suitable for mingw-get.

Dependencies

mingw on Windows (MSYS)

On the mingw side, MSYS provides a pretty good environment these days. Some things are still needed - currently provided by 'jhbuild bootstrap' using the binary module type. This has always been a hack and is not welcome upstream.

An alternative would be bring together the dependencies using a shell script and provide a binary blob (or an MSYS package repository), avoiding the need for any binary module handing in jhbuild. This looks especially attractive given that we will probably have to use our own version of the compiler at the moment.

mingw on Linux (cross-compiling)

Cross-compiling all the dependencies is a bit more work, but not difficult as almost all open-source software comes with an autotools based build-system and once the cross-building environment is set up, compiling goes pretty smooth.

Packaging/Distribution

Application Packaging

A related problem to distributing the runtime, is also distributing an application using the runtime. The consensus is that all gtk applications should include, on non-unix platforms, a copy of all libraries used. To create installers/bundles which do this a number of utilities exist

What do other projects do

Conclusions

Unfortunately there are no clear answers at the moment. We should work with the current momentum, and support building the platform libraries with Visual C using the custom build tools. And support building as much of Gnome as possible with mingw and jhbuild.

Possible solutions / future work

Practical

Cracktical


2024-10-23 11:17