Audio Data API ~ Build from Scratch

Installing build tools

Before I can build Firefox i needed to install some build tools. To guide me through the process i used Mozilla’s Documentation. To get started you need Xcode and MacPorts, if you need help installing these visit my post on Installing Git on Mac OS.

To install the build tools run these two commands in your terminal:

  • sudo port sync
  • sudo port install mercurial libidl autoconf213

Building Firefox

Update with Audio Patch

Due to the fact that the audio data api is brand new it is always changing and therefore the version numbers and patch links I am providing may be outdated visit the audio api wiki to check for updates.

  • hg update -r 6d517fe3d7ae (use 683dfdc4adf0 if wiki has not been updated post May 14)
  • get a patch and save it on your computer: patch -p1 < pathToaudio11h.diff

Making Config file

Type the following commands in the terminal. Make sure all ‘ and ” are correct. For more information and if you are not running Mac OS 10.6 visit Build Prerequisites.

  • let’s build Firefox:  echo ‘. $topsrcdir/browser/config/mozconfig’ > mozconfig
  • …in this directory:  echo ‘mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release’ >> mozconfig
  • echo ‘mk_add_options MOZ_MAKE_FLAGS=”-s -j4″‘ >> mozconfig
  • echo ‘ac_add_options –with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk’ >> mozconfig


  • make -f

Make a Package

  • cd objdir-ff-release
  • make package

Run The Browser

You are now ready to run the browser. If you have other versions of Firefox installed you will need to make a new profile.

  • mozilla-central/objdir-ff-release/dist/ -no-remote -profilemanager

View all of my blogs on Audio
View all of my blogs

Installing Git on Max OS

If you have been following my blog you would know that I have been working with Git for a while but on my Vista machine. Getting started with Git can be challenging so in order to be able to easily reproduce my steps I have created 2 separate blogs about it. #1 Setting Up GitHub on Windows #2. Adding Code To GitHub Now that I will be working on an iMax i have decided to do the same. The challenge here is to learn how to install things on the Mac (this is my first week using the not configured Mac OS) and also to figure out how to link Git to my existing repo without braking my Windows configuration.

After some googling i found a helpful site courtesy  of  git: check it out here

Installing xCode

In order to run the make command you need to install xCode . xCode is a developer tool that will enable you to make iPhone and Mac OS applications. In order to download xCode you have to make an Apple Developer Account on their site. Once you are logged in go to the Downloads section and under Snow Leopard Downloads click on the xCode 3.2.2 and iPhone SDK link (note that by the time you do this the version may have changed).

Once the file is downloaded open the containing folder and double click on the .dmg file (i think the icon for all of these file types is a 3D box) Once you have double clicked on it you will get a pop-up window guiding you through the installation. Don’t fly through the process because one of the windows will ask you which features you want to install and not all of them are check-marked by default (i ensured all of them are). Here is a snap shot of the installation video:

When the installation finished you should see a big green check mark (the first time i run the installer it failed and i didn’t even notice). Also, if you click on the magnifying glass located in the top right corner of the desktop and type in xcode you should see it listed as an application.

Download and Install Git

In order to install Git download git-1.7.1.tar.bz2 (version might be different) from Git.

  • Open the terminal application and change to the Downloads directory (assuming that where git downloaded): cd ~/Downloads
  • Unzip the file: tar -xjf git-1.7.1.tar.bz2
  • Switch to the Git directory: cd git-1.7.1
  • Make git and put it in the /opt/git folder for easy removal: make prefix=/opt/git
  • Install the compiled binaries: sudo make install prefix=/opt/git

The next step is installing man pages but since i dont have MacPorts ill go over that first

Installing MacPorts

To install MacPorts visit their download site and under the Mac OS X Package (.pkg) Installer section download the.dmg for your OS (I chose the SnowLeopard one). Once the file downloaded double click on it and an installation window will open similar to the xCode one i described above.

Setting up Man Pages

Git man pages are not yet installed so you should install them because they are very helpful

  • Get them (this takes a while, use -d after port if u get stuck): sudo port install asciidoc xmlto
  • make man prefix=/opt/git
  • sudo make install-man prefix=/opt/git

Public keys

Check out this tutorial on setting up public keys. Now if you already have Git set up on another machine use the tutorial to generate the keys/files and then edit the files manually.


You are now ready to run git commands. Use clone to get a local copy of your repository.

  • git clone git:// dirName

View all of my blogs on GitHub
View all of my blogs

iTouch… My Struggle

If you have been following along with my Apple OS/Cocoa blog you know that I am taking an Apple programming course. If this is the first you’ve heard about it read more here. Last week I borrowed an iTouch from my school to help me with developing apps. (The school got a wicked discount of $8…Be carefull Apple, with those deals you might go bankrupt). Anyhow, I decided to make some use out of my new device and download an IRC app that would help me with my processing.js project. Seems simple enough right? Well lets see.

I fired up the device, made sure i was connected to my home WiFi, and then I clicked on the AppStore thumbnail. Nice the app store came up and i searched for IRChon, after dealing with some predictive text bs i finally found the app. Now how do i download it? I scrolled up and down looking for a; ‘Get It’, or a ‘Download’, or an ‘Install’ button but found only a ‘Free’ button. Haha… when you click the ‘Free’ button it changes to an ‘Install’  button whatever! So now you click the install button and a pop-up comes up asking you to enter your account information!? Great… lets go to and get an account. (Navigation:>store->account->log in->new account). After filling out all of my information here is what I got:

What a wonderful error message, don’t you agree? Well I thought i had a browser issue so I made multiple attempts: Minefield, Firefox, Chrome, IE. But nope the same issue. You want to know what the problem was? It simply didn’t like my gmail account so i had to use a different email address. Alright fine, now can I download my app? I went back to the store, clicked install, put in my account information, pressed ok….. You want to know what happened? The device returned to the Home screen and a pop-up displayed the error ‘Authorization failed. Please connect to iTunes.’ OMG do not tell me I need another account!!!!! I pressed the iTunes thumbnail on the device to see if I can find a ‘log in’ button. i scrolled down and behold a label that said ‘Account: myemail’. So Now i was really confused am I logged in or aren’t I? I tried doing the above steps a couple times which was really annoying because the form that is used to log into your apple account before you can download the app clears so you have to reenter your email and password again and again. Normally this wouldn’t be a problem but i can’t see why i would want to go to the extremes to secure an apple store account.

Ok I decided to approach this from another angle. I plugged the iTouch to my computer and fired up iTunes. I went into the store, logged-in, and was asked to ‘update needed security inforamtion’. Ok I thought maybe that was the problem so i clicked ‘continue’ and you know where the browser took me!!! To UPDATE My profile!!!!!!!! Well maybe they consider my bday, country and gender as Security so I decided to fill in all of the fields. I tried loggin in again and here is what I got:

Another wonderful error message. I decided to put the iTouch away because if i broke it I would have to dish out $200. I came back the next day and after attempting to log into the apple store via iTunes, and finally I was taken to the ‘Fill in ur Credit Card Info’ screen. So this is Apples idea of a secure site. Right. There is no way I am putting in my Credit Card.  Now comes the next question…. How does one share an app?

View all of my posts on Apple
View all of my posts

All About Me… an iPhone App

i just finished my second iPhone app. This app is way more sophisticated then the last one i wrote. It took me almost a week to figure things out and get them working. I think that the biggest problem I have is converting numbers to strings and using member functions. Read the specs for the app. Basically, when you enter a number in the GPA textField the app should update the slider. The problem with this is that the textField value is a string and the slider setValue method only accepts Floats. Let me tell you that this took me soooo long to figure out. This is what you need to do:

//make a sting and set it to the value of the textField
 NSString *text = [[NSString alloc] initWithFormat:@"%@",[txt_gpa text]];
//convert the string to a float        
 float val = [text floatValue];
//set the value of the slider
 [sl_gpa setValue:val animated:YES];
//deallocate the value
 [text release];

I also figured out that to dismiss the keyboard you have to implement:

– (BOOL)textFieldShouldReturn:(UITextField *)theTextField {…}

Here is a screen shot of my app:

You can download the source from here.

View all of my posts on Apple

View all of my posts


My first IPhone Application

As I was saying earlier, I recently enrolled in an Apple programming class. Today I worked on a small Hello app that I found on the iPhone Dev Center. It is basically a regular Hello World app that has a text field, a button, and a label. When you type in your name in the text field and press the button, the label gets updated. Here is a screen shot of it working:

As you can tell, i am still trying to figure out how to dismiss the keyboard. You would think its automatic since there is a ‘Done’ button but it’s NOT. You can download my source if you wish to try it.

View all of my posts on Apple

View all of my posts

The beginning of my struggle with Cocoa

I recently decided to take the Apple programming course available at my school (Seneca College). The main idea here is to develop a fully functional IPhone or ITouch App. This is going to be quite challenging as I do not own a MAC (thanks to and their lack of ethics) but I think it will be FUN. Luckily, my school has enough MAC machines so I just have to buckle down and stay at school and dish out the extra money for parking. I will try to post frequently and post screen shots of my app. Well, before anything I need an idea… Feel free to suggest stuff via post comment, all comments are appreciated. Stay tunned….

View all of my blogs