Skip to content

Commit eca69c2

Browse files
committedApr 7, 2012
OS X install update - osgearth and globe plugin
1 parent 59a08c4 commit eca69c2

File tree

3 files changed

+398
-100
lines changed

3 files changed

+398
-100
lines changed
 

‎INSTALL

Lines changed: 123 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Quantum GIS (QGIS)
22
Building QGIS from source - step by step
3-
Wednesday April 04, 2012
3+
Saturday April 07, 2012
44

55

6-
Last Updated: Wednesday April 04, 2012
7-
Last Change : Monday December 26, 2011
6+
Last Updated: Saturday April 07, 2012
7+
Last Change : Saturday April 07, 2012
88

99

1010
1. Introduction
@@ -26,8 +26,8 @@ Last Change : Monday December 26, 2011
2626
5. Building on MacOS X
2727
5.1. Install Developer Tools
2828
5.2. Install Qt4 from disk image
29-
5.3. Install development frameworks for QGIS dependencies
30-
5.4. Install CMake for OSX
29+
5.3. Install CMake for OSX
30+
5.4. Install development frameworks for QGIS dependencies
3131
5.5. QGIS source
3232
5.6. Configure the build
3333
5.7. Building
@@ -1245,7 +1245,25 @@ may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS,
12451245
CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build.
12461246

12471247

1248-
5.3. Install development frameworks for QGIS dependencies
1248+
5.3. Install CMake for OSX
1249+
==========================
1250+
1251+
Get the latest source release from here:
1252+
1253+
http://www.cmake.org/cmake/resources/software.html
1254+
1255+
Binary installers are available for OS X, but they are not recommended
1256+
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
1257+
strange application). Instead, download the source.
1258+
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
1259+
Double-click the source tarball, then cd to the source folder and:
1260+
1261+
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
1262+
make
1263+
sudo make install
1264+
1265+
1266+
5.4. Install development frameworks for QGIS dependencies
12491267
=========================================================
12501268

12511269
Download William Kyngesburye's excellent GDAL Complete package that includes
@@ -1271,7 +1289,7 @@ Old versions of these packages for older systems are available in the
12711289
software archive section.
12721290

12731291

1274-
5.3.1. Additional Dependencies: General compatibility note
1292+
5.4.1. Additional Dependencies: General compatibility note
12751293
==========================================================
12761294

12771295
There are some additional dependencies that, at the time of writing, are not
@@ -1286,7 +1304,7 @@ Stable release versions are preferred. Beta and other development versions may
12861304
have problems and you are on your own with those.
12871305

12881306

1289-
5.3.2. Additional Dependencies: Expat
1307+
5.4.2. Additional Dependencies: Expat
12901308
=====================================
12911309

12921310
Snow Leopard+ note: Snow Leopard includes a usable expat, so this step is
@@ -1304,7 +1322,7 @@ source folder and:
13041322
sudo make install
13051323

13061324

1307-
5.3.3. Additional Dependencies: Python
1325+
5.4.3. Additional Dependencies: Python
13081326
======================================
13091327

13101328
Leopard+ note: Starting with Leopard a usable Python is included
@@ -1321,7 +1339,7 @@ Python 3 is a major change, and may have compatibility issues, so try it at
13211339
your own risk.
13221340

13231341

1324-
5.3.4. Additional Dependencies: SIP
1342+
5.4.4. Additional Dependencies: SIP
13251343
===================================
13261344

13271345
Retrieve the python bindings toolkit SIP from
@@ -1380,7 +1398,7 @@ Then continue with compilation and installation:
13801398
sudo make install
13811399

13821400

1383-
5.3.5. Additional Dependencies: PyQt
1401+
5.4.5. Additional Dependencies: PyQt
13841402
====================================
13851403

13861404
Retrieve the python bindings toolkit for Qt from
@@ -1435,7 +1453,7 @@ QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS.
14351453
Then make again.
14361454

14371455

1438-
5.3.6. Additional Dependencies: Qwt
1456+
5.4.6. Additional Dependencies: Qwt
14391457
===================================
14401458

14411459
The GPS tracking feature uses Qwt.
@@ -1461,7 +1479,7 @@ The Qwt shared library is now installed in /usr/local/qwt-5.x.x (x.x is
14611479
the minor.point version). Remember this for QGIS configuration.
14621480

14631481

1464-
5.3.7. Additional Dependencies: Bison
1482+
5.4.7. Additional Dependencies: Bison
14651483
=====================================
14661484

14671485
The version of bison available by default on Mac OS X is too old so you
@@ -1477,23 +1495,92 @@ tarball to unpack it, then cd to the source folder and:
14771495
sudo make install
14781496

14791497

1480-
5.4. Install CMake for OSX
1481-
==========================
1498+
5.4.8. Additional Dependencies: OSG & osgEarth
1499+
==============================================
14821500

1483-
Get the latest source release from here:
1501+
If you want the Globe plugin in QGIS (default OFF), OSG and osgEarth are needed.
14841502

1485-
http://www.cmake.org/cmake/resources/software.html
1503+
First, OpenSceneGraph. The main site is:
14861504

1487-
Binary installers are available for OS X, but they are not recommended
1488-
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
1489-
strange application). Instead, download the source.
1490-
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
1491-
Double-click the source tarball, then cd to the source folder and:
1505+
http://www.openscenegraph.org/
14921506

1493-
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
1507+
Get the tarball (or zip) for the the latest 3.x version.
1508+
Binary availability is unknown at this time as the site is down.
1509+
1510+
Another place to get the source is github:
1511+
1512+
http://github.com/openscenegraph/osg/tags
1513+
1514+
Download the latest 3.1 version (you can select a tarball when you hover over
1515+
the entry). Double-click the source tarball to unpack it.
1516+
(There is a version numbering oddity in the source, but since we'll be
1517+
bundling OSG as it's meant to be, it really doesn't matter).
1518+
1519+
Installation is a bit out of touch with OS X standards, so we'll stage it to a
1520+
temporary location first. You could stage it to the folder that the OSG source
1521+
folder is in, or a common staging area like /Users/Shared/unix/osg. Pick a
1522+
folder not hidden and that doesn't need admin permissions to write to for simplicity.
1523+
1524+
In a new Terminal cd to the source folder and:
1525+
1526+
mkdir build
1527+
cd build
1528+
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
1529+
-D OSG_COMPILE_FRAMEWORKS=ON \
1530+
-D OSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
1531+
..
1532+
make
1533+
make install
1534+
sudo mkdir -p "/Library/Application Support/OpenSceneGraph/PlugIns"
1535+
1536+
Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
1537+
1538+
Now move all .frameworks from the lib/ folder in the staging area to /Library/Frameworks. Move the files in the osgPlugins folder in the lib/ folder
1539+
to /Library/Application Support/OpenSceneGraph/PlugIns. The bin/ executables
1540+
can be left where they are, we don't need them.
1541+
1542+
Next up is libzip. Get the latest tarball at:
1543+
1544+
http://nih.at/libzip/
1545+
1546+
Double-click the source tarball to unpack it.
1547+
In a new Terminal cd to the source folder and:
1548+
1549+
./configure --disable-dependency-tracking --disable-shared CFLAGS=-Os
14941550
make
14951551
sudo make install
14961552

1553+
Then it's time for osgEarth. Downloads are also on github:
1554+
1555+
http://github.com/gwaldron/osgearth/tags
1556+
1557+
Download a tarball for the latest stable release (sorting can be confusing here).
1558+
Double-click the source tarball to unpack it.
1559+
1560+
This one also needs an intermediate staging area. Choose a folder similar to OSG.
1561+
1562+
In a new Terminal cd to the source folder and:
1563+
1564+
mkdir build
1565+
cd build
1566+
export PATH="/path/to/osg/staging/folder/bin:$PATH"
1567+
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
1568+
-D CMAKE_BUILD_TYPE=MinSizeRel \
1569+
-D OSGEARTH_BUILD_FRAMEWORKS=true \
1570+
..
1571+
make
1572+
make install
1573+
sudo mkdir -p "/Library/Application Support/OpenSceneGraph/Headers"
1574+
1575+
Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
1576+
Also enter the OSG staging path /bin folder in the export above.
1577+
1578+
Move all the .frameworks from the lib/ folder to /Library/Frameworks.
1579+
Move the files in the osgPlugins folder in the lib/ folder to
1580+
/Library/Application Support/OpenSceneGraph/PlugIns. Move the osgEarthDrivers
1581+
folder in the include/ folder to /Library/Application Support/OpenSceneGraph/Headers. And as for OSG, you can leave the bin/
1582+
executables where they are.
1583+
14971584

14981585
5.5. QGIS source
14991586
================
@@ -1527,8 +1614,8 @@ In a Terminal cd to the qgis source folder previously downloaded, then:
15271614
mkdir build
15281615
cd build
15291616
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
1530-
-D CMAKE_BUILD_TYPE=MinSizeRel \
1531-
-D WITH_INTERNAL_SPATIALITE=FALSE \
1617+
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
1618+
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
15321619
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
15331620
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
15341621
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -1549,8 +1636,8 @@ script and add arch flags to the configuration:
15491636
sudo chmod +x /usr/local/bin/python32
15501637

15511638
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \
1552-
-D CMAKE_BUILD_TYPE=MinSizeRel \
1553-
-D WITH_INTERNAL_SPATIALITE=FALSE \
1639+
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
1640+
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
15541641
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
15551642
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
15561643
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -1567,19 +1654,19 @@ the above configuration:
15671654
On Lion you are on your own to figure out how to install libfcgi and add fcgi
15681655
support to the system Apache. Not recommended for the average user.
15691656

1570-
Bundling note: Older Qt versions may have problems with some Qt plugins and
1571-
QGIS. The way to handle this is to bundle Qt inside the QGIS application. You
1572-
can do this now or wait to see if there are immediate crashes when running QGIS.
1573-
It's also a good idea to bundle Qt if you need to copy QGIS to other Macs (where
1574-
you would have to install Xcode just so Qt would install!).
1657+
If you want the Globe plugin (and you compiled and installed OSG/osgEarth),
1658+
add the following lines before the last line in the above configuration:
15751659

1576-
To bundle Qt, add the following line before the last line (the ".." line) in
1577-
the above cmake configurations:
1660+
-D WITH_GLOBE=true \
1661+
-D OSGEARTH_INCLUDE_DIR="/Library/Application Support/OpenSceneGraph/Headers" \
1662+
-D OSG_PLUGINS_PATH="/Library/Application Support/OpenSceneGraph/PlugIns" \
15781663

1579-
-D QGIS_MACAPP_BUNDLE=1 \
1664+
Bundling note: Older Qt versions may have problems with some Qt plugins and
1665+
QGIS. The way to handle this is to bundle Qt inside the QGIS application. The
1666+
default is to bundle Qt (and osg/osgEarth, if configured).
15801667

15811668
Even better for distribution purposes, to also bundle any extra non-framework,
1582-
non-standard, libs (ie postgres' libpq) bump the bundle number to 2:
1669+
non-standard, libs (ie postgres' libpq) set the bundle value to 2:
15831670

15841671
-D QGIS_MACAPP_BUNDLE=2 \
15851672

‎doc/INSTALL.html

Lines changed: 155 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
<DIV CLASS="header" ID="header">
8181
<H1>Quantum GIS (QGIS)</H1>
8282
<H2>Building QGIS from source - step by step</H2>
83-
<H3>Wednesday April 04, 2012</H3>
83+
<H3>Saturday April 07, 2012</H3>
8484
</DIV>
8585

8686
<DIV CLASS="body" ID="body">
8787
<P>
88-
Last Updated: Wednesday April 04, 2012
89-
Last Change : Monday December 26, 2011
88+
Last Updated: Saturday April 07, 2012
89+
Last Change : Saturday April 07, 2012
9090
</P>
9191
<DIV CLASS="toc">
9292

@@ -115,8 +115,8 @@ <H3>Wednesday April 04, 2012</H3>
115115
<UL>
116116
<LI><A HREF="#toc18">5.1. Install Developer Tools</A>
117117
<LI><A HREF="#toc19">5.2. Install Qt4 from disk image</A>
118-
<LI><A HREF="#toc20">5.3. Install development frameworks for QGIS dependencies</A>
119-
<LI><A HREF="#toc21">5.4. Install CMake for OSX</A>
118+
<LI><A HREF="#toc20">5.3. Install CMake for OSX</A>
119+
<LI><A HREF="#toc21">5.4. Install development frameworks for QGIS dependencies</A>
120120
<LI><A HREF="#toc22">5.5. QGIS source</A>
121121
<LI><A HREF="#toc23">5.6. Configure the build</A>
122122
<LI><A HREF="#toc24">5.7. Building</A>
@@ -1775,7 +1775,30 @@ <H2>5.2. Install Qt4 from disk image</H2>
17751775
</P>
17761776

17771777
<A NAME="toc20"></A>
1778-
<H2>5.3. Install development frameworks for QGIS dependencies</H2>
1778+
<H2>5.3. Install CMake for OSX</H2>
1779+
1780+
<P>
1781+
Get the latest source release from here:
1782+
</P>
1783+
<P>
1784+
<A HREF="http://www.cmake.org/cmake/resources/software.html">http://www.cmake.org/cmake/resources/software.html</A>
1785+
</P>
1786+
<P>
1787+
Binary installers are available for OS X, but they are not recommended
1788+
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
1789+
strange application). Instead, download the source.
1790+
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
1791+
Double-click the source tarball, then cd to the source folder and:
1792+
</P>
1793+
1794+
<div class="code"><PRE>
1795+
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
1796+
make
1797+
sudo make install
1798+
</PRE></div>
1799+
1800+
<A NAME="toc21"></A>
1801+
<H2>5.4. Install development frameworks for QGIS dependencies</H2>
17791802

17801803
<P>
17811804
Download William Kyngesburye's excellent GDAL Complete package that includes
@@ -1808,7 +1831,7 @@ <H2>5.3. Install development frameworks for QGIS dependencies</H2>
18081831
software archive section.
18091832
</P>
18101833

1811-
<H3>5.3.1. Additional Dependencies: General compatibility note</H3>
1834+
<H3>5.4.1. Additional Dependencies: General compatibility note</H3>
18121835

18131836
<P>
18141837
There are some additional dependencies that, at the time of writing, are not
@@ -1824,7 +1847,7 @@ <H3>5.3.1. Additional Dependencies: General compatibility note</H3>
18241847
have problems and you are on your own with those.
18251848
</P>
18261849

1827-
<H3>5.3.2. Additional Dependencies: Expat</H3>
1850+
<H3>5.4.2. Additional Dependencies: Expat</H3>
18281851

18291852
<P>
18301853
<U>Snow Leopard+ note:</U> Snow Leopard includes a usable expat, so this step is
@@ -1847,7 +1870,7 @@ <H3>5.3.2. Additional Dependencies: Expat</H3>
18471870
sudo make install
18481871
</PRE></div>
18491872

1850-
<H3>5.3.3. Additional Dependencies: Python</H3>
1873+
<H3>5.4.3. Additional Dependencies: Python</H3>
18511874

18521875
<P>
18531876
<U>Leopard+ note:</U> Starting with Leopard a usable Python is included
@@ -1867,7 +1890,7 @@ <H3>5.3.3. Additional Dependencies: Python</H3>
18671890
your own risk.
18681891
</P>
18691892

1870-
<H3>5.3.4. Additional Dependencies: SIP</H3>
1893+
<H3>5.4.4. Additional Dependencies: SIP</H3>
18711894

18721895
<P>
18731896
Retrieve the python bindings toolkit SIP from
@@ -1956,7 +1979,7 @@ <H3>5.3.4. Additional Dependencies: SIP</H3>
19561979
sudo make install
19571980
</PRE></div>
19581981

1959-
<H3>5.3.5. Additional Dependencies: PyQt</H3>
1982+
<H3>5.4.5. Additional Dependencies: PyQt</H3>
19601983

19611984
<P>
19621985
Retrieve the python bindings toolkit for Qt from
@@ -2042,7 +2065,7 @@ <H3>5.3.5. Additional Dependencies: PyQt</H3>
20422065
Then make again.
20432066
</P>
20442067

2045-
<H3>5.3.6. Additional Dependencies: Qwt</H3>
2068+
<H3>5.4.6. Additional Dependencies: Qwt</H3>
20462069

20472070
<P>
20482071
The GPS tracking feature uses Qwt.
@@ -2077,7 +2100,7 @@ <H3>5.3.6. Additional Dependencies: Qwt</H3>
20772100
the minor.point version). Remember this for QGIS configuration.
20782101
</P>
20792102

2080-
<H3>5.3.7. Additional Dependencies: Bison</H3>
2103+
<H3>5.4.7. Additional Dependencies: Bison</H3>
20812104

20822105
<P>
20832106
The version of bison available by default on Mac OS X is too old so you
@@ -2099,29 +2122,122 @@ <H3>5.3.7. Additional Dependencies: Bison</H3>
20992122
sudo make install
21002123
</PRE></div>
21012124

2102-
<A NAME="toc21"></A>
2103-
<H2>5.4. Install CMake for OSX</H2>
2125+
<H3>5.4.8. Additional Dependencies: OSG &amp; osgEarth</H3>
21042126

21052127
<P>
2106-
Get the latest source release from here:
2128+
If you want the Globe plugin in QGIS (default OFF), OSG and osgEarth are needed.
21072129
</P>
21082130
<P>
2109-
<A HREF="http://www.cmake.org/cmake/resources/software.html">http://www.cmake.org/cmake/resources/software.html</A>
2131+
First, <B>OpenSceneGraph</B>. The main site is:
21102132
</P>
21112133
<P>
2112-
Binary installers are available for OS X, but they are not recommended
2113-
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
2114-
strange application). Instead, download the source.
2115-
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
2116-
Double-click the source tarball, then cd to the source folder and:
2134+
<A HREF="http://www.openscenegraph.org/">http://www.openscenegraph.org/</A>
2135+
</P>
2136+
<P>
2137+
Get the tarball (or zip) for the the latest 3.x version.
2138+
Binary availability is unknown at this time as the site is down.
2139+
</P>
2140+
<P>
2141+
Another place to get the source is github:
2142+
</P>
2143+
<P>
2144+
<A HREF="http://github.com/openscenegraph/osg/tags">http://github.com/openscenegraph/osg/tags</A>
2145+
</P>
2146+
<P>
2147+
Download the latest 3.1 version (you can select a tarball when you hover over
2148+
the entry). Double-click the source tarball to unpack it.
2149+
(There is a version numbering oddity in the source, but since we'll be
2150+
bundling OSG as it's meant to be, it really doesn't matter).
2151+
</P>
2152+
<P>
2153+
Installation is a bit out of touch with OS X standards, so we'll stage it to a
2154+
temporary location first. You could stage it to the folder that the OSG source
2155+
folder is in, or a common staging area like /Users/Shared/unix/osg. Pick a
2156+
folder not hidden and that doesn't need admin permissions to write to for simplicity.
2157+
</P>
2158+
<P>
2159+
In a new Terminal cd to the source folder and:
21172160
</P>
21182161

21192162
<div class="code"><PRE>
2120-
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
2163+
mkdir build
2164+
cd build
2165+
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
2166+
-D OSG_COMPILE_FRAMEWORKS=ON \
2167+
-D OSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
2168+
..
2169+
make
2170+
make install
2171+
sudo mkdir -p "/Library/Application Support/OpenSceneGraph/PlugIns"
2172+
</PRE></div>
2173+
2174+
<P>
2175+
Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
2176+
</P>
2177+
<P>
2178+
Now move all .frameworks from the lib/ folder in the staging area to /Library/Frameworks. Move the files in the osgPlugins folder in the lib/ folder
2179+
to /Library/Application Support/OpenSceneGraph/PlugIns. The bin/ executables
2180+
can be left where they are, we don't need them.
2181+
</P>
2182+
<P>
2183+
Next up is <B>libzip</B>. Get the latest tarball at:
2184+
</P>
2185+
<P>
2186+
<A HREF="http://nih.at/libzip/">http://nih.at/libzip/</A>
2187+
</P>
2188+
<P>
2189+
Double-click the source tarball to unpack it.
2190+
In a new Terminal cd to the source folder and:
2191+
</P>
2192+
2193+
<div class="code"><PRE>
2194+
./configure --disable-dependency-tracking --disable-shared CFLAGS=-Os
21212195
make
21222196
sudo make install
21232197
</PRE></div>
21242198

2199+
<P>
2200+
Then it's time for <B>osgEarth</B>. Downloads are also on github:
2201+
</P>
2202+
<P>
2203+
<A HREF="http://github.com/gwaldron/osgearth/tags">http://github.com/gwaldron/osgearth/tags</A>
2204+
</P>
2205+
<P>
2206+
Download a tarball for the latest stable release (sorting can be confusing here).
2207+
Double-click the source tarball to unpack it.
2208+
</P>
2209+
<P>
2210+
This one also needs an intermediate staging area. Choose a folder similar to OSG.
2211+
</P>
2212+
<P>
2213+
In a new Terminal cd to the source folder and:
2214+
</P>
2215+
2216+
<div class="code"><PRE>
2217+
mkdir build
2218+
cd build
2219+
export PATH="/path/to/osg/staging/folder/bin:$PATH"
2220+
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
2221+
-D CMAKE_BUILD_TYPE=MinSizeRel \
2222+
-D OSGEARTH_BUILD_FRAMEWORKS=true \
2223+
..
2224+
make
2225+
make install
2226+
sudo mkdir -p "/Library/Application Support/OpenSceneGraph/Headers"
2227+
</PRE></div>
2228+
2229+
<P>
2230+
Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
2231+
Also enter the OSG staging path /bin folder in the export above.
2232+
</P>
2233+
<P>
2234+
Move all the .frameworks from the lib/ folder to /Library/Frameworks.
2235+
Move the files in the osgPlugins folder in the lib/ folder to
2236+
/Library/Application Support/OpenSceneGraph/PlugIns. Move the osgEarthDrivers
2237+
folder in the include/ folder to /Library/Application Support/OpenSceneGraph/Headers. And as for OSG, you can leave the bin/
2238+
executables where they are.
2239+
</P>
2240+
21252241
<A NAME="toc22"></A>
21262242
<H2>5.5. QGIS source</H2>
21272243

@@ -2162,8 +2278,8 @@ <H2>5.6. Configure the build</H2>
21622278
mkdir build
21632279
cd build
21642280
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
2165-
-D CMAKE_BUILD_TYPE=MinSizeRel \
2166-
-D WITH_INTERNAL_SPATIALITE=FALSE \
2281+
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
2282+
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
21672283
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
21682284
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
21692285
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -2189,8 +2305,8 @@ <H2>5.6. Configure the build</H2>
21892305
sudo chmod +x /usr/local/bin/python32
21902306

21912307
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \
2192-
-D CMAKE_BUILD_TYPE=MinSizeRel \
2193-
-D WITH_INTERNAL_SPATIALITE=FALSE \
2308+
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
2309+
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
21942310
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
21952311
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
21962312
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -2199,7 +2315,7 @@ <H2>5.6. Configure the build</H2>
21992315
</PRE></div>
22002316

22012317
<P>
2202-
The QGIS Mapserver feature requires fastcgi support. This is included in
2318+
The QGIS <B>Mapserver</B> feature requires fastcgi support. This is included in
22032319
Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
22042320
component on Leopard and Snow, add the followling line before the last line in
22052321
the above configuration:
@@ -2214,24 +2330,24 @@ <H2>5.6. Configure the build</H2>
22142330
support to the system Apache. Not recommended for the average user.
22152331
</P>
22162332
<P>
2217-
<U>Bundling note:</U> Older Qt versions may have problems with some Qt plugins and
2218-
QGIS. The way to handle this is to bundle Qt inside the QGIS application. You
2219-
can do this now or wait to see if there are immediate crashes when running QGIS.
2220-
It's also a good idea to bundle Qt if you need to copy QGIS to other Macs (where
2221-
you would have to install Xcode just so Qt would install!).
2222-
</P>
2223-
<P>
2224-
To bundle Qt, add the following line before the last line (the ".." line) in
2225-
the above cmake configurations:
2333+
If you want the <B>Globe</B> plugin (and you compiled and installed OSG/osgEarth),
2334+
add the following lines before the last line in the above configuration:
22262335
</P>
22272336

22282337
<div class="code"><PRE>
2229-
-D QGIS_MACAPP_BUNDLE=1 \
2338+
-D WITH_GLOBE=true \
2339+
-D OSGEARTH_INCLUDE_DIR="/Library/Application Support/OpenSceneGraph/Headers" \
2340+
-D OSG_PLUGINS_PATH="/Library/Application Support/OpenSceneGraph/PlugIns" \
22302341
</PRE></div>
22312342

2343+
<P>
2344+
<U>Bundling note:</U> Older Qt versions may have problems with some Qt plugins and
2345+
QGIS. The way to handle this is to bundle Qt inside the QGIS application. The
2346+
default is to bundle Qt (and osg/osgEarth, if configured).
2347+
</P>
22322348
<P>
22332349
Even better for distribution purposes, to also bundle any extra non-framework,
2234-
non-standard, libs (ie postgres' libpq) bump the bundle number to 2:
2350+
non-standard, libs (ie postgres' libpq) set the bundle value to 2:
22352351
</P>
22362352

22372353
<div class="code"><PRE>

‎doc/osx.t2t

Lines changed: 120 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,25 @@ may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS,
102102
CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build.
103103

104104

105+
== Install CMake for OSX ==
106+
107+
Get the latest source release from here:
108+
109+
http://www.cmake.org/cmake/resources/software.html
110+
111+
Binary installers are available for OS X, but they are not recommended
112+
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
113+
strange application). Instead, download the source.
114+
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
115+
Double-click the source tarball, then cd to the source folder and:
116+
117+
```
118+
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
119+
make
120+
sudo make install
121+
```
122+
123+
105124
== Install development frameworks for QGIS dependencies ==
106125

107126
Download William Kyngesburye's excellent GDAL Complete package that includes
@@ -352,24 +371,100 @@ make
352371
sudo make install
353372
```
354373

355-
== Install CMake for OSX ==
374+
=== Additional Dependencies: OSG & osgEarth ===
356375

357-
Get the latest source release from here:
376+
If you want the Globe plugin in QGIS (default OFF), OSG and osgEarth are needed.
358377

359-
http://www.cmake.org/cmake/resources/software.html
378+
First, **OpenSceneGraph**. The main site is:
360379

361-
Binary installers are available for OS X, but they are not recommended
362-
(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a
363-
strange application). Instead, download the source.
364-
NOTE: 2.8.5 is broken for detecting part of Qt. Fixed in 2.8.6.
365-
Double-click the source tarball, then cd to the source folder and:
380+
http://www.openscenegraph.org/
366381

367-
```
368-
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
382+
Get the tarball (or zip) for the the latest 3.x version.
383+
Binary availability is unknown at this time as the site is down.
384+
385+
Another place to get the source is github:
386+
387+
http://github.com/openscenegraph/osg/tags
388+
389+
Download the latest 3.1 version (you can select a tarball when you hover over
390+
the entry). Double-click the source tarball to unpack it.
391+
(There is a version numbering oddity in the source, but since we'll be
392+
bundling OSG as it's meant to be, it really doesn't matter).
393+
394+
Installation is a bit out of touch with OS X standards, so we'll stage it to a
395+
temporary location first. You could stage it to the folder that the OSG source
396+
folder is in, or a common staging area like /Users/Shared/unix/osg. Pick a
397+
folder not hidden and that doesn't need admin permissions to write to for simplicity.
398+
399+
In a new Terminal cd to the source folder and:
400+
401+
```
402+
mkdir build
403+
cd build
404+
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
405+
-D OSG_COMPILE_FRAMEWORKS=ON \
406+
-D OSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS=OFF \
407+
..
408+
make
409+
make install
410+
sudo mkdir -p "/Library/Application Support/OpenSceneGraph/PlugIns"
411+
```
412+
413+
Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
414+
415+
Now move all .frameworks from the lib/ folder in the staging area to /Library/Frameworks. Move the files in the osgPlugins folder in the lib/ folder
416+
to /Library/Application Support/OpenSceneGraph/PlugIns. The bin/ executables
417+
can be left where they are, we don't need them.
418+
419+
420+
Next up is **libzip**. Get the latest tarball at:
421+
422+
http://nih.at/libzip/
423+
424+
Double-click the source tarball to unpack it.
425+
In a new Terminal cd to the source folder and:
426+
427+
```
428+
./configure --disable-dependency-tracking --disable-shared CFLAGS=-Os
369429
make
370430
sudo make install
371431
```
372432

433+
434+
Then it's time for **osgEarth**. Downloads are also on github:
435+
436+
http://github.com/gwaldron/osgearth/tags
437+
438+
Download a tarball for the latest stable release (sorting can be confusing here).
439+
Double-click the source tarball to unpack it.
440+
441+
This one also needs an intermediate staging area. Choose a folder similar to OSG.
442+
443+
In a new Terminal cd to the source folder and:
444+
445+
```
446+
mkdir build
447+
cd build
448+
export PATH="/path/to/osg/staging/folder/bin:$PATH"
449+
cmake -D CMAKE_INSTALL_PREFIX=/path/to/some/staging/folder \
450+
-D CMAKE_BUILD_TYPE=MinSizeRel \
451+
-D OSGEARTH_BUILD_FRAMEWORKS=true \
452+
..
453+
make
454+
make install
455+
sudo mkdir -p "/Library/Application Support/OpenSceneGraph/Headers"
456+
```
457+
458+
Enter the staging path you chose for the CMAKE_INSTALL_PREFIX option above.
459+
Also enter the OSG staging path /bin folder in the export above.
460+
461+
Move all the .frameworks from the lib/ folder to /Library/Frameworks.
462+
Move the files in the osgPlugins folder in the lib/ folder to
463+
/Library/Application Support/OpenSceneGraph/PlugIns. Move the osgEarthDrivers
464+
folder in the include/ folder to /Library/Application Support/OpenSceneGraph/Headers. And as for OSG, you can leave the bin/
465+
executables where they are.
466+
467+
373468
== QGIS source ==
374469

375470
Unzip the QGIS source tarball to a working folder of your choice
@@ -400,8 +495,8 @@ In a Terminal cd to the qgis source folder previously downloaded, then:
400495
mkdir build
401496
cd build
402497
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
403-
-D CMAKE_BUILD_TYPE=MinSizeRel \
404-
-D WITH_INTERNAL_SPATIALITE=FALSE \
498+
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
499+
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
405500
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
406501
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
407502
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -424,16 +519,16 @@ EOF
424519
sudo chmod +x /usr/local/bin/python32
425520

426521
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \
427-
-D CMAKE_BUILD_TYPE=MinSizeRel \
428-
-D WITH_INTERNAL_SPATIALITE=FALSE \
522+
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
523+
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
429524
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
430525
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
431526
-D BISON_EXECUTABLE=/usr/local/bin/bison \
432527
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
433528
..
434529
```
435530

436-
The QGIS Mapserver feature requires fastcgi support. This is included in
531+
The QGIS **Mapserver** feature requires fastcgi support. This is included in
437532
Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
438533
component on Leopard and Snow, add the followling line before the last line in
439534
the above configuration:
@@ -445,21 +540,21 @@ the above configuration:
445540
On Lion you are on your own to figure out how to install libfcgi and add fcgi
446541
support to the system Apache. Not recommended for the average user.
447542

448-
__Bundling note:__ Older Qt versions may have problems with some Qt plugins and
449-
QGIS. The way to handle this is to bundle Qt inside the QGIS application. You
450-
can do this now or wait to see if there are immediate crashes when running QGIS.
451-
It's also a good idea to bundle Qt if you need to copy QGIS to other Macs (where
452-
you would have to install Xcode just so Qt would install!).
453-
454-
To bundle Qt, add the following line before the last line (the ".." line) in
455-
the above cmake configurations:
543+
If you want the **Globe** plugin (and you compiled and installed OSG/osgEarth),
544+
add the following lines before the last line in the above configuration:
456545

457546
```
458-
-D QGIS_MACAPP_BUNDLE=1 \
547+
-D WITH_GLOBE=true \
548+
-D OSGEARTH_INCLUDE_DIR="/Library/Application Support/OpenSceneGraph/Headers" \
549+
-D OSG_PLUGINS_PATH="/Library/Application Support/OpenSceneGraph/PlugIns" \
459550
```
460551

552+
__Bundling note:__ Older Qt versions may have problems with some Qt plugins and
553+
QGIS. The way to handle this is to bundle Qt inside the QGIS application. The
554+
default is to bundle Qt (and osg/osgEarth, if configured).
555+
461556
Even better for distribution purposes, to also bundle any extra non-framework,
462-
non-standard, libs (ie postgres' libpq) bump the bundle number to 2:
557+
non-standard, libs (ie postgres' libpq) set the bundle value to 2:
463558

464559
```
465560
-D QGIS_MACAPP_BUNDLE=2 \

0 commit comments

Comments
 (0)
Please sign in to comment.