Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Building Brackets Shell

markshepherd edited this page Apr 17, 2013 · 50 revisions

All Platforms

Prerequisites

  • Node.js
  • Additional prerequisites are listed below for Mac and Windows
  • Clone both brackets-shell and brackets repositories as siblings in the same directory. By default, Gruntfiles in both projects make this assumption.

Install Dependencies

From the brackets-shell directory, run the following set of commands to install package dependencies and Grunt

npm install
npm install -g grunt-cli

Running grunt --help lists all the available tasks. Those tasks are listed below:

          full-build  Alias for "git", "create-project", "build",              
                      "build-branch", "build-num", "build-sha", "stage",       
                      "package" tasks.                                         
           installer  Alias for "full-build", "build-installer" tasks.         
               build  Build shell executable. Run 'grunt full-build' to update 
                      repositories, build the shell and package www files.     
           build-mac  Build mac shell                                          
           build-win  Build windows shell                                      
                 git  Pull specified repo branch from origin *                 
        build-branch  Write www repo branch to config property                 
                      build.build-branch                                       
           build-num  Compute www repo build number and set config property    
                      build.build-number                                       
           build-sha  Write www repo SHA to config property build.build-sha    
               stage  Stage release files                                      
           stage-mac  Stage mac executable files                               
           stage-win  Stage win executable files                               
             package  Package www files                                        
        write-config  Update version data in www config.json payload           
     build-installer  Build installer                                          
 build-installer-mac  Build mac installer                                      
 build-installer-win  Build windows installer                                  
          set-sprint  Update occurrences of sprint number for all native       
                      installers and binaries                                  
                 cef  Download and setup CEF                                   
           cef-clean  Removes CEF binaries and linked folders                  
        cef-download  Download CEF, see curl-dir config in Gruntfile.js        
         cef-extract  Extract CEF zip                                          
        cef-symlinks  Create symlinks for CEF                                  
                node  Download Node.js binaries and setup dependencies         
            node-win  Setup Node.js for Windows                                
            node-mac  Setup Node.js for Mac OSX and extract                    
          node-clean  Removes Node.js binaries                                 
      create-project  Create Xcode/VisualStudio project                        
               setup  Alias for "cef", "node", "create-project" tasks.         
              jshint  Validate files with JSHint. *                            
                copy  Copy files. *                                            
               clean  Clean files and folders. *                               
                curl  Download files from the internet via grunt. *            
            curl-dir  Download collections of files from the internet via      
                      grunt. *                                                 
             default  Alias for "setup", "build" tasks.

Mac

####Prerequisites

  • Git command line tools
  • Python (should be installed by default--enter python --version in a Terminal window to verify)
  • Xcode 4 required to build the project
    • In newer versions of Xcode, you might also need to install the "Command Line Tools" in Xcode from Preferences > Downloads.

####Setup Open a Terminal window at the brackets-shell directory and run grunt. This will download the CEF and Node.js binaries (if needed), create symlinks for the CEF and Node.js directories, create the XCode project, then run a command line build.

You will need to run grunt setup later if new source files are added or if brackets-shell updates to a newer CEF build.

####Building in XCode Open appshell.xcodeproj in XCode and build the "Brackets" target.

####Building from the command line Open a Terminal window at the brackets-shell directory and run grunt build.

####Running The build output is located at xcodebuild/Release/Brackets.app (release build) or xcodebuild/Debug/Brackets.app (debug build).

When you launch this app, you will be prompted to select index.html (the main file for the Brackets HTML/JS/CSS source code). Navigate to your local copy of the brackets repo and select src/index.html. To avoid having to do this every time you launch, go to the brackets repo and run the tools/setup_for_hacking script. This will add a symlink to the main file into your compiled Brackets.app. The parameter to setup_for_hacking is the full path to Brackets.app.

Windows

####Prerequisites

  • Visual Studio 2010 or later required to build the project. The free Visual Studio Express works fine.
  • Windows Vista or later (although brackets-shell runs on Windows XP, you cannot build it on XP)
  • GitBash (I used Git-1.8.0-preview20121022.exe)
  • Python 2.7 (Use the Windows X86 MSI or Windows X86-64 MSI)

Add Python to your path. The default python 2.7 install directory is C:\Python27.

####Verify Prerequisites

  • Start GitBash
  • Enter python --version. You should see "Python 2.7.3".
  • Enter echo $VS100COMNTOOLS. You should see something like ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools"

####Setup Open a GitBash shell and navigate to the brackets-shell directory. Run grunt. This will download the CEF binary (if needed), create symlinks for the CEF directories, create the Visual Studio solution file, then run a command line build.

You will need to re-run grunt setup later if new source files are added or if brackets-shell updates to a newer CEF build.

####Building in Visual Studio. Open appshell.sln in Visual Studio. NOTE: If you are using Visual Studio Express, you may get warnings that say some of the projects couldn't be loaded. These can be ignored. Build the "Brackets" target.

####Building from the command line Open a GitBash window at the brackets-shell directory and run grunt build.

####Running The build output is located at Release\Brackets.exe.

When you launch this executable, you will be prompted to select an index.html file. Navigate to your local copy of the brackets repo and select src\index.html. You will be prompted to select the index.html file every time you launch.

You can also run the tools\setup_for_hacking script in the brackets repo to create a symlink in the build directory. Pass the full path to the directory containing the exe you are building. Debug builds are in the Debug directory, and Release builds are in the Release directory.

Linux

Not available yet. Please let us know if you'd like to help with the Linux version. -- You may want to take a look at https://github.com/adobe/brackets/wiki/Linux-Version to get started.

Clone this wiki locally