]> git.saurik.com Git - wxWidgets.git/blame - docs/msw/gtk.txt
Don't hard code "2.9.3" in the release preparation instructions.
[wxWidgets.git] / docs / msw / gtk.txt
CommitLineData
dbf67d66
VZ
1Building wxGTK port with Win32 GDK backend
2------------------------------------------
3
4GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
5It is a wrapper around Windows API.
6
7See http://www.gtk.org/download/win32.php
8
9These notes don't consider building wxGTK with X11 backend under Windows.
10
11Building steps:
12
131. wxGTK/Win32 build is similar to wxMSW one and you should have configured
14and be able to build wxWidgets as described in docs/msw/install.txt
15
162. wxGTK/Win32 is disabled by default in wxWidgets, you need to enable it
17in bakefiles manually. TOOLKIT variable should not be a constantly MSW
18for required bakefile formats.
19
20
21diff 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
5b608795 27 <!-- We must make TOOLKIT a constant under Windows -->
dbf67d66
VZ
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
38Regenerate required make/project files:
39 cd build\bakefiles
40 bakefile_gen
41
423. Download GTK+ for Windows and uncompress files in the directory
43without spaces in the name. We suppose later that GTK+/Win32 is
44in 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
484. Building
49
504.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
60and library directory
61
62 C:\gtk\lib\
63
64 See http://msdn.microsoft.com/en-us/library/t9az1d21(v=vs.90).aspx
65
66Open solution file in build\msw directory, select "GTK+ Debug" solution
67configuration and build the solution. To be sure that everything is as expected
68you can build minimal sample.
69
70GTK+ is linked to wxWidgets always as DLL, so C:\gtk\bin directory should be
71in %PATH% environment variable before application run.
72
734.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
81or 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
975. Now you can use wxGTK/Win32 as wxMSW in your applications.