GNOME Bugzilla – Bug 787622
Patches to fix building on win32
Last modified: 2018-05-02 19:06:35 UTC
Hi, with the following patches I am finally able to build GTK on windows (msys2/mingw32 environment). Please review.
Created attachment 359704 [details] [review] GDK: define GDK_WINDOWING_WIN32 on Windows
Created attachment 359705 [details] [review] Depend on gio-unix on unix and gio-windows on windows
Created attachment 359706 [details] [review] GDK: link needed libraries on windows
Created attachment 359707 [details] [review] gtkprintoperation-portal.c is unix-only
Created attachment 359708 [details] [review] Fix building gtk-demo
Created attachment 359709 [details] [review] define GTK_PRINT_BACKENDS in win32
Created attachment 359710 [details] [review] Build and link win32 resource and manifest into DLL
Created attachment 359711 [details] [review] Only depend on xkbcommon when building for wayland
Created attachment 359712 [details] [review] gentypefuncs.py: open file in binary mode
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
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!
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 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!
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 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 on attachment 359707 [details] [review] gtkprintoperation-portal.c is unix-only This was fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment on attachment 359705 [details] [review] Depend on gio-unix on unix and gio-windows on windows Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment on attachment 359711 [details] [review] Only depend on xkbcommon when building for wayland Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment on attachment 359704 [details] [review] GDK: define GDK_WINDOWING_WIN32 on Windows Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment on attachment 359706 [details] [review] GDK: link needed libraries on windows Fixed in 18abb78bfd1718e1a4f54333518959bc059cf0af
Comment on attachment 359709 [details] [review] define GTK_PRINT_BACKENDS in win32 Not needed with 18abb78bfd1718e1a4f54333518959bc059cf0af
-- 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.