Changes between Version 23 and Version 24 of BuildingQtOnWindows


Ignore:
Timestamp:
Feb 24, 2010 4:17:18 AM (12 years ago)
Author:
jocelyn.turcotte@nokia.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingQtOnWindows

    v23 v24  
    88The following external GNU tools are needed from the [http://gnuwin32.sourceforge.net/packages.html GnuWin32 Project]:
    99
    10  * Make
    11  * Bison
    12  * Gperf
    13  * Flex
    14  * LibIconv (needed for bison)
     10 * [http://gnuwin32.sourceforge.net/downlinks/bison.php Bison]
     11 * [http://gnuwin32.sourceforge.net/downlinks/gperf.php GPerf]
     12 * [http://gnuwin32.sourceforge.net/downlinks/flex.php Flex]
     13 * [http://gnuwin32.sourceforge.net/downlinks/libiconv.php LibIconv] (needed for bison)
     14 * [http://gnuwin32.sourceforge.net/downlinks/make.php Make] (not necessary if you want to build using MSVC)
    1515
    16 In addition you need Perl. ActiveState Perl works fine for example. You can download it from the [http://www.activestate.com/Products/ActivePerl/ ActivePerl Website].
     16Install [http://www.activestate.com/Products/ActivePerl/ ActiveState Perl]
    1717
    18 Make sure the GnuWin32 packages are in your PATH as well as Perl. You also need to have %QTDIR% set and have %QTDIR%\bin in your PATH.
     18Please '''install these tools in a path without spaces''' (i.e. not in "C:\Program Files")
    1919
    20 Please note that building inside Cygwin is currently not supported.
     20Make sure the GnuWin32 packages are in your PATH as well as Perl. You also need to have %QTDIR% set and have %QTDIR%\bin in your PATH.[[BR]]
     21If 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 with slashes and backslashes while building using MinGW. mingw32-make will use sh.exe to run commands if it finds it in the PATH.
    2122
    2223== Building QtWebKit ==
    2324
    24  * Open for example a Qt Command Prompt from the Start Menu
     25 * Open for example a Qt Command Prompt from the Start Menu.[[BR]]You need an MSVC or MinGW command line environment that matches the version of Qt you downloaded.[[BR]]Note that building inside Cygwin or MSYS is currently not supported. Please use a Windows command prompt.
    2526 * Change into the WebKit source tree
    2627 * Run {{{perl WebKitTools\Scripts\build-webkit --qt}}}
    2728 * Wait :)
    28  * {{{build-webkit}}} is likely to abort with an error when compiling testkjs if you're compiling with MingW g++. This is '''safe''' to ignore for now.
    2929 * Try to run WebKitBuild\Release\bin\QtLauncher.exe
    3030
    3131=== Notes about building QtWebKit with the Qt/Windows OpenSource Edition ===
    3232
    33  * Make sure that you are using Qt >= 4.3.2. Otherwise you may run into build problems with the Moc at the very end of the build process.
     33 * If you want to compile using multiple cores:
     34   * On MinGW use build-webkit's --makeargs option: {{{perl WebKitTools\Scripts\build-webkit --qt --makeargs=-j4}}}
     35   * On MSVC use the CL environment variable along with the /MP switch: {{{set CL= /MP}}}
     36 * If you can't access HTTPS pages and you compiled Qt from sources, make sure that you configured it with OpenSSL support. You will need the non-light version of [http://www.slproweb.com/products/Win32OpenSSL.html Win32 OpenSSL] libraries.
    3437 * If you haven't set up your PATH already to include the GnuWin32 packages then you may want to execute the following command: {{{set PATH=C:\GnuWin32\bin;C:\Perl\bin;%PATH%}}} Provided that the GnuWin32 packages are installed in {{{C:\GnuWin32\bin}}} and Perl in {{{C:\Perl\bin}}}.
    3538 * If you get build errors in JavaScriptCore\bindings\NP_jsobject.cpp or similar then please make sure that the Microsoft Platform SDK is '''NOT''' in your %INCLUDE% path because it conflicts with your MingW headers.
    3639 * If you get build errors after makefile generation ("Makefile:178: *** Multiple target patterns.  Stop.") then you're probably still using the Cygwin version of make. Try removing Cygwin from your %PATH% for the time being (it's not currently supported, as mentioned above).
    37  * I had troubles with m4 when the GnuWin32 packages were installed in C:\Program Files\GnuWin32 (something choked on the whitespace), it worked when installing them into C:\GnuWin32 instead.
    3840
    39 * When I try to build using Qt 4.4.3 on windows, the above procedure throws error. all the build (perl) scripts are using unix style dir-paths. Example buildQMakeProject perl method in webkitdirs.pm uses unix style dir-path and also reading pro file. I am amazing that the people could build Qt port of Webkit on Windows.
    40 Please Let me know exact steps / modification required to build the Webkit in Qt command prompt.
     41== A 'Works For Me' Step-by-Step Guide to Building QtWebKit on Windows using MinGW ==
    4142
    42 == A 'Works For Me' Step-by-Step Guide to Building QtWebKit on Windows ==
    43 
    44   1. The following external GNU tools are needed from the GnuWin32 Project:
    45    * [http://gnuwin32.sourceforge.net/downlinks/bison.php Download Bison]
    46    * [http://gnuwin32.sourceforge.net/downlinks/gperf.php Download GPerf]
    47    * [http://gnuwin32.sourceforge.net/downlinks/flex.php Download Flex]
    48    * [http://gnuwin32.sourceforge.net/downlinks/libiconv.php LibIconv]
    49    * [http://gnuwin32.sourceforge.net/downlinks/make.php Make]
    50    * It is safer to install the gnuwin32 tools to `C:\GnuWin32` rather than `C:\Program Files\GnuWin32`. This is because, depending on your luck with the webkit build, the space in `Program Files` can prevent the windows shell from locating the binaries correctly. The error message below is what you will see if you get this problem.
    51 {{{
    52 make[2]: Entering directory `C:/Users/robert/Development/webkit/WebKitBuild/Release/WebCore'
    53 bison -d -p jscyy ..\..\..\JavaScriptCore\parser\Grammar.y -o Grammar.tab.c && move Grammar.tab.c tmp\Grammar.cpp && move Grammar.tab.h tmp/Grammar.h
    54 m4: cannot open `Files\GnuWin32/share/bison': No such file or directory
    55 m4: cannot open `C:\Program': No such file or directory
    56 m4: cannot open `Files\GnuWin32/share/bison/m4sugar/m4sugar.m4': No such file or directory
    57 bison: I/O error
    58 }}}
     43  1. The the mentioned GnuWin32 tools
    5944  2. [http://www.qtsoftware.com/downloads/sdk-windows-cpp Download QT SDK (and QT Creator)] and  [http://www.activestate.com/store/download.aspx?prdGUID=81fbce82-6bd5-49bc-a915-08d58c2648ca Download ActivePerl]
    6045  3. Open for example a Qt Command Prompt from the Start Menu. `Click Start->Program Files->Qt->QT Command Prompt`. In fact, you really do need to use Qt Command Prompt for this rather than the normal windows command prompt.
     
    6348  6. Trim your PATH down as much as possible. Remove Git and Mingw from your PATH if you have them installed, their presence can cause odd build failures. For example, the PATH that works for me is:
    6449{{{
    65  set Path=C:\Program Files\GnuWin32\bin;c:\GnuWin32\bin;c:\Qt\2009.01\qt\bin;c:\Qt\2009.01\bin;C:\Perl\bin;C:\Windows\system32;c:\Qt\2009.01\mingw\bin;C:\Perl\site\bin;C:\Windows;C\\Program Files\SlikSvn\bin\
     50 set Path=c:\GnuWin32\bin;c:\Qt\2009.01\qt\bin;c:\Qt\2009.01\bin;C:\Perl\bin;C:\Windows\system32;c:\Qt\2009.01\mingw\bin;C:\Perl\site\bin;C:\Windows;C\\Program Files\SlikSvn\bin\
    6651}}}
    6752     * Note that `c:\Qt\2009.01\qt` above will vary depending on the QT SDK that you downloaded. You should modify it appropriately.