]> git.saurik.com Git - wxWidgets.git/blob - docs/msw/gtk.txt
Change version to 3.0.0.
[wxWidgets.git] / docs / msw / gtk.txt
1 Building wxGTK port with Win32 GDK backend
2 ------------------------------------------
3
4 GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
5 It is a wrapper around Windows API.
6
7 See http://www.gtk.org/download/win32.php
8
9 These notes don't consider building wxGTK with X11 backend under Windows.
10
11 Building steps:
12
13 1. wxGTK/Win32 build is similar to wxMSW one and you should have configured
14 and be able to build wxWidgets as described in docs/msw/install.txt
15
16 2. wxGTK/Win32 is disabled by default in wxWidgets, you need to enable it
17 in bakefiles manually. TOOLKIT variable should not be a constantly MSW
18 for required bakefile formats.
19
20
21 diff build/bakefiles/config.bkl build/bakefiles/config.bkl
22 --- build/bakefiles/config.bkl
23 +++ build/bakefiles/config.bkl
24 @@ -67,9 +67,9 @@
25 </if>
26
27 <!-- We must make TOOLKIT a constant under Windows -->
28 - <if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
29 + <!--if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
30 <set var="TOOLKIT">MSW</set>
31 - </if>
32 + </if-->
33 </if>
34
35 <!--
36
37
38 Regenerate required make/project files:
39 cd build\bakefiles
40 bakefile_gen
41
42 3. Download GTK+ for Windows and uncompress files in the directory
43 without spaces in the name. We suppose later that GTK+/Win32 is
44 in the C:\gtk directory.
45
46 http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+_2.24.10-1_win32.zip
47
48 4. Building
49
50 4.1 If you are using Visual C++ project files you need to setup GTK+ 2 include directories
51 C:\gtk\lib\include\gtk-2.0
52 C:\gtk\lib\include\glib-2.0
53 C:\gtk\lib\include\cairo
54 C:\gtk\lib\include\pango-1.0
55 C:\gtk\lib\include\gdk-pixbuf-2.0
56 C:\gtk\lib\include\atk-1.0
57 C:\gtk\lib\glib-2.0\include
58 C:\gtk\lib\gtk-2.0\include
59
60 and library directory
61
62 C:\gtk\lib\
63
64 See http://msdn.microsoft.com/en-us/library/t9az1d21(v=vs.90).aspx
65
66 Open solution file in build\msw directory, select "GTK+ Debug" solution
67 configuration and build the solution. To be sure that everything is as expected
68 you can build minimal sample.
69
70 GTK+ is linked to wxWidgets always as DLL, so C:\gtk\bin directory should be
71 in %PATH% environment variable before application run.
72
73 4.2 You can also build using nmake:
74
75 set INCLUDE=C:\gtk\lib\glib-2.0\include\;C:\gtk\lib\gtk-2.0\include\;C:\gtk\include\cairo\;C:\gtk\include\pango-1.0\;C:\gtk\include\gtk-2.0\;C:\gtk\include\glib-2.0\;C:\gtk\include\gdk-pixbuf-2.0\;C:\gtk\include\atk-1.0\;
76 set LIB=C:\gtk\lib\;
77 set PATH=C:\gtk\bin\;%PATH%;
78
79 nmake -f makefile.vc "TOOLKIT=GTK" "TOOLKIT_VERSION=2"
80
81 or with MinGW:
82
83 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\gtk-2.0
84 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\glib-2.0
85 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\cairo
86 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\pango-1.0
87 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\gdk-pixbuf-2.0
88 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\atk-1.0
89 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\lib\glib-2.0\include
90 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\lib\gtk-2.0\include
91 set CFLAGS=%CXXFLAGS%
92 set LDFLAGS=%LDFLAGS% -LC:\gtk\lib
93 set PATH=C:\gtk\bin\;%PATH%;
94
95 mingw32-make -f makefile.gcc "TOOLKIT=GTK" "TOOLKIT_VERSION=2"
96
97 5. Now you can use wxGTK/Win32 as wxMSW in your applications.