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 764984 - Update how introspection builds are done on Visual Studio
Update how introspection builds are done on Visual Studio
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.40.x
Other Windows
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2016-04-13 09:16 UTC by Fan, Chun-wei
Modified: 2016-04-13 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a common autotools module to generate the items needed for building introspection under Visual Studio (7.27 KB, patch)
2016-04-13 09:19 UTC, Fan, Chun-wei
committed Details | Review
Generate the items for generating introspection on Visual Studio builds during 'make dist' (26.55 KB, patch)
2016-04-13 09:21 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2016-04-13 09:16:18 UTC
Hi,

Currently, in Pango, introspection builds are done on Visual Studio builds in the following way, when the NMake Makefile is invoked:

-A Python script is used to parse pango/Makefile.am for the files that
 need to be fed through the introspection scanner, which is then made
 into a file list that is passed into g-ir-scanner.

-The full introspection command that calls g-ir-scanner, which is currently 
 maintained by hand in the NMake Makefiles, is then run to generate the 
 Pango-1.0.gir and PangoCairo-1.0.gir files.

-The Pango-1.0.typelib and PangoCairo-1.0.typelib are then generated using
 g-ir-compiler, using a hand-written command line in the NMake Makefiles

This works for our purposes, but is not actually that optimal, in terms of maintenance.

This bug will attempt to move the process to depend on 'make dist', when we generate the release tarball, to do these steps automatically, which is the approach that is currently done in GtkSourceview, libsoup and HarfBuzz.  This helps to make things more consistent across the board and that we can have the same NMake Makefile modules as far as possible.

Note that this is *not* done in GObject-Introspection due to differences of how introspection is done there, specifically the file list is generated in a different way for *all* builds, at least for the .gir's for GLib (i.e. GLib-2.0.gir, GObject-2.0.gir, GModule-2.0.gir and Gio-2.0.gir).

Note also that this bug is not meant to address generating PangoFT2-1.0.[gir|typelib], as support for PangoFT2 on Visual Studio is not that well supported at this time.

I will attach the patches for this in a bit.
Comment 1 Fan, Chun-wei 2016-04-13 09:19:32 UTC
Created attachment 325847 [details] [review]
Add a common autotools module to generate the items needed for building introspection under Visual Studio

Hi,

This is the same Makefile.msvc-introspection autotools module that is currently in use in GtkSourceview and libsoup, which is used to generate the following during 'make dist':

-The file lists of files to be run through g-ir-scanner for Pango and
 PangoCairo.
-The full command lines, in a generated NMake Makefile snippet,
 for g-ir-scanner to generate the .gir files for
 Pango and PangoCairo, as well as compiling them into .typelib's...
Comment 2 Fan, Chun-wei 2016-04-13 09:21:29 UTC
Created attachment 325848 [details] [review]
Generate the items for generating introspection on Visual Studio builds during 'make dist'

Hi,

This is the patch for the updates to the autotools files for:
-Generating the items mentioned in the previous comment during 'make dist'.
-Dist'ing the generated items as needed.

Yes, this was tested with 'make -j8 distcheck' in an out-of-tree build. :)

With blessings, thank you!
Comment 3 Ignacio Casal Quinteiro (nacho) 2016-04-13 09:33:21 UTC
Review of attachment 325847 [details] [review]:

Sure
Comment 4 Ignacio Casal Quinteiro (nacho) 2016-04-13 09:34:00 UTC
Review of attachment 325848 [details] [review]:

Double check distcheck and if it passes then go for it.
Comment 5 Fan, Chun-wei 2016-04-13 12:59:44 UTC
Hi Nacho,

Thanks!  I have pushed these patches after running 'make distcheck' as:
-Attachment 325847 [details]: 96129ef
-Attachment 325848 [details]: e89c467.

With blessings, thank you!