summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanc999@yahoo.com.tw>2018-06-06 14:42:23 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2018-06-06 23:54:13 +0800
commit6888e3278c715066ca336946e75e556f5a40f91b (patch)
tree3af99bc1da2643f94bfc2f10b3f29e5fa83a38fe
parentf658e94e6595b632030e013ade88091d07fc2296 (diff)
downloadglib-6888e3278c715066ca336946e75e556f5a40f91b.tar.gz
README.win32: Update build instructions
Let people know that they should use Meson for building GLib under Visual Studio, and the steps that they may need to know.
-rw-r--r--README.win3246
1 files changed, 24 insertions, 22 deletions
diff --git a/README.win32 b/README.win32
index 4fda64ae0..809cdfa33 100644
--- a/README.win32
+++ b/README.win32
@@ -172,32 +172,34 @@ and libtool documentation.
Building with Visual Studio
===========================
-A more detailed outline of building GLib with its dependencies can
-now be found on the GNOME wiki:
+Meson is now the supported method of building GLib using Visual Studio.
-https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack
+Note that you will need a libintl implementation, zlib, and libFFI.
-Please do not build GLib in paths that contain spaces in them, as
-this may cause problems during compilation and during usage of the
-library.
+You will also need the following items:
+-Python 3.6.x, you need the 32-bit version if you are building GLib
+ as a 32-bit/x86 build, or the amd64/x64 version for building 64-bit/x86-64
+ builds. You will then need to install or update Meson by using pip.
+-The Ninja build tool, required for Visual Studio 2008, 2012 and 2013 builds,
+ and optional for 2010, 2015 and 2017 builds, where Visual Studio projects
+ can be generated instead of the Ninja build files.
-In an unpacked tarball, you will find in build\win32\vs9 (VS 2008) and
-build\win32\vs10 (VS 2010) a solution file that can be used to build
-the GLib DLLs and some auxiliary programs under VS 2008 and VS 2010
-(Express Edition will suffice with the needed dependencies) respectively.
-Read the README.txt file in those folders for more
-information. Note that you will need a libintl implementation, zlib, and
-libFFI.
+One can also refer to the following page for building the dependencies:
+
+https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack
-If you are building from a GIT checkout, you will first need to use some
-Unix-like environment or run win32/setup.py,
-which will expand the VS 2008/2010 project files, the DLL resouce files and
-other miscellanious files required for the build. Run win32/setup.py
-as follows:
+Note that if building the sources with Visual Studio 2008, note the following steps:
-$python win32/setup.py --perl path_to_your_perl.exe
+-You need to run the following lines from your build directory, to embed the manifests
+ that are generated during the build, assuming the built binaries are installed
+ to $(PREFIX), after a successful build/installation:
-for more usage on this script, run
-$python win32/setup.py -h/--help
+for /r %f in (*.dll.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f $(PREFIX)\bin\%~nf;2
+for /r %f in (*.exe.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f $(PREFIX)\bin\%~nf;1
-[1]: https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack under "Preparations"
+-If building for amd64/x86_64/x64, sometimes the compilation of sources may seem to hang, which
+ is caused by an optimization issue in the 2008 x64 compiler. You need to use Task Manager to
+ remove all running instances of cl.exe, which will cause the build process to terminate. Update
+ the build flags of the sources that hang on compilation by changing its "/O2" flag to "/O1", and
+ things should continue to build normally. At the time of writing, this is needed for compiling
+ glib/gtestutils.c, gio/gsettings.c and gio/gsettingsschema.c