Commit 6888e327 authored by Chun-wei Fan's avatar Chun-wei Fan Committed by Chun-wei Fan

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.
parent f658e94e
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment