Skip to main content

Building Cappuccino Framework on Ubuntu 10.10

I was supposed to learn the Cappuccino Framework but for some important tasks I had to postpone learning. And I thought I can share the single step I made for building the source code.


Step 1: Get Source Code

I tried to use the source code available on their website, but I had a problem with the script. So I used the source code on GitHub.


1- Install a git client
$
$ sudo apt-get install git

2- Get Source Code
$
$ git clone git://github.com/280north/cappuccino.git cappuccino


Step 2: Install Needed Packages

Browse to the cappuccino folder and rub a bootstrap that will install any needed packages

cd ./cappuccino
./bootstrap.sh
================================================================================
Narwhal JavaScript platform is required. Install it automatically now?
Enter "yes" or "no": 
yes
================================================================================
To use the default location, "/home/adly/narwhal", just hit enter/return, or enter another path:
================================================================================
Using Narwhal installation at "/home/adly/narwhal". Is this correct?
Enter "yes" or "no":
yes
.
.
.
================================================================================
You must add Narwhal's "bin" directory to your PATH environment variable. Do this automatically now?
    "export PATH="/home/adly/narwhal/bin:$PATH"" will be appended to "/home/adly/.profile".
Enter "yes" or "no": 
yes
Added to "/home/adly/.profile". Restart your shell or run "source /home/adly/.profile".
================================================================================
Before building Cappuccino we recommend you set the $CAPP_BUILD 
environment variable to a path where you wish to build Cappuccino.
This can be automatically set to the default value of "/home/adly/cappuccino/Build", or you can set $CAPP_BUILD yourself.
    "export CAPP_BUILD="/home/adly/cappuccino/Build"" will be appended to "/home/adly/.profile".
Enter "yes" or "no":
yes 

Note: On a fresh copy of Ubuntu 10.10, I had a message asking me to change from working with OpenJDK to SunJDK. So I had to install it first. And unfortunately it was no longer on the Multiverse section of the Ubuntu archive, so I searched to find the following commands:

sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
sudo apt-get update   
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo update-alternatives --config java


Step 3: Compile Source Code

After restarting the shell, it is time to compile.
$ cd ./cappuccino/
~/cappuccino$ jake install
No command 'jake' found

~/cappuccino$ export PATH="/home/adly/narwhal/bin:$PATH"
~/cappuccino$ jake



Thanks to Randy Luecke for helping.

Resources:
Getting and Building the Source
Sun Java moved to the Partner repository
Choosing the default Java to use

Comments

  1. I have a problem. I can't use 'jake' command even I exported path in the last row. I can't find any link which explain to install 'jake' on ubuntu. How did you install it?

    ReplyDelete
    Replies
    1. I did not use other external links. I just found the jakefile inside my directory after step 2. Maybe you can search for it inside your directory in case the paths changed in later versions.

      Delete

Post a Comment

Popular posts from this blog

Prayer Times Calculations: Pure C++ Code

[25-March-2017] Update: For brothers and sisters in Indonesia or any country below the equator, thanks to Reza's comment ,  the code now works correctly. [18-January-2012 Update: I refined the code to make it easier and more elegant to use] [06-July-2011 Update: I found this page http://praytimes.org/calculation#Implementation ] This idea came to me when a friend of mine was asking for an 'offline database' for prayer times. I searched for algorithms to make my own database and almost all search results lead to the same algorithm. And all codes are divided into two categories: a simple but approximate one, and a complicated but precise one. I tried with the complicated one to understand it but it needs more time because of its nested functions and -unfortunately- it is not a priority right now. So I went with the easy one as a start. One thing I noticed is that every person is trying to make the ultimate use of the framework he is working on (mostly dotNet). But co...

[Qt] Custom QListView delegate with word wrap

Using QListView with a custom item layout has been a very popular demand by many developers. The problem with using  a custom delegate was having some basic features like word wrap depending on the allowed list size. Here is a screenshot from a project prototype I've been working on. The text will wrap around to fit in multiple lines depending on text length and list view width. My custom delegate is about using two important methods: QFontMetrics::boundingRect() and QPainter::drawText() . The first method will return the minimum Rect needed to draw the given text using the given origin and font. The second method draws the given text within the given Rect. Note that the flag Qt::TextWordWrap is given to both methods when called. The code is simple: Get system default font. Process the font to suite your needs. In my case: I have a normal font and another bold one for the header. Create a QFontMetrics instance for each font. Use the QFontMetrics instances to cal...

Qt Folder Compression

I needed a compression module that does not depend on anything but Qt, and I mean a module to compress a complete folder with its children. This is because I wanted the compression module to work on any platform supported by Qt with no other dependencies. So I made this modules that only uses only qCompress() & qUncompress() methods plus some logic. It is mainly a recursive algorithm that serializes data into a single file, each with its relative path to the parent folder. And deserializing is just taking binary data, creating needed subfolders, and saving the file. Download: QtFolderCompressor.zip [FolderCompressor.h] #ifndef FOLDERCOMPRESSOR_H #define FOLDERCOMPRESSOR_H #include <QFile> #include <QObject> #include <QDir> class FolderCompressor : public QObject { Q_OBJECT public: explicit FolderCompressor(QObject *parent = 0); //A recursive function that scans all files inside the source folder //and serializes all files in a row of f...