As glib-mkenums would likely be used in the building of the other
components of the stack, such as Cogl, Clutter and
gsettings-desktop-schemas, generate that using a Python script (if Python
can be found) and "install" it.
Be a bit more careful when copying and updating the property sheets, so that
we don't accidently change fields with '10' in them that are actually not
indicating the Visual Studio version.
Currently, due to the way that Visual Studio 2010+ projects are handled,
the "install" project does not re-build upon changes to the sources, as it
does not believe that its dependencies have changed, although the changed
sources are automatically recompiled. This means that if a part or more
of the solution does not build, or if the sources need some other fixes
or enhancements, the up-to-date build is not copied automatically, which
can be misleading.
Improve on the situation by forcing the "install" project to trigger its
rebuild, so that the updated binaries can be copied. This does trigger an
MSBuild warning, but having that warning is way better than not having an
up-to-date build, especially during testing and development.
Like the Visual Studio 2012 project files, the Visual Studio 2013 files are
largely the same as the Visual Studio 2010 project files, so support
Visual Studio 2013 by updating the autotools scripts that is used for
Visual Studio 2012. This means that project files for Visual Studio 2012
and Visual Studio 2013 can be maintained by simply maintaining the Visual
Studio 2010 project files, adding minimal maintenance overhead.
There are many test programs that are shipped with GLib, and this project
is a one-to-one project, which does not make sense to keep as various test
programs may have different CFLAGS, etc, which will require different build
options.
Make the projects include a single property sheet as necessary, which will
in turn include the other property sheet(s) as needed, so that we can avoid
warnings where we include the same property sheets twice in a single
project.
Also make the copying of pre-configured headers into custom build rules so
that they can be removed upon the clean command from the IDE and that they
can be re-copied if their counterpart *.h.win32 are updated.
...where possible, to make application of patches easier in the future.
The README.txt's and the .sln files are still in Windows/DOS line endings
as they need to be so.
Install the Python scripts that is used by gdbus-codegen in
share\glib-2.0\codegen, to be consistent with the other platforms.
Please see https://bugzilla.gnome.org/show_bug.cgi?id=702862 for details
on this.
Due to the split up of the property sheets, the install projects did not
have info on the Intermediate and Output Paths, which caused confusing
messages from Visual Studio to show up upon completing build+"install" and
closing Visual Studio on whether to reload the install project, at least on
Visual Studio 2008.
Include the property sheet which defines these properties to fix this.
Like the Visual Studio 2008 project files, split up the property sheets
so to ease maintenace, and to prepare to use autotools to fill in the
header entries to "install".
Put some of the items that are frequently repeated in the projects as well,
also to simplify maintenance.
Also, update the autotools files to automate the upgrade of Visual Studio
2010 project as we now have multiple property sheets to copy and process.
Split the property sheet into four sheets, to make maintainance of the
build files easier, and also to prepare for using autotools to fill in
the parts for the "installation" of headers.
Also put more of the items that are repeated in the projects into the
property sheets, also to improve ease of maintenance.
Updates to the Visual Studio 2010 projects will come later, as the script
to update them to Visual Studio 2012 must also be taken into account during'
the process.
This is needed for GetAdaptersAddresses()[1], which was used to implement
if_nametoindex on Windows, notably on Windows XP, in commit 01156b12.
if_nametoindex and if_indextoname, as noted in config.h.win32(.in), is
available with Windows Vista and later, so when we eventually drop
support for Windows XP, we can call them directly, and these functions
also reside in the same iphlpapi.lib
[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365915%28v=vs.85%29.aspx
Build and "install" the gio-querymodules and gdbus utility programs so that
the Visual Studio builds of GLib is more comprehensive. The Python scripts
for the GDBus codegen will be added to "installation" later.
Update G_LOG_DOMAIN to be "GLib-GObject" so that we are consistent with
the autotools builds, and that tests expecting the log domain to be
"GLib-GObject" would not fail.
Define the G_LOG_DOMAIN of the GLib DLL as "GLib", because:
-This makes it consistent with the autotools builds
-Some tests expect the log domain to be "GLib"
We no longer need entries to generate the .def files in the property sheets
as we are now doing __declspec (dllexport) to export all the needed
symbols. So, purge these items from the property sheets since they are no
longer used.
We should also stop using gthread/gthread.def file as well, since we
also use __declspec (dllexport) for the two (deprecated) functions there
since commit f8756694.
This should also silence some linker warnings in x64 builds.
Also get rid of the references to the .symbols files in the
.vcxproj.filters(in) in the various Visual C++ 2010 projects
Since we are now starting to use __declspec (dllexport) to export the
public functions during the build of the GLib DLLs (i.e. to generate the
.lib files), we don't want to generate the .def files from the .symbols
files as we did before for a long time.
This removes from the projects the custom build steps to generate the
various .def files
This will also update the pre-configured config.h(.win32.in) to define
_GLIB_EXTERN appropriately as __declspec (dllexport), as well as making its
entries reflect config.h.in more closely.
The last commit (Add a preconfigured gio/gnetworking.h for Windows) has to
be split into two as git am does not like a patch that deals with files
that have different line feeds.
This updates the property sheets to use the pre-configured
gio/gnetworking.h during the build process.
https://bugzilla.gnome.org/show_bug.cgi?id=690163
As the project file format for Visual Studio 2012 is only slightly
different from Visual Studio 2010 projects, we can provide support for
building GLib (and other projects) with Visual Studio 2012 with relatively
little effort. This might change when we eventually get GLib to work with
the Windows 8 (Modern UI/formerly Metro) APIs, but this will suffice for
the time being for people needing to build GLib with Visual Studio 2012.
Basically all that needs to be done at 'make dist' is:
-Copy the .sln/.props/README.txt/.vcxproj files and replace the VS2010
stuff with VS2012 stuff
-Copy the .vcxproj.filters as is
Add the PlatformToolset tag to the project configs so that we can use add a
simple script later to the autotools files to copy the projects and change
the value (v100 -> v110) of that tag (and other simple changes) in order
that we can quickly provide and maintain support for Visual Studio 2012
with minimal effort.
Note that at the moment GLib does not yet support the API/SDK requirements
for Windows 8 Modern UI (formerly known as Metro), but this paves the very
initial step.
Apparently the C4819 warnings appear due to a bug on Visual C++ on DBCS
locales, so re-enable this.
Add a note in the Visual C++ Readme.txt's regarding this.
-Make up for the missed DLL_EXPORT-it's actually needed for all GLib DLL
builds, omitting this caused problems to surface due to recent works to
make GDBus work on Windows.
-Also use the FFI_BULIDING macro for GObject builds as the suggessted
workaround for using static LibFFI builds (as we do now)-please see
ffi.h(.in). This will fix the build of GObject against LibFFI 3.0.11,
but it is probable that this will change at some point for LibFFI.
Clean/fix up the Preprocessor Definitions for the various projects, where
we purge out the unneeded macros and add _DEBUG to the Debug builds of
various projects that somehow lacked this.
This will also fix the GIO build under Visual C++ 2008, as the _DEBUG macro
in the release builds will cause a debug entry to appear in its manifest
file during the build, which will cause GIO-using applications to fail
to run on systems not running Visual C++/Studio 2008 due to its embedding
of a badly-generated manifest file.