1General Information
2===================
3
4This is GTK+ version 2.24.33. GTK+ is a multi-platform toolkit for
5creating graphical user interfaces. Offering a complete set of widgets,
6GTK+ is suitable for projects ranging from small one-off projects to
7complete application suites.
8
9GTK+ is free software and part of the GNU Project. However, the
10licensing terms for GTK+, the GNU LGPL, allow it to be used by all
11developers, including those developing proprietary software, without any
12license fees or royalties.
13
14The official ftp site is:
15 ftp://ftp.gtk.org/pub/gtk
16
17The official web site is:
18 http://www.gtk.org/
19
20Information about mailing lists can be found at
21 http://www.gtk.org/mailinglists.html
22
23
24Installation
25============
26
27See the file 'INSTALL'
28
29
30Release notes for 2.20
31======================
32
33* GtkStatusbar now has a message area (see gtk_status_bar_get_message_area)
34 which makes it easy to place additional widgets inside the statusbar
35 frame or to replace the label widgets. Previously, this was only possible
36 by accessing the innards of the statusbar widget directly. Applications
37 which are doing so may need some adjustments, since the addition of the
38 message area changed the internal widget hierarchy.
39
40* GtkBuilder no longer sets the "name" property of widgets to the ID
41 attribute of the <object>. Use gtk_buildable_get_name() instead of
42 gtk_widget_get_name() to obtain the ID.
43
44* GTK+ now includes introspection data, as a consequence, it gained a
45 dependency on gobject-introspection. It is possible to build without
46 introspection by passing --disable-introspection to configure.
47
48
49Release notes for 2.18
50======================
51
52* gtk_tooltip_set_custom now accept a NULL custom_widget to unset the
53 old custom_widget. Custom_widget does not get destroyed when the
54 tooltip goes away.
55
56* JPEG2000 support is no longer enabled by default. It must be
57 explicitly turned on, by passing --with-libjasper to configure.
58
59* GDK has been reworked to implement 'client-side windows'. This offers
60 exciting new possibilities, such as transformed, offscreen rendering,
61 but it breaks some long-standing assumptions that applications may
62 have about GDK windows. Setting the environment variable
63 GDK_NATIVE_WINDOWS makes GDK create a native X11 window for each
64 GDK window, which might make problematic applications work better.
65
66* GTK+ calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore
67 SIGPIPE signals, since these are almost never wanted in graphical
68 applications. If you do need to handle SIGPIPE for some reason, reset
69 the handler after gtk_init(), but notice that other libraries (e.g.
70 libdbus or gvfs) might do similar things.
71
72Release notes for 2.16
73======================
74
75* Password entries now display a caps-lock warning. This can be turned off
76 with the caps-lock-warning property.
77
78* Various orientation-related functions have been deprecated in favour
79 of the new GtkOrientable interface: gtk_scale_button_get_orientation,
80 gtk_scale_button_set_orientation, gtk_toolbar_set_orientation.
81
82* The action-proxy interaction has been changed. Widgets that operate as
83 proxies have to implement the GtkActivatable interface now. GtkActivatable
84 implementation are responsible for syncing their appearance with the
85 action and for activating the action. All GTK+ widgets that are commonly
86 used as proxies implement the GtkActivatable interface.
87
88* The handling of keyboard shortcuts has been changed, to help with a
89 longstanding complaint about the way GTK+ handles multiple layouts. GTK+
90 now only uses keys from groups other than the current group if they are
91 not present in the current group.
92
93Release notes for 2.14
94======================
95
96* gtkitemfactory.h is now completely deprecated.
97 As gtkactiongroup.h and gtkstock.h no longer include the gtkitemfactory.h
98 header, this might break application using gtk_item_factory_* symbols
99 without including gtkitemfactory.h - even though this behaviour has never
100 been supported in the first place.
101
102* The GtkFileSystem semi-private interface has been removed.
103 The GTK+ filechooser implementation now uses GIO directly, which has
104 rendered external filesystem implementations unnecessary. Consequently,
105 the GtkFileSystem interface is no longer available, nor the filechooser
106 will load any GtkFileSystem implementation.
107
108* GtkComboBox now renders the popdown button insensitive when
109 the model is empty. Applications which want to populate the list
110 only before displaying it can set gtk_combo_box_set_button_sensitivity
111 to GTK_SENSITIVITY_ON, so that the button is always sensitive or
112 GTK_SENSITIVITY_OFF to make it insensitive respectively.
113
114* In the early 2.14.x releases, GtkAdjustment was changed to enforce
115 that values are restricted to the range [lower, upper - page_size].
116 This has always been the documented behaviour, and the recommended
117 practice is to set page_size to 0 when using adjustments for simple
118 scalar values, like in a slider or spin button.
119 Due to the large number of applications that are affected by this
120 change, the behaviour has been reverted to the old behaviour in
121 2.14.3, with an explicit warning that this change will be
122 reintroduced in 2.90.
123
124* gdk-pixbuf will use GIO for mime type detection if possible. For
125 this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
126 set accordingly at configure time. Otherwise, gdk-pixbuf falls
127 back to its built-in sniffing implementation.
128
129Release notes for 2.12
130======================
131
132* gtk_about_dialog_get/set_name() were deprecated in favour of
133 gtk_about_dialog_get/set_program_name(), the GtkAboutDialog now uses the
134 "program-name" property instead of the conflicting "name" property.
135
136* The gdk-pixbuf tiff loader now requires libtiff 3.6.0 or later.
137
138* Support for Windows 9x/ME has officially been removed. It hasn't worked
139 since 2.6 anyway.
140
141* The GtkTextBufferTargetInfo enumeration values have been changed from
142 G_MAXUINT-0, G_MAXUINT-1, G_MAXUINT-2, etc, to -1, -2, -3 to stay within
143 ANSI C limits.
144
145* A change in the handling of _NET_WM_USER_TIME properties on toplevel
146 windows can cause deadlock problems with window managers that are using
147 GDK for drawing decorations. In particular, metacity <= 2.18.0 is affected
148 by this. The problem has been fixed in metacity 2.18.1.
149
150* Semi-private GtkTextLayout api has changed: new GtkTextLayout method
151 invalidate_cursors(), and new functions gtk_text_layout_invalidate_cursors()
152 and gtk_text_layout_cursors_changed(), which should be used in place of
153 gtk_text_layout_invalidate() and gtk_text_layout_changed() if invalidation
154 is due to marks moved or changed selection; new GtkTextLineDisplay structure
155 member. Source compatibility is preserved; binary compatibility may break
156 only if GtkTextLineDisplay structure was created on stack or as a part
157 of another structure (in particular GnomeCanvas and its clones do not need
158 recompiling).
159
160* Another new signal has been added to GtkNotebook. The new signal
161 is called create-window, so this name can no longer be used for signals
162 in objects derived from GtkNotebook.
163
164* The gtk_notebook_set/get_group_id() functions were found to be insufficient
165 and have been deprecated in favour of gtk_notebook_set/get_group().
166
167* The move-focus signal has been moved to GtkWidget, to unify the
168 various implementations of this signal in specific widgets. Great care
169 has been taken to make sure that all code using this signal continues
170 to work.
171
172* An unused and hardly visible GtkFrame has been removed from the menu
173 widget hierarchy when GtkComboBox::appears-as-list style property is
174 set. Any RC file applying a different style to any widget below the
175 widget path "gtk-combobox-popup-window.GtkFrame" should take into
176 account that the frame no longer exists.
177
178* The external print preview application used by GtkPrintOperationPreview
179 is now passed the print settings on the command line with the
180 --print-settings parameter pointing to a temp file containing the
181 settings. The preview application assumes ownership of the file and
182 should delete it once it does not need it anymore. The --print-settings
183 commandline option is understood by Evince 0.9.0 and newer. To use a
184 different print preview application, change the gtk-print-preview-command
185 setting in your gtkrc file, e.g. gtk-print-preview-command = "ggv %f"
186
187* GtkMenuShell is now defined as an abstract type. It was already
188 documented as an abstract class, and there is little reason to
189 instantiate it.
190
191* The GtkTooltips struct (this is the old tooltips API) is now considered
192 private. Code that used to access this struct, in particular the
193 tips_data_list field, will need to change. All of the old tooltips
194 API has been deprecated in favour of a new implementation and
195 API. This affects all of the gtk_tooltips_ functions, and functions
196 which take a GtkTooltips argument, such as gtk_tool_item_set_tooltip()
197 and gtk_menu_tool_button_set_arrow_tooltip().
198
199* The memory management of the GtkRecentManager object has been changed,
200 as using the screen didn't guarantee that the singleton instance was
201 correctly destroyed. The screen-related functions have been deprecated,
202 and should not be used anymore; the GtkRecentManager instance returned by
203 the gtk_recent_manager_get_default() function is guaranteed to be valid
204 for the entire lifetime of an application.
205
206* A number of interfaces that have been superseded by newer interfaces for
207 a long time have finally been deprecated. This includes
208 gtk_widget_ref/unref(), gtk_rc_style_ref/unref() and the old file selector.
209
210* The various coordinate systems in use in GtkTreeView widgets have
211 been clarified in the documentation, and in the cause of doing so,
212 the functions gtk_tree_view_widget_to_tree_coords() and
213 gtk_tree_view_tree_to_widget_coords() have been deprecated in
214 favour of a new family of gtk_tree_view_convert_ functions.
215
216* gtk_menu_item_remove_submenu() has been deprecated in favour of
217 gtk_menu_item_set_submenu (..., NULL).
218
219* gtk_default_draw_check() has been fixed to really decrease the
220 indicator size by one pixel to ensure an odd size instead of
221 accidentially increasing it.
222 Consequently, gtk_cell_renderer_toggle_render() could be fixed to
223 not subtract 1 from the size passed to gtk_paint_option(), which
224 was just a workaround for above off-by-two for even sizes (theme
225 engines now get the real indicator size passed).
226 The default toggle size of GtkCheckMenuItem and GtkCellRendererToggle
227 has been changed to 13 to be consistent with GtkCheckButton.
228 The only visible change with default settings is that the indicator in
229 GtkCellRendererToggle has changed its size from 11 to 13 and is now
230 consistent with menus and toggle buttons.
231
232* GTK+ has always required that gtk_init() (or a variant thereof) is
233 called before any other GTK+ function. Some applications call functions
234 like gtk_clipboard_get() to check if they need to call gtk_init(),
235 anyway. A change in GLib 2.14 has recently broken this unsupported
236 practise. It is worth pointing out that calling gtk_init() twice
237 does no harm.
238
239
240Release notes for 2.10
241======================
242
243* The hexadecimal Unicode input feature has been reworked. It no longer
244 blocks the use of the sixteen Ctrl-Shift-<hex digit> key sequences. Now
245 it only uses Ctrl-Shift-u.
246
247* A memory leak in GtkStyle handling has been fixed. This may expose bugs
248 in third-party widgets which forget to call gtk_style_attach() in their
249 realize functions.
250
251* Range widgets like GtkScrollbar now render their arrows insensitive
252 when the slider is at the end. Applications which react to arrow
253 clicks even if the slider is at the end may want to use the new
254 gtk_range_set_[upper/lower]_stepper_sensitivity() functions to
255 prevent the arrows from being rendered insensitive.
256
257* GtkObject now uses the "floating reference" support in GObject.
258 GTK_OBJECT_IS_FLOATING() will still work, but direct checking
259 of the GTK_FLOATING flag will no longer detect the floating
260 reference. Details about floating references can be found in the docs:
261 http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
262
263* Accelerators like (_F) are now stripped from labels when they are
264 displayed in toolbars. If this is not wanted, the feature can be
265 suppressed by inserting a Unicode control character, e.g ZWNJ.
266
267* The pixbuf theme engine can now customize expanders (in GtkTreeView
268 and GtkExpander) and resize grips, using the new EXPANDER and
269 RESIZE_GRIP function values.
270
271* Dialogs created by gtk_about_dialog_new() no longer hide automatically
272 when the user clicks close. It is the applications responsibility to
273 hide or destroy the dialog.
274
275* Several new signals have been added to GtkNotebook. Care has been taken
276 to choose signal names which do not collide with signals added by well-known
277 derived classes. The names which can no longer be used for signals in
278 objects derived from GtkNotebook are page-reordered, page-removed and
279 page-added.
280
281* Due to the interface changes in the file chooser backend interface,
282 the GTK+ ABI version has been bumped to 2.10.0. Third-party filesystem
283 backends have to be ported to the new interface, other modules, such as
284 theme engines, input method modules or pixbuf loaders have to be rebuilt
285 so that they are installed in the right place for GTK+ to find them.
286
287
288Release notes for 2.8
289=====================
290
291* GTK+ 2.8 and Pango 1.10 require the cairo library.
292
293* The default theme has been renamed to "Raleigh". Existing configurations
294 specifying the "Default" theme name should still work.
295
296* The GtkTreeView::enable-search property has been changed to control
297 only typeahead search, not the C-f keybinding to start an interactive
298 search. To turn off interactive searching completely, you have to
299 set GtkTreeView::search-column to -1.
300
301* The restriction on using the same cell renderer in multiple columns
302 of a GtkTreeView is now more strictly enforced.
303
304* In GTK+ 2.8, GtkCalendar uses nl_langinfo() (if available) to determine
305 the first day of the week. Thus, it is possible to select the first day
306 of the week independently from the language, by setting LC_TIME.
307
308* In GTK+ 2.8, the gtk-update-icon-cache utility includes image data
309 in the icon caches, which will make the icon cache files larger than
310 the one produced by GTK+ 2.6. This change will reduce the memory
311 overhead of icon themes at runtime, since all GTK+ applications can
312 share the image data in memory.
313
314* In 2.8, GDK emits GdkEventGrabBroken events when a keyboard or pointer
315 grab is broken. On X11, this can happen if the same application grabs
316 again, or if the window used for the grab becomes unviewable. It happens
317 more often on Win32. Applications which use grabs should pay attention
318 to these events and do the necessary cleanups when the grab is lost.
319* The GIOChannel code for sockets on win32 has been rewritten.
320 Applications who make non-trivial use of GIOChannels on win32 should
321 be watched for possible problems.
322
323* GLib 2.8 uses atomic operations to implement reference counting, thus
324 g_object_ref/unref, g_closure_ref/sink/unref and g_iochannel_ref/unref
325 can be used without locking in multithreaded applications. Note that
326 other modifications, like concurrent setting of properties still require
327 locking.
328
329* g_convert() and related character set conversion functions have been
330 fixed to emit pending shift states and to not cache iconv descriptors
331 across multiple calls, since that is problematic for some encodings.
332 Note that these functions are not suitable for streaming conversions;
333 use g_iconv() to do streaming conversion.
334
335
336Release notes for 2.6
337=====================
338
339* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
340 a clipboard manager following the specification at
341 http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
342 must be running. A sample implementation of such a clipboard manager
343 is available at
344 http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
345 Applications can use the function gdk_display_supports_clipboard_persistence()
346 to find out if clipboard persistence is available.
347
348* Notification on clipboard ownership changes via GdkOwnerChange events
349 requires the XFIXES X extension. Applications can use the function
350 gdk_display_supports_selection_notification() to find out if ownerchip
351 change notification is available.
352
353* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
354 specification. Setting the XDG_DATA_DIRS environtment variable may be
355 necessary if your icons aren't installed in the default location
356 /usr/share/icons.
357
358* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
359 to avoid a lot of disk searching overhead. GTK+ includes a utility named
360 gtk-update-icon-cache to generate these cache files. For further details,
361 see the gtk-update-icon-cache man page or the GTK+ documentation.
362
363* To reduce code size and improve efficiency, GTK+, when compiled
364 with the GNU toolchain, has separate internal and external entry
365 points for exported functions. The internal names, which begin with
366 IA__, may be seen when debugging a GTK+ program.
367
368* The following functions have been deprecated in GTK+ 2.6:
369 gdk_pango_context_set_colormap
370 gtk_cell_renderer_editing_canceled
371
372* The new GtkFileChooser widget emphasizes simplicity and thus does
373 not provide a navigation entry by default when opening files.
374 Experienced command line users will likely want to make heavy use of
375 the location dialog brought up by the Control-L key shortcut.
376
377* The GTK+ libraries use an '_' prefix to indicate private symbols that
378 must not be used by applications. On some platforms, symbols beginning
379 with prefixes such as _gtk, _gdk, and _pango will be exported
380 from the library, on others not. In no case can applications
381 use these private symbols. In addition to that, GTK+ 2.6 makes several
382 symbols private which were not in any installed header files and
383 were never intended to be exported.
384
385* The gdk_pixbuf_xlib library included in the contrib/ directory
386 and the framebuffer GDK backend included in the gdk/linux-fb directory
387 of GTK+ are provided on an as-is basis and have not been tested at all.
388 No guarantees about the degree of workingness or about future
389 compatibility are provided.
390
391* On Unix, the assumption of GLib and GTK+ by default is that filenames on
392 the filesystem are encoded in UTF-8 rather than the encoding of the locale;
393 the GTK+ developers consider that having filenames whose interpretation
394 depends on the current locale is fundamentally a bad idea.
395
396 If you have filenames encoded in the encoding of your locale, then you
397 may want to set the G_FILENAME_ENCODING environment variable:
398
399 G_FILENAME_ENCODING=@locale
400 export G_FILENAME_ENCODING
401
402 (Earlier versions of GLib 2.x required a different environment variable
403 setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
404 is still supported, but G_FILENAME_ENCODING is preferred.)
405 Best integration of GTK+ 2.6 with the environment is achieved by
406 using a UTF-8 locale.
407
408 On Windows, filenames passed to GTK+ should always be in UTF-8, as
409 in GLib 2.6. This is different than in previous versions of GTK+
410 where the system codepage was used. As in GLib, for DLL ABI
411 stability, applications built against previous versions of GTK+ will
412 use entry points providing the old semantics.
413
414 When compiling against GTK+ 2.6, applications intended to be
415 portable to Windows must take the UTF-8 file name encoding into
416 consideration, and use the gstdio wrappers to access files whose
417 names have been constructed from strings returned from GTK+ or GLib.
418
419
420How to report bugs
421==================
422
423Bugs should be reported to the GNOME bug tracking system.
424(http://bugzilla.gnome.org, product gtk+.) You will need to create an
425account for yourself.
426
427In the bug report please include:
428
429* Information about your system. For instance:
430
431 - What operating system and version
432 - What version of X
433 - For Linux, what version of the C library
434
435 And anything else you think is relevant.
436
437* How to reproduce the bug.
438
439 If you can reproduce it with one of the tests or demos built with GTK+,
440 such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
441 please include a short test program that exhibits the behavior. As a
442 last resort, you can also provide a pointer to a larger piece of software
443 that can be downloaded.
444
445* If the bug was a crash, the exact text that was printed out when the
446 crash occured.
447
448* Further information such as stack traces may be useful, but is not
449 necessary. If you do send a stack trace, and the error is an X error,
450 it will be more useful if the stacktrace is produced running the test
451 program with the --sync command line option.
452
453
454Patches
455=======
456
457Patches should also be submitted to bugzilla.gnome.org. If the patch
458fixes an existing bug, add the patch as an attachment to that bug
459report.
460
461Otherwise, enter a new bug report that describes the patch, and attach
462the patch to that bug report.
463
464Patches should be in unified diff form. (The -up option to GNU diff.)
465
1GTK+ is part of the GNOME git repository. At the current time, any
2person with write access to the GNOME repository, can make changes to
3GTK+. This is a good thing, in that it encourages many people to work
4on GTK+, and progress can be made quickly. However, GTK+ is a fairly
5large and complicated package that many other things depend on, so to
6avoid unnecessary breakage, and to take advantage of the knowledge
7about GTK+ that has been built up over the years, we'd like to ask
8people committing to GTK+ to follow a few rules:
9
100) Ask first. If your changes are major, or could possibly break existing
11 code, you should always ask. If your change is minor and you've
12 been working on GTK+ for a while it probably isn't necessary
13 to ask. But when in doubt, ask. Even if your change is correct,
14 somebody may know a better way to do things.
15
16 If you are making changes to GTK+, you should be subscribed
17 to gtk-devel-list@gnome.org. (Subscription address:
18 gtk-devel-list-request@gnome.org.) This is a good place to ask
19 about intended changes.
20
21 #gtk+ on GIMPNet (irc.gimp.org, irc.us.gimp.org, irc.eu.gimp.org, ...)
22 is also a good place to find GTK+ developers to discuss changes with,
23 however, email to gtk-devel-list is the most certain and preferred
24 method.
25
261) Ask _first_.
27
282) With git, we no longer maintain a ChangeLog file, but you are expected
29 to produce a meaningful commit message. Changes without a sufficient
30 commit message will be reverted. See below for the expected format
31 of commit messages.
32
33Notes:
34
35* When developing larger features or complicated bug fixes, it is
36 advisable to work in a branch in your own cloned GTK+ repository.
37 You may even consider making your repository publically available
38 so that others can easily test and review your changes.
39
40* The expected format for git commit messages is as follows:
41
42=== begin example commit ===
43Short explanation of the commit
44
45Longer explanation explaining exactly what's changed, whether any
46external or private interfaces changed, what bugs were fixed (with bug
47tracker reference if applicable) and so forth. Be concise but not too brief.
48=== end example commit ===
49
50 - Always add a brief description of the commit to the _first_ line of
51 the commit and terminate by two newlines (it will work without the
52 second newline, but that is not nice for the interfaces).
53
54 - First line (the brief description) must only be one sentence and
55 should start with a capital letter unless it starts with a lowercase
56 symbol or identifier. Don't use a trailing period either. Don't exceed
57 72 characters.
58
59 - The main description (the body) is normal prose and should use normal
60 punctuation and capital letters where appropriate. Normally, for patches
61 sent to a mailing list it's copied from there.
62
63 - When committing code on behalf of others use the --author option, e.g.
64 git commit -a --author "Joe Coder <joe@coder.org>" and --signoff.
65
66
67Owen Taylor
6813 Aug 1998
6917 Apr 2001
70
71Matthias Clasen
7231 Mar 2009
73
1The Win32 backend in GTK+ is not as stable or correct as the X11 one.
2
3For prebuilt runtime and developer packages see
4http://ftp.gnome.org/pub/gnome/binaries/win32/
5
6Building GTK+ on Win32
7======================
8
9First you obviously need developer packages for the compile-time
10dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv
11at least. See
12http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies.
13
14For people compiling GTK+ on Visual C++ 2005 or later, it is recommended
15that you build GDK-Pixbuf, Pango, atk, glib with the same compiler to avoid
16crashes and errors caused by the usage of different CRTS. VS 2008
17project files and/or VS Makefiles are either already available in these
18packages or will be available in the next stable release. Unfortunately
19compiling with Microsoft's compilers (version 2003 or earlier) is not
20supported as compiling GLib requires features from the newer compilers
21and/or the newer Platform SDKs at this time of writing.
22
23After installing the dependencies, there are two ways to build GTK+
24for win32.
25
261) GNU tools, ./configure && make install
27-----------------------------------------
28
29This requires you have mingw and MSYS.
30
31Use the configure script, and the resulting Makefiles (which use
32libtool and gcc to do the compilation). I use this myself, but it can
33be hard to setup correctly.
34
35The full script I run to build GTK+ 2.16 unpacked from a source
36distribution is as below. This is from bulding GTK+ 2.16.5. I don't
37use any script like this to build the development branch, as I don't
38distribute any binaries from development branches.
39
40# This is a shell script that calls functions and scripts from
41# tml@iki.fi's personal work env�ronment. It is not expected to be
42# usable unmodified by others, and is included only for reference.
43
44MOD=gtk+
45VER=2.16.5
46REV=1
47ARCH=win32
48
49THIS=${MOD}_${VER}-${REV}_${ARCH}
50
51RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
52DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
53
54HEX=`echo $THIS | md5sum | cut -d' ' -f1`
55TARGET=c:/devel/target/$HEX
56
57usedev
58usemsvs6
59
60(
61
62set -x
63
64DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
65PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
66
67PKG_CONFIG_PATH=
68for D in $DEPS; do
69 PATH=/devel/dist/${ARCH}/$D/bin:$PATH
70 [ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
71done
72
73LIBPNG=`latest --arch=${ARCH} libpng`
74ZLIB=`latest --arch=${ARCH} zlib`
75LIBTIFF=`latest --arch=${ARCH} libtiff`
76JPEG=`latest --arch=${ARCH} jpeg`
77
78patch -p0 <<'EOF'
79EOF
80
81lt_cv_deplibs_check_method='pass_all' \
82CC='gcc -mtune=pentium3 -mthreads' \
83CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
84-I/devel/dist/${ARCH}/${ZLIB}/include \
85-I/devel/dist/${ARCH}/${LIBTIFF}/include \
86-I/devel/dist/${ARCH}/${JPEG}/include \
87-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
88LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
89-L/devel/dist/${ARCH}/${ZLIB}/lib \
90-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
91-L/devel/dist/${ARCH}/${JPEG}/lib \
92-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
93-Wl,--enable-auto-image-base" \
94LIBS=-lintl \
95CFLAGS=-O2 \
96./configure \
97--with-gdktarget=win32 \
98--disable-gdiplus \
99--with-included-immodules \
100--without-libjasper \
101--enable-debug=yes \
102--enable-explicit-deps=no \
103--disable-gtk-doc \
104--disable-static \
105--prefix=$TARGET &&
106
107libtoolcacheize &&
108rm gtk/gtk.def &&
109(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
110
111PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
112
113grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
114 mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
115grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/lib/gtk-2.0/2.10.0/immodules.cache >$TARGET/lib/gtk-2.0/2.10.0/immodules.temp &&
116 mv $TARGET/lib/gtk-2.0/2.10.0/immodules.temp $TARGET/lib/gtk-2.0/2.10.0/immodules.cache &&
117
118./gtk-zip.sh &&
119
120mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
121mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
122
123) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
124
125(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
126manifestify /tmp/$RUNZIP /tmp/$DEVZIP
127
128You should not just copy the above blindly. There are some things in
129the script that are very specific to *my* build setup on *my* current
130machine. For instance the "latest" command, the "usedev" and
131"usemsvs6" shell functions, the /devel/dist folder. The above script
132is really just meant for reference, to give an idea. You really need
133to understand what things like PKG_CONFIG_PATH are and set them up
134properly after installing the dependencies before building GTK+.
135
136As you see above, after running configure, one can just say "make
137install", like on Unix. A post-build fix is needed, running
138gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
139file.
140
141For a 64-bit build you need to remove the gtk/gtk.def file and let it
142be regenerated by the makefilery. This is because the 64-bit GTK dll
143has a slightly different list of exported function names. This is on
144purpose and not a bug. The API is the same at the source level, and
145the same #defines of some function names to actually have a _utf8
146suffix is used (just to keep the header simpler). But the
147corresponding non-suffixed function to maintain ABI stability are not
148needed in the 64-bit case (because there are no older EXEs around that
149would require such for ABI stability).
150
151
1522) Microsoft's tools
153--------------------
154
155Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
156makefile.msc in gdk and gtk. Be prepared to manually edit various
157makefile.msc files, and the makefile snippets in build/win32.
158
159There are also VS 2008/2010 solution and project files to build GTK+, which
160are maintained by Chun-wei Fan. They should build GTK+ out of the box,
161provided that the afore-mentioned dependencies are installed. They will
162build GDK with the Win32 backend, GTK+ itself and the gtk-demo program.
163(The GAIL and GAIL-util sources are not built by this method yet)
164
165Please refer to the following GNOME Live! page for a more detailed ouline
166on the process of building the GTK+ stack and its dependencies with Visual
167C++:
168
169https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
170
171Alternative 1 also generates Microsoft import libraries (.lib), if you
172have lib.exe available. It might also work for cross-compilation from
173Unix.
174
175I (Tor) use method 1 myself. Hans Breuer has been taking care of the MSVC
176makefiles. At times, we disagree a bit about various issues, and for
177instance the makefile.msc files might not produce identically named
178DLLs and import libraries as the "autoconfiscated" makefiles and
179libtool do. If this bothers you, you will have to fix the makefiles.
180
181Using GTK+ on Win32
182===================
183
184To use GTK+ on Win32, you also need either one of the above mentioned
185compilers. Other compilers might work, but don't count on it. Look for
186prebuilt developer packages (DLLs, import libraries, headers) on the
187above website.
188
189Multi-threaded use of GTK+ on Win32
190===================================
191
192Multi-threaded GTK+ programs might work on Windows in special simple
193cases, but not in general. Sorry. If you have all GTK+ and GDK calls
194in the same thread, it might work. Otherwise, probably not at
195all. Possible ways to fix this are being investigated.
196
197Wintab
198======
199
200The tablet support uses the Wintab API. The Wintab development kit is
201no longer required. The wintab.h header file is bundled with GTK+
202sources. Unfortunately it seems that only Wacom tablets come with
203support for the Wintab API nowadays.
204
205--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
206--Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>
207