blob: c03066c58f753993c022dd2594cb1b51ade108a6 [file] [log] [blame] [view]
rniwa@webkit.org507882e2017-02-22 02:16:35 +00001# WebKit
2
3WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, iBooks, and many other applications.
4
5## Feature Status
6
7Visit [WebKit Feature Status](https://webkit.org/status/) page to see which Web API has been implemented, in development, or under consideration.
8
9## Trying the Latest
10
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +000011On macOS, [download Safari Technology Preview](https://webkit.org/downloads/) to test the latest version of WebKit. On Linux, download [Epiphany Technology Preview](https://webkitgtk.org/epiphany-tech-preview). On Windows, you'll have to build it yourself.
rniwa@webkit.org507882e2017-02-22 02:16:35 +000012
13## Reporting Bugs
14
151. [Search WebKit Bugzilla](https://bugs.webkit.org/query.cgi?format=specific&product=WebKit) to see if there is an existing report for the bug you've encountered.
162. [Create a Bugzilla account](https://bugs.webkit.org/createaccount.cgi) to to report bugs (and to comment on them) if you haven't done so already.
173. File a bug in accordance with [our guidelines](https://webkit.org/bug-report-guidelines/).
18
19Once your bug is filed, you will receive email when it is updated at each stage in the [bug life cycle](https://webkit.org/bug-life-cycle). After the bug is considered fixed, you may be asked to download the [latest nightly](https://webkit.org/nightly) and confirm that the fix works for you.
20
21## Getting the Code
22
23On Windows, follow the [instructions on our website](https://webkit.org/webkit-on-windows/).
24
25### Cloning the Git SVN Repository
26
27Run the following command to clone WebKit's Git SVN repository:
28
29```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +000030git clone git://git.webkit.org/WebKit.git WebKit
rniwa@webkit.org507882e2017-02-22 02:16:35 +000031```
32
33If you want to be able to commit changes to the repository, or just want to check out branches that aren’t contained in WebKit.git, you will need track WebKit's Subversion repository. You can run the following command to configure this and other options of the new Git clone for WebKit development.
34
35```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +000036Tools/Scripts/webkit-patch setup-git-clone
rniwa@webkit.org507882e2017-02-22 02:16:35 +000037```
38
39For information about this, and other aspects of using Git with WebKit, read [the wiki page](https://trac.webkit.org/wiki/UsingGitWithWebKit).
40
41### Checking out the Subversion Repository
42
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +000043If you don't want to use Git, run the following command to check out WebKit's Subversion repository:
rniwa@webkit.org507882e2017-02-22 02:16:35 +000044
45```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +000046svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
rniwa@webkit.org507882e2017-02-22 02:16:35 +000047```
48
49## Building WebKit
50
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +000051### Building macOS Port
rniwa@webkit.org507882e2017-02-22 02:16:35 +000052
53Install Xcode and its command line tools if you haven't done so already:
54
551. **Install Xcode** Get Xcode from https://developer.apple.com/downloads. To build WebKit for OS X, Xcode 5.1.1 or later is required. To build WebKit for iOS Simulator, Xcode 7 or later is required.
562. **Install the Xcode Command Line Tools** In Terminal, run the command: `xcode-select --install`
57
58Run the following command to build a debug build with debugging symbols and assertions:
59
60```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +000061Tools/Scripts/build-webkit --debug
rniwa@webkit.org507882e2017-02-22 02:16:35 +000062```
63
64For performance testing, and other purposes, use `--release` instead.
65
66### Using Xcode
67
68You can open `WebKit.xcworkspace` to build and debug WebKit within WebKit.
69
70If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use `WebKitBuild` directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select "Custom", "Relative to Workspace", and enter `WebKitBuild` for both Products and Intermediates.
71
rniwa@webkit.orgd62bb4e2017-02-23 04:43:46 +000072### Building iOS Port
rniwa@webkit.org507882e2017-02-22 02:16:35 +000073
74The first time after you install a new Xcode, you will need to run the following command to enable Xcode to build command line tools for iOS Simulator:
75
76```
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +000077sudo Tools/Scripts/configure-xcode-for-ios-development
rniwa@webkit.org507882e2017-02-22 02:16:35 +000078```
79
80Without this step, you will see the error message: "`target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform.`" when building target `JSCLLIntOffsetsExtractor` of project `JavaScriptCore`.
81
82Run the following command to build a debug build with debugging symbols and assertions for iOS:
83
84```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +000085Tools/Scripts/build-webkit --debug --ios-simulator.
rniwa@webkit.org507882e2017-02-22 02:16:35 +000086```
87
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +000088### Building the GTK+ Port
rniwa@webkit.orgd62bb4e2017-02-23 04:43:46 +000089
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +000090For production builds:
91
92```
93cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
94ninja
95sudo ninja install
96```
97
98For development builds:
99
rniwa@webkit.orgd62bb4e2017-02-23 04:43:46 +0000100```
101Tools/gtk/install-dependencies
rniwa@webkit.orgd62bb4e2017-02-23 04:43:46 +0000102Tools/Scripts/update-webkitgtk-libs
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +0000103Tools/Scripts/build-webkit --gtk --debug
rniwa@webkit.orgd62bb4e2017-02-23 04:43:46 +0000104```
105
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +0000106For more information on building WebKitGTK+, see the [wiki page](https://trac.webkit.org/wiki/BuildingGtk).
107
108### Building the WPE Port
109
110For production builds:
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000111
112```
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +0000113cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
114ninja
115sudo ninja install
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000116```
117
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +0000118For development builds:
119
120```
121Tools/wpe/install-dependencies
122Tools/Scripts/update-webkitwpe-libs
123Tools/Scripts/build-webkit --wpe --debug
124```
rniwa@webkit.orgd62bb4e2017-02-23 04:43:46 +0000125
126### Building Windows Port
127
128For building WebKit on Windows, see the [wiki page](https://webkit.org/webkit-on-windows/).
129
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000130## Running WebKit
131
132### With Safari and Other macOS Applications
133
134Run the following command to launch Safari with your local build of WebKit:
135
136```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +0000137Tools/Scripts/run-safari --debug
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000138```
139
140The `run-safari` script sets the `DYLD_FRAMEWORK_PATH` environment variable to point to your build products, and then launches `/Applications/Safari.app`. `DYLD_FRAMEWORK_PATH` tells the system loader to prefer your build products over the frameworks installed in `/System/Library/Frameworks`.
141
142To run other applications with your local build of WebKit, run the following command:
143
144```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +0000145Tools/Scripts/run-webkit-app <application-path>
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000146```
147
148### iOS Simulator
149
150Run the following command to launch iOS simulator with your local build of WebKit:
151
152```
rniwa@webkit.orga3344e72017-02-22 06:51:07 +0000153run-safari --debug --ios-simulator
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000154```
155
156In both cases, if you have built release builds instead, use `--release` instead of `--debug`.
157
mcatanzaro@igalia.com45c91a32018-02-01 01:38:34 +0000158### Linux Ports
159
160If you have a development build, you can use the run-minibrowser script, e.g.:
161
162```
163run-minibrowser --debug --wpe
164```
165
166Pass one of `--gtk`, `--jsc-only`, or `--wpe` to indicate the port to use.
167
rniwa@webkit.org507882e2017-02-22 02:16:35 +0000168## Contribute
169
170Congratulations! Youre up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read [Contributing Code](https://webkit.org/contributing-code/).
171