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 690145 - Improve on how the MSVC project files are completed during 'make dist', by using Python
Improve on how the MSVC project files are completed during 'make dist', by us...
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: build
2.11.x
Other All
: Normal enhancement
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-12-13 09:03 UTC by Fan, Chun-wei
Modified: 2013-12-17 02:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Enhance the MSVC projects creation/completion (24.26 KB, patch)
2012-12-13 09:03 UTC, Fan, Chun-wei
none Details | Review
Use Python scripts to generate the MSVC Project Files (29.12 KB, patch)
2013-12-13 09:40 UTC, Fan, Chun-wei
reviewed Details | Review
Same patch with comments about the need for Python for 'make dist' (29.49 KB, patch)
2013-12-13 11:07 UTC, Fan, Chun-wei
committed Details | Review
NMake Makefiles to build the test programs with Visual C++ (5.02 KB, patch)
2013-12-16 03:39 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2012-12-13 09:03:09 UTC
Created attachment 231450 [details] [review]
Enhance the MSVC projects creation/completion

Hi,

According to a conversation I had with Behdad, we agreed that it would be a good idea to improve on the way how the Visual C++ project files are completed for the GTK+/Clutter stack during 'make dist'.

The main reason behind this drive is that the current approach adds some crowd-up to the autotools files (namely Makefile.am's) under the various sub-projects which make use of autotools to fill in the source file lists of the corresponding Visual C++ projects.  In the conversation, we have come to a consensus that there should be unified autotools file(s) to be included by the various Makefile.am's which will help to reduce the crowding of the these files.

So, this is my attempt on providing such an update to ATK, which will hope to provide:
-Continued ability to create/complete
 the project files upon 'make dist'
-Added ability to create/complete the
 property sheets in regards to the headers
 listings to "install", as headers can be
 added/moved/renamed quite frequently in
 a development cycle (especially in GLib/GTK+...)
-Simple to use by defining constants/macros on
 items to build/exclude/install, and the destination
 to install the various headers

With blessings, thank you!
Comment 1 Fan, Chun-wei 2013-12-13 09:40:44 UTC
Created attachment 264125 [details] [review]
Use Python scripts to generate the MSVC Project Files

Hi,

As time went on, I thought it might be a even better idea to use some Python 2/3 scripts to do the completion of the Visual C++ projects, as:

-The approach using the special autotools rules add congestion to the autotools files (the original reason for this bug report)

-Testing changes to the current Project Files generation would require using autotools, which is hard on Windows, so moving to Python would enable one to be able to even generate the project files on Windows with a standard Python 2/3 installation.  This also paves the way to generate the necessary sources to enable one to build ATK from a GIT checkout easier on Windows.  This can still be quite easily integrated into 'make dist' by calling the Python script when necessary.

With blessings, thank you for your time!
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-12-13 10:26:48 UTC
Review of attachment 264125 [details] [review]:

I didn't review all the details of this patch because I don't have the experience with visual studio files or the environment (Win32) to test this. Having said so, I like the idea of moving more of the win32 specifics to the build directory as things are more tidy in that way. The patch seems sensible in general. In the same way I tested the patch, and all seems to work without problem, so I will trust the rest of the patch on you. I just found one big but on the patch.

::: configure.ac
@@ +227,3 @@
+fi
+AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
+

Does that mean that now python is a dependency to build ATK?

In the same way, it would be good to mention on the comments why that dependency is needed.
Comment 3 Fan, Chun-wei 2013-12-13 11:07:29 UTC
Created attachment 264133 [details] [review]
Same patch with comments about the need for Python for 'make dist'

Hello Piñeiro,

It is that Python is used to do 'make dist', as the scripts to do the project files are in Python, so regular building should not depend on Python (probably I need some pointers on making that part optional, if necessary, as I am defintly not a autotools expert).  It is true that I should add in the comments about the Python part, so I'll get around adding it here.

I think since people are likely going to generate the .gir files during the 'make dist'/'make distcheck' process (and I don't think one is able to do that on Windows/MinGW, as GTK-Doc can't be easily installed on Windows), this dependency shouldn't be a big issue as the .gir file generation scripts are Python 2.6+ scripts.  Please correct me if I am wrong here.

For records, I was asking on the gtk-devel-list regarding the use of Python for generating the project files[1] a bit ago, which I think the reply I got was fine for Linux, where AFAIK is where "make dist" is generally run.

Thanks for the review though, with blessings!

[1]https://mail.gnome.org/archives/gtk-devel-list/2013-November/msg00027.html
   https://mail.gnome.org/archives/gtk-devel-list/2013-November/msg00028.html
Comment 4 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-12-13 11:55:30 UTC
Review of attachment 264133 [details] [review]:

If python is only needed for make dist then I don't have any problem. Anyway, I don't see the explanation at the configure.ac. I think that you uploaded the same patch. Anycase, feel free to commit it after adding that comment.
Comment 5 Fan, Chun-wei 2013-12-16 03:32:00 UTC
Review of attachment 264133 [details] [review]:

Hello Piñeiro,

I have committed the patch with the comments in configure.ac as 56e07beb.  Thanks for the review.

I will come up with NMake Makefiles to build the tests in a bit.

With blessings, thank you!
Comment 6 Fan, Chun-wei 2013-12-16 03:39:55 UTC
Created attachment 264262 [details] [review]
NMake Makefiles to build the test programs with Visual C++
Comment 7 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-12-16 18:11:00 UTC
Review of attachment 264262 [details] [review]:

As with other VisualC++ files, I don't know too much about them, and dont' have the way to test them. If they work for you, feel free to commit it.
Comment 8 Fan, Chun-wei 2013-12-17 02:33:31 UTC
Review of attachment 264262 [details] [review]:

Thanks Piñeiro, I have committed the patch as d1638910.

With blessings-I will close this bug shortly.