Debian Codegraph @

gtk/README

raw
1 -----------
2 The History
3 -----------
4
5 For simpler installation and more consistent behaviour, official Windows build of mtPaint is packaged with its own copy of GTK+ runtime environment. Prior to version 3.40, it was GTK+ 2.6.4 - or more accurately, a mix of DLLs from official Windows distributions of GTK+ 2.6.4 and 2.6.9, with libgdk and libgtk being from 2.6.4. This allowed mtPaint to continue to support Windows 98, which became unsupported with GTK+ 2.8.
6
7 But since version 2.6.4 had been released in 2005, some improvements in Windows support in GTK+ had been made which were really desirable. Moreover, libraries such as libpng, libjpeg, LibTIFF, FreeType, and even zlib had undergone multiple version changes in the meantime, with bugfixes and other improvements. Still, upgrading the package to a newer official distribution of GTK+ would have meant exposing the program to a new set of GTK+ bugs and quirks - which would have been hard to detect and counter in time, because I myself do not run Windows. For this reason, mtPaint 3.40 came with a custom build of GTK+ based on version 2.6.7 with a set of patches backported from the later versions, compiled from source along with all its dependencies.
8
9 With mtPaint 3.50, an updated version of that build, with updated libraries, comes with 32-bit build of mtPaint intended for old 32-bit Windows systems such as Windows XP, or even now-ancient Windows 98 in case someone somewhere has a reason to run one. On newer 64-bit Windows systems, specifically Windows 7 and later, the 64-bit build of mtPaint is expected to work better; however, the newer GTK+2 build coming with it is near untested (for I still do not run Windows) so if it misbehaves in any major way, this 32-bit build could serve as a fallback.
10
11 For mtPaint 3.51, the only notable change is that giflib library which was a dependency before, now isn't and was removed.
12
13 -------------
14 The Specifics
15 -------------
16
17 Original patches from GTK+ tree contained in the cumulative patch:
18 - svn 7886 / git d73fa807875951d0240dce572398992d395bbe77
19 Use GetDriveType() to recognize removable drives (in order to avoid
20 (REVERTED: was making flash drives inaccessible from file selector)
21 - svn 12881 / git 0604a90098416694c1d26bfa920e34c3f5d61493
22 Remove debugging output. (#302404, Frederic Crozat)
23 (APPLIED: cleans up BMP loader)
24 - svn 12899 / git cf5324d980fcddad8318bf52f5315d39fc4221f6
25 Don't grab focus to unrealized widgets. (#302240, Philip Langdale)
26 (APPLIED: fixes possible glitch in radiobutton groups)
27 - svn 12903 / git 0ae5528968af2b0e28eebdb9c4b38f76af129707
28 Take multi-monitor offset into account. (#302525)
29 (APPLIED)
30 - svn 12946 / git 35f75bd3401d498201327fe00fa454deb351cee1
31 Always initialize child-visible to FALSE, otherwise we may end up with the
32 (PARTIALLY APPLIED: fixes possible glitch in GtkNotebook)
33 - svn 12968 / git ff576e3fe7dce780f2b892967fb16c073656d29d
34 Check that GDK_IS_SCREEN(screen) (like the X11 backend does), not screen
35 (APPLIED)
36 - svn 12991 / git 7c337b69f23d4200d4975cc35da13d1d3c00cc1f
37 Don't blink the cursor if the entry is not editable. (#304171,Nikos
38 (APPLIED)
39 - svn 12992 / git ef25506011d6bfa67294cdcc8bbdd40185f0bfaa
40 Don't bind GDK_Page_Up and GDK_Page_Down twice. (#168333, Hazael Maldonado
41 (APPLIED: fixes reaction to PageUp & PageDown keys in sliders)
42 - svn 12994 / git f4fc3fee869d901eba7b6eaf22a4794b15659a2e
43 Keep the popup posted if the button is released over the cellview. This
44 (APPLIED: fixes GtkComboBox)
45 - svn 13027 / git a9c0d119133ea9c22017cf7bb567b5de54b538c0
46 If the keysym isn't one of the special cases this function takes care of,
47 (APPLIED)
48 - svn 13057 / git 67f3c556626c6e9fa06b2143c87633e635ed733c
49 If blitting from the root window, take the multi-monitor offset into
50 (APPLIED)
51 - svn 13062 / git b27c1cc6ee8e5d86a628a3a96a8c3d56bdc00b7e
52 Make autoscrolling work at the bottom of the screen.
53 (APPLIED: fixes GtkComboBox)
54 - svn 13095 / git 36c4c40f8822aa519aa33fa3222f42fc6563dfa8
55 Check for overflow. (#306394, Morten Welinder)
56 (APPLIED: fixes PNM loader)
57 - svn 13200 / git 5e575c6df3a3e407042a666a9ba9cbb1e01c0b6c
58 [Win32] Borrow this function from GLib HEAD. (_gtk_get_localedir): [Win32]
59 (APPLIED: fixes possible problem with non-ASCII installation path)
60 - svn 13219 / git 4a37701aa1615c30d80a6840fbc836fc2896adaa
61 Queue a draw on the old and new focus widgets, if their defaultness
62 (APPLIED)
63 - svn 13224 / git c943c3552a7a8f2aee2bad0d3d694b67c6c8e41c
64 Set the actions and suggested_action fields in the GdkDragContext to
65 (APPLIED)
66 - svn 13267 / git 406be320feec1adec2e5794150cb3eea351cb1fb
67 Connect to button-release-event as well, to handle touchscreen scenarios
68 (APPLIED)
69 - svn 13438 / git 5454441a8336a0f96a3999143903e394ce1498cd
70 Fix handling of Aiptek and Aiptek-like graphical tablets such as Trust on
71 (APPLIED)
72 - svn 13493 / git 91f2fb2d4d3b8f5474121a396c1b191938ad3887
73 don't iterate past the end of the string, so pango_layout_get_cursor_pos()
74 (APPLIED: fixes a glitch in GtkEntry)
75 - svn 13498 / git 24d63ffe74df3b5f5780c8c9a8058c341f26da93
76 Don't fail if we can't get a keyboard grab. (#168351)
77 (APPLIED)
78 - svn 13588 / git 1cabe720eb48eb0fd29421b4dcdf8c3f58eaf71e
79 Avoid spurious core pointer events when the tablet pen is lifted.
80 (APPLIED)
81 - svn 13738 / git bd80abab9f749698ad034aa2a3b313ac62344b9c
82 Backport from 2.8.
83 (APPLIED: fixes possible crash in GtkComboBox)
84 - svn 14261 / git 21b6ed0024a44054d99c4930914f4eb81dfdd05b
85 2.8.7
86 (PARTIALLY APPLIED: fixes two vulnerabilities in XPM loader)
87 - svn 14527 / git 3750d5da6b2dc7e104b9cc19f60b5724032e67c2
88 Get the invalidated region from ScrollWindowEx() instead of an incorrect
89 (APPLIED: fixes scrolling of partially covered windows)
90 - svn 15720 / git f93e5455e983144e133e18b5041aab29afc97360
91 [WM_WINDOWPOSCHANGED] Replace identical code as in
92 (APPLIED: prerequisite for svn 17834)
93 - svn 17096 / git 8d601fbde30fd28f9d9fc5e5ebc47cba5e56f351
94 New file. Downloaded from freedesktop.org's webcvs. Slighly edited cursors
95 (APPLIED: changes to several builtin cursors)
96 - svn 17299 / git ea7cc8d95eade637c67c5331a9f98863210ad8f1
97 Fix Win32 resize events and flickering
98 (APPLIED)
99 - svn 17615 / git f251591cf8d1d6c399485a4b0f95811e628e6b6f
100 Fix menuitem rendering in Vista
101 (BACKPORTED)
102 - svn 17645 / git 2cf71073edccd5a445a3baef5a158d85caf16520
103 Use native Win32 cursors where it makes sense
104 (APPLIED)
105 - svn 17834 / git 50af49319ad07682cd15913d264cb4a9570e1f8c
106 Fix context iterations for handle_configure_event()
107 (APPLIED)
108 - svn 20250 / git 710c9619b944e993f5402e04dc08846851b11f38
109 leak of GDI region in function 'handle_wm_paint'
110 (APPLIED)
111 - svn 20726 / git 0d0f9a7fc184db3ff8ce76e49256fee397de3d35
112 Windows' System Menu blocks main loop
113 (APPLIED)
114 - svn 20881 / git c8fef535b20ad75f82739f68fce2216c1d62f6ab
115 Repaint glitches in widgets
116 (APPLIED)
117 - svn 22511 / git 703a18c25fc4b1e8f06c4b9c8ea7cb74c06b3871
118 Can not resize shaped windows on Windows
119 (APPLIED)
120 - git 106ddae86d5ffd3409901c5f9772b1a01f84ad04
121 Emit changed and notify:text only once. The same fix was applied for
122 (BACKPORTED)
123
124 In addition, there are couple of my own patches, solving the build problems arising from use of then-recent MinGW on a Linux box (in GTK+ 2.6.x time, official Windows packages were built with MSVC on Windows).
125
126 And one my patch that fixes a critical bug afflicting the entire GTK+2 line for whole 20 years, causing random crashes on Windows; namely, mixing up GDI handles from CreateDIBSection() in gdk/win32/gdkpixmap-win32.c with HWND user handles from everywhere else, in one single hash. The two types of handles can clash, and when they do, GDK event dispatch is done for, with "invalid cast from `GdkPixmap' to `GdkWindow'" as its dying gasps. It managed to avoid my notice till now, accruing full benefit from my not using Windows; still, better late than never.
127
128 Patch from Pango tree:
129 - svn 2489 / git d686e1d4ae80b64390149e7336329c0254479161
130 On Windows store the default aliases file in a string array. (#492517)
131 (BACKPORTED: needed to handle 'pango.aliases' for Windows Vista & Windows 7)
132
133 ---------
134 The Build
135 ---------
136
137 The build was done on a Slackware Linux system using MinGW cross-compiler installation combined of the following parts:
138 - GCC 4.2.4 ( https://gcc.gnu.org/pub/gcc/releases/gcc-4.2.4/ )
139 - TDM patches to it ( https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Old%20Releases/TDM-GCC%204.2%20series/4.2.4-tdm-1/ )
140 - binutils 2.28 ( https://ftp.gnu.org/gnu/binutils/ )
141 - MinGW runtime 3.15.2 ( https://sourceforge.net/projects/mingw/files/OldFiles/mingwrt-3.15.2/ )
142 - Win32 API 3.13 ( https://sourceforge.net/projects/mingw/files/OldFiles/w32api-3.13/ )
143 And CMake 3.5.2 (for building OpenJPEG and zstd).
144
145 The reason for using those old MinGW packages specifically, besides maximal similarity with the build packaged with mtPaint 3.40, is retaining support for old Windows versions, in case it was removed from MinGW (or bitrotten there) sometime later.
146
147 To replicate it, you need the following source packages:
148 - GTK+ 2.6.7 (this specific version and no other):
149 gtk+-2.6.7.tar.bz2
150 https://download.gnome.org/sources/gtk+/2.6/gtk+-2.6.7.tar.bz2
151 - Wintab development package:
152 wtkit126.zip
153 https://web.archive.org/web/20070728143618/http://www.wacomeng.com/devsupport/downloads/pc/wtkit126.zip
154 - Pango 1.8.2 (this specific version and no other):
155 pango-1.8.2.tar.bz2
156 https://download.gnome.org/sources/pango/1.8/pango-1.8.2.tar.bz2
157 - ATK 1.9.0:
158 atk-1.9.0.tar.bz2
159 https://download.gnome.org/sources/atk/1.9/atk-1.9.0.tar.bz2
160 - GLib 2.6.6:
161 glib-2.6.6.tar.bz2
162 https://download.gnome.org/sources/glib/2.6/glib-2.6.6.tar.bz2
163 - GNU gettext 0.14.5:
164 gettext-0.14.5.tar.gz
165 https://ftp.gnu.org/pub/gnu/gettext/gettext-0.14.5.tar.gz
166 - GNU libiconv 1.9.2:
167 libiconv-1.9.2.tar.gz
168 https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.2.tar.gz
169 - zlib 1.2.11:
170 zlib-1.2.11.tar.gz
171 https://zlib.net/zlib-1.2.11.tar.gz
172 - XZ Utils 5.2.5:
173 xz-5.2.5.tar.gz
174 https://tukaani.org/xz/xz-5.2.5.tar.gz
175 - zstd 1.4.5:
176 zstd-1.4.5.tar.gz
177 https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz
178 - libpng 1.2.59 (not version 1.4+):
179 libpng-1.2.59.tar.gz
180 https://sourceforge.net/projects/libpng/files/libpng12/1.2.59/libpng-1.2.59.tar.gz/download
181 - libjpeg 9d:
182 jpegsrc.v9d.tar.gz
183 https://www.ijg.org/files/jpegsrc.v9d.tar.gz
184 - libwebp 1.1.0:
185 libwebp-1.1.0.tar.gz
186 https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.1.0.tar.gz
187 - LibTIFF 4.1.0:
188 tiff-4.1.0.tar.gz
189 https://download.osgeo.org/libtiff/tiff-4.1.0.tar.gz
190 - FreeType 2.10.4:
191 freetype-2.10.4.tar.xz
192 https://sourceforge.net/projects/freetype/files/freetype2/2.10.4/freetype-2.10.4.tar.xz/download
193 - OpenJPEG 2.4.0:
194 openjpeg-2.4.0.tar.gz
195 https://github.com/uclouvain/openjpeg/archive/v2.4.0.tar.gz
196 - Little CMS 2.11:
197 lcms2-2.11.tar.gz
198 https://sourceforge.net/projects/lcms/files/lcms/2.11/lcms2-2.11.tar.gz/download
199 - Gifsicle 1.92:
200 gifsicle-1.92.tar.gz
201 https://www.lcdf.org/gifsicle/gifsicle-1.92.tar.gz
202 - mtPaint 3.50 (or later):
203 mtpaint-3.50.tar.bz2
204 - mtPaint handbook 3.50 (same version as mtPaint):
205 mtpaint_handbook-3.50.zip
206
207 Also you need the following files from 'gtk' subdirectory of mtPaint source package:
208 winbuild.sh
209 gtk267_7wj.patch
210 gtkrc
211 pango182_1wj.patch
212 pango.aliases
213
214 To recreate the "etc/pango/pango.modules" and "etc/gtk-2.0/gdk-pixbuf.loaders" files, you additionally need a working install of Wine.
215
216 To do the build, put all requisite files into same directory, adjust the variables in "CONFIGURATION SETTINGS" section of 'winbuild.sh' if necessary, and run 'winbuild.sh'. Subdirectory 'zad' will be created for use in the build process; if the build succeeds, executables and runtime files will be placed under 'zad/pkg', and development libraries and headers, under 'zad/dev'.
217
218 An alternative cross-compiler installation using MXE http://mxe.cc :
219 git clone https://github.com/mxe/mxe.git
220 cd mxe && make gcc MXE_TARGETS=i686-w64-mingw32.shared
221
222 ---------------------------------
223 Copyright (C) 2010,2011,2017,2019,2020,2021 Dmitry Groshev