-
Notifications
You must be signed in to change notification settings - Fork 132
How to Build the Brackets App Shell on Mac
For most of your work on Brackets, you should only need to edit the HTML/JS/CSS code in the brackets repo. But if you need to do work on the native app shell in brackets-app, here's how. (These instructions are for Mac; Windows instructions are [here] (https://github.com/adobe/brackets-app/wiki/How-to-Build-the-Brackets-App-Shell-on-Windows).)
To build the application shell code, load src/mac/Brackets.xcodeproj into XCode 4.1 (or newer). If you see a dialog asking to update the build settings for OSX 10.7, select "Don't Perform Changes" (this will make Brackets only work on 10.7 or later).
There are three main build targets:
- Brackets CEF Debug - this is a full debug build and is really slow. This target should only be used if you need breakpoint debugging.
- Brackets Development - this is a "release development" build. It's much faster, but you can't set breakpoints.
- Brackets Archive - this target does a full release build and copies the build to the bin/mac directory. This target MUST be built before checking in any changes to the shell application.
NOTE: Before you build anything, you need to make a couple changes to the build schemes. This only needs to be done once since these settings will persist when you quit Xcode.
- Click the combobox at the top that says "Brackets Archive".
- Select "Edit Scheme..." from the dropdown.
- In the window that opens, select "Run Brackets.app" on the left hand list
- In the right pane, select "Release" for Build Configuration
- Click OK to close the window
- Select "Brackets" from the dropdown
- Repeat steps 1-5 for the Brackets Development scheme
Brackets uses V8 extensions to bridge between JavaScript and native code. This code lives in:
- src/mac/Resources/brackets_extensions.js This is the JavaScript side of the bridge. Native functions are noted with the "native" keyword.
-
src/mac/cefclient/brackets_extensions.mm (and .h) This is the native side of the bridge. The
Execute()
method in theBracketsExtensionHandler
class is the bottleneck that all calls go through.