[[PageOutline]] = Windows CE Port of WebKit = WebKit is an open source web browser engine. WebKit WinCE is a project aiming at porting this fabulous engine to Windows CE. The WinCE port of WebKit currently compiles on Windows. == Status == WebKit WinCE port is based on the work by Torch Mobile and is currently under development. == Getting the Source == Follow the procedures to [http://webkit.org/building/checkout.html checkout the source code]. You also need to get the source code of third party libraries: {{{ git clone git://gitorious.org/webkit-thirdparty/webkit-thirdparty.git }}} If you get a message like "{{{fatal: The remote end hung up unexpectedly}}}" try to use the actual version of [http://code.google.com/p/msysgit/ msysgit]. == Build == We use [http://cmake.org/ CMake] as our build system. You '''don't''' need a full Cygwin environment like Apple's Windows port, but the following tooles are required: * [http://gnuwin32.sourceforge.net/downlinks/bison.php Bison] * [http://gnuwin32.sourceforge.net/downlinks/gperf.php GPerf] * [http://gnuwin32.sourceforge.net/downlinks/flex.php Flex] * [http://www.activestate.com/activeperl/downloads ActiveState Perl] * [http://www.python.org/download/ Python 2.x] Make sure the GnuWin32 packages are in your PATH as well as Perl and Python. If you have Cygwin's bin directory in your path, make sure that it comes after ActiveState Perl and GnuWin32. You might have to remove it completely from your PATH if you have problems while building. === Windows CE SDK === Visual Studio 2005 or 2008 (No Express Edition!) with a Windows CE SDK is required to build the binary. You can find the Windows CE 5.0 Standard SDK at http://www.microsoft.com/downloads/details.aspx?familyid=fa1a3d66-3f61-4ddc-9510-ae450e2318c3. Any other SDK should work too. It has been tested on Windows CE 6.0 but there may not be a public SDK available. === CMake === Because the offical CMake has no support for Windows CE at the moment, we need to use a special CMake version. Please install the latest CMake version from http://cmake.org/cmake/resources/software.html. ==== Build CMake with WinCE support (recommended) ==== To build your own CMake you need to get the code from the gitorious repository. {{{ git clone git://gitorious.org/~paroga/cmake/parogas-cmake.git git checkout wince }}} Then you can build it with the following commands. {{{ mkdir CMakeBuild cd CMakeBuild cmake \path\to\source cmake --build . }}} After this you have you own {{{cmake.exe}}} in the {{{bin}}} directory. Make sure to use this one when creating the project files for Windows CE. You also need to use the {{{Modules}}} directory form the gitorious repository. The easiest way is to copy {{{cmake.exe}}} and the whole {{{Modules}}} directory into you CMake installation directory (C:\Program Files\CMake 2.8). ==== Use provided binary (not secure) ==== '''This is not a secure source for a binary, so we recommend to build it yourself! If you are not able to clone the repository and/or compile CMake on your host it is possible to use the provided binary on this page. You only need to extract [attachment:cmake-2.8.3-ce-win32-x86-diff.zip] in you CMake installation directory. It will replace the {{{bin/cmake.exe}}} and change a few Modules files. === Build WebKit === When you have a working CMake with WinCE support you can generate a Visual Studio Solution out of the CMake files. {{{ mkdir WebKitBuild cd WebKitBuild cmake -G "Visual Studio 8 2005" -DCMAKE_WINCE_SDK="STANDARDSDK_500 (ARMV4I)" -DPORT=WinCE -D3RDPARTY_DIR=/path/to/webkit-thirdparty \path\to\source }}} '''ATTENTION:''' The {{{3RDPARTY_DIR}}} argument needs slash as separator, while the path to the source needs backslash. This will generate a WebKit.sln in the WebKitBuild directory from the sourcecode in {{{\path\to\source}}}. You can change the generator to {{{Visual Studio 9 2008}}} if you want to generate Visual Studio 2008 projects. It is also possible to select an other Windwos CE SDK when you replace the {{{STANDARDSDK_500 (ARMV4I)}}} with the name of SDK you want to use. Now you should be able to open the solution and build it. You also can simply type {{{cmake --build . --config Release}}} in your build directory. The following is an example of the required steps: {{{ C:\>svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit C:\>git clone git://gitorious.org/webkit-thirdparty/webkit-thirdparty.git C:\>mkdir WebKitBuild C:\>cd WebKitBuild C:\WebKitBuild>cmake -G "Visual Studio 8 2005" -DCMAKE_WINCE_SDK="STANDARDSDK_500 (ARMV4I)" -DPORT=WinCE -D3RDPARTY_DIR=C:/webkit-thirdparty C:\WebKit C:\WebKitBuild>cmake --build . --config Release }}} ==== Possible Builderrors ==== Because of the fact that the buildsystem isn't 100% finished you may see one or more of the following errors: {{{ example.h(123) : fatal error C1083: Cannot open include file: 'ExampleNames.h': No such file or directory }}} This should happen only with the first build, because of some missing dependencies. When you build the solution a second time (wait until the first is finished!) they will be gone. {{{ Creating library... LIB : warning LNK4068: /MACHINE not specified; defaulting to X86 example.obj : fatal error LNK1112: module machine type 'ARM' conflicts with target machine type 'X86' }}} To fix this issue open the project properties and navigate to "Configuration Properties" / "Librarian" / "Command Line" and add {{{/MACHINE:ARM}}} into the "Additional options". {{{ example.lib(example.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll) example.lib(example.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll) }}} If you get tons of this messages you hit http://support.microsoft.com/kb/148652. Moving all windows libraries after the WebKit libraries in "Configuration Properties" / "Linker" / "Additional Dependencies" will solve this problem. {{{ Generating ../DerivedSources/DocTypeStrings.cpp syntax error at .../WebCore/make-hash-tools.pl line 123, near "} continue" Execution of .../WebCore/make-hash-tools.pl aborted due to compilation errors. }}} It seams that your {{{make-hash-tools.pl}}} has CRLF line ending. Changing the line endings to LF only should fix this problem. You may also encounter errors generating chartables.c because of the version of perl that you are using. Some versions of perl have issues with CR/LF. Most win32 versions of perl will work. == Run == After a successful build you got a {{{WinCELauncher.exe}}} in your build directory. You can run it with the following command: {{{ WinCELauncher.exe http://webkit.org/ }}} ==== Possible Runtimeerrors ==== {{{ The file 'WinCELauncher' cannot be opened. Either is is not signed with a trusted certificate or one of its components cannot be found. If the problem persists, try reinstalling or restoring this file. }}} If you get this message you probably need to copy additional files to your device. You can open the executable with Dependency Walker ({{{depends.exe}}}) to examine all dependecies. When you are building with Visual Studio 2005 the executable will depend on {{{MSVCR80.DLL}}}; with Visual Studio 2008 it will depend on {{{MSVCR90.DLL}}}. == Questions and feedback == If you have questions please send an email to the [http://groups.google.com/group/wincewebkit Windows CE WebKit Mailinglist]. The staging area of the current development can be found at http://gitorious.org/+wincewebkit-developers/webkit/wincewebkit.