Friday, February 25, 2011

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

Thursday, February 10, 2011

RealPlayer Stream on Nokia: Unable to connect

I've been facing the message of "Unable to connect" when I stream any RTSP link like these:
  • [video] rtsp://video3.multicasttech.com/AFTVClassics3GPP296.sdp
  • [audio] rtsp://rmv8.bbc.net.uk:554/radio1coyopa/radio_1_-_friday_1900.ra

And after some observations, here is what I've found:

1- When RealPlayer asks for an internet connection and starts it, I often receive the message. But when I open a connection manually, I works fine.

2- Make sure that the access point given to RealPlayer is a working one:
Options -> Settings -> Streaming -> Network -> Access point in use

3- Make sure the WLAN bandwidth is set to a right value that suits your connection speed:
Options -> Settings -> Streaming -> Network -> Options -> Advanced settings -> WLAN bandwidth