Difference between revisions of "Build Panini on MacOSX"

From PanoTools.org Wiki
Jump to: navigation, search
m (Make XCode project)
m (Build Panini)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{| style="margin: 1em auto 1em 1em;background:#FFFF99;color:#FF0000;text-align:left;border: solid #FF3300;"
 +
|-valign="top"
 +
! '''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.
 +
|}
 
==Introduction==
 
==Introduction==
  
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.<br>
+
Panini is a visual tool for creating perspective views from panoramic and wide angle photographs. More than a [[Panorama Viewers|pano viewer]], more than a view camera, with features of both. For Linux/Unix, Win32, and Mac systems with OpenGL 2.0.<br>
You can find Panini on [http://pvqt.sourceforge.net/ Panini's project area] on [http://sourceforge.net/ Sourceforge.net].
+
You can find Panini on [http://sourceforge.net/projects/pvqt/ Panini's project area] on [http://sourceforge.net/ Sourceforge.net].
  
  
Line 10: Line 15:
  
  
'''Note: The steps with an asterix between brackets (*) behind it are only neccessary if you build from svn source. If you download the "panini-0.63.94R-src.zip" source package, you don't need MacPorts or svn.'''
+
'''Note: The steps with an asterix between brackets [*] behind it are only neccessary if you build from svn source. If you download the "panini-0.x.y-src.zip" source package, you don't need MacPorts or svn.'''
  
 
==Building environment==
 
==Building environment==
Line 17: Line 22:
  
 
===Install QT===
 
===Install QT===
Get and install the Trolltech QT Framework. Download it from [http://www.qtsoftware.com/downloads QTsoftware]. 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).
+
Get and install the Trolltech QT Framework. Download it from [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x 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 (*)===
+
===Install Macports [*]===
 
''Note: If you don't want to install MacPorts you can also download the binary svn version from [http://www.open.collab.net/downloads/community/ collab.net]. 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".''<br>
 
''Note: If you don't want to install MacPorts you can also download the binary svn version from [http://www.open.collab.net/downloads/community/ collab.net]. 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".''<br>
 
If you don't have it already, install MacPorts, which provides the <tt>port</tt> command, from [http://www.macports.org MacPorts], giving you compilable package access to thousands of pieces of open source software.  If you already have macports (formerly darwinports) installed, update it:  <blockquote><pre>$ sudo port selfupdate</pre>Make sure you have synced the latest port files:<pre>$ sudo port -d sync</pre></blockquote>
 
If you don't have it already, install MacPorts, which provides the <tt>port</tt> command, from [http://www.macports.org MacPorts], giving you compilable package access to thousands of pieces of open source software.  If you already have macports (formerly darwinports) installed, update it:  <blockquote><pre>$ sudo port selfupdate</pre>Make sure you have synced the latest port files:<pre>$ sudo port -d sync</pre></blockquote>
  
===Subversion (SVN) (*)===
+
===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.
 
You need to get and install Subversion from MacPorts as Tiger comes without subversion and Leopard has a way too old version of subversion.
 
<blockquote><pre>$ sudo port install subversion</pre></blockquote>
 
<blockquote><pre>$ sudo port install subversion</pre></blockquote>
Line 39: Line 44:
  
  
===Get Panini from SVN (*)===
+
===Get Panini from SVN [*]===
 
Check out the Panini sources from SVN and download them into your home directory (for example), like:<blockquote><pre>$cd ~
 
Check out the Panini sources from SVN and download them into your home directory (for example), like:<blockquote><pre>$cd ~
 
$ svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt Panini</pre></blockquote>
 
$ svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt Panini</pre></blockquote>
Line 46: Line 51:
  
 
===Make XCode project===
 
===Make XCode project===
 +
'''First you need to disable the MacPorts installation
 +
Do this by going into the terminal and issue the command: <blockquote><pre>$ sudo mv /opt /opt.ORG</pre></blockquote>'''
 +
 
Cd into the Panini directory.<br>
 
Cd into the Panini directory.<br>
  
Run the following command inside the Panini source code directory: <blockquote><pre>$ qmake panini.pro</pre></blockquote>  
+
Run the following command inside the Panini source code directory: <blockquote><pre>$ qmake -spec macx-xcode panini.pro</pre></blockquote>  
 
This will create your Panini.xcodeproj project.<br><br>
 
This will create your Panini.xcodeproj project.<br><br>
  
 
==Build Panini straightforward for your system only==
 
==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.
 
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.4.x Tiger or 10.5.y Leopard Mac. See the next section of this wiki for that build type.<br>
+
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.<br>
  
 
*Double-click the "Panini.xcodeproj" project inside you Panini source directory.<br>
 
*Double-click the "Panini.xcodeproj" project inside you Panini source directory.<br>
Line 64: Line 72:
  
 
==Build a complete portable Universal Panini==
 
==Build a complete portable Universal Panini==
===Pre build configuration steps===
+
 
Before we build this portable Universal Panini we need to modify a script file.
+
*Cd into the mac directory inside you Panini source directory.
+
*Open the "complete-bundle.sh"  script file in a text editor.
+
*You will find the lines:
+
<pre># The App_path should contain the complete full path from / to where
+
# your source code folder is
+
Panini_path=/Users/Shared/development/Panini0.63.86
+
</pre>
+
So if you're Spiderman and you created the source directory "Panini" in your home directory, the "Panini_path" line should read:
+
<pre>Panini_path=/Users/Spiderman/Panini</pre>.
+
Below this (variable) line you should not need to modify anything.
+
  
 
===Set correct Panini project settings===
 
===Set correct Panini project settings===
 
Use Finder to find the "Panini.xcodeproj" inside your Panini source directory and double-click to open the project.
 
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.'''
 
*'''Set project build type to Release.'''
 
**Select the long rectangular "Project" button. Click it and set your project to "Release".
 
**Select the long rectangular "Project" button. Click it and set your project to "Release".
Line 85: Line 83:
 
**Select the build tab.
 
**Select the build tab.
 
***section Architectures.
 
***section Architectures.
****set "Architectures" to "Standard (32-bit Universal)"
+
****set "Architectures" to "64-bit Intel"
****set base SDK to "Mac OS X 10.4".
+
****set base SDK to "Mac OS X 10.5".
 
***Section Deployment
 
***Section Deployment
****set "Deployment target" to "Mac OS X 10.4" (''Note: OpenGL vs 2 is not available on 10.3'').
+
****set "Deployment target" to "Mac OS X 10.5" (''Note: OpenGL vs 2 is not available on 10.3'').
***Section GCC 4.0 - Code generation
+
 
****set "Instruction Scheduling" to "none".
 
****set "Instruction Scheduling" to "none".
 
****Close window by clicking the red "bulb" of this popup.
 
****Close window by clicking the red "bulb" of this popup.
Line 96: Line 93:
 
**Select the build tab.
 
**Select the build tab.
 
***section Architectures.
 
***section Architectures.
****set "Architectures" to "Standard (32-bit Universal)"
+
****set "Architectures" to "64-bit Intel"
****set base SDK to "Mac OS X 10.4".
+
****set base SDK to "Mac OS X 10.5".
 
***Section Deployment
 
***Section Deployment
****set "Deployment target" to "Mac OS X 10.4" (''Note: OpenGL vs 2 is not available on 10.3'').
+
****set "Deployment target" to "Mac OS X 10.5" (''Note: OpenGL vs 2 is not available on 10.3'').
***Section GCC 4.0 - Code generation
+
 
****set "Instruction Scheduling" to "none".
 
****set "Instruction Scheduling" to "none".
 
**Select the properties tab
 
**Select the properties tab
 
***set "Identifier"  to "Panini.sourceforge.net".
 
***set "Identifier"  to "Panini.sourceforge.net".
 
***set "Creator" to "TKSH".
 
***set "Creator" to "TKSH".
***set "Icon File" to "/Users/Spiderman/Panini/mac/appIcon.icns". (''Remember you were Spiderman building inside a Panini source directory inside your home directory?'')
+
***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.
 
**Close the popup window by clicking the red "bulb" of the window.
 
*'''Add "run script" build phase to Panini target.
 
*'''Add "run script" build phase to Panini target.
Line 113: Line 109:
 
**Type inside the "big" script window: "sh mac/complete-bundle.sh" ''(without the double-quotes)''.
 
**Type inside the "big" script window: "sh mac/complete-bundle.sh" ''(without the double-quotes)''.
 
**Close this popup window. You will see a new "Run Script" build phase added.
 
**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".
+
**Right-click (or Ctrl-click) the "Run Script" phase and rename it to "Complete bundle" (not neccessary, just gives clarity).
  
 
===Build Panini===
 
===Build Panini===
Line 119: Line 115:
 
'''Note:''' The Panini.app in your <tt>source-directory/build/Release</tt> directory is the correct Universal one, not the one in your root source directory.<br><br>
 
'''Note:''' The Panini.app in your <tt>source-directory/build/Release</tt> directory is the correct Universal one, not the one in your root source directory.<br><br>
 
Once this build has finished successfully, you can copy it to any location but "<tt>/Applications</tt>" would be the most appropriate location.
 
Once this build has finished successfully, you can copy it to any location but "<tt>/Applications</tt>" 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==
 
==Distributing the Universal Panini==
*Create a directory <tt>"Panini-<version>-mac"</tt> where version is your Panini version, like 0.63.90
+
*Create a directory <tt>"Panini-<version>-mac"</tt> where version is your Panini version, like 0.63.94
 
*Copy the Panini.app from your <tt>"<Panini_source_directory>/build/Release"</tt> into this newly created <tt>"Panini-<version>-mac"</tt> directory.
 
*Copy the Panini.app from your <tt>"<Panini_source_directory>/build/Release"</tt> into this newly created <tt>"Panini-<version>-mac"</tt> directory.
 
*Copy the "GPLversion3.txt", the "<tt>panini-<version>-release.txt</tt>", the "panini-build.txt" and the "panini-usage.txt" from the source directory also into this <tt>Panini-<version>-mac</tt> directory.
 
*Copy the "GPLversion3.txt", the "<tt>panini-<version>-release.txt</tt>", the "panini-build.txt" and the "panini-usage.txt" from the source directory also into this <tt>Panini-<version>-mac</tt> directory.
Line 128: Line 126:
 
* Select the created <tt>"Panini-<version>-mac"</tt> directory.
 
* Select the created <tt>"Panini-<version>-mac"</tt> directory.
 
*Make a standard compressed dmg image and share the resulting <tt>"Panini-<version>-mac.dmg"</tt> with the world.
 
*Make a standard compressed dmg image and share the resulting <tt>"Panini-<version>-mac.dmg"</tt> with the world.
 +
 +
[[Category:Software:Platform:Mac OS X]]

Latest revision as of 15:09, 3 September 2012

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.

Introduction

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 Sourceforge.net.


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 "panini-0.x.y-src.zip" 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 collab.net. 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 "panini-0.63.94R-src.zip"
  • 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 https://pvqt.svn.sourceforge.net/svnroot/pvqt 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 panini.pro

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 "Panini.app" 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 "Panini.sourceforge.net".
      • 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/complete-bundle.sh" (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 Panini.app 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 Panini.app 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 Utility.app".
  • 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.