How to compile Tupi source code (OSX) using Macports

Once again, Cristian Cepeda is helping us to bring Tupi closer to the Mac world. This time, adding a new way to compile it using a friendly package manager called Macports.

Note: To build and install Tupi on Mac OSX following this article, the Terminal application is required. This tool can be located at /Applications/Utilities/Terminal using the Finder application.
The Terminal is just a command console (terminal emulator), so if you have no experience using it, we recommend you to take a look at this little guide:

http://www.hacktheday.com/beginners-guide-to-apple-terminal-part-1/

Now, when you feel ready to compile/install Tupi from source code, please follow the instructions below:

1. Install the XCode Developer Tools available at:

https://developer.apple.com/downloads/index.action

If your OSX version is Lion, try version 4.1 or later and include the package called "Command Line Tools for Xcode"




If your OSX version is Snow Leopard, try version 3.2


Note: an Apple ID account is required to download XCode

2. Install the Macports (package manager) available at:

http://www.macports.org/

Read the installation instructions at:
http://www.macports.org/install.php

3. Install required ports:
    $ sudo port install zlib
    $ sudo port install ffmpeg +nonfree
    $ sudo port install git-core
    $ sudo port install qt4-mac

4. Download Tupi source code from Gitorious:
    $ mkdir -p /Users/username/tupi/sources (where username is your user account name in the OSX system)
    $ cd /Users/username/tupi/sources
    $ git clone git://github.com/xtingray/tupi.git

5. Move into project's directory:
    $ cd tupi

6. Run the configure script:

    $ ./configure --prefix=/Users/username/tupi/installer --bindir=/Users/username/tupi/installer --with-debug

7. Compile the project:
    $ make

8. Install binaries and resources:
    $ sudo make install

9. Create the .dmg installer:
    $ cd /Users/username/tupi/sources/tupi
    $ ./tools/build_mac_osx_app.sh /Users/username/tupi/sources/tupi /Users/username/tupi/installer

10. Look for the .dmg file at the path /Users/username/tupi/installer and install it. Now you can enjoy Tupi! (like we do).

Pending tasks:
- To make Tupi port file for Macports