Changes between Version 23 and Version 24 of BuildingQtOnWindows
- Timestamp:
- Feb 24, 2010, 4:17:18 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingQtOnWindows
v23 v24 8 8 The following external GNU tools are needed from the [http://gnuwin32.sourceforge.net/packages.html GnuWin32 Project]: 9 9 10 * Make11 * Bison12 * Gperf13 * Flex14 * 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) 15 15 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].16 Install [http://www.activestate.com/Products/ActivePerl/ ActiveState Perl] 17 17 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. 18 Please '''install these tools in a path without spaces''' (i.e. not in "C:\Program Files") 19 19 20 Please note that building inside Cygwin is currently not supported. 20 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.[[BR]] 21 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 with slashes and backslashes while building using MinGW. mingw32-make will use sh.exe to run commands if it finds it in the PATH. 21 22 22 23 == Building QtWebKit == 23 24 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. 25 26 * Change into the WebKit source tree 26 27 * Run {{{perl WebKitTools\Scripts\build-webkit --qt}}} 27 28 * 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.29 29 * Try to run WebKitBuild\Release\bin\QtLauncher.exe 30 30 31 31 === Notes about building QtWebKit with the Qt/Windows OpenSource Edition === 32 32 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. 34 37 * 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}}}. 35 38 * 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. 36 39 * 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.38 40 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 == 41 42 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 59 44 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] 60 45 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. … … 63 48 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: 64 49 {{{ 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\ 66 51 }}} 67 52 * Note that `c:\Qt\2009.01\qt` above will vary depending on the QT SDK that you downloaded. You should modify it appropriately.