Swallow -- argument when necessary
[glib.git] / build / win32 / vs9 / README.txt
blob158f1457054f8d52e8e44ea71a803c5b5a2ad759
1 Please do not compile this package (GLib) in paths that contain\r
2 spaces in them-as strange problems may occur during compilation or during\r
3 the use of the library.\r
4 \r
5 Please refer to the following GNOME Live! page for more detailed\r
6 instructions on building GLib and its dependencies with Visual C++:\r
7 \r
8 https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack\r
9 \r
10 This VS9 solution and the projects it includes are intented to be used\r
11 in a GLib source tree unpacked from a tarball. In a git checkout you\r
12 first need to use some Unix-like environment or run build/win32/setup.py, \r
13 which will do the work for you:\r
15 $python build/win32/setup.py --perl path_to_your_perl.exe\r
17 for more usage on this script, run\r
18 $python build/win32/setup.py -h/--help\r
20 The required dependencies are zlib and proxy-libintl. Fetch the latest\r
21 proxy-libintl-dev and zlib-dev zipfiles from\r
22 http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ for 32-bit\r
23 builds, and correspondingly\r
24 http://ftp.gnome.org/pub/GNOME/binaries/win64/dependencies/ for 64-bit\r
25 builds. \r
27 One may wish to build his/her own ZLib-It is recommended that ZLib is\r
28 built using the win32/Makefile.msc makefile with VS9 with the ASM routines\r
29 to avoid linking problems-see win32/Makefile.msc in ZLib for more details.\r
31 For LibFFI, please get version 3.0.10 or later, as Visual C++ build support\r
32 was added in the 3.0.10 release series.  Please see the README file that\r
33 comes with the LibFFI source package for more details on how to build LibFFI\r
34 on Visual C++-please note that the mozilla-build package from Mozilla is needed\r
35 in order to build LibFFI on Windows.\r
37 Please note, although using one's own existing PCRE installation to build GLib\r
38 is possible, it is still recommended to build PCRE during the process of building\r
39 GLib (i.e. using the Debug or Release configurations), as GLib's bundled PCRE\r
40 has been patched to work optimally with GLib.  If building against an existing\r
41 PCRE is desired, use the(BuildType)_ExtPCRE configurations, but one needs to ensure\r
42 that the existing PCRE is:\r
43 -Built with VS9\r
44 -Unicode support is built in (please see the CMake options for this)\r
45 -It is built with the Multithreaded DLL (/MD, for release builds) or the\r
46  Multithreaded DLL Debug (/MDd, for debug builds)\r
48 If using static builds of PCRE, please add PCRE_STATIC to the "Preprocessor\r
49 Definitions" of the glib project settings.\r
51 Please be aware that the GLib's regex test program will only pass with PCRE directly\r
52 built into GLib.\r
54 Set up the source tree as follows under some arbitrary top\r
55 folder <root>:\r
57 <root>\<this-glib-source-tree>\r
58 <root>\vs9\<PlatformName>\r
60 *this* file you are now reading is thus located at\r
61 <root>\<this-glib-source-tree>\build\win32\vs9\README.\r
63 <PlatformName> is either Win32 or x64, as in VS9 project files.\r
65 You should unpack the proxy-libintl-dev zip file into\r
66 <root>\vs9\<PlatformName>, so that for instance libintl.h end up at\r
67 <root>\vs9\<PlatformName>\include\libintl.h.\r
69 For LibFFI, one should also put the generated ffi.h and ffitarget.h\r
70 into <root>\vs9\<PlatformName>\include\ and the compiled static libffi.lib\r
71 (or copy libffi-convenience.lib into libffi.lib) into \r
72 <root>\vs9\<PlatformName>\lib\.\r
74 The "install" project will copy build results and headers into their\r
75 appropriate location under <root>\vs9\<PlatformName>. For instance,\r
76 built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into\r
77 <root>\vs9\<PlatformName>\lib and GLib headers into\r
78 <root>\vs9\<PlatformName>\include\glib-2.0. This is then from where\r
79 project files higher in the stack are supposed to look for them, not\r
80 from a specific GLib source tree.\r
82 Note: If you see C4819 errors and you are compiling GLib on a DBCS\r
83 (Chinese/Korean/Japanese) version of Windows, you may need to switch\r
84 to an English locale in Control Panel->Region and Languages->System->\r
85 Change System Locale, reboot and rebuild to ensure GLib, Pango, GDK-Pixbuf,\r
86 ATK and GTK+ is built correctly.  This is due to a bug in Visual C++ running\r
87 on DBCS locales, and also affects many other opensource projects which are\r
88 built with Visual C++, including but not limited to QT and the Mozilla apps.\r
90 --Tor Lillqvist <tml@iki.fi>\r
91 --Updated by Chun-wei Fan <fanc999@gmail.com>\r