Skip to content

Commit 0c9dc07

Browse files
author
kyngchaos
committed
update install instructions for OSX
git-svn-id: http://svn.osgeo.org/qgis/trunk@11393 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d0c19c5 commit 0c9dc07

File tree

1 file changed

+91
-59
lines changed

1 file changed

+91
-59
lines changed

doc/INSTALL.t2t

+91-59
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Included are a few notes for building on Mac OS X 10.5 (__Leopard__).
368368
== Install XCODE ==
369369

370370
I recommend to get the latest xcode dmg from the Apple XDC Web site. Install
371-
XCODE after the ~941mb download is complete.
371+
XCODE after the ~1gb download is complete.
372372

373373
/!\ Note: It may be that you need to create some symlinks after installing
374374
the XCODE SDK (in particular if you are using XCODE 2.5 on tiger):
@@ -384,26 +384,29 @@ sudo ln -s /usr/local/ local
384384
You need a minimum of Qt4.3.0. I suggest getting the latest (at time of writing).
385385

386386
```
387-
ftp://ftp.trolltech.com/qt/source/qt-mac-opensource-4.3.2.dmg
387+
ftp://ftp.trolltech.com/qt/source/
388388
```
389389

390-
If you want debug libs, Qt also provide a dmg with these:
390+
Mac versions are named as:
391391

392-
```
393-
ftp://ftp.trolltech.com/qt/source/qt-mac-opensource-4.3.2-debug-libs.dmg
394392
```
393+
qt-mac-opensource-x.y.z.dmg
394+
```
395+
396+
x, y, z being the major, minor and revision version.
397+
398+
If you want debug frameworks, Qt also provide a dmg with these. These are in
399+
addition to the non-debug frameworks.
395400

396-
I am going to proceed using only release libs at this stage as the download for
397-
the debug dmg is substantially bigger. If you plan to do any debugging though
398-
you probably want to get the debug libs dmg. Once downloaded open the dmg and
399-
run the installer. Note you need admin access to install.
401+
Once downloaded open the dmg and run the installer. Note you need admin
402+
privileges to install.
400403

401404
After installing you need to make two small changes:
402405

403406
First edit ``/Library/Frameworks/QtCore.framework/Headers/qconfig.h`` and
404407
change
405408

406-
/!\ Note this doesnt seem to be needed since version 4.2.3
409+
/!\ Note: this isn't needed since version 4.2.3
407410

408411
``QT_EDITION_Unknown`` to ``QT_EDITION_OPENSOURCE``
409412

@@ -415,6 +418,7 @@ sudo rm default
415418
sudo ln -sf macx-g++ default
416419
```
417420

421+
/!\ Note: this doesn't seem to be needed since version 4.4.
418422

419423
== Install development frameworks for QGIS dependencies ==
420424

@@ -427,33 +431,37 @@ http://www.kyngchaos.com/wiki/software:frameworks
427431

428432
Once downloaded, open and install the frameworks.
429433

430-
William provides an additional installer package for Postgresql/PostGIS. Its
434+
William provides an additional installer package for Postgresql/PostGIS. It's
431435
available here:
432436

433437
```
434438
http://www.kyngchaos.com/wiki/software:postgres
435439
```
436440

441+
Also available is a GRASS application:
442+
443+
```
444+
http://www.kyngchaos.com/wiki/software:grass
445+
```
446+
437447
There are some additional dependencies that at the time of writing are not
438-
provided as frameworks so we will need to build these from source.
448+
provided as frameworks or installers so we will need to build these from source.
439449

440450
=== Additional Dependencies : GSL ===
441451

442-
Retrieve the Gnu Scientific Library from
452+
Retrieve the current version of the Gnu Scientific Library from:
443453

444454
```
445-
curl -O ftp://ftp.gnu.org/gnu/gsl/gsl-1.8.tar.gz
455+
ftp://ftp.gnu.org/gnu/gsl/
446456
```
447457

448-
Then extract it and build it to a prefix of /usr/local:
458+
Then extract it and build it to a prefix of /usr/local. Double-click the source
459+
tarball to unpack it, then cd to the source folder and:
449460

450461
```
451-
tar xvfz gsl-1.8.tar.gz
452-
cd gsl-1.8
453-
./configure --prefix=/usr/local
462+
./configure
454463
make
455464
sudo make install
456-
cd ..
457465
```
458466

459467
=== Additional Dependencies : Expat ===
@@ -464,18 +472,17 @@ Get the expat sources:
464472
http://sourceforge.net/project/showfiles.php?group_id=10127
465473
```
466474

475+
Double-click the source tarball to unpack, then cd to the source folder and:
476+
467477
```
468-
tar xvfz expat-2.0.0.tar.gz
469-
cd expat-2.0.0
470-
./configure --prefix=/usr/local
478+
./configure
471479
make
472480
sudo make install
473-
cd ..
474481
```
475482

476483
=== Additional Dependencies : SIP ===
477484

478-
Make sure you have the latest Python fom
485+
Make sure you have the latest Python 2.5 fom
479486

480487
```
481488
http://www.python.org/download/mac/
@@ -489,15 +496,13 @@ Retrieve the python bindings toolkit SIP from
489496
http://www.riverbankcomputing.com/software/sip/download
490497
```
491498

492-
Then extract and build it (this installs by default into the Python framework):
499+
Double-click the source tarball to unpack it, then cd to the source folder
500+
and (this installs by default into the Python framework):
493501

494502
```
495-
tar xvfz sip-<version number>.tar.gz
496-
cd sip-<version number>
497503
python configure.py
498504
make
499505
sudo make install
500-
cd ..
501506
```
502507

503508
__Leopard notes__
@@ -515,7 +520,7 @@ below you can also try adding python from your frameworks dir
515520
explicitly to your path e.g.
516521

517522
```
518-
export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH$
523+
export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
519524
```
520525

521526
Retrieve the python bindings toolkit for Qt from
@@ -524,17 +529,15 @@ Retrieve the python bindings toolkit for Qt from
524529
http://www.riverbankcomputing.com/software/pyqt/download
525530
```
526531

527-
Then extract and build it (this installs by default into the Python framework):
532+
Double-click the source tarball to unpack it, then cd to the source folder
533+
and (this installs by default into the Python framework):
528534

529535
```
530-
tar xvfz PyQt-mac<version number here>
531-
cd PyQt-mac<version number here>
532536
export QTDIR=/Developer/Applications/Qt
533537
python configure.py
534538
yes
535539
make
536540
sudo make install
537-
cd ..
538541
```
539542

540543
__Leopard notes__
@@ -545,46 +548,49 @@ If building on Leopard, using Leopard's bundled Python, PyQt wants to install in
545548
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
546549
```
547550

548-
There may be a problem with undefined symbols in QtOpenGL on Leopard. Edit QtOpenGL/makefile and add ""-undefined dynamic_lookup"" to LFLAGS.
551+
If there is a problem with undefined symbols in QtOpenGL on Leopard, edit
552+
QtOpenGL/makefile and add ""-undefined dynamic_lookup"" to LFLAGS.
553+
Then make again.
549554

550555
=== Additional Dependencies : Bison ===
551556

552557
__Leopard note:__ Leopard includes Bison 2.3, so this step can be skipped on Leopard.
553558

554559
The version of bison available by default on Mac OSX is too old so you need to
555-
get a more recent one on your system. Download if from:
560+
get a more recent one on your system. Download at least version 2.3 from:
556561

557562
```
558-
curl -O http://ftp.gnu.org/gnu/bison/bison-2.3.tar.gz
563+
ftp.gnu.org/gnu/bison/
559564
```
560565

561-
Now build and install it to a prefix of /usr/local :
566+
Now build and install it to a prefix of /usr/local.� Double-click the source
567+
tarball to unpack it, then cd to the source folder and:
562568

563569
```
564-
tar xvfz bison-2.3.tar.gz
565-
cd bison-2.3
566570
./configure --prefix=/usr/local
567571
make
568572
sudo make install
569-
cd ..
570573
```
571574

572575
== Install CMAKE for OSX ==
573576

574-
Get the latest release from here:
577+
Get the latest source release from here:
575578

576579
```
577-
http://www.cmake.org/HTML/Download.html
580+
http://www.cmake.org/cmake/resources/software.html
578581
```
579582

580-
At the time of writing the file I grabbed was:
583+
Binary installers are available for OS X, but they are not recommended
584+
(2.4 versions install in /usr instead of /usr/local, and 2.6 versions are a
585+
strange application).� Download the source.� Double-click the source tarball,
586+
then cd to the source folder and:
581587

582588
```
583-
curl -O http://www.cmake.org/files/v2.4/cmake-2.4.6-Darwin-universal.dmg
589+
./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
590+
make
591+
sudo make install
584592
```
585593

586-
Once downloaded open the dmg and run the installer
587-
588594
== Install subversion for OSX ==
589595

590596
__Leopard note:__ Leopard includes SVN, so this step can be skipped on Leopard.
@@ -646,14 +652,9 @@ Trunk:
646652
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
647653
```
648654

649-
For svn 0.8 branch
650-
```
651-
svn co https://svn.osgeo.org/qgis/branches/Release-0_8_0 qgis0.8
652-
```
653-
654-
For svn 0.9 branch
655+
For a release branch version x.y.z:
655656
```
656-
svn co https://svn.qgis.org/qgis/branches/Release-0_9_0 qgis0.9
657+
svn co https://svn.qgis.org/qgis/branches/Release-x_y_z qgis-x.y.z
657658
```
658659

659660
The first time you check out QGIS sources you will probably get a message like
@@ -672,9 +673,16 @@ this:
672673

673674
I suggest you press 'p' to accept the key permanently.
674675

675-
676676
== Configure the build ==
677677

678+
There are 2 different methods to build QGIS.� The traditional Cmake method,
679+
and the new Xcode project (starting with QGIS 1.1). The Xcode project has
680+
additional bundling steps, though some optional QGIS features are required due
681+
to limited conditional compilation.� The Cmake build handles optional features,
682+
and some bundling steps are available with scripts in the mac directory.
683+
684+
=== Configure the Cmake build ===
685+
678686
CMake supports out of source build so we will create a 'build' dir for the
679687
build process. By convention I build my software into a dir called 'apps' in
680688
my home directory. If you have the correct permissions you may want to build
@@ -703,9 +711,9 @@ version as required):
703711

704712
```
705713
cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
706-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.3.app/Contents/MacOS/
714+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/
707715
include \
708-
-D GRASS_PREFIX=/Applications/GRASS-6.3.app/Contents/MacOS \
716+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
709717
-D CMAKE_BUILD_TYPE=Release \
710718
..
711719
```
@@ -716,14 +724,30 @@ path and version as required):
716724

717725
```
718726
cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
719-
-D GRASS_INCLUDE_DIR=/user/local/grass-6.3.0/include \
720-
-D GRASS_PREFIX=/user/local/grass-6.3.0 \
727+
-D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
728+
-D GRASS_PREFIX=/user/local/grass-6.4.0 \
721729
-D CMAKE_BUILD_TYPE=Release \
722730
..
723731
```
724732

733+
=== Configure the Xcode build ===
734+
735+
In the mac/xcode folder in the source, duplicate the 'qgis_user-template.xcconfig'
736+
file and name it 'qgis_user.xcconfig'.� A default build will use the KyngChaos
737+
frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 and extra dependencies
738+
as described above, and compile for the build OSX version, so no extra configuration
739+
is necessary. If building on Leopard, you may want to use the system Python, which
740+
requires editing qgis_user.xcconfig.
741+
742+
See the mac/xcode/readme.rtf for details, if you need to customize the build.
743+
The default build will also bundle the Qt frameworks, Postgres library, and
744+
other dependency libraries to create a self-contained package.� The KyngChaos
745+
frameworks and GRASS application are not bundled.
746+
725747
== Building ==
726748

749+
=== Building with Cmake ===
750+
727751
Now we can start the build process:
728752

729753
```
@@ -733,9 +757,17 @@ make
733757
If all built without errors you can then install it:
734758

735759
```
736-
make install
760+
sudo make install
737761
```
738762

763+
=== Building with Xcode ===
764+
765+
Open the xcode project file in Xcode.� Select 'Release' build configuration
766+
and select the 'Full Qgis' target, then build.
767+
768+
The Qgis application will be found in the 'build/Release' folder in the xcode folder.
769+
Copy this to whereever you like.
770+
739771
% -----------------------------------------------------------------------------
740772
% ----Please leave this break marker here for clarity - it wont be rendered ---
741773
% -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)