summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authortfarina <tfarina@chromium.org>2016-03-01 00:41:31 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-01 08:42:59 +0000
commitb8f70688d44d033c9f14786cb19ea6b176559456 (patch)
tree10f098afacee49c53f6b843c212806ba571c64ad /docs
parent66b2619883aad9c11bb00787e33cc53df7036f1f (diff)
downloadchromium_src-b8f70688d44d033c9f14786cb19ea6b176559456.zip
chromium_src-b8f70688d44d033c9f14786cb19ea6b176559456.tar.gz
chromium_src-b8f70688d44d033c9f14786cb19ea6b176559456.tar.bz2
docs: convert ios build instructions from html to markdown
This patch converts iOS Build Instructions from https://www.chromium.org/developers/how-tos/build-instructions-ios to Markdown and check it in docs/ directory. The process for doing this was done partially by command line tools and partially manually after inspection at http://dillinger.io/. The command lines to generate the markdown file were: $ wget https://www.chromium.org/developers/how-tos/build-instructions-ios $ pandoc -s -r html build-instructions-ios -o ios_build_instructions.md BUG=None TEST=opened ios_build_instructions.md in dillinger.io and visually inspected it. R=sdefresne@chromium.org Review URL: https://codereview.chromium.org/1747873002 Cr-Commit-Position: refs/heads/master@{#378417}
Diffstat (limited to 'docs')
-rw-r--r--docs/ios_build_instructions.md118
1 files changed, 118 insertions, 0 deletions
diff --git a/docs/ios_build_instructions.md b/docs/ios_build_instructions.md
new file mode 100644
index 0000000..ab7a1770
--- /dev/null
+++ b/docs/ios_build_instructions.md
@@ -0,0 +1,118 @@
+### Build Instructions (iOS)
+
+**Note:** Upstreaming of iOS code is still a work in progress. In particular,
+note that **it is not currently possible to build an actual Chromium app.**
+Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around
+the web layer), and various unit tests.
+
+Prerequisites
+-------------
+
+- A Mac with a version of OS X capable of running the latest version
+ of Xcode.
+- The latest version of [Xcode](https://developer.apple.com/xcode/),
+ including the current iOS SDK.
+- The current version of the JDK (required for the closure compiler).
+- [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools).
+
+Setting Up
+----------
+
+In the directory where you are going to check out the code, create a
+`chromium.gyp_env` to set the build to use iOS targets (and to use
+hybrid builds; see Building below):
+
+`echo "{ 'GYP_DEFINES': 'OS=ios','GYP_GENERATORS':
+'ninja,xcode-ninja', }" > chromium.gyp_env`
+
+If you aren't set up to sign iOS build products via a developer account,
+you should instead use:
+
+`echo "{ 'GYP_DEFINES': 'OS=ios chromium_ios_signing=0', 'GYP_GENERATORS': 'ninja,xcode-ninja', }" > chromium.gyp_env`
+
+Also, you should [install API
+keys](https://www.chromium.org/developers/how-tos/api-keys).
+
+Getting the Code
+----------------
+
+Next, [check out the
+code](https://www.chromium.org/developers/how-tos/get-the-code), with
+
+`fetch ios`
+
+Building
+--------
+
+Build the target you are interested in. The instructions above select
+the ninja/Xcode hybrid mode, which uses ninja to do the actual build,
+but provides a wrapper Xcode project that can be used to build targets
+and navigate the source. (The Xcode project just shells out to ninja to
+do the builds, so you can't actually inspect/change target-level
+settings from within Xcode; this mode avoids generating a large tree of
+Xcode projects, which leads to performance issues in Xcode). To build
+with ninja (simulator and device, respectively):
+
+`ninja -C out/Debug-iphonesimulator All`
+
+`ninja -C out/Debug-iphoneos All`
+
+To build with Xcode, open build/all.ninja.xcworkspace, and choose the
+target you want to build.
+
+You should always be able to build all:All, since targets are added
+there for iOS only when they compile.
+
+Running
+-------
+
+Any target that is built and runs on the bots (see below) should run
+successfully in a local build. As of the time of writing, this is only
+ios\_web\_shell and unit test targets—see the note at the top of this
+page. Check the bots periodically for updates; more targets (new
+components) will come on line over time.
+
+To run in the simulator from the command line, you can use `iossim`. For
+example, to run a debug build of web\_shell:
+
+`out/Debug-iphonesimulator/iossim out/Debug-iphonesimulator/ios_web_shell.app`
+
+**Converting an existing Mac checkout into an iOS checkout**
+
+If you want to convert your Mac checkout into an iOS checkout, you can
+follow the next steps:
+
+1- Add 'target\_os = [ "ios" ]' to the bottom of your chromium/.gclient
+file.
+
+2- Make sure you have the following in your chromium/chromium.gyp\_env
+file (removing the `chromium_ios_signing=0` if you want to make
+developer-signed builds):
+
+{
+
+"GYP\_DEFINES" : "OS=ios chromium\_ios\_signing=0",
+
+"GYP\_GENERATORS" : "ninja,xcode-ninja",
+
+}
+
+\
+
+Then make sure you sync again to get all the new files like the
+following. At the end it will run gyp\_chromium which will regenerate
+all the build files according to the new settings.
+
+\
+
+`gclient sync`
+
+\
+
+Troubleshooting
+---------------
+
+If your build fails, check the iOS columns of [the Mac
+waterfall](http://build.chromium.org/p/chromium.mac/console) (the last
+two) to see if the bots are green. In general they should be, since
+failures on those bots will close the tree.