| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 3 |
<head> |
|---|
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
|---|
| 5 |
<title>OWB Notes</title> |
|---|
| 6 |
<style type="text/css"> |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
</style> |
|---|
| 18 |
</head> |
|---|
| 19 |
|
|---|
| 20 |
<body> |
|---|
| 21 |
<h1>OWB Notes</h1> |
|---|
| 22 |
<h2>Basic info</h2> |
|---|
| 23 |
<ul> |
|---|
| 24 |
<li>http://www.sand-labs.org/owb/</li> |
|---|
| 25 |
<li>OWB is a distribution of the WebKit browser source code.</li> |
|---|
| 26 |
<li>To sync the development OWB (e.g. "Doduo"), use the cygwin command: |
|---|
| 27 |
<ul> |
|---|
| 28 |
<li>svn co http://www.sand-labs.org/svn/branches/Doduo /cygdrive/d/development/internet/owb/Doduo_owb</li> |
|---|
| 29 |
</ul> |
|---|
| 30 |
</li> |
|---|
| 31 |
<li>Release Doduo: </li> |
|---|
| 32 |
<ul> |
|---|
| 33 |
<li>svn co http://www.sand-labs.org/svn/tags/Doduo /cygdrive/d/development/internet/owb/Doduo_owb</li> |
|---|
| 34 |
</ul> |
|---|
| 35 |
</ul> |
|---|
| 36 |
<h2>OWB CMake build configuration parameters (not C++ #define parameters) </h2> |
|---|
| 37 |
<blockquote> |
|---|
| 38 |
<table border="1"> |
|---|
| 39 |
<tr> |
|---|
| 40 |
<th valign="top" scope="col">Pameter</th> |
|---|
| 41 |
<th scope="col">Options</th> |
|---|
| 42 |
<th scope="col">Meaning</th> |
|---|
| 43 |
</tr> |
|---|
| 44 |
<tr> |
|---|
| 45 |
<td valign="top">OWBAL_PLATFORM_GRAPHICS</td> |
|---|
| 46 |
<td>GTK<br /> |
|---|
| 47 |
SDL</td> |
|---|
| 48 |
<td> </td> |
|---|
| 49 |
</tr> |
|---|
| 50 |
<tr> |
|---|
| 51 |
<td valign="top">OWBAL_BENCH_LOAD_TIME</td> |
|---|
| 52 |
<td>OFF<br /> |
|---|
| 53 |
ON</td> |
|---|
| 54 |
<td> </td> |
|---|
| 55 |
</tr> |
|---|
| 56 |
<tr> |
|---|
| 57 |
<td valign="top">OWB_FAILSAFE_WITHOUT_DEEPSEE</td> |
|---|
| 58 |
<td>OFF<br /> |
|---|
| 59 |
ON</td> |
|---|
| 60 |
<td> </td> |
|---|
| 61 |
</tr> |
|---|
| 62 |
<tr> |
|---|
| 63 |
<td valign="top">OWBAL_PLATFORM_MACPORT</td> |
|---|
| 64 |
<td>OFF<br /> |
|---|
| 65 |
ON</td> |
|---|
| 66 |
<td>Generates compile option of __OWBAL_PLATFORM_MACPORT__</td> |
|---|
| 67 |
</tr> |
|---|
| 68 |
<tr> |
|---|
| 69 |
<td valign="top">OWBAL_PLATFORM_WIN32PORT</td> |
|---|
| 70 |
<td>OFF<br /> |
|---|
| 71 |
ON</td> |
|---|
| 72 |
<td>Generates compile option of __OWBAL_PLATFORM_WIN32PORT__</td> |
|---|
| 73 |
</tr> |
|---|
| 74 |
<tr> |
|---|
| 75 |
<td valign="top"> </td> |
|---|
| 76 |
<td> </td> |
|---|
| 77 |
<td> </td> |
|---|
| 78 |
</tr> |
|---|
| 79 |
<tr> |
|---|
| 80 |
<td valign="top">WEBKIT_DEBUG</td> |
|---|
| 81 |
<td><p>DEBUG<br /> |
|---|
| 82 |
DEBUG_GCC3.X<br /> |
|---|
| 83 |
RELEASE</p></td> |
|---|
| 84 |
<td> </td> |
|---|
| 85 |
</tr> |
|---|
| 86 |
<tr> |
|---|
| 87 |
<td valign="top">WEBKIT_USE_ACCESSIBILITY</td> |
|---|
| 88 |
<td>OFF<br /> |
|---|
| 89 |
ON</td> |
|---|
| 90 |
<td> </td> |
|---|
| 91 |
</tr> |
|---|
| 92 |
<tr> |
|---|
| 93 |
<td valign="top">WEBKIT_USE_CC_EXCEPTIONS</td> |
|---|
| 94 |
<td>OFF<br /> |
|---|
| 95 |
ON</td> |
|---|
| 96 |
<td> </td> |
|---|
| 97 |
</tr> |
|---|
| 98 |
<tr> |
|---|
| 99 |
<td valign="top">WEBKIT_USE_CC_PIC</td> |
|---|
| 100 |
<td>OFF<br /> |
|---|
| 101 |
ON</td> |
|---|
| 102 |
<td> </td> |
|---|
| 103 |
</tr> |
|---|
| 104 |
<tr> |
|---|
| 105 |
<td valign="top">WEBKIT_USE_CC_RTTI</td> |
|---|
| 106 |
<td>OFF<br /> |
|---|
| 107 |
ON</td> |
|---|
| 108 |
<td> </td> |
|---|
| 109 |
</tr> |
|---|
| 110 |
<tr> |
|---|
| 111 |
<td valign="top">WEBKIT_USE_CROSS_DOCUMENT_MESSAGING</td> |
|---|
| 112 |
<td>OFF<br /> |
|---|
| 113 |
ON</td> |
|---|
| 114 |
<td> </td> |
|---|
| 115 |
</tr> |
|---|
| 116 |
<tr> |
|---|
| 117 |
<td valign="top">WEBKIT_USE_DASHBOARD</td> |
|---|
| 118 |
<td>OFF<br /> |
|---|
| 119 |
ON</td> |
|---|
| 120 |
<td> </td> |
|---|
| 121 |
</tr> |
|---|
| 122 |
<tr> |
|---|
| 123 |
<td valign="top">WEBKIT_USE_DATABASE</td> |
|---|
| 124 |
<td>OFF<br /> |
|---|
| 125 |
ON</td> |
|---|
| 126 |
<td> </td> |
|---|
| 127 |
</tr> |
|---|
| 128 |
<tr> |
|---|
| 129 |
<td valign="top">WEBKIT_USE_DOM_STORAGE</td> |
|---|
| 130 |
<td>OFF<br /> |
|---|
| 131 |
ON</td> |
|---|
| 132 |
<td> </td> |
|---|
| 133 |
</tr> |
|---|
| 134 |
<tr> |
|---|
| 135 |
<td valign="top">WEBKIT_USE_FILESYSTEM</td> |
|---|
| 136 |
<td>GTK<br /> |
|---|
| 137 |
POSIX</td> |
|---|
| 138 |
<td> </td> |
|---|
| 139 |
</tr> |
|---|
| 140 |
<tr> |
|---|
| 141 |
<td valign="top">WEBKIT_USE_FONTS</td> |
|---|
| 142 |
<td>GTK<br /> |
|---|
| 143 |
FREETYPE<br /> |
|---|
| 144 |
EMBEDDED</td> |
|---|
| 145 |
<td> </td> |
|---|
| 146 |
</tr> |
|---|
| 147 |
<tr> |
|---|
| 148 |
<td valign="top">WEBKIT_USE_HTML5_VIDEO</td> |
|---|
| 149 |
<td>OFF<br /> |
|---|
| 150 |
ON</td> |
|---|
| 151 |
<td> </td> |
|---|
| 152 |
</tr> |
|---|
| 153 |
<tr> |
|---|
| 154 |
<td valign="top">WEBKIT_USE_I18N</td> |
|---|
| 155 |
<td><p>ICU<br /> |
|---|
| 156 |
GENERIC</p> |
|---|
| 157 |
</td> |
|---|
| 158 |
<td> </td> |
|---|
| 159 |
</tr> |
|---|
| 160 |
<tr> |
|---|
| 161 |
<td valign="top">WEBKIT_USE_NPAPI</td> |
|---|
| 162 |
<td>OFF<br /> |
|---|
| 163 |
ON</td> |
|---|
| 164 |
<td> </td> |
|---|
| 165 |
</tr> |
|---|
| 166 |
<tr> |
|---|
| 167 |
<td valign="top">WEBKIT_USE_SVG</td> |
|---|
| 168 |
<td>OFF<br /> |
|---|
| 169 |
ON</td> |
|---|
| 170 |
<td> </td> |
|---|
| 171 |
</tr> |
|---|
| 172 |
<tr> |
|---|
| 173 |
<td valign="top">WEBKIT_USE_SYSTEMTIME</td> |
|---|
| 174 |
<td>GTK<br /> |
|---|
| 175 |
LINUX</td> |
|---|
| 176 |
<td> </td> |
|---|
| 177 |
</tr> |
|---|
| 178 |
<tr> |
|---|
| 179 |
<td valign="top">WEBKIT_USE_THREADING</td> |
|---|
| 180 |
<td>GTK<br /> |
|---|
| 181 |
PTHREADS<br /> |
|---|
| 182 |
NONE</td> |
|---|
| 183 |
<td> </td> |
|---|
| 184 |
</tr> |
|---|
| 185 |
<tr> |
|---|
| 186 |
<td valign="top">WEBKIT_USE_UCLIBC</td> |
|---|
| 187 |
<td>OFF<br /> |
|---|
| 188 |
ON</td> |
|---|
| 189 |
<td>Link OWB with uClibc instead of glibc.<br /> |
|---|
| 190 |
Generates compile option of __OWB_UCLIBC__</td> |
|---|
| 191 |
</tr> |
|---|
| 192 |
<tr> |
|---|
| 193 |
<td valign="top">WEBKIT_OFFLINE_WEB_APPLICATIONS</td> |
|---|
| 194 |
<td>OFF<br /> |
|---|
| 195 |
ON</td> |
|---|
| 196 |
<td> </td> |
|---|
| 197 |
</tr> |
|---|
| 198 |
</table> |
|---|
| 199 |
</blockquote> |
|---|
| 200 |
<h2>Webkit configurable compile parameters (C++ #defines) </h2> |
|---|
| 201 |
<blockquote> |
|---|
| 202 |
<table border="1"> |
|---|
| 203 |
<tr> |
|---|
| 204 |
<th valign="top" scope="col">Pameter</th> |
|---|
| 205 |
<th scope="col">Options</th> |
|---|
| 206 |
<th scope="col">Meaning</th> |
|---|
| 207 |
</tr> |
|---|
| 208 |
<tr> |
|---|
| 209 |
<td valign="top">WTF_USE_CFNETWORK</td> |
|---|
| 210 |
<td>0 or 1 </td> |
|---|
| 211 |
<td> </td> |
|---|
| 212 |
</tr> |
|---|
| 213 |
<tr> |
|---|
| 214 |
<td valign="top"><p>WTF_USE_CURL</p></td> |
|---|
| 215 |
<td>0 or 1</td> |
|---|
| 216 |
<td> </td> |
|---|
| 217 |
</tr> |
|---|
| 218 |
<tr> |
|---|
| 219 |
<td valign="top"><p>WTF_USE_ICU_UNICODE</p></td> |
|---|
| 220 |
<td>0 or 1</td> |
|---|
| 221 |
<td> </td> |
|---|
| 222 |
</tr> |
|---|
| 223 |
<tr> |
|---|
| 224 |
<td valign="top"><p>WTF_USE_JAVASCRIPTCORE_BINDINGS</p></td> |
|---|
| 225 |
<td>0 or 1</td> |
|---|
| 226 |
<td> </td> |
|---|
| 227 |
</tr> |
|---|
| 228 |
<tr> |
|---|
| 229 |
<td valign="top"><p>WTF_USE_LOCKFREE_THREADSAFESHARED</p></td> |
|---|
| 230 |
<td>0 or 1</td> |
|---|
| 231 |
<td> </td> |
|---|
| 232 |
</tr> |
|---|
| 233 |
<tr> |
|---|
| 234 |
<td valign="top"><p>WTF_USE_MULTIPLE_THREADS</p></td> |
|---|
| 235 |
<td>0 or 1</td> |
|---|
| 236 |
<td> </td> |
|---|
| 237 |
</tr> |
|---|
| 238 |
<tr> |
|---|
| 239 |
<td valign="top"><p>WTF_USE_PTHREADS</p></td> |
|---|
| 240 |
<td>0 or 1</td> |
|---|
| 241 |
<td> </td> |
|---|
| 242 |
</tr> |
|---|
| 243 |
<tr> |
|---|
| 244 |
<td valign="top"><p>WTF_USE_QT4_UNICODE</p></td> |
|---|
| 245 |
<td>0 or 1</td> |
|---|
| 246 |
<td> </td> |
|---|
| 247 |
</tr> |
|---|
| 248 |
<tr> |
|---|
| 249 |
<td valign="top"><p>WTF_USE_SYMBIAN_UNICODE</p></td> |
|---|
| 250 |
<td>0 or 1</td> |
|---|
| 251 |
<td> </td> |
|---|
| 252 |
</tr> |
|---|
| 253 |
<tr> |
|---|
| 254 |
<td valign="top">WTF_USE_WININET</td> |
|---|
| 255 |
<td>0 or 1</td> |
|---|
| 256 |
<td> </td> |
|---|
| 257 |
</tr> |
|---|
| 258 |
</table> |
|---|
| 259 |
</blockquote> |
|---|
| 260 |
<h2>Need to provide some external packages yourself, at least on Windows</h2> |
|---|
| 261 |
<ul> |
|---|
| 262 |
<li>Some of these are listed in the old OWB for Win32 document, but the latest OWB requires some more.</li> |
|---|
| 263 |
<li>ICU, SDL, SDL_gfx, ZLib, fontconfig, pthread, freetype, curl, iconv, libxml, xslt, libpng, libjpeg.</li> |
|---|
| 264 |
</ul> |
|---|
| 265 |
<h2>General CMake script observations</h2> |
|---|
| 266 |
<ul> |
|---|
| 267 |
<li>The CMake scripts would IMO be a little easier to read if CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS was used.</li> |
|---|
| 268 |
<li>Most or all the scripts need to have this added to them: |
|---|
| 269 |
<ul> |
|---|
| 270 |
<li><span class="mono">IF (OWBAL_PLATFORM_WIN32PORT)<br /> |
|---|
| 271 |
INCLUDE_DIRECTORIES (<br /> |
|---|
| 272 |
${CMAKE_SOURCE_DIR}/JavaScriptCore/os-win32<br /> |
|---|
| 273 |
${PTHREAD_INCLUDE_DIRS}<br /> |
|---|
| 274 |
${ICU_INCLUDE_DIRS}<br /> |
|---|
| 275 |
${ICONV_INCLUDE_DIRS}<br /> |
|---|
| 276 |
)<br /> |
|---|
| 277 |
ENDIF (OWBAL_PLATFORM_WIN32PORT)</span></li> |
|---|
| 278 |
</ul> |
|---|
| 279 |
</li> |
|---|
| 280 |
</ul> |
|---|
| 281 |
<h2>Using OWB with CMake</h2> |
|---|
| 282 |
<p>All code below in <span class="style3">blue</span> is code/declarations that are changed, added or could be added.</p> |
|---|
| 283 |
<ul> |
|---|
| 284 |
<li>Modified WebKit config.h to allow the user to set parameters instead of forcing them: |
|---|
| 285 |
<ul> |
|---|
| 286 |
<li><span class="mono">#if PLATFORM(WIN)<br /> |
|---|
| 287 |
</span><span class="addedCode">#ifndef WTF_USE_JAVASCRIPTCORE_BINDINGS</span><span class="mono"><br /> |
|---|
| 288 |
#define WTF_USE_JAVASCRIPTCORE_BINDINGS 1<br /> |
|---|
| 289 |
#endif<br /> |
|---|
| 290 |
</span><span class="addedCode">#ifndef WTF_PLATFORM_CG</span><span class="mono"><br /> |
|---|
| 291 |
#define WTF_PLATFORM_CG 1<br /> |
|---|
| 292 |
#endif<br /> |
|---|
| 293 |
#undef WTF_PLATFORM_CAIRO<br /> |
|---|
| 294 |
</span><span class="addedCode">#ifndef WTF_USE_CFNETWORK</span><span class="mono"><br /> |
|---|
| 295 |
#define WTF_USE_CFNETWORK 1<br /> |
|---|
| 296 |
#endif<br /> |
|---|
| 297 |
#undef WTF_USE_WININET<br /> |
|---|
| 298 |
</span><span class="addedCode">#ifndef WTF_PLATFORM_CF</span><span class="mono"><br /> |
|---|
| 299 |
#define WTF_PLATFORM_CF 1<br /> |
|---|
| 300 |
#endif<br /> |
|---|
| 301 |
</span><span class="addedCode">#ifndef WTF_USE_PTHREADS</span><span class="mono"><br /> |
|---|
| 302 |
#define WTF_USE_PTHREADS 0<br /> |
|---|
| 303 |
#endif<br /> |
|---|
| 304 |
#endif</span><br /> |
|---|
| 305 |
</li> |
|---|
| 306 |
</ul> |
|---|
| 307 |
</li> |
|---|
| 308 |
<li>Added support for the concept of Win32 port to the root CMakeLists.txt via some changes: |
|---|
| 309 |
<ul> |
|---|
| 310 |
<li class="addedCode"># Global switch for OWBAL support for Windows port<br /> |
|---|
| 311 |
OPTION (OWBAL_PLATFORM_WIN32PORT "OWBAL support for Win32 port" OFF)<br /> |
|---|
| 312 |
</li> |
|---|
| 313 |
<li class="addedCode">IF (OWBAL_PLATFORM_WIN32PORT)<br /> |
|---|
| 314 |
ADD_DEFINITIONS (-D__OWBAL_PLATFORM_WIN32PORT__=1)<br /> |
|---|
| 315 |
ADD_DEFINITIONS (-DWTF_PLATFORM_CG=0)<br /> |
|---|
| 316 |
ADD_DEFINITIONS (-DWTF_PLATFORM_CF=0)<br /> |
|---|
| 317 |
ADD_DEFINITIONS (-DWTF_USE_CFNETWORK=0)<br /> |
|---|
| 318 |
ENDIF (OWBAL_PLATFORM_WIN32PORT)</li> |
|---|
| 319 |
<li>It may be useful to instead simply define an option which is the platform, as opposed to defining a Mac or Windows 'port': |
|---|
| 320 |
<ul> |
|---|
| 321 |
<li class="mono">SET (OWBAL_PLATFORM "LINUX" CACHE STRING "Target platform . (LINUX/MAC/WIN32)")</li> |
|---|
| 322 |
</ul> |
|---|
| 323 |
</li> |
|---|
| 324 |
<li>Implemented this: |
|---|
| 325 |
<ul> |
|---|
| 326 |
<li class="mono"><span class="addedCode"># Would be best if we had a universal platform definition (linux, Mac, Win32, etc.) instead of 'port'.<br /> |
|---|
| 327 |
IF (NOT OWBAL_PLATFORM_WIN32PORT AND NOT OWBAL_PLATFORM_MACPORT)<br /> |
|---|
| 328 |
</span> ADD_DEFINITIONS (-DLINUX)<br /> |
|---|
| 329 |
ENDIF (NOT OWBAL_PLATFORM_WIN32PORT AND NOT OWBAL_PLATFORM_MACPORT)</li> |
|---|
| 330 |
</ul> |
|---|
| 331 |
</li> |
|---|
| 332 |
<li>Implemented this:</li> |
|---|
| 333 |
<ul> |
|---|
| 334 |
<li class="mono"><span class="addedCode">IF (NOT OWBAL_PLATFORM_WIN32PORT)</span><br /> |
|---|
| 335 |
ADD_DEFINITIONS (-DHAVE_MMAP=1)<br /> |
|---|
| 336 |
ENDIF (NOT OWBAL_PLATFORM_WIN32PORT) |
|---|
| 337 |
</li> |
|---|
| 338 |
</ul> |
|---|
| 339 |
</ul> |
|---|
| 340 |
</li> |
|---|
| 341 |
<li>The OWB CMake files have a consistency bug: |
|---|
| 342 |
<ul> |
|---|
| 343 |
<li>They use XXX_LIBRARIES in all cases (e.g. PNG12_LIBRARIES) except JPEG_LIBRARIES. In this case JPEG_LIBRARY is used. </li> |
|---|
| 344 |
<li>IMO JPEG_LIBRARY usage should be changed to JPEG_LIBRARIES.</li> |
|---|
| 345 |
</ul> |
|---|
| 346 |
</li> |
|---|
| 347 |
<li>Probably want to add Win32 to the following: |
|---|
| 348 |
<ul> |
|---|
| 349 |
<li class="mono">SET (WEBKIT_USE_FILESYSTEM "GTK" CACHE STRING "FileSystem support. (GTK/POSIX<span class="addedCode">/WIN32</span>)")<br /> |
|---|
| 350 |
SET (WEBKIT_USE_SYSTEMTIME "LINUX" CACHE STRING "SystemTime support. (GTK/LINUX<span class="addedCode">/WIN32</span>)")<br /> |
|---|
| 351 |
SET (WEBKIT_USE_THREADING "GTK" CACHE STRING "Threading support. (GTK/PTHREADS<span class="addedCode">/WIN32</span>/NONE)")</li> |
|---|
| 352 |
</ul> |
|---|
| 353 |
</li> |
|---|
| 354 |
<li>CMake 2.6 requires the following be added early to the CMake scripts: |
|---|
| 355 |
<ul> |
|---|
| 356 |
<li><span class="addedCode"># Need to tell CMake how to handle searched library directories.<br /> |
|---|
| 357 |
IF (COMMAND cmake_policy)<br /> |
|---|
| 358 |
cmake_policy(SET CMP0003 NEW)<br /> |
|---|
| 359 |
ENDIF(COMMAND cmake_policy)</span> |
|---|
| 360 |
</li> |
|---|
| 361 |
</ul> |
|---|
| 362 |
</li> |
|---|
| 363 |
<li>BAL/Base/wtf/Platform.h, added the following: |
|---|
| 364 |
<ul> |
|---|
| 365 |
<li class="mono">#elif PLATFORM(WIN_OS)<span class="addedCode"> && !defined(__OWBAL_PLATFORM_WIN32PORT__)</span><br /> |
|---|
| 366 |
#define WTF_PLATFORM_WIN 1</li> |
|---|
| 367 |
<li>Actually it would be best if the code was like this: |
|---|
| 368 |
<ul> |
|---|
| 369 |
<li class="mono">#elif defined(BUILDING_WX__) <span class="addedCode">&& !defined(WTF_PLATFORM_WX)</span> <br /> |
|---|
| 370 |
#define WTF_PLATFORM_WX 1<br /> |
|---|
| 371 |
#elif defined(BUILDING_GTK__)<span class="addedCode"> && !defined(WTF_PLATFORM_WIN)</span> <br /> |
|---|
| 372 |
#define WTF_PLATFORM_GTK 1<br /> |
|---|
| 373 |
#elif PLATFORM(DARWIN)<span class="addedCode"> && !defined(WTF_PLATFORM_MAC)</span> && !defined(__OWBAL_PLATFORM_MACPORT__)<br /> |
|---|
| 374 |
#define WTF_PLATFORM_MAC 1<br /> |
|---|
| 375 |
#elif PLATFORM(WIN_OS)<span class="addedCode"> && !defined(WTF_PLATFORM_WIN</span>) && !defined(__OWBAL_PLATFORM_WIN32PORT__)<br /> |
|---|
| 376 |
#define WTF_PLATFORM_WIN 1<br /> |
|---|
| 377 |
#endif</li> |
|---|
| 378 |
</ul> |
|---|
| 379 |
</li> |
|---|
| 380 |
</ul> |
|---|
| 381 |
</li> |
|---|
| 382 |
<li> This is my Windows CMake invokation, many parameters of which are for all practical purposes required on Windows: |
|---|
| 383 |
<ul> |
|---|
| 384 |
<li class="mono">"C:\Program Files (x86)\CMake 2.6\bin\cmake" -G "Visual Studio 8 2005" c:\doduo\CMakeLists.txt -Wno-dev</li> |
|---|
| 385 |
<li>With the following relevant config entries in the CMakeListsCustomer.txt file: |
|---|
| 386 |
<ul> |
|---|
| 387 |
<li><span class="mono">SET(BUILD_SHARED_LIBS OFF)<br /> |
|---|
| 388 |
SET(WEBKIT_USE_DASHBOARD OFF)<br /> |
|---|
| 389 |
SET(WEBKIT_USE_FILESYSTEM "POSIX")<br /> |
|---|
| 390 |
SET(WEBKIT_USE_THREADING "PTHREADS")<br /> |
|---|
| 391 |
SET(WEBKIT_USE_ACCESSIBILITY OFF)<br /> |
|---|
| 392 |
SET(WEBKIT_USE_FONTS "EMBEDDED")<br /> |
|---|
| 393 |
SET(WEBKIT_USE_DATABASE OFF)<br /> |
|---|
| 394 |
SET(WEBKIT_USE_DOM_STORAGE OFF)<br /> |
|---|
| 395 |
SET(WEBKIT_OFFLINE_WEB_APPLICATIONS OFF)<br /> |
|---|
| 396 |
SET(WEBKIT_USE_HTML5_VIDEO OFF)<br /> |
|---|
| 397 |
SET(WEBKIT_USE_I18N "GENERIC")<br /> |
|---|
| 398 |
SET(WEBKIT_USE_NPAPI OFF)<br /> |
|---|
| 399 |
SET(WEBKIT_USE_SVG OFF)<br /> |
|---|
| 400 |
SET(WEBKIT_USE_CC_PIC OFF)<br /> |
|---|
| 401 |
SET(OWBAL_PLATFORM_WIN32PORT ON)<br /> |
|---|
| 402 |
SET(OWBAL_PLATFORM_GRAPHICS "SDL")<br /> |
|---|
| 403 |
SET(COMPILE_TESTS OFF)</span></li> |
|---|
| 404 |
</ul> |
|---|
| 405 |
</li> |
|---|
| 406 |
</ul> |
|---|
| 407 |
</li> |
|---|
| 408 |
<li>This is my VC++ build invocation: |
|---|
| 409 |
<ul> |
|---|
| 410 |
<li class="mono">devenv "D:\Development\Internet\OWB\doduo\WebKit.sln" /build "Debug"</li> |
|---|
| 411 |
<li>Or the following to build just a sub-project:<span class="mono"><br /> |
|---|
| 412 |
devenv "D:\Development\Internet\OWB\doduo\WebKit.sln" /build "Debug" /project "generated-sources"</span></li> |
|---|
| 413 |
</ul> |
|---|
| 414 |
</li> |
|---|
| 415 |
<li>Running CMake results in some warnings that may be due to the OWB code not being ready for the latest version of CMake. |
|---|
| 416 |
<ul> |
|---|
| 417 |
<li class="mono"><span class="highlightedError">CMake Warning (dev) at CMakeLists_deepseeProject.txt:43 (ADD_DEFINITIONS)</span>:<br /> |
|---|
| 418 |
Policy CMP0005 is not set: Preprocessor definition values are now escaped<br /> |
|---|
| 419 |
automatically. Run "cmake --help-policy CMP0005" for policy details. Use<br /> |
|---|
| 420 |
the cmake_policy command to set the policy and suppress this warning.<br /> |
|---|
| 421 |
Call Stack (most recent call first):<br /> |
|---|
| 422 |
CMakeLists.txt:401 (INCLUDE)<br /> |
|---|
| 423 |
This warning is for project developers. Use -Wno-dev to suppress it.<br /> |
|---|
| 424 |
<br /> |
|---|
| 425 |
<span class="highlightedError">CMake Warning (dev) at JavaScriptCore/CMakeLists.txt:35 (ADD_LIBRARY)</span>:<br /> |
|---|
| 426 |
Policy CMP0002 is not set: Logical target names must be globally unique.<br /> |
|---|
| 427 |
Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy<br /> |
|---|
| 428 |
command to set the policy and suppress this warning.<br /> |
|---|
| 429 |
This warning is for project developers. Use -Wno-dev to suppress it.<br /> |
|---|
| 430 |
<br /> |
|---|
| 431 |
<span class="highlightedError">CMake Warning (dev) at BAL/OWBAL/Tests/CMakeLists.txt:65 (ADD_EXECUTABLE)</span>:<br /> |
|---|
| 432 |
Policy CMP0003 should be set before this line. Add code such as<br /> |
|---|
| 433 |
if(COMMAND cmake_policy)<br /> |
|---|
| 434 |
cmake_policy(SET CMP0003 NEW)<br /> |
|---|
| 435 |
endif(COMMAND cmake_policy)<br /> |
|---|
| 436 |
as early as possible but after the most recent call to<br /> |
|---|
| 437 |
cmake_minimum_required or cmake_policy(VERSION). This warning appears<br /> |
|---|
| 438 |
because target "runOwbalTests" links to some libraries for which the linker<br /> |
|---|
| 439 |
must search:<br /> |
|---|
| 440 |
-lxslt, -lz, -lm, -lxml2, png12, z, -ljpeg, cppunit, dl, pthread<br /> |
|---|
| 441 |
-lSDL_gfx<br /> |
|---|
| 442 |
and other libraries with known full path:<br /> |
|---|
| 443 |
D:/Development/Internet/OWB/Doduo_owb/lib/Debug/generated-sources.lib<br /> |
|---|
| 444 |
D:\Development\Internet\OWB\Doduo_owb\WebkitExternalSupport\libxslt-1.1.23+.win32\lib\libxslt.lib<br /> |
|---|
| 445 |
CMake is adding directories in the second list to the linker search path in<br /> |
|---|
| 446 |
case they are needed to find libraries from the first list (for backwards<br /> |
|---|
| 447 |
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable<br /> |
|---|
| 448 |
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for<br /> |
|---|
| 449 |
more information.<br /> |
|---|
| 450 |
This warning is for project developers. Use -Wno-dev to suppress it.</li> |
|---|
| 451 |
</ul> |
|---|
| 452 |
</li> |
|---|
| 453 |
<li>Packages specified like so in CMakeLists.txt cannot be found in Windows: |
|---|
| 454 |
<ul> |
|---|
| 455 |
<li class="mono">PKG_CHECK_MODULES (XML2 REQUIRED libxml-2.0)<br /> |
|---|
| 456 |
PKG_CHECK_MODULES (SDL REQUIRED sdl)<br /> |
|---|
| 457 |
etc.</li> |
|---|
| 458 |
<li>I have temporarily worked around this by adding the following to my CMakeLists and CMakeListsCustomer.txt, respectively: |
|---|
| 459 |
<ul> |
|---|
| 460 |
<li class="mono"><span class="addedCode">IF (NOT OWBAL_PLATFORM_WIN32PORT)</span><br /> |
|---|
| 461 |
PKG_CHECK_MODULES (XML2 REQUIRED libxml-2.0)<br /> |
|---|
| 462 |
ENDIF (NOT OWBAL_PLATFORM_WIN32PORT)<br /> |
|---|
| 463 |
</li> |
|---|
| 464 |
<li class="addedCode"> SET (XML2_FOUND TRUE)<br /> |
|---|
| 465 |
SET (XML2_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}\\WebkitExternalSupport\\libxml2-2.6.32+.win32\\include")<br /> |
|---|
| 466 |
SET (XML2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}\\WebkitExternalSupport\\libxml2-2.6.32+.win32\\include")<br /> |
|---|
| 467 |
SET (XML2_LIBRARIES "${CMAKE_SOURCE_DIR}\\WebkitExternalSupport\\libxml2-2.6.32+.win32\\lib\\libxml2.lib")<br /> |
|---|
| 468 |
SET (XML2_LIBRARY_DIRS "${CMAKE_SOURCE_DIR}\\WebkitExternalSupport\\libxml2-2.6.32+.win32\\lib")<br /> |
|---|
| 469 |
SET (XML2_VERSION "2.6.32")</li> |
|---|
| 470 |
</ul> |
|---|
| 471 |
</li> |
|---|
| 472 |
<li>I hope there is a better way to solve this. One solution that is not good for us is one that involves looking in a registry or some location that requires the given package to be manually installed by the user. We have a policy that users aren't required to install anything in order to build; all they should have to do is sync. This is because when you ask 1000 users across your company multiple times a year to manually install packages in order to build then you become unpopular. So for the time being, a known location relative to the root works OK. </li> |
|---|
| 473 |
</ul> |
|---|
| 474 |
</li> |
|---|
| 475 |
<li>Need to make usage of the GCC "-include" parameter portable to VC++: |
|---|
| 476 |
<ul> |
|---|
| 477 |
<li>For example, this works on GCC but not other compilers: |
|---|
| 478 |
<ul> |
|---|
| 479 |
<li><span class="mono">ADD_DEFINITIONS (-include ${CMAKE_SOURCE_DIR}/BAL/Base/config.h) </span> </li> |
|---|
| 480 |
</ul> |
|---|
| 481 |
</li> |
|---|
| 482 |
<li>To allow this to work with VC++, we want to use the following: |
|---|
| 483 |
<ul> |
|---|
| 484 |
<li class="mono"><span class="addedCode">IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 485 |
ADD_DEFINITIONS (/FI ${CMAKE_SOURCE_DIR}/BAL/Base/config.h)<br /> |
|---|
| 486 |
</span>ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 487 |
ADD_DEFINITIONS (-include ${CMAKE_SOURCE_DIR}/BAL/Base/config.h)<br /> |
|---|
| 488 |
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")</li> |
|---|
| 489 |
</ul> |
|---|
| 490 |
</li> |
|---|
| 491 |
<li> The following CMake files need the above change: |
|---|
| 492 |
<ul> |
|---|
| 493 |
<li>GeneratedSources\CMakeLists.txt (two instances)</li> |
|---|
| 494 |
<li>WebCore\CMakeLists.txt</li> |
|---|
| 495 |
<li>WebKit\gtk\CMakeLists.txt</li> |
|---|
| 496 |
<li>WebKit\OrigynWebBrowser\CMakeLists.txt</li> |
|---|
| 497 |
</ul> |
|---|
| 498 |
</li> |
|---|
| 499 |
</ul> |
|---|
| 500 |
</li> |
|---|
| 501 |
<li>Made the root CMakeLists.txt CC_EXCEPTIONS and CC_RTTI options portable to VC++: |
|---|
| 502 |
<ul> |
|---|
| 503 |
<li class="mono">IF (NOT WEBKIT_USE_CC_EXCEPTIONS)<br /> |
|---|
| 504 |
<span class="addedCode"> IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 505 |
# We have a problem: CMake has no known means to disable exception handling. Does this work?<br /> |
|---|
| 506 |
ADD_DEFINITIONS (/EHs-)</span><br /> |
|---|
| 507 |
ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 508 |
ADD_DEFINITIONS (-fno-exceptions)<br /> |
|---|
| 509 |
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 510 |
ENDIF (NOT WEBKIT_USE_CC_EXCEPTIONS) |
|---|
| 511 |
</li> |
|---|
| 512 |
</ul> |
|---|
| 513 |
<blockquote> |
|---|
| 514 |
<p class="mono">IF (NOT WEBKIT_USE_CC_RTTI)<br /> |
|---|
| 515 |
<span class="addedCode"> IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 516 |
ADD_DEFINITIONS (/GR-)</span><br /> |
|---|
| 517 |
ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 518 |
ADD_DEFINITIONS (-fno-rtti)<br /> |
|---|
| 519 |
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")<br /> |
|---|
| 520 |
ENDIF (NOT WEBKIT_USE_CC_RTTI)</p> |
|---|
| 521 |
</blockquote> |
|---|
| 522 |
</li> |
|---|
| 523 |
<li>Made the root CMakeLists.txt debug definitions section portable to VC++: |
|---|
| 524 |
<ul> |
|---|
| 525 |
<li class="mono">IF (${WEBKIT_DEBUG} MATCHES "^DEBUG*")<br /> |
|---|
| 526 |
ADD_DEFINITIONS (-DENABLE_FTPDIR=1)<br /> |
|---|
| 527 |
ADD_DEFINITIONS (-DDEBUG_LAYOUTTEST)<br /> |
|---|
| 528 |
ADD_DEFINITIONS (-DBAL_LOG)<br /> |
|---|
| 529 |
<span class="addedCode">IF (NOT CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")</span><br /> |
|---|
| 530 |
ADD_DEFINITIONS (-W)<br /> |
|---|
| 531 |
ADD_DEFINITIONS (-Wall)<br /> |
|---|
| 532 |
ADD_DEFINITIONS (-g)<br /> |
|---|
| 533 |
ADD_DEFINITIONS (-Wno-unused-parameter)<br /> |
|---|
| 534 |
ADD_DEFINITIONS (-Wno-unused-variable)<br /> |
|---|
| 535 |
<span class="style3">ENDIF (NOT CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")</span><br /> |
|---|
| 536 |
ENDIF (${WEBKIT_DEBUG} MATCHES "^DEBUG*")</li> |
|---|
| 537 |
</ul> |
|---|
| 538 |
</li> |
|---|
| 539 |
<li>Need to add this change to the root CMakeLists.txt file: |
|---|
| 540 |
<ul> |
|---|
| 541 |
<li class="mono">IF (NOT OWBAL_PLATFORM_MACPORT<span class="addedCode"> AND NOT CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)</span>")<br /> |
|---|
| 542 |
ADD_DEFINITIONS (-pthread)<br /> |
|---|
| 543 |
ENDIF (NOT OWBAL_PLATFORM_MACPORT<span class="addedCode"> AND NOT CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)</span>")</li> |
|---|
| 544 |
</ul> |
|---|
| 545 |
</li> |
|---|
| 546 |
<li>This doesn't work on Windows, as it requires a shell (bash) to run from. Also, the create_link.sh script for Windows creates a .lnk file, which doesn't work. |
|---|
| 547 |
<ul> |
|---|
| 548 |
<li><span class="mono">MACRO (OWBLN _in_FILE _dest_DIR _keep _noLink )<br /> |
|---|
| 549 |
EXECUTE_PROCESS (COMMAND ${CMAKE_SOURCE_DIR}/BAL/scripts/create_link.sh ${_in_FILE} ${_dest_DIR} ${_keep} ${CMAKE_CURRENT_SOURCE_DIR} ${_noLink}<br /> |
|---|
| 550 |
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) <br /> |
|---|
| 551 |
ENDMACRO (OWBLN)</span></li> |
|---|
| 552 |
<li>To make it work on Windows, I implemented the following and slightly augmented the create_link.sh script (see way below for the new script) to have a new option: hardLink, which works on Windows (though in the long run a better solution may be desired): |
|---|
| 553 |
<ul> |
|---|
| 554 |
<li class="mono"><span class="addedCode">IF (OWBAL_PLATFORM_WIN32PORT)<br /> |
|---|
| 555 |
MACRO (OWBLN _in_FILE _dest_DIR _keep _noLink )<br /> |
|---|
| 556 |
EXECUTE_PROCESS (COMMAND bash ${CMAKE_SOURCE_DIR}/BAL/scripts/create_link.sh ${_in_FILE} ${_dest_DIR} ${_keep} ${CMAKE_CURRENT_SOURCE_DIR} ${_noLink} 1<br /> |
|---|
| 557 |
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) <br /> |
|---|
| 558 |
ENDMACRO (OWBLN)</span><br /> |
|---|
| 559 |
ELSE (OWBAL_PLATFORM_WIN32PORT)<br /> |
|---|
| 560 |
MACRO (OWBLN _in_FILE _dest_DIR _keep _noLink )<br /> |
|---|
| 561 |
<span class="addedCode"> EXECUTE_PROCESS (COMMAND bash ${CMAKE_SOURCE_DIR}/BAL/scripts/create_link.sh ${_in_FILE} ${_dest_DIR} ${_keep} ${CMAKE_CURRENT_SOURCE_DIR} ${_noLink} 0 <br /> |
|---|
| 562 |
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) <br /> |
|---|
| 563 |
|---|