The whole process of compiling WebKit Mac OS X

Source: Internet
Author: User

System Information: Mac OS 10.9.4

Environment: Xcode 5.1

Please be patient enough to wait for the source code to download, troubleshooting path problems, compiling a series of long time.

Download Source:

The following are from: WebKit official website www. webkit.org

1. You can go to http://nightly.webkit.org/to download the source file

(This is called WebKit r172372, about 35.6M, with the update may vary)

2. You can open the URL in the browser to start downloading the source Zip package

(At this time is about 1G, as if there are some debug files)

http://nightly.webkit.org/files/WebKit-SVN-source.tar.bz2

Then the terminal enters the downloads folder but then unzip

(This department can also open the Finder to find the file and double-click to unzip)

Tar jxvf webkit-svn-source.tar.bz2

3. You can enter the following command in the terminal to obtain the source code

Svncheckout Https://svn.webkit.org/repository/webkit/trunk

Note: If you are prompted not to find the SVN command, install SVN on your own

Compile the source code:

First, use Xcode to open the WebKit Master directory of the project files

Second, Xcode menu file->workspacesettings->build->derived Data Location Column Select Workspace-relative, enter Webkitbuild, Then select Advanced ..., select the Custom option in the pop-up box, and select relative to Workspace later

After that, enter Webkitbuild after the products,

Enter Build/webkitbuild after intermediates

Third, Xcode menu Product->scheme->editscheme ...

In the pop-up box, you can select scheme at the top, select all Source (target webprocess)

In the middle executable select webprocess (this will appear after compiling a safari, you can also choose Minibrowser.app, which is also the UI layer provided by WebKit, can be modified again after compiling)

Four, click Run to compile and run

Five, wait a minute, compile error? It's normal, don't panic. Remember, no matter what error, will not be the source of the problem, in most cases will be a path configuration problem. (due to the different versions, the missing files may be different, so please compile to find the error, the targeted copy files, do not rush not to be impatient)

The following is the problem I encountered, due to the online about Xcode compiled WebKit kernel Less, most of the problem is in the header file, the processing method is similar to the following

(1) llvm-c/analysis.h file NotFound

In WebKit's home directory, there is a webkitlibraries folder under which there is a LLVMincludesMavericks.tar.bz2, unzip, into the unpacked directory, there are llvm,llvm-c two folders,  Copy both folders to the <webkit home directory >/webkitbuild/<configuration>/usr/local/include directory; By default, the configuration is debug;

Continue compiling, there is a second error

(2) Library not found For–lllvmtabllegen

It means to find LIBLLVMTABLLEGEN.A this library, so follow the idea, open <webkit home directory > under the Webkitlibraries folder, There is another compression package LLVMLibrariesMavericks.tar.bz2, unzip, into the directory, found that there are many suffixes of. A files, copy all files directly to the <webkit home directory >/webkitbuild/<  Under the Configuration>/usr/local directory; By default, the configuration is debug;

Compiled, waited a long time (compiled two main cores, these two very slow), after

It's another mistake.

(3) WebKitSystemInterface.h Filenot found

Intuition tells me to go back to the <webkit home directory > under the Webkitlibraries folder under the search, sure enough, and saw the WebKitSystemInterface.h, decisive and copied to the <webkit home directory >/  Under the Webkitbuild/<configuration>/usr/local/include directory; By default, the configuration is debug;

After copying, I left simpleton, looked at this directory a few eyes, I went, incredibly there is a

LIBWEBKITSYSTEMINTERFACEMAVERICKS.A, the intuition tells me, this goods must also make a mistake, simply, copy it directly to <webkit home directory >/webkitbuild/<configuration  Under the >/usr/local directory; By default, the configuration is debug;

Six, click Run to compile and run, this time can be compiled normally (I am, there may be other errors to resolve themselves, most of them will be the problem of this path), the compilation process is very long, please wait patiently, in addition, after compiling the <webkit home directory > will become very large.

The whole process of compiling WebKit Mac OS X

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.