Commit Graph

12 Commits

Author SHA1 Message Date
Chun-wei Fan
96cc50156c Fix Visual Studio projects
We are transitioning to Meson for Visual Studio builds, but since the
Visual Studio projects are still around, we ought to keep them
up-to-date (and these projects are needed to build for Visual Studio
2008, at least for x64 builds).

Adapt to the source additions and merges for building
gio-querymodules.exe and gspawn-win[32|64]-helper-console.exe.
2018-03-16 17:36:38 +08:00
Ernestas Kulik
03e86d000f Remove HAVE_CONFIG_H defs and uses
Since GLib files are only meant to be built as part of GLib, config.h
always exists, so the checks are more or less pointless.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-21 13:57:10 +00:00
Chun-wei Fan
a8e55992dd Visual Studio Projects: Improve binary security
The initial MSVC 201x projects inadvertly disabled
RandomizedBaseAddress, which is normally enabled by default, so ensure
that is the case for all 201x builds.  This feature is supported by
Visual Studio 2010 or later.

Also, for x64 builds on MSVC 2012 or later, use /HIGHENTROPYVA when
linking.

Pointed out by Ignacio Casal Quinteiro.
2017-10-20 16:33:48 +08:00
Chun-wei Fan
213c31a49d build: Change DLL naming in Visual Studio projects
The previous commit to glib/glibconfig.h.win32.in, though it improves
the state of GLib and fixes bugs, cannot be used as a drop-in
replacement for code that builds against the previous
glib/glibconfig.h(.win32.in) that were build using the Visual Studio
projects.  Change the DLL names as a result so that the likelihood of
problems caused by replacing existing GLib DLLs can be reduced--code
that was built against previous GLib MSVC builds should be rebuilt, so
that things will work with the newer DLLs, instead of depending on the
older DLLs.

Note that if Visual Studio builds are done through Meson, existing code
that link against GLib should be rebuilt as well, for the same reason.
DLLs built with the Visual Studio projects from 2.55.0 onwards should be
compatible with the ones that are built with Visual Studio via Meson.
2017-09-15 12:56:40 +08:00
Chun-wei Fan
9aa98db404 Visual Studio builds: Use PythonDir instead of PythonPath
This is to avoid confusion with the PYTHONPATH envvar that is commonly
used to determine where additional Python modules can be loaded,
especially in the case of a MSBuild build.  Note that envvar names are
not case sensitive on Windows in general.
2017-07-13 17:45:44 +08:00
Chun-wei Fan
7d64d109f0 MSVC 201x builds: Allow different Python versions per toolset
Use conditionals to select the Python installation, so that we can more
stick to the default Visual Studio versions used to compile each
official Python releases more closely.

This means by default:
-2010/2012/2013 builds use Python 3.4.x, which is built with 2010
-2015/2017 builds use Python 3.6.x, which is built with 2015
2017-07-12 18:18:28 +08:00
Chun-wei Fan
a00e7ed32e win32: Update MSVC projects for glib-genmarshal
glib-genmarshal is now a Python script instead of a compiled program, so
we need to:

-Remove the projects that are used to build the glib-genmarshal sources.
-Generate the full glib-genmarshal Python script from glib-genmarshal.in
-Make Python a hard build-time requirement, since we use this tool
 in many parts of the stack (and it is the case for glib-mkenums).
-Tell people in the Visual Studio build README.txt files that Python
 2.7.x or 3.x is now required for the build/"install".
2017-07-12 18:00:22 +08:00
Chun-wei Fan
951fd642dc Visual Studio builds: Use the Centricular fork of libffi
The latest upstream libffi is getting bit-rotten with the Windows/MSVC
builds, and since we are eventually moving to a Meson-based build system,
make use of the Centricular fork of libffi[1], which is better maintained
and tested for builds on Windows, with the use of DLLs over static libraries
and elimination of awkward build flags that we had to use for GObject.

[1]: https://github.com/centricular/libffi
2017-06-14 10:51:55 +08:00
Chun-wei Fan
e9846a7c8f Visual Studio builds: Redo utility script generation
Use the new gen_util_scripts.py script to generate the glib-mkenums and
gdbus-codegen scripts with the proper info in them so that they can be
used properly by other build systems such as Meson, during "install".
2017-05-24 15:43:59 +08:00
Chun-wei Fan
20fde20ab4 Visual Studio 201x builds: Fix GIO x64 Debug builds
The custom build rules did not have rules for x64 Debug builds during
the refactoring.  Fix this by removing all Platform and Configuration
conditions for it, since this is done on are configs in the same manner.

Noted by Ignacio Casal Quinteiro.
2017-04-05 00:15:26 +08:00
Chun-wei Fan
0baaac786e Visual Studio builds: Add support for Visual Studio 2017
This adds support for Visual Studio 2017 by updating the autotools files for
copying and updating the Visual Studio 2010 project files.

Since the toolset version of Visual Studio 2017 is no longer in the form
of $(MSVC_VER_SHORT)0, we need to specify the full number, but this is a
rather simple change we have here.  Note that Visual Studio 2017's CRT
aims to be compatible with the 2015's CRT, so it should be possible to
use 2017-compiled code with the 2015-compiled ones.
2017-02-15 11:42:20 +08:00
Chun-wei Fan
6dfc6fee7b Visual Studio builds: Move project files to win32/
It was suggested that the project files be moved here as we don't actually
need to go two directory layers from $(srcroot), and would help us to
standardize on things in the future across the board.
2017-01-09 14:00:46 +08:00