Skip to content

Linux Development for Contributors

Jason San Jose edited this page Jun 22, 2013 · 59 revisions

Introduction

Brackets officially supports Mac and Windows. However, we're working on adding Linux support with the help of our open source community. If you're an end user that just wants to try out Brackets on Linux, please be aware that many features are missing or partially implemented.

To be clear, if you are NOT an extension developer and NOT planning to contribute to brackets-shell, please visit (TBD landing page) to download an experimental build of Brackets. Please review the release notes for known issues.

Development Environment Setup

Required Setup for brackets-shell and brackets

These instructions will download the Git repositories for brackets-shell and brackets, download required dependencies, compile the native shell, create and install a debian package, then run Brackets ( /usr/bin/brackets points to /usr/lib/brackets/Brackets).

  1. Create a top level folder to contain the Brackets git repositories
  2. In a terminal window, cd to the folder from the previous step and run the following command
wget -O - https://gist.github.com/jasonsanjose/5514813/raw/cff18a4388ab04f16d1519d3f713729a8fd3c7a4/setup.sh | bash
  1. Respond to sudo password prompts when requested

ATTENTION This setup script will point your installed Brackets directly to the the brackets/master branch for the main Adobe git repository. Assuming you're here to contribute to Brackets, you will want to point your git repositories at your own fork.

# TODO
# git instructions to change the repo downloaded in the one-line setup
# to point to the user's fork and brackets upstream
# https://github.com/adobe/brackets/wiki/How-to-Hack-on-Brackets#setting-up-your-dev-environment

Cache Location

# cache root
~/.Brackets

# browser cache, local storage, etc.
~/.Brackets/cef_data

# extensions
~/.Brackets/extensions/user

Extension Development

The extension development workflow is the same as Mac and Windows. Please refer to How to hack on Brackets and How to write extensions. Please note that the extension location on Linux is ~/.Brackets/extensions/user.

Tested Distributions

Contributors: If you are willing to test other Linux distributions please add your results here

Distribution Version Issues
Ubuntu 12.04 32-bit None
Ubuntu 12.04 64-bit Manually replace brackets-shell/deps/cef/Release/libcef.so with the 64-bit binary from http://www.magpcss.net/cef_downloads/ and rebuild
Mint 15 64-bit Manually replace brackets-shell/deps/cef/Release/libcef.so with the 64-bit binary from http://www.magpcss.net/cef_downloads/ and rebuild
LMDE(*) Debian Testing 32 bit None

(*) Linux Mint Debian Edition

Building brackets-shell

The setup script will automatically create /path/to/brackets-shell/Makefile. If you're only making changes to C++ code, just run make and the binaries will be in /path/to/brackets-shell/out/Release.

When adding new files or changing the build configuration, you'll need to make modifications to the GYP configuration files (either appshell.gyp.txt or common.gypi). After making changes, you'll need to generate a new Makefile. To do this, run:

gyp --depth .

Packaging Brackets

On Mac and Windows we would use the grunt installer task to build an installer. However, we haven't updated all our Grunt tasks for Linux yet. In the meantime, you can do the following to copy the www source and binaries into a debian package

cd /path/to/brackets-shell

# copy shell binaries and www files from brackets repo
grunt copy:linux copy:www copy:samples

# creates debian package installer/linux/brackets.deb
./installer/linux/build_installer.sh

User Stories

There are several user stories (feature work) to complete in brackets-shell before the Linux version reaches feature parity with Mac and Windows. These stories are listed below in priority order

User Story Status Affected Features Contact
Update CEF In Progress Everything Jason San Jose
Node Integration Not Started Live Preview HTML Highlighting, Extension Manager Install/Update/Remove Joel Brandt
Ubuntu Installer/Packaging Not Started Install experience Jason San Jose
File API - delete, rename Not Started Project tree and File menu delete and rename commands
Native Menus Not Started Menus (HTML menus are an interim, but completely functional substitute)
Show in OS Not Started Project tree command to show the selected file in the native OS file viewer
Automated Builds Not Started Jason San Jose

FAQ

  1. I found a bug, where do I file it? Here Brackets issues
  2. I want to help, but I don't have any C++ or GTK experience. How can I help? Start learning C++ and GTK! Otherwise, see the next question.
  3. I can't help on the native shell, but how else can I help? You can help fix issues (Linux-specific or not) in the www code located in the brackets repository.
  4. Why isn't Linux distribution X supported? We're currently focused on Ubuntu since Chromium Embedded Framework (CEF) is well tested there both in a development environment and in deployment. We're open to contributors helping us test and support more distributions.
  5. How do I debug the native shell? As of June 12, 2013, CEF does not have a 32-bit Debug build. Once this is available, we'll post a new answer to this question.
  6. Why aren't the Grunt scripts updated for Linux? The CEF binaries for Linux use 7zip instead of the standard ZIP file format. Some work needs to be done in the Grunt scripts to support this.
  7. Why is NodeJS required for brackets-shell?
  8. How do I use a browser other than Google Chrome?
  9. Live Development doesn't work with the Chromium browser. How can I fix it? If you want to use the Chromium browser for Live Development, you will need to add symlink the file /usr/bin/google-chrome to the chromium executable which is normally located at /usr/bin/chromium-browser. All it should take is sudo ln -s /usr/bin/chromium-browser /usr/bin/google-chrome.
  10. What IDE or tools should I use to work on brackets-shell?
  11. I really want to use Brackets in my browser instead of the native shell. How do I do that?

Development Log

  • 2013-06-22: Updated brackets-shell/linux branch with SVG app icon jasonsanjose
  • 2013-06-21: Linux branches land in master in brackets-shell and brackets. Includes: CEF parity with Mac and Win, stubbed methods for incomplete native shell stories (Node, File I/O, etc.), debian packaging. jasonsanjose
Clone this wiki locally