Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

How to Build the Brackets App Shell on Mac

gruehle edited this page Apr 30, 2012 · 8 revisions

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).)

Building the app shell

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:

  1. Brackets CEF Debug - this is a full debug build and is really slow. This target should only be used if you need breakpoint debugging.
  2. Brackets Development - this is a "release development" build. It's much faster, but you can't set breakpoints.
  3. 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.

  1. Click the combobox at the top that says "Brackets Archive".
  2. Select "Edit Scheme..." from the dropdown.
  3. In the window that opens, select "Run Brackets.app" on the left hand list
  4. In the right pane, select "Release" for Build Configuration
  5. Click OK to close the window
  6. Select "Brackets" from the dropdown
  7. Repeat steps 1-5 for the Brackets Development scheme

Adding Native Code to Brackets

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 the BracketsExtensionHandler class is the bottleneck that all calls go through.