Posted by & filed under Code.

TextMate 2 recently went open source on github and a coworker friend of mine was asking if I had compiled it yet. Here’s the quick and easy on how to compile it.

Prerequisites

  • Either homebrew or macports (I’ll be using homebrew for this post)
  • Xcode 4.4+ (make sure to open at least once and accept licence agreement)

Now install the needed apps with brew:

brew install ragel boost multimarkdown hg ninja proctools
  • ninja — build system similar to make
  • ragel — state machine compiler
  • boost — portable C++ source libraries
  • multimarkdown — marked-up plain text compiler
  • mercurial — distributed SCM system
  • pgrep and pkill – part of protocols

If the hg install gives you issues, get the latest command line tools from Apple. (At the time of this writing it is Command Line Tools (OS X Lion) for Xcode – August 2012)

Compile

git clone https://github.com/textmate/textmate.git
cd textmate
git submodule update --init
./configure && ninja

Install and Cleanup

cp -R ~/build/TextMate/Applications/TextMate/TextMate.app Applications
rm -Rf ~/build/TextMate*
  • Cantello

    Thanks for the instructions, it’s ‘proctools’ not ‘protocols’ btw.

    • http://timbroder.com Tim Broder

      Thanks for catching that, I’ve updated the post

  • Suse

    isn’t this just the readme for textmate? what is different?

    • http://timbroder.com Tim Broder

      You are right it is, someone had asked me for help even after reading that so I just pulled out the important parts.

  • Oida

    can’t you just offer the compiled textmate for downloading? I tried a number of tutorials to build it myself, but none of them did work. it’s frustrating me.

    • http://timbroder.com Tim Broder

      The binaries still cost money.

      if you’d like help compiling it, post your questions here and I’ll be happy to answer them

  • Ben

    Thanks it’s working but there is a typo on line 4 : the AND chars have been replaced by & This line should contain two & symbols

    • Ben

      well obviously the comment field did the translation from html chars… I mean line 4 should not have “amp” encoded and chars but the real “and” symbol

      • http://timbroder.com Tim Broder

        sorry about that. I’ve updated the post. Thanks