Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: docs/ios_build_instructions.md

Issue 1904773003: Documentation: Update iOS build docs to include instructions for gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # iOS Build Instructions 1 # iOS Build Instructions
2 2
3 **Note:** Upstreaming of iOS code is still a work in progress. In particular, 3 **Note:** Upstreaming of iOS code is still a work in progress. In particular,
4 note that **it is not currently possible to build an actual Chromium app.** 4 note that **it is not currently possible to build an actual Chromium app.**
5 Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around 5 Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around
6 the web layer), and various unit tests. 6 the web layer), and various unit tests.
7 7
8 ## Prerequisites 8 ## Prerequisites
9 9
10 * A Mac with a version of OS X capable of running the latest version 10 * A Mac with a version of OS X capable of running the latest version
11 of Xcode. 11 of Xcode.
12 * The latest version of [Xcode](https://developer.apple.com/xcode/), 12 * The latest version of [Xcode](https://developer.apple.com/xcode/),
13 including the current iOS SDK. 13 including the current iOS SDK.
14 * The current version of the JDK (required for the closure compiler). 14 * The current version of the JDK (required for the closure compiler).
15 * [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tool s). 15 * [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tool s).
16 16
17 ## Setting Up 17 ## Setting Up
18 18
19 ### With GYP
20
19 In the directory where you are going to check out the code, create a 21 In the directory where you are going to check out the code, create a
20 `chromium.gyp_env` to set the build to use iOS targets (and to use 22 `chromium.gyp_env` to set the build to use iOS targets (and to use
21 hybrid builds; see [Building](#Building) below): 23 hybrid builds; see [Building](#Building) below):
22 24
23 ```shell 25 ```shell
24 cat > chromium.gyp_env <<EOF 26 cat > chromium.gyp_env <<EOF
25 { 27 {
26 "GYP_DEFINES": "OS=ios", 28 "GYP_DEFINES": "OS=ios",
27 "GYP_GENERATORS": "ninja,xcode-ninja", 29 "GYP_GENERATORS": "ninja,xcode-ninja",
28 } 30 }
29 EOF 31 EOF
30 ``` 32 ```
31 33
32 If you aren't set up to sign iOS build products via a developer account, 34 If you aren't set up to sign iOS build products via a developer account,
33 you should instead use: 35 you should instead use:
34 36
35 ```shell 37 ```shell
36 cat > chromium.gyp_env <<EOF 38 cat > chromium.gyp_env <<EOF
37 { 39 {
38 "GYP_DEFINES": "OS=ios chromium_ios_signing=0", 40 "GYP_DEFINES": "OS=ios chromium_ios_signing=0",
39 "GYP_GENERATORS": "ninja,xcode-ninja", 41 "GYP_GENERATORS": "ninja,xcode-ninja",
40 } 42 }
41 EOF 43 EOF
42 ``` 44 ```
43 45
46 ### With GN
47
48 Use `gn args out/Debug-iphonesimulator` (or replace
49 `out/Debug-iphonesimulator` with your chosen `out/` directory) to open up an
50 editor to set the following gn variables and regenerate:
51
52 ```
53 # For the iOS simulator at out/Debug-iphonesimulator/iossim.
54 use_ios_simulator = true
sdefresne 2016/04/22 15:22:37 This is not required as the value of use_ios_simul
Patti Lor 2016/04/26 00:03:01 Done, thanks for the extra information!
55 # Set to true for developer-signed builds.
56 ios_enable_code_signing = false
57 target_os = "ios"
58 ```
59
60 ### API Keys
61
44 Before you build, you may want to 62 Before you build, you may want to
45 [install API keys](https://sites.google.com/a/chromium.org/dev/developers/how-to s/api-keys) 63 [install API keys](https://sites.google.com/a/chromium.org/dev/developers/how-to s/api-keys)
46 so that Chrome-integrated Google services work. This step is optional if you 64 so that Chrome-integrated Google services work. This step is optional if you
47 aren't testing those features. 65 aren't testing those features.
48 66
49 ## Getting the Code 67 ## Getting the Code
50 68
51 Next, [check out the 69 Next, [check out the
52 code](https://www.chromium.org/developers/how-tos/get-the-code), with: 70 code](https://www.chromium.org/developers/how-tos/get-the-code), with:
53 71
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ``` 111 ```
94 112
95 ## Converting an existing Mac checkout into an iOS checkout 113 ## Converting an existing Mac checkout into an iOS checkout
96 114
97 If you want to convert your Mac checkout into an iOS checkout, follow the steps 115 If you want to convert your Mac checkout into an iOS checkout, follow the steps
98 below: 116 below:
99 117
100 1. Add `target_os = [ "ios" ]` to the bottom of your `chromium/.gclient` 118 1. Add `target_os = [ "ios" ]` to the bottom of your `chromium/.gclient`
101 file. 119 file.
102 120
103 2. Make sure you have the following in your `chromium/chromium.gyp_env` 121 2. For gyp, make sure you have the following in your
104 file (removing the `chromium_ios_signing=0` if you want to make 122 `chromium/chromium.gyp_env` file (removing the `chromium_ios_signing=0` if you
105 developer-signed builds): 123 want to make developer-signed builds):
106 124
107 ```json 125 ```json
108 { 126 {
109 "GYP_DEFINES" : "OS=ios chromium_ios_signing=0", 127 "GYP_DEFINES" : "OS=ios chromium_ios_signing=0",
110 "GYP_GENERATORS" : "ninja,xcode-ninja", 128 "GYP_GENERATORS" : "ninja,xcode-ninja",
111 } 129 }
112 ``` 130 ```
113 131
132 For gn, add the arguments specified [above](#With-GN) to your gn setup.
133
114 3. Make sure to sync again to fetch the iOS specific dependencies and 134 3. Make sure to sync again to fetch the iOS specific dependencies and
115 regenerate build rules using: 135 regenerate build rules using:
116 136
117 ```shell 137 ```shell
118 gclient sync 138 gclient sync
119 ``` 139 ```
120 140
121 ## Troubleshooting 141 ## Troubleshooting
122 142
123 If your build fails, check the iOS columns of [the Mac 143 If your build fails, check the iOS columns of [the Mac
124 waterfall](http://build.chromium.org/p/chromium.mac/console) (the last two) to 144 waterfall](http://build.chromium.org/p/chromium.mac/console) (the last two) to
125 see if the bots are green. In general they should be, since failures on those 145 see if the bots are green. In general they should be, since failures on those
126 bots will close the tree. 146 bots will close the tree.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698