Skip to content

Commit aabbbdc

Browse files
author
kyngchaos
committed
more OSX install updates
git-svn-id: http://svn.osgeo.org/qgis/trunk@12168 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 0d5d839 commit aabbbdc

File tree

1 file changed

+72
-112
lines changed

1 file changed

+72
-112
lines changed

doc/INSTALL.t2t

Lines changed: 72 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -415,30 +415,10 @@ addition to the non-debug frameworks.
415415
Once downloaded open the dmg and run the installer. Note you need admin
416416
privileges to install.
417417

418-
After installing you need to make two small changes:
419-
420-
First edit ``/Library/Frameworks/QtCore.framework/Headers/qconfig.h`` and
421-
change
422-
423-
/!\ Note: this isn't needed since version 4.2.3
424-
425-
``QT_EDITION_Unknown`` to ``QT_EDITION_OPENSOURCE``
426-
427-
Second change the default mkspec symlink so that it points to macx-g++:
428-
429-
```
430-
cd /usr/local/Qt4.3/mkspecs/
431-
sudo rm default
432-
sudo ln -sf macx-g++ default
433-
```
434-
435-
/!\ Note: this doesn't seem to be needed since version 4.4.
436-
437418

438419
== Install development frameworks for QGIS dependencies ==
439420

440-
Download William Kyngesburye's excellent all in one framework that includes
441-
proj, gdal, sqlite3, etc.
421+
Download William Kyngesburye's excellent all in GDAL Complete framework that includes proj, gdal, sqlite3, etc.
442422

443423
```
444424
http://www.kyngchaos.com/wiki/software:frameworks
@@ -458,14 +438,15 @@ Also available is a GRASS application:
458438
```
459439
http://www.kyngchaos.com/wiki/software:grass
460440
```
441+
461442
=== Additional Dependencies : General compatibility note ===
462443

463444
There are some additional dependencies that, at the time of writing, are not
464445
provided as frameworks or installers so we will need to build these from source.
465446
If you are wanting to build Qgis as a 64-bit application, you will need to
466447
provide the appropriate build commands to produce 64-bit support in dependencies.
467448
Likewise, for 32-bit support on Snow Leopard, you will need to override the
468-
default system architecture, which is 64-bit according to instructions for
449+
default system architecture, which is 64-bit, according to instructions for
469450
individual dependency packages.
470451

471452
=== Additional Dependencies : GSL ===
@@ -477,25 +458,19 @@ ftp://ftp.gnu.org/gnu/gsl/
477458
```
478459

479460
Then extract it and build it to a prefix of /usr/local. Double-click the source
480-
tarball to unpack it, then cd to the source folder and:
461+
tarball to unpack it, then, in Terminal.app, cd to the source folder and:
481462

482463
```
483464
./configure
484465
make
485466
sudo make install
486467
```
487468

488-
__Snow Leopard note:__ For explicit 32-bit support in gsl, substitute the standard
489-
configure line with:
469+
__Snow Leopard note:__ Snow Leopard compiles 64bit by default.
470+
For explicit 32-bit support in gsl, substitute the standard configure line with:
490471

491472
```
492-
./configure --build=i386
493-
```
494-
495-
And for 64-bit gsl:
496-
497-
```
498-
./configure --build=x86_64
473+
./configure CFLAGS="-Os -arch i386"
499474
```
500475

501476

@@ -510,21 +485,27 @@ Get the expat sources:
510485
http://sourceforge.net/project/showfiles.php?group_id=10127
511486
```
512487

513-
Double-click the source tarball to unpack, then cd to the source folder and:
488+
Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and:
514489

515490
```
516491
./configure
517492
make
518493
sudo make install
519494
```
520495

496+
__Leopard note:__ To compile for 64bit, substitute the standard configure line with:
497+
498+
```
499+
./configure CFLAGS="-Os -arch x86_64"
500+
```
501+
521502

522503
=== Additional Dependencies : SIP ===
523504

524505
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include a usable Python
525506
2.5 or 2.6, respectively. You can install Python from python.org if preferred.
526507

527-
Make sure you have the latest Python 2.5 from
508+
Make sure you have at least the latest Python 2.5 from
528509

529510
```
530511
http://www.python.org/download/mac/
@@ -536,7 +517,7 @@ Retrieve the python bindings toolkit SIP from
536517
http://www.riverbankcomputing.com/software/sip/download
537518
```
538519

539-
Double-click the source tarball to unpack it, then cd to the source folder
520+
Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder
540521
and (this installs by default into the Python framework):
541522

542523
```
@@ -552,42 +533,36 @@ system path -- this is not a good idea. Use this configure command instead of t
552533
basic configure above:
553534

554535
```
555-
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip
536+
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin \
537+
-e /usr/local/include -v /usr/local/share/sip
556538
```
557539

558540
__Snow Leopard notes__
559541

560-
If building on Snow Leopard, you need to use one of the following configure lines
561-
based on your installed version of Qt. If you are using 32-bit Qt (Qt Carbon):
542+
Similar to Leopard, you should install outside the system Python path. Also, you need to specify the architecture you want (requires at least SIP 4.9). If you are using 32-bit Qt (Qt Carbon):
562543

563544
```
564-
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch i386
545+
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin \
546+
-e /usr/local/include -v /usr/local/share/sip --arch=i386
565547
```
566548

567549
For 64-bit Qt (Qt Cocoa), use this configure line:
568550

569551
```
570-
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch x86_64
552+
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin \
553+
-e /usr/local/include -v /usr/local/share/sip --arch=x86_64
571554
```
572555

573556

574557
=== Additional Dependencies : PyQt ===
575558

576-
If you encounter problems compiling PyQt using the instructions
577-
below you can also try adding python from your frameworks dir
578-
explicitly to your path e.g.
579-
580-
```
581-
export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
582-
```
583-
584559
Retrieve the python bindings toolkit for Qt from
585560

586561
```
587562
http://www.riverbankcomputing.com/software/pyqt/download
588563
```
589564

590-
Double-click the source tarball to unpack it, then cd to the source folder
565+
Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder
591566
and (this installs by default into the Python framework):
592567

593568
```
@@ -600,7 +575,9 @@ sudo make install
600575

601576
__Leopard notes__
602577

603-
If building on Leopard, using Leopard's bundled Python, PyQt wants to install in the system path -- this is not a good idea. Use this configure command instead of the basic configure above:
578+
If building on Leopard, using Leopard's bundled Python, PyQt wants to install
579+
in the system path -- this is not a good idea. Use this configure command
580+
instead of the basic configure above:
604581

605582
```
606583
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
@@ -612,7 +589,9 @@ Then make again.
612589

613590
__Snow Leopard notes__
614591

615-
If building on Snow Leopard, you need to use one of the following configure lines based on your installed version of Qt. If you are using 32-bit Qt (Qt Carbon):
592+
Similar to Leopard, you should install outside the system Python path.
593+
Also, you need to specify the architecture you want (requires at least PyQt 4.6).
594+
If you are using 32-bit Qt (Qt Carbon):
616595

617596
```
618597
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch i386
@@ -627,7 +606,7 @@ python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use
627606

628607
=== Additional Dependencies : Bison ===
629608

630-
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard includes Bison 2.3, so this step can be skipped on Leopard and Snow Leopard.
609+
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include Bison 2.3, so this step can be skipped on Leopard and Snow Leopard.
631610

632611
The version of bison available by default on Mac OS X 10.4 and older is too old so you need to
633612
get a more recent one on your system. Download at least version 2.3 from:
@@ -666,9 +645,9 @@ sudo make install
666645

667646
== Install subversion for OSX ==
668647

669-
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include SVN, so this step can be skipped on these Operating Systems.
648+
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include SVN, so this step can be skipped on Leopard and Snow Leopard.
670649

671-
The [http://sourceforge.net/projects/macsvn/ MacSVN] project has a downloadable
650+
The [http://sourceforge.net/projects/macsvn/MacSVN] project has a downloadable
672651
build of svn. If you are a GUI inclined person you may want to grab their gui
673652
client too. Get the command line client here:
674653

@@ -711,7 +690,7 @@ Now close and reopen your shell to get the updated vars.
711690
== Check out QGIS from SVN ==
712691

713692
Now we are going to check out the sources for QGIS. First we will create a
714-
directory for working in:
693+
directory for working in (or some folder of your choice):
715694

716695
```
717696
mkdir -p ~/dev/cpp cd ~/dev/cpp
@@ -756,92 +735,82 @@ and some bundling steps are available with scripts in the mac directory.
756735
=== Configure the Cmake build ===
757736

758737
CMake supports out of source build so we will create a 'build' dir for the
759-
build process. By convention I build my software into a dir called 'apps' in
760-
my home directory. If you have the correct permissions you may want to build
738+
build process. OS X uses ${HOME}/Applications as a standard user app folder (it gives it the system app folder icon).
739+
If you have the correct permissions you may want to build
761740
straight into your /Applications folder. The instructions below assume you are
762-
building into a pre-existing ${HOME}/apps directory ...
741+
building into a pre-existing ${HOME}/Applications directory ...
763742

764743
```
765744
cd qgis
766745
mkdir build
767746
cd build
768-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ -D CMAKE_BUILD_TYPE=Release ..
769-
```
770-
771-
__Leopard note:__ To find the custom install of SIP on Leopard, add ""-
772-
D SIP_BINARY_PATH=/usr/local/bin/sip"" to the cmake command above,
773-
before the "".."" at the end, ie:
774-
775-
```
776-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ \
777-
-D CMAKE_BUILD_TYPE=Release \
778-
-D SIP_BINARY_PATH=/usr/local/bin/sip \
779-
..
747+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release ..
780748
```
781749

782750
To use the application build of GRASS on OSX, you can optionally use the
783751
following cmake invocation (minimum GRASS 6.3 required, substitute the GRASS
784752
version as required):
785753

786754
```
787-
cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
788-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/
789-
include \
790-
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
791-
-D CMAKE_BUILD_TYPE=Release \
792-
..
755+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
756+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
757+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
758+
..
793759
```
794760

795761
Or, to use a Unix-style build of GRASS, use the following cmake invocation
796762
(minimum GRASS version as stated in the Qgis requirements, substitute the GRASS
797763
path and version as required):
798764

799765
```
800-
cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
801-
-D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
802-
-D GRASS_PREFIX=/user/local/grass-6.4.0 \
803-
-D CMAKE_BUILD_TYPE=Release \
804-
..
766+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
767+
-D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
768+
-D GRASS_PREFIX=/user/local/grass-6.4.0 \
769+
..
770+
```
771+
772+
__Leopard note:__ To find the custom install of SIP on Leopard, add
773+
'-D SIP_BINARY_PATH=/usr/local/bin/sip' to the cmake commands above,
774+
before the '..' at the end, ie:
775+
776+
```
777+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
778+
-D SIP_BINARY_PATH=/usr/local/bin/sip \
779+
..
805780
```
806781

807782
__Snow Leopard note:__ To handle the appropriate version of Qt (32-bit or 64-bit), you will need to invoke cmake based on which version of Qt you installed.
808783

809-
For 32-bit Qt (Carbon) with GRASS-6.4:
784+
For 32-bit Qt (Carbon) with GRASS-6.4, add '-D CMAKE_CXX_FLAGS="-arch i386" -D CMAKE_OSX_ARCHITECTURES=i386':
810785

811786
```
812-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ \
813-
-D CMAKE_BUILD_TYPE=Release \
814-
-D SIP_BINARY_PATH=/usr/local/bin/sip
815-
-D CMAKE_C_FLAGS=-m32 \
816-
-D CMAKE_CXX_FLAGS=-m32
817-
-D CMAKE_OSX_ARCHITECTURES=i386
818-
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
819-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include\
820-
..
787+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
788+
-D SIP_BINARY_PATH=/usr/local/bin/sip \
789+
-D CMAKE_CXX_FLAGS="-arch i386" -D CMAKE_OSX_ARCHITECTURES=i386 \
790+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
791+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
792+
..
821793
```
822794

823795
For 64-bit Qt (Cocoa) with GRASS-6.4:
824796

825797
```
826-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ \
827-
-D CMAKE_BUILD_TYPE=Release \
828-
-D SIP_BINARY_PATH=/usr/local/bin/sip
829-
-D CMAKE_C_FLAGS=-m64 \
830-
-D CMAKE_CXX_FLAGS=-m64
831-
-D CMAKE_OSX_ARCHITECTURES=x86_64
832-
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
833-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include\
834-
..
798+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
799+
-D SIP_BINARY_PATH=/usr/local/bin/sip \
800+
-D CMAKE_CXX_FLAGS="-arch x86_64" -D CMAKE_OSX_ARCHITECTURES=x86_64 \
801+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
802+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
803+
..
835804
```
836805

837806
=== Configure the Xcode build ===
838807

839808
In the mac/xcode folder in the source, duplicate the 'qgis_user-template.xcconfig'
840809
file and name it 'qgis_user.xcconfig'. A default build will use the KyngChaos
841-
frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 and extra dependencies
810+
frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 (for Tiger)
811+
or the system Python (for Leopard and Snow Leopard) and extra dependencies
842812
as described above, and compile for the current OSX architecture and version, so no
843-
extra configuration is necessary. If building on Leopard or newer, you may want to
844-
use the system Python, which requires editing qgis_user.xcconfig.
813+
extra configuration is necessary.
845814

846815
See the mac/xcode/readme.rtf for details, if you need to customize the build.
847816
The default build will also bundle the Qt frameworks, Postgres library, and
@@ -876,20 +845,11 @@ configuration and select the 'Full Qgis' target, then build. If you use ccache,
876845
there have been compilation problems reported, so it is suggested that you disable
877846
ccache support.
878847

879-
880848
Alternatively, from within the mac/xcode directory, build with the command:
881849

882850
```
883851
xcodebuild
884852
```
885-
__Snow Leopard note:__ You can also build Qgis using the new llvm compilers supplied
886-
with Xcode 3.2.x. To do this, you first need to export the proper compiler settings:
887-
888-
```
889-
export CC=/Developer/usr/bin/llvm-gcc
890-
export CXX=/Developer/usr/bin/llvm-g++
891-
xcodebuild
892-
```
893853

894854
The Qgis application will be found in the 'build/$SYSTEM/Release' folder in the xcode folder.
895855
Copy this to whereever you like.

0 commit comments

Comments
 (0)