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 765195 - Visual Studio builds: Update how introspection is done
Visual Studio builds: Update how introspection is done
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-18 07:12 UTC by Fan, Chun-wei
Modified: 2016-04-19 06:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MSVC builds: Update how introspection build items are prepared (45.82 KB, patch)
2016-04-18 07:17 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2016-04-18 07:12:43 UTC
Hi,

Currently, in GTK+-3.x, introspection is done in the following sequence on Visual Studio builds:

-A Python script is run to parse gdk/Makefile.am and gtk/Makefile.am to
 acquire the list of sources and headers that is to be introspected.
-Hand-written command lines are then used to run g-ir-scanner to obtain
 the .gir's and g-ir-compiler is run on the generated .gir's to produce
 the final .typelib's.

This is suboptimal in the maintenance point of view.

This bug attempts to make the file lists and the full command lines for g-ir-scanner and g-ir-compiler generated instead via 'make dist', so that it is easier to maintain.  This is essentially the approach that is used for the stack up to and including GDK-Pixbuf, libsoup and GtkSourceview.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2016-04-18 07:17:39 UTC
Created attachment 326222 [details] [review]
MSVC builds: Update how introspection build items are prepared

Hi,

This adds the common autotools module that is included by gdk/Makefile.am and gtk/Makefile.am, so that the lists for files to introspect for Gdk-3.0.gir, GdkWin32-3.0.gir and Gtk-3.0.gir are generated during 'make dist', along with the command lines for g-ir-scanner and g-ir-compiler that would be run.

I had trouble with this in 'make distcheck' as I was unable to get the tests for a11y and the reftests to pass on my system, with or without this patch, but otherwise 'make distcheck' passes by removing the testsuite/a11y and testsuite/reftest items from configure.ac and testsuite/Makefile.am.

With blessings, thank you!
Comment 2 Ignacio Casal Quinteiro (nacho) 2016-04-18 07:27:52 UTC
Review of attachment 326222 [details] [review]:

Looks good, but double check distcheck. Thanks
Comment 3 Paolo Borelli 2016-04-18 08:36:24 UTC
Review of attachment 326222 [details] [review]:

::: gdk/Makefile.am
@@ -458,0 +461,6 @@
+if HAVE_INTROSPECTION
+# Introspection Items for MSVC
+MSVC_INTROSPECT_GIRS = Gdk-3.0.gir GdkWin32-3.0.gir
... 3 more ...

Can you use GDK_CFLAGS_DEFINES you defined above here?
Comment 4 Fan, Chun-wei 2016-04-19 06:54:12 UTC
Hi,

Thanks, I have pushed the patch (with Paolo's suggestion) as 9a87b6b.

With blessings, thank you!