How to build Textmate 2 [Mac OS X]
ลง Xcode 4.4+ และ Command Line Tools ก่อนครับ :)
เพราะการ Compile source ต้องใช้ clang และ make ด้วย
จากนั้นก็ลง Homebrew เพื่อมาลง Dependency ต่างๆ ครับ (MacPorts ก็ได้นะ แต่ผมใช้ brew)
** คำเตือน Textmate 2 ยังคงเป็น Alpha Version อยู่นะครับ โปรดใช้วิจารณญาณก่อนการใช้งาน
เพราะการ Compile source ต้องใช้ clang และ make ด้วย
จากนั้นก็ลง Homebrew เพื่อมาลง Dependency ต่างๆ ครับ (MacPorts ก็ได้นะ แต่ผมใช้ brew)
$ /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
** ใครใช้ Homebrew อยู่แล้ว อย่าลืมสั่ง brew update สักครั้งก่อนนะครับ ...
จากนั้นก็ถึงเวลาลง Dependency แล้วครับ
$ brew install ragel boost multimarkdown hg ninja proctools
- ninja -- build system similar to make
- ragel -- state machine compiler
- boost -- C++ boost library
- multimarkdown -- marked-up plain text compiler
และเนื่องจาก Source ของ Textmate 2 อยู่ภายใต้ Github.com ก็ต้องลง Git ด้วยนะ
$ brew install git
พอเรียบร้อยหมดแล้ว ก็มาลง Textmate 2 กันตามนี้เลย ...
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*
Comments
Post a Comment