OLD | NEW |
(Empty) | |
| 1 # Introduction |
| 2 |
| 3 This page has the setup instructions for Xcode4. The setup chosen and recommende
d by most developers is to not use the Xcode4 GUI, but to instead use [ninja](ht
tp://code.google.com/p/chromium/wiki/NinjaBuild) at the command line, with your
text editor of choice. |
| 4 |
| 5 **Note that [NIB/XIB files](http://dev.chromium.org/developers/design-documents/
mac-xib-files) _must_ be be saved with the Xcode 4.4.x toolchain on Mac OS X 10.
8.x** |
| 6 |
| 7 # Xcode 4 General |
| 8 |
| 9 1. Install the command-line tools (now a separate install) in Xcode → Preferen
ces → Downloads → Components → **Command Line Tools** This is no longer required
with Xcode 5. |
| 10 1. If you're doing a side-by-side install with Xcode3, make sure you install X
code4 in a separate directory (like /Xcode4) rather than /Developer so you don't
overwrite your current devtools version. |
| 11 |
| 12 ## Lion and Mountain Lion |
| 13 |
| 14 (This used to tell you to set `GYP_DEFINES=mac_sdk=10.6`. That's now done by def
ault an no longer necessary.) |
| 15 |
| 16 # Xcode 4.3 |
| 17 |
| 18 Starting with Xcode 4.3, the /Developer directory has moved, along with the enti
re install, to /Applications. If you install Xcode 4.3, you may have to run: |
| 19 |
| 20 ``` |
| 21 $ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer |
| 22 ``` |
| 23 |
| 24 # Xcode 4.4 |
| 25 |
| 26 If you install Xcode 4.4, it does not contain the 10.6 SDK. The build will auto
matically pick an SDK if no 10.6 SDK can be found. This will work fine and is a
good way to work on chrome. |
| 27 |
| 28 However, the bots build with the 10.6 SDK. If you want to do this too, you can s
ymlink it from somewhere else (or copy it from an earlier Xcode version). |
| 29 |
| 30 ``` |
| 31 $ ln -s /Volumes/SnowLeopard/Developer/SDKs/MacOSX10.6.sdk /Applications/Xcode.a
pp/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ |
| 32 ``` |
| 33 |
| 34 # Tips for Using the GUI |
| 35 |
| 36 1. Don’t. Seriously. Have you tried [ninja](http://code.google.com/p/chromium/
wiki/NinjaBuild)? |
| 37 1. Xcode → Preferences → General → Turn **off** Live Issues (for In Editors an
d In Issue Navigator) |
| 38 1. Set Xcode → Preferences → Locations → Advanced to **Place build products in
locations specified by their targets** |
| 39 1. Don’t run `gclient runhooks/sync` with the project open. Close it first and
then update project files. |
| 40 1. Xcode → Product → Edit Scheme → Edit the **chrome** scheme and choose the *
*Run** step to set any arguments (e.g. `--user-data-dir`) |
| 41 1. Disable indexing by setting a secret pref: `defaults write com.apple.dt.Xco
de IDEIndexDisable 1` . This significantly improves things. |
OLD | NEW |