]> git.saurik.com Git - wxWidgets.git/commitdiff
Add documentation for building wxGTK under Windows.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Jul 2013 13:08:56 +0000 (13:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Jul 2013 13:08:56 +0000 (13:08 +0000)
Closes #15318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/msw/gtk.txt [new file with mode: 0644]

index bae06e44426a2ed38ed6d7ec14f04f0cf5970c51..be1157880a2d8bf5dc8271887247898793c5f4cc 100644 (file)
@@ -686,6 +686,7 @@ All (GUI):
 wxGTK:
 
 - Allow building wxGTK3 with Broadway backend (Kolya Kosenko).
+- Further improvements to wxGTK/MSW port (Kolya Kosenko).
 - Provide native implementation of wxNotificationMessage using libnotify.
 - Generate clipboard events for wxComboBox and not only wxTextCtrl.
 - Improve drag-and-drop of URLs.
diff --git a/docs/msw/gtk.txt b/docs/msw/gtk.txt
new file mode 100644 (file)
index 0000000..8dfac94
--- /dev/null
@@ -0,0 +1,97 @@
+Building wxGTK port with Win32 GDK backend
+------------------------------------------
+
+GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
+It is a wrapper around Windows API.
+
+See http://www.gtk.org/download/win32.php
+
+These notes don't consider building wxGTK with X11 backend under Windows.
+
+Building steps:
+
+1. wxGTK/Win32 build is similar to wxMSW one and you should have configured
+and be able to build wxWidgets as described in docs/msw/install.txt
+
+2. wxGTK/Win32 is disabled by default in wxWidgets, you need to enable it
+in bakefiles manually. TOOLKIT variable should not be a constantly MSW
+for required bakefile formats.
+
+
+diff build/bakefiles/config.bkl build/bakefiles/config.bkl
+--- build/bakefiles/config.bkl
++++ build/bakefiles/config.bkl
+@@ -67,9 +67,9 @@
+         </if>
+         <!-- We must make TOOLKIT a constant under MSW -->
+-        <if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
++        <!--if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
+             <set var="TOOLKIT">MSW</set>
+-        </if>
++        </if-->
+     </if>
+     <!--
+
+
+Regenerate required make/project files:
+    cd build\bakefiles
+    bakefile_gen
+
+3. Download GTK+ for Windows and uncompress files in the directory
+without spaces in the name. We suppose later that GTK+/Win32 is
+in the C:\gtk directory.
+
+    http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+_2.24.10-1_win32.zip
+
+4. Building
+
+4.1 If you are using Visual C++ project files you need to setup GTK+ 2 include directories
+    C:\gtk\lib\include\gtk-2.0
+    C:\gtk\lib\include\glib-2.0
+    C:\gtk\lib\include\cairo
+    C:\gtk\lib\include\pango-1.0
+    C:\gtk\lib\include\gdk-pixbuf-2.0
+    C:\gtk\lib\include\atk-1.0
+    C:\gtk\lib\glib-2.0\include
+    C:\gtk\lib\gtk-2.0\include
+
+and library directory
+
+    C:\gtk\lib\
+
+    See http://msdn.microsoft.com/en-us/library/t9az1d21(v=vs.90).aspx
+
+Open solution file in build\msw directory, select "GTK+ Debug" solution
+configuration and build the solution. To be sure that everything is as expected
+you can build minimal sample.
+
+GTK+ is linked to wxWidgets always as DLL, so C:\gtk\bin directory should be
+in %PATH% environment variable before application run.
+
+4.2 You can also build using nmake:
+
+    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\;
+    set LIB=C:\gtk\lib\;
+    set PATH=C:\gtk\bin\;%PATH%;
+
+    nmake -f makefile.vc "TOOLKIT=GTK" "TOOLKIT_VERSION=2"
+
+or with MinGW:
+
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\gtk-2.0
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\glib-2.0
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\cairo
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\pango-1.0
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\gdk-pixbuf-2.0
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\atk-1.0
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\lib\glib-2.0\include
+    set CXXFLAGS=%CXXFLAGS% -IC:\gtk\lib\gtk-2.0\include
+    set CFLAGS=%CXXFLAGS%
+    set LDFLAGS=%LDFLAGS% -LC:\gtk\lib
+    set PATH=C:\gtk\bin\;%PATH%;
+
+    mingw32-make -f makefile.gcc "TOOLKIT=GTK" "TOOLKIT_VERSION=2"
+
+5. Now you can use wxGTK/Win32 as wxMSW in your applications.