As you may have read already, I’m in the process of learning and developing web applications with Cappuccino. I’ve been building against the latest stable release of Cappuccino, which at the time of this writing was 0.6.5, and I saw the Cappuccino team released a new version: 0.7 beta. I wanted to play with 0.7b, to see the new features and possibly contribute to testing.
Right now, the only way to use 0.7b is to download and build it from source. Since I develop on a MacBook Pro using Mac OS X Leopard (10.5), these instructions will be based on that. These instructions also assume you are familiar with the Terminal application.
Prerequisites
You will need the following:
- Git
- Ruby, Rubygems and Rails – If you’re using OS X Leopard, the default install that comes with the OS is sufficient. (Cappuccino will not compile on Ruby 1.9, make sure you’re using Ruby 1.8)
Installing Needed Gems
Cappuccino 0.7b requires the plist Ruby Gem. The installer is supposed to automatically install it for you, but it can be flakey, so just for safety’s sake, install the plist gem by running the following command:
sudo gem install plist
Getting the Source Code
Once you have Git and Ruby installed, you need to get the source from the Cappuccino project on GitHub. I keep all my source code in /usr/local/src/ (for more info on why, Hivelogic has an article about this very subject).
Let’s go into the src directory and check out the source code
cd /usr/local/src/
git clone git://github.com/280north/cappuccino.git
This will download all the source and create a directory name cappuccino. Let’s go into that directory and select the 0.7b branch as the active target.
cd cappuccino
git checkout -b 0.7b origin/0.7b
This sets 0.7b as the current target.
Building the Cappuccino Code
Now, let’s go ahead and build the code
rake release
This should have built Cappuccino 0.7b. You may have experienced the following error while trying to build the code:
subrake missing: ojunit
If so, don’t panic. It’s just looking for additional software, build by the Cappuccino team, that isn’t provided in the Cappuccino source by default.
Just run the following commands:
cd Tools
git clone git://github.com/280north/ojunit.git
cd ..
Then run
rake release
again and you should have happy compiled code.
Installing the Cappuccino Code
Now, to install the Cappuccino tools, you just run the following command:
sudo rake install
This will install all the Cappuccino binaries in /usr/local/bin/. This should already be in your PATH, so you should be able to run the Cappuccino binaries.
Using capp
Building and installing the Cappuccino code created some new useful tools for you. One of them is the capp application that generates all the Cappuccino frameworks and shell code for you. It can also be used to upgrade the frameworks in your existing application.
Creating a new Cappuccino Application
You can use the capp application to create a new Cappuccino application for you. From within any directory you want your new cappuccino application created, just issue the following command:
capp Application Name [options]
If, for instance, you want to create a new app called “HelloWorld” to be placed on your desktop, then you can easily enter the following command:
capp ~/Desktop/HelloWorld
This will create, quite literally, a Hello World application. You can use this as the basis for your app and build on top of it.
Upgrading an Existing Cappuccino Application
If you already have developed (or are developing) a Cappuccino application and you just want to see how your application will function in the latest beta, the easiest method is to create a dummy application with capp using the instructions above, and then just replacing the Frameworks folder in your application’s folder with the new one created by capp.










