Imported Upstream version 1.39.3
[platform/upstream/gobject-introspection.git] / build / win32 / vs9 / README.txt
1 Please do not compile this package (gobject-introspection) 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 gobject-introsecption and its dependencies\r
7 with Visual C++:\r
8 \r
9 https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack\r
10 \r
11 This VS9 solution and the projects it includes are intented to be used\r
12 in a gobject-introspection source tree unpacked from a tarball. In a git checkout you\r
13 first need to use some Unix-like environment, which will do the work for you.\r
14 \r
15 The required dependencies are Python 2.6 or later, GLib and LibFFI.  It is recommended\r
16 that GLib is built with Visual C++ 2008 to avoid problems cause by usage of different CRTs\r
17 \r
18 Please refer to the README.txt file in $(GLib_src_root)\build\win32\vs9 on how to build\r
19 GLib using Visual C++ 2008\r
20 \r
21 For LibFFI, please get version 3.0.10 or later, as Visual C++ build support\r
22 was added in the 3.0.10 release series.  Please see the README file that\r
23 comes with the LibFFI source package for more details on how to build LibFFI\r
24 on Visual C++-please note that the mozilla-build package from Mozilla is needed\r
25 in order to build LibFFI on Windows.\r
26 \r
27 For Python, retrieving the official Windows binaries for 2.6 or later from\r
28 http://www.python.org will do the job-be sure that the Python version that\r
29 you downloaded matches the configuration of your build (win32 or x64/amd64).\r
30 \r
31 For building the Regress test project, cairo (and possibly cairo-gobject support)\r
32 is needed.\r
33 \r
34 Set up the source tree as follows under some arbitrary top\r
35 folder <root>:\r
36 \r
37 <root>\<this-gobject-introspection-source-tree>\r
38 <root>\vs9\<PlatformName>\r
39 \r
40 *this* file you are now reading is thus located at\r
41 <root>\<this-glib-source-tree>\build\win32\vs9\README.\r
42 \r
43 <PlatformName> is either Win32 or x64, as in VS9 project files.\r
44 \r
45 For LibFFI, one should also put the generated ffi.h and ffitarget.h\r
46 into <root>\vs9\<PlatformName>\include\ and the compiled static libffi.lib\r
47 (or copy libffi-convenience.lib into libffi.lib) into\r
48 <root>\vs9\<PlatformName>\lib\.\r
49 \r
50 The libintl.h that is used for building GLib needs to be in\r
51 <root>\vs9\<PlatformName>\include, if not already done so\r
52 \r
53 You will also need a working GCC/MinGW compiler installation\r
54 in order to generate the .gir and .typelib files.  One may be\r
55 obtained from the mingw or the mingw64 project.\r
56 \r
57 A working pkg-config tool is also required-it may be obtained from\r
58 http://www.gtk.org/download/win32.php [32-bit]\r
59 http://www.gtk.org/download/win64.php [64-bit]\r
60 \r
61 *** Note! ***\r
62 Please note that due to numerous possible configurations on Python, PKG_CONFIG_PATH and\r
63 MinGW, the build of G-I is now a 2-step process: one with the Visual Studio Projects that\r
64 will build the libraries, tools, Python Module and test DLLs (except for the everything\r
65 test), and the other one with NMake Makefiles for building the introspection files.\r
66 Please note that if one needs to change the installation location\r
67 of Python, one needs to change the values of PythonDir (for x86/Win32 builds) and/or\r
68 PythonDirX64 (for x64 builds) in gi-extra-paths.vsprops\r
69 \r
70 The use of Visual Studio Projects will no longer require the setting of environmental\r
71 variables, but the following environmental variables are needed (either by using "set xxx=yyy"\r
72 or by nmake -f gi-introspection-msvc.mak xxx=yyy) for building the introspection files (which\r
73 should be done after successfully building the Project Files):\r
74 \r
75 PYTHON2: Full path to your Python 2.6.x/2.7.x interpretor (python.exe) if it is\r
76          not in your PATH.  Please note that only 2.6.x and 2.7.x works at this time.\r
77          You need to use an x64/amd64 version of Python for x64 builds, and a Win32/x86\r
78          version of Python for Win32/x86 builds\r
79 PKG_CONFIG_PATH: Location of the .pc (pkg-config) files, especially for the GLib .pc files.\r
80 MINGWDIR: Root installation folder for your Windows GCC (such as MinGW).  For example,\r
81           if your gcc executable (gcc.exe) is in c:\mingw\bin, use "set MINGWDIR=c:\mingw"\r
82           You need to use an x64/amd64 version of gcc for x64 builds, and a Win32/x86\r
83           version of gcc for Win32/x86 builds\r
84 \r
85 GCC is currently needed to as the GCC preprocessor is used to create the introspection dump source\r
86 file, which is then compiled with the Visual C++ compiler to produce the .gir files.\r
87 \r
88 Please see $(srcroot)\build\gi-introspection-msvc.mak for more details.  Doing\r
89 "nmake -f gi-introspection-msvc.mak (options omitted)" will build the various introspection files,\r
90 and "nmake -f gi-introspection-msvc.mak (options omitted) install-introspection" will copy the introspection\r
91 files to <root>\vs9\<PlatformName>\share\gir-1.0 (.gir files) and <root>\vs9\<PlatformName>\lib\girepository-1.0\r
92 (.typelib files)\r
93 \r
94 *** End of Note! ***\r
95 \r
96 The "install" project will copy build results and headers into their\r
97 appropriate location under <root>\vs9\<PlatformName>. For instance,\r
98 built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into\r
99 <root>\vs9\<PlatformName>\lib and gobject-introspection headers into\r
100 <root>\vs9\<PlatformName>\include\gobject-introsection-1.0.\r
101 \r
102 This is then from where\r
103 project files higher in the stack are supposed to look for them, not\r
104 from a specific gobject-introspection source tree.\r
105 \r
106 --Tor Lillqvist <tml@iki.fi>\r
107 --Updated by Chun-wei Fan <fanc999@gmail.com>\r