@@ -368,7 +368,7 @@ Included are a few notes for building on Mac OS X 10.5 (__Leopard__).
368
368
== Install XCODE ==
369
369
370
370
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.
372
372
373
373
/!\ Note: It may be that you need to create some symlinks after installing
374
374
the XCODE SDK (in particular if you are using XCODE 2.5 on tiger):
@@ -384,26 +384,29 @@ sudo ln -s /usr/local/ local
384
384
You need a minimum of Qt4.3.0. I suggest getting the latest (at time of writing).
385
385
386
386
```
387
- ftp://ftp.trolltech.com/qt/source/qt-mac-opensource-4.3.2.dmg
387
+ ftp://ftp.trolltech.com/qt/source/
388
388
```
389
389
390
- If you want debug libs, Qt also provide a dmg with these :
390
+ Mac versions are named as :
391
391
392
- ```
393
- ftp://ftp.trolltech.com/qt/source/qt-mac-opensource-4.3.2-debug-libs.dmg
394
392
```
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.
395
400
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.
400
403
401
404
After installing you need to make two small changes:
402
405
403
406
First edit ``/Library/Frameworks/QtCore.framework/Headers/qconfig.h`` and
404
407
change
405
408
406
- /!\ Note this doesnt seem to be needed since version 4.2.3
409
+ /!\ Note: this isn't needed since version 4.2.3
407
410
408
411
``QT_EDITION_Unknown`` to ``QT_EDITION_OPENSOURCE``
409
412
@@ -415,6 +418,7 @@ sudo rm default
415
418
sudo ln -sf macx-g++ default
416
419
```
417
420
421
+ /!\ Note: this doesn't seem to be needed since version 4.4.
418
422
419
423
== Install development frameworks for QGIS dependencies ==
420
424
@@ -427,33 +431,37 @@ http://www.kyngchaos.com/wiki/software:frameworks
427
431
428
432
Once downloaded, open and install the frameworks.
429
433
430
- William provides an additional installer package for Postgresql/PostGIS. Its
434
+ William provides an additional installer package for Postgresql/PostGIS. It's
431
435
available here:
432
436
433
437
```
434
438
http://www.kyngchaos.com/wiki/software:postgres
435
439
```
436
440
441
+ Also available is a GRASS application:
442
+
443
+ ```
444
+ http://www.kyngchaos.com/wiki/software:grass
445
+ ```
446
+
437
447
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.
439
449
440
450
=== Additional Dependencies : GSL ===
441
451
442
- Retrieve the Gnu Scientific Library from
452
+ Retrieve the current version of the Gnu Scientific Library from:
443
453
444
454
```
445
- curl -O ftp://ftp.gnu.org/gnu/gsl/gsl-1.8.tar.gz
455
+ ftp://ftp.gnu.org/gnu/gsl/
446
456
```
447
457
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:
449
460
450
461
```
451
- tar xvfz gsl-1.8.tar.gz
452
- cd gsl-1.8
453
- ./configure --prefix=/usr/local
462
+ ./configure
454
463
make
455
464
sudo make install
456
- cd ..
457
465
```
458
466
459
467
=== Additional Dependencies : Expat ===
@@ -464,18 +472,17 @@ Get the expat sources:
464
472
http://sourceforge.net/project/showfiles.php?group_id=10127
465
473
```
466
474
475
+ Double-click the source tarball to unpack, then cd to the source folder and:
476
+
467
477
```
468
- tar xvfz expat-2.0.0.tar.gz
469
- cd expat-2.0.0
470
- ./configure --prefix=/usr/local
478
+ ./configure
471
479
make
472
480
sudo make install
473
- cd ..
474
481
```
475
482
476
483
=== Additional Dependencies : SIP ===
477
484
478
- Make sure you have the latest Python fom
485
+ Make sure you have the latest Python 2.5 fom
479
486
480
487
```
481
488
http://www.python.org/download/mac/
@@ -489,15 +496,13 @@ Retrieve the python bindings toolkit SIP from
489
496
http://www.riverbankcomputing.com/software/sip/download
490
497
```
491
498
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):
493
501
494
502
```
495
- tar xvfz sip-<version number>.tar.gz
496
- cd sip-<version number>
497
503
python configure.py
498
504
make
499
505
sudo make install
500
- cd ..
501
506
```
502
507
503
508
__Leopard notes__
@@ -515,7 +520,7 @@ below you can also try adding python from your frameworks dir
515
520
explicitly to your path e.g.
516
521
517
522
```
518
- export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH$
523
+ export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
519
524
```
520
525
521
526
Retrieve the python bindings toolkit for Qt from
@@ -524,17 +529,15 @@ Retrieve the python bindings toolkit for Qt from
524
529
http://www.riverbankcomputing.com/software/pyqt/download
525
530
```
526
531
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):
528
534
529
535
```
530
- tar xvfz PyQt-mac<version number here>
531
- cd PyQt-mac<version number here>
532
536
export QTDIR=/Developer/Applications/Qt
533
537
python configure.py
534
538
yes
535
539
make
536
540
sudo make install
537
- cd ..
538
541
```
539
542
540
543
__Leopard notes__
@@ -545,46 +548,49 @@ If building on Leopard, using Leopard's bundled Python, PyQt wants to install in
545
548
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
546
549
```
547
550
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.
549
554
550
555
=== Additional Dependencies : Bison ===
551
556
552
557
__Leopard note:__ Leopard includes Bison 2.3, so this step can be skipped on Leopard.
553
558
554
559
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:
556
561
557
562
```
558
- curl -O http:// ftp.gnu.org/gnu/bison/bison-2.3.tar.gz
563
+ ftp.gnu.org/gnu/bison/
559
564
```
560
565
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:
562
568
563
569
```
564
- tar xvfz bison-2.3.tar.gz
565
- cd bison-2.3
566
570
./configure --prefix=/usr/local
567
571
make
568
572
sudo make install
569
- cd ..
570
573
```
571
574
572
575
== Install CMAKE for OSX ==
573
576
574
- Get the latest release from here:
577
+ Get the latest source release from here:
575
578
576
579
```
577
- http://www.cmake.org/HTML/Download .html
580
+ http://www.cmake.org/cmake/resources/software .html
578
581
```
579
582
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:
581
587
582
588
```
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
584
592
```
585
593
586
- Once downloaded open the dmg and run the installer
587
-
588
594
== Install subversion for OSX ==
589
595
590
596
__Leopard note:__ Leopard includes SVN, so this step can be skipped on Leopard.
@@ -646,14 +652,9 @@ Trunk:
646
652
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
647
653
```
648
654
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:
655
656
```
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
657
658
```
658
659
659
660
The first time you check out QGIS sources you will probably get a message like
@@ -672,9 +673,16 @@ this:
672
673
673
674
I suggest you press 'p' to accept the key permanently.
674
675
675
-
676
676
== Configure the build ==
677
677
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
+
678
686
CMake supports out of source build so we will create a 'build' dir for the
679
687
build process. By convention I build my software into a dir called 'apps' in
680
688
my home directory. If you have the correct permissions you may want to build
@@ -703,9 +711,9 @@ version as required):
703
711
704
712
```
705
713
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/
707
715
include \
708
- -D GRASS_PREFIX=/Applications/GRASS-6.3 .app/Contents/MacOS \
716
+ -D GRASS_PREFIX=/Applications/GRASS-6.4 .app/Contents/MacOS \
709
717
-D CMAKE_BUILD_TYPE=Release \
710
718
..
711
719
```
@@ -716,14 +724,30 @@ path and version as required):
716
724
717
725
```
718
726
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 \
721
729
-D CMAKE_BUILD_TYPE=Release \
722
730
..
723
731
```
724
732
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
+
725
747
== Building ==
726
748
749
+ === Building with Cmake ===
750
+
727
751
Now we can start the build process:
728
752
729
753
```
@@ -733,9 +757,17 @@ make
733
757
If all built without errors you can then install it:
734
758
735
759
```
736
- make install
760
+ sudo make install
737
761
```
738
762
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
+
739
771
% -----------------------------------------------------------------------------
740
772
% ----Please leave this break marker here for clarity - it wont be rendered ---
741
773
% -----------------------------------------------------------------------------
0 commit comments