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 787622 - Patches to fix building on win32
Patches to fix building on win32
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
3.91.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-09-13 12:24 UTC by Jaime Velasco
Modified: 2018-05-02 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDK: define GDK_WINDOWING_WIN32 on Windows (1.27 KB, patch)
2017-09-13 12:25 UTC, Jaime Velasco
none Details | Review
Depend on gio-unix on unix and gio-windows on windows (2.52 KB, patch)
2017-09-13 12:26 UTC, Jaime Velasco
none Details | Review
GDK: link needed libraries on windows (901 bytes, patch)
2017-09-13 12:26 UTC, Jaime Velasco
none Details | Review
gtkprintoperation-portal.c is unix-only (649 bytes, patch)
2017-09-13 12:27 UTC, Jaime Velasco
none Details | Review
Fix building gtk-demo (716 bytes, patch)
2017-09-13 12:27 UTC, Jaime Velasco
none Details | Review
define GTK_PRINT_BACKENDS in win32 (566 bytes, patch)
2017-09-13 12:27 UTC, Jaime Velasco
none Details | Review
Build and link win32 resource and manifest into DLL (3.37 KB, patch)
2017-09-13 12:28 UTC, Jaime Velasco
none Details | Review
Only depend on xkbcommon when building for wayland (1009 bytes, patch)
2017-09-13 12:28 UTC, Jaime Velasco
none Details | Review
gentypefuncs.py: open file in binary mode (1.25 KB, patch)
2017-09-13 12:28 UTC, Jaime Velasco
none Details | Review

Description Jaime Velasco 2017-09-13 12:24:32 UTC
Hi, with the following patches I am finally able to build GTK on windows (msys2/mingw32 environment). Please review.
Comment 1 Jaime Velasco 2017-09-13 12:25:31 UTC
Created attachment 359704 [details] [review]
GDK: define GDK_WINDOWING_WIN32 on Windows
Comment 2 Jaime Velasco 2017-09-13 12:26:20 UTC
Created attachment 359705 [details] [review]
Depend on gio-unix on unix and gio-windows on windows
Comment 3 Jaime Velasco 2017-09-13 12:26:51 UTC
Created attachment 359706 [details] [review]
GDK: link needed libraries on windows
Comment 4 Jaime Velasco 2017-09-13 12:27:11 UTC
Created attachment 359707 [details] [review]
gtkprintoperation-portal.c is unix-only
Comment 5 Jaime Velasco 2017-09-13 12:27:32 UTC
Created attachment 359708 [details] [review]
Fix building gtk-demo
Comment 6 Jaime Velasco 2017-09-13 12:27:53 UTC
Created attachment 359709 [details] [review]
define GTK_PRINT_BACKENDS in win32
Comment 7 Jaime Velasco 2017-09-13 12:28:13 UTC
Created attachment 359710 [details] [review]
Build and link win32 resource and manifest into DLL
Comment 8 Jaime Velasco 2017-09-13 12:28:30 UTC
Created attachment 359711 [details] [review]
Only depend on xkbcommon when building for wayland
Comment 9 Jaime Velasco 2017-09-13 12:28:49 UTC
Created attachment 359712 [details] [review]
gentypefuncs.py: open file in binary mode
Comment 10 Jaime Velasco 2017-09-13 18:56:07 UTC
I don't know how I managed not to find bug 785210, but from a quick glance it seems to fix the same problems and a few more. I think attachment 359709 [details] [review] and attachment 359708 [details] [review] are still needed, and the gentypefuncs.py patch is a different approach that I think could be less robust than mine, but I don't think it matters much.

Kind regards
Comment 11 Fan, Chun-wei 2017-09-14 08:21:51 UTC
Hi Jaime,

I think we could work together to get GTK+ master building on Windows, out of the box.  I presume you are using MSYS2?  I am working more on getting the code to build with Visual Studio with Meson in bug 785210, hence the other items, as well as getting Vulkan support built.

Let's keep an eye out for each other and track the duplicate patches and remove them from review if one of ours patches gets in.

With blessings, and cheers!
Comment 12 Jaime Velasco 2017-09-14 13:25:49 UTC
Hello, you are right, I'm using MSYS2. It seems that needed fixes are mostly the same for both environments, which is a good thing.

I'll be away (from windows) for a couple of weeks and won't be able to test or do much of anything with this for a while. I wanted to post the work in progress in case it could be helpful, didn't realize you had written those patches already.

Regards.
Comment 13 Fan, Chun-wei 2017-09-15 14:08:35 UTC
Comment on attachment 359704 [details] [review]
GDK: define GDK_WINDOWING_WIN32 on Windows

Hi Jaime,

Part of this (the gdk/gdkconfig.h.meson portion) went into master as e5a1de1.

With blessings, thank you!
Comment 14 Fan, Chun-wei 2017-09-15 14:13:53 UTC
Hi Jaime,

For records, when things go in, we could close things at either side:

For attachments 359705, 359706 and 359707 and 359709 is covered by attachment 359850 [details] [review] of bug 785210.

For attachment 359710 [details] [review] is covered by attachment 357100 [details] [review] of bug 785210.

With blessings, thank you!
Comment 15 Fan, Chun-wei 2017-09-15 14:16:21 UTC
Comment on attachment 359712 [details] [review]
gentypefuncs.py: open file in binary mode

Hi Jaime,

The fix to gentypefuncs.py went into master as 0332dbc, so I am going to make this patch obsolete.  Thanks though!

(In reply to Fan, Chun-wei from comment #14)
 
> For attachments 359705, 359706 and 359707 and 359709 is covered by
> attachment 359850 [details] [review] [review] of bug 785210.

... oh, and attachment 359711 [details] [review] as well.

With blessings, and cheers!
Comment 16 Jaime Velasco 2017-12-12 13:00:02 UTC
Comment on attachment 359707 [details] [review]
gtkprintoperation-portal.c is unix-only

This was fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment 17 Jaime Velasco 2017-12-12 13:01:58 UTC
Comment on attachment 359705 [details] [review]
Depend on gio-unix on unix and gio-windows on windows

Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment 18 Jaime Velasco 2017-12-12 13:04:00 UTC
Comment on attachment 359711 [details] [review]
Only depend on xkbcommon when building for wayland

Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment 19 Jaime Velasco 2017-12-12 13:04:51 UTC
Comment on attachment 359704 [details] [review]
GDK: define GDK_WINDOWING_WIN32 on Windows

Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment 20 Jaime Velasco 2017-12-12 13:06:29 UTC
Comment on attachment 359706 [details] [review]
GDK: link needed libraries on windows

Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment 21 Jaime Velasco 2017-12-12 13:07:25 UTC
Comment on attachment 359709 [details] [review]
define GTK_PRINT_BACKENDS in win32

Not needed with 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment 22 GNOME Infrastructure Team 2018-05-02 19:06:35 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/909.