Build Panini on MacOSX

From Wiki
Jump to navigation Jump to search
2012-Sep-03: This article is rewritten. The latest QT does no longer support 32bit, Carbon and/or PPC. It's currently only possible to build 64bits builds against a 64bit Cocoa version of Qt.


Panini is a visual tool for creating perspective views from panoramic and wide angle photographs. More than a pano viewer, more than a view camera, with features of both. For Linux/Unix, Win32, and Mac systems with OpenGL 2.0.
You can find Panini on Panini's project area on

This wiki page explains how to build Panini on MacOSX and it contains two "build" sections.

  • Build Panini straightforward for your system only.
  • Build a complete portable Universal Panini (for distribution).

Note: The steps with an asterix between brackets [*] behind it are only neccessary if you build from svn source. If you download the "" source package, you don't need MacPorts or svn.

Building environment

Download and install XCode

Download and install the XCode Tools version for your MacOSX version: Xcode 2.5.x for MacOSX 10.4.x or below and Xcode 3.1.x for 10.5.x (Leopard).

Install QT

Get and install the Trolltech QT Framework. Download it from Nokia Open Source Downloads. Select the "LGPL / Free" version. Select the "Download Qt 4.x libraries for Mac" and download the default Carbon set if you want to build for Tiger 10.4 and Leopard 10.5 (I didn't test the Cocoa version yet).

Install Macports [*]

Note: If you don't want to install MacPorts you can also download the binary svn version from This enables you to skip this step (Install MacPorts) and the following step (install subversion). You don't need subversion anyway if you download a "release source package".

If you don't have it already, install MacPorts, which provides the port command, from MacPorts, giving you compilable package access to thousands of pieces of open source software. If you already have macports (formerly darwinports) installed, update it:

$ sudo port selfupdate

Make sure you have synced the latest port files:

$ sudo port -d sync

Subversion (SVN) [*]

You need to get and install Subversion from MacPorts as Tiger comes without subversion and Leopard has a way too old version of subversion.

$ sudo port install subversion

General "pre-build" steps

You can build Panini either:

  • from the source package ""
  • from SVN.

Currently (early June), the stable version is 0.63.94 and completely up-to-date. You can just as well download that source package and skip the svn build.

Get Panini from stable source

Download the source code from the Panini project area. Unzip it.

Get Panini from SVN [*]

Check out the Panini sources from SVN and download them into your home directory (for example), like:

$cd ~
$ svn co Panini

This will create a Panini directory with the Panini source inside.
If you are asked to accept the ssl key from the sourceforge svn server, you need to accept it: either temorarily (p) or permanently (p).

Make XCode project

First you need to disable the MacPorts installation

Do this by going into the terminal and issue the command:

$ sudo mv /opt /opt.ORG

Cd into the Panini directory.

Run the following command inside the Panini source code directory:

$ qmake -spec macx-xcode

This will create your Panini.xcodeproj project.

Build Panini straightforward for your system only

As mentioned: You can build Panini straightforward with the generated XCode project. This will generate an application that will run perfectly on your system, but on your system only. You can also build it as a complete portable Universal application which will run on any 10.5.y Leopard Mac or newer. See the next section of this wiki for that build type.

  • Double-click the "Panini.xcodeproj" project inside you Panini source directory.
  • Once your project has opened you see the the long rectangular "Project" button. Click it and set your project to "Release" and to your Mac's architecture: "PPC" or "i386" (it will default to the correct one).
  • Navigate to "Targets" and open it so that you can see the "Panini" target. Select the Panini target and right-click (or ctrl-click) it and select "build Panini".
  • Once your project has succesfully built, you will find the "" inside your source directory inside "./build/Release".
  • Copy this app to a location of your liking where "/Applications" would be the most appropriate one.

Note again: This freshly built application will run fine on your system, but only on your system.

Build a complete portable Universal Panini

Set correct Panini project settings

Use Finder to find the "Panini.xcodeproj" inside your Panini source directory and double-click to open the project. Note: that it is as of 4.7 only possible to build 64bits versions against Cocoa.

  • Set project build type to Release.
    • Select the long rectangular "Project" button. Click it and set your project to "Release".
  • Set Main project settings
    • Double-click the blue icon (with Panini) in the top-left of the navigation.
    • Select the build tab.
      • section Architectures.
        • set "Architectures" to "64-bit Intel"
        • set base SDK to "Mac OS X 10.5".
      • Section Deployment
        • set "Deployment target" to "Mac OS X 10.5" (Note: OpenGL vs 2 is not available on 10.3).
        • set "Instruction Scheduling" to "none".
        • Close window by clicking the red "bulb" of this popup.
  • Set Panini target settings.
    • Double-click the "Panini target" inside "Targets".
    • Select the build tab.
      • section Architectures.
        • set "Architectures" to "64-bit Intel"
        • set base SDK to "Mac OS X 10.5".
      • Section Deployment
        • set "Deployment target" to "Mac OS X 10.5" (Note: OpenGL vs 2 is not available on 10.3).
        • set "Instruction Scheduling" to "none".
    • Select the properties tab
      • set "Identifier" to "".
      • set "Creator" to "TKSH".
      • set "Icon File" to "/Users/Spiderman/Panini-<version>-src/mac/appIcon.icns". (Remember you were Spiderman building inside a Panini source directory inside your home directory?)
    • Close the popup window by clicking the red "bulb" of the window.
  • Add "run script" build phase to Panini target.
    • Click the triangle in forn the Panini target to open it.
    • Right-click (or Ctrl-click) the Panini target
    • Select "Add -> New Build Phase -> New Run Script Build Phase"
    • Type inside the "big" script window: "sh mac/" (without the double-quotes).
    • Close this popup window. You will see a new "Run Script" build phase added.
    • Right-click (or Ctrl-click) the "Run Script" phase and rename it to "Complete bundle" (not neccessary, just gives clarity).

Build Panini

Now you can right-click (or Ctrl-click) the Panini target. Select the "Build Panini" option and wait untill it's finished building.
Note: The in your source-directory/build/Release directory is the correct Universal one, not the one in your root source directory.

Once this build has finished successfully, you can copy it to any location but "/Applications" would be the most appropriate location.

Note: If you did disable MacPorts earlier during the build process, you can now re-enable it.

Distributing the Universal Panini

  • Create a directory "Panini-<version>-mac" where version is your Panini version, like 0.63.94
  • Copy the from your "<Panini_source_directory>/build/Release" into this newly created "Panini-<version>-mac" directory.
  • Copy the "GPLversion3.txt", the "panini-<version>-release.txt", the "panini-build.txt" and the "panini-usage.txt" from the source directory also into this Panini-<version>-mac directory.
  • With Finder go to "/Applications/Utilities" and start the "Disk".
  • From the menu select "File -> New -> Disk Image from Folder"
  • Select the created "Panini-<version>-mac" directory.
  • Make a standard compressed dmg image and share the resulting "Panini-<version>-mac.dmg" with the world.