TextMate Deployment and Usage Guide
Prerequisites
To build and run TextMate, you need:
- macOS 10.12 or later (TextMate is macOS-only)
- Development tools: Command Line Tools for Xcode
- Dependencies (install via Homebrew or MacPorts):
boost- portable C++ source librariescapnp- Cap'n Proto serialization librarymultimarkdown- marked-up plain text compilerninja- build system (alternative tomake)ragel- state machine compilersparsehash- cache-friendly hash map implementation
Installation
- Install dependencies using your preferred package manager:
# Using Homebrew
brew install boost capnp google-sparsehash multimarkdown ninja ragel
# Using MacPorts
sudo port install boost capnproto multimarkdown ninja ragel sparsehash
- Clone the repository with submodules:
git clone --recursive https://github.com/textmate/textmate.git
cd textmate
Configuration
No specific environment variables or API keys are required for building TextMate. However, for building from within TextMate itself, you need to configure the PATH variable:
-
Set up PATH in TextMate preferences:
- Go to Preferences → Variables
- Add
$PATH:/usr/local/binto ensureninjaand related tools are accessible
-
Install the Ninja bundle for building from within TextMate:
- Install via Preferences → Bundles
- This enables ⌘B to build the project
Build & Run
Building from Terminal
# Configure and build
./configure && ninja TextMate/run
# Alternative: build and sign without launching
ninja TextMate
# Build and relaunch (with dialog confirmation)
ninja TextMate/run
Building from Within TextMate
- Ensure the Ninja bundle is installed
- Press ⌘B to build
- The default target is
TextMate/runwhich will relaunch TextMate - Session restore ensures unsaved changes are preserved
Build Targets
ninja TextMate- Build and sign TextMateninja TextMate/run- Build, sign, and relaunch TextMateninja -t clean- Clean build artifacts- Delete
~/build/TextMateto completely clean the build directory
Special Build Behavior
- If editing a test file, the build target automatically changes to build the library containing that test
- If editing files for an application target (other than TextMate.app), the target builds and runs that specific application
Deployment
TextMate is a desktop application for macOS and does not require traditional server deployment. For distribution:
- Local Development: Use the built-in build process described above
- Distribution: TextMate is distributed through its official website at macromates.com/download
- Code Signing: The build process includes code signing for distribution
Troubleshooting
Common Issues and Solutions
Dependency Not Found
- Ensure all dependencies are installed via Homebrew or MacPorts
- Verify installation with
brew listorport installed - Check that tools are in your PATH
Build Fails with Missing Submodules
- Make sure you cloned with
--recursiveflag - If you forgot, run:
git submodule update --init --recursive
Cannot Build from Within TextMate
- Verify the Ninja bundle is installed
- Check PATH configuration in Preferences → Variables
- Ensure
ninjais accessible from Terminal
Relaunch Dialog Appears Unexpectedly
- This is normal behavior when building from within TextMate
- Session restore will preserve your work
Test Files Not Building Correctly
- The build system automatically detects test files and adjusts targets
- Ensure you're in the correct directory when building
Performance Issues During Build
- Clean the build directory:
ninja -t clean - Delete
~/build/TextMateand rebuild - Ensure sufficient disk space and memory
Getting Help
- Mailing List: textmate@lists.macromates.com
- IRC: #textmate on freenode.net
- Bug Reports: Follow writing bug reports instructions before submitting
- General Support: Contact MacroMates