GNOME Bugzilla – Bug 679118
Add "automated" VS2008/2010 project files
Last modified: 2016-04-16 08:20:11 UTC
Created attachment 217596 [details] [review] Add "automated" MSVC 2008/2010 project files Hi, I thought it might be a good idea to come up with Visual C++ project files that have their source file listings filled in during 'make dist', like what is done now on GLib/Pango/ATK/GTK+/Cogl/Clutter, as the existing Visual C++ projects can go out-of-date at times, causing builds to break. The following items are supported by these project files sets, in x86 and x64 configurations: GStreamer (core) library GSTBase library GSTController library gst-inspect tool gst-typefind tool gst-launch tool gst-plugin-scanner helper tool gstcoreelements plug-in The projects to build GStreamer (core), GSTController, GSTNet libraries (DLLs) and the gstcoreelements plug-in are done this way, and the other projects in the GStreamer core package are done normally. The build results (headers, library LIBs, DLLs, EXEs) are "installed" to a common location where the GTK+ MSVC builds are "installed" to after compilation, and the list of headers to install are also filled in by autotools during 'make dist'. The generation of win32/common/config.h has also been updated to suit 64-bit builds better and also received some other updates too to reflect the actual situation on Visual C++ compilers. Thanks for the time, as this is a larger patchset, with blessings! p.s. I only did this for VS 2008/2010 as those are the only versions that I have around with me.
Wouldn't it be possible to create a tool like androgenizer[0] for creating the VS project files, instead of cluttering all the Makefiles with lots of manual building of the files? Would seem to be easier to maintain to me, and less work to add it to new projects. [0] http://cgit.collabora.com/git/android/androgenizer.git/
Sorry, I left this out on my list: GSTNet is also built with this project files set. Thank you, with blessings!
Apart from that, great work :) This is a big step forward from what we currently have.
Created attachment 217798 [details] [review] Add templates for the VS projects completion in common/ Hi Sebastian, Probably I can't make the time to do something like androgenizer for now, but I thought maybe I could make the thing I proposed in a more modular manner, so that the Makefiles wouldn't be so filled with stuff..., and make maintenance of these things a bit easier. These are the items I think I might add to gstreamer/common to be used as templates to generate the various projects that may need auto-generation and to generate the headers list to "install" during 'make dist' An updated patch for GStreamer will follow shortly.
Created attachment 217799 [details] [review] 2nd take on Visual C++ 2008/2010 projects ...and this is the other take at getting the Visual C++ 2008/2010 project files and property sheets for compiling and "installing" the needed files. All tools and libraries in this package (except GSTCheck) is built, like the original proposal. With blessings, Thank you!
Would it be possible to make the templates more reusable? I.e. to have a template for all plugins, template for all libraries, etc? Also I had a brief look on the patch, it looks like the project files do contain some stuff than can be externalized to property files. I did MSVC project files for 0.11 a while ago (they are not up to date though) https://bugzilla.gnome.org/show_bug.cgi?id=666219 When doing those I made sure that the project files are as brief as possible, so a template for gstreamer plugin could be maybe less than 70-80 lines.
Matej, did you continue to work on this?
I did not. We currently have CMake based build for the parts of gstreamer that we need, but it's not very pretty.
Comment on attachment 217798 [details] [review] Add templates for the VS projects completion in common/ The templates should be made a bit more reusable as explained by Matej. This is still too large
Created attachment 265675 [details] [review] Common Utility Python script to be Used to Generate Visual C++ Projects Hi, Sorry I was not able to re-visit this issue for a long while, but I thought it might be a good idea to have a common Python utility script that can be used to acquire the source files and headers needed for the various components. This also avoids having to crowd up the Makefile.am's for this purpose. As Visual Studio 2012 and 2013 uses more or less the same format as Visual Studio 2010, I didn't add specific support for them here, as it's probably not really needed for now. With blessings, thank you!
Created attachment 265676 [details] [review] Python Script Used to Generate Complete MSVC Projects for the GStreamer Package Hi, This is the Python 2.x/3.x script that calls the utility script from the previous attachment. It would generate the complete Visual Studio 2008/2010 project files form the various Makefile.am's for libgstreamer, libgstbase, libgstcontroller, libgstnet as well as libgstprintf and libgstcoreelements (plugin). It also generates the list of headers for these libraries that need to be installed. Hopefully this is a better approach for people wishing to have more up-to-date Visual Studio projects for building GStreamer. With blessings, thank you!
Created attachment 265677 [details] [review] Third take on Visual Studio 2008/2010 Projects Hi, This is my third take on the Visual Studio Projects, splitting up the property sheets into much smaller bits (by referring to what Matej is doing) and make the part where the headers and binaries/libs are installed generated with the Python script in the previous 2 patches. Hopefully this is better for all parties-this builds GStreamer in both x86 and x64 flavors. The .sln files are in another coming patch as they need to have Windows/DOS file endings. With blessings, thank you!
Created attachment 265678 [details] [review] Add master MSVC solution files to build GStreamer Hi, This is the main .sln files that is used to build GStreamer, which is in a different patch as this needs to be committed with DOS/Windows line endings. With blessings, thank you! p.s. Please note that attachment 265675 [details] [review] is meant for gstreamer/common.
Hi, Sorry for not revisiting the issue, and I saw that support for the Visual Studio projects in GST has been dropped, as they were not maintained. Will close this bug now as imcomplete, and I think I will try to resurrect Visual Studio build support for GST ASAP as there is now a newer and more efficient mechanism in the GTK+ stack that is used to generate the full project files from their templates, as well as copy the Visual Studio 2010 projects to turn them into 2012~2015 versions, which will likely make the items here obsolete. I will also try to get introspection support for Visual Studio builds in that drive as well, as the situation of G-I is now much improved on Windows. With blessings, thank you!
Hi, thanks for all your work on this, also in glib and gtk+. Just so you know, there is currently work being done on another way of enabling Visual Studio support for GStreamer via the meson build system, as we felt that was a better approach longer term, so you may want to hold off on updating this for GStreamer to see what comes out of that first.
Hi Tim-Philipp, Can I know, if any, the bug number or discussion thread on that please, so that I can follow and possibly input to that? Thanks, with blessings!
There's no bug or thread yet. I'll mention it here once it's ready for testing/commenting, if I don't forget.