@@ -415,30 +415,10 @@ addition to the non-debug frameworks.
415
415
Once downloaded open the dmg and run the installer. Note you need admin
416
416
privileges to install.
417
417
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
-
437
418
438
419
== Install development frameworks for QGIS dependencies ==
439
420
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.
442
422
443
423
```
444
424
http://www.kyngchaos.com/wiki/software:frameworks
@@ -458,14 +438,15 @@ Also available is a GRASS application:
458
438
```
459
439
http://www.kyngchaos.com/wiki/software:grass
460
440
```
441
+
461
442
=== Additional Dependencies : General compatibility note ===
462
443
463
444
There are some additional dependencies that, at the time of writing, are not
464
445
provided as frameworks or installers so we will need to build these from source.
465
446
If you are wanting to build Qgis as a 64-bit application, you will need to
466
447
provide the appropriate build commands to produce 64-bit support in dependencies.
467
448
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
469
450
individual dependency packages.
470
451
471
452
=== Additional Dependencies : GSL ===
@@ -477,25 +458,19 @@ ftp://ftp.gnu.org/gnu/gsl/
477
458
```
478
459
479
460
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:
481
462
482
463
```
483
464
./configure
484
465
make
485
466
sudo make install
486
467
```
487
468
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:
490
471
491
472
```
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"
499
474
```
500
475
501
476
@@ -510,21 +485,27 @@ Get the expat sources:
510
485
http://sourceforge.net/project/showfiles.php?group_id=10127
511
486
```
512
487
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:
514
489
515
490
```
516
491
./configure
517
492
make
518
493
sudo make install
519
494
```
520
495
496
+ __Leopard note:__ To compile for 64bit, substitute the standard configure line with:
497
+
498
+ ```
499
+ ./configure CFLAGS="-Os -arch x86_64"
500
+ ```
501
+
521
502
522
503
=== Additional Dependencies : SIP ===
523
504
524
505
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include a usable Python
525
506
2.5 or 2.6, respectively. You can install Python from python.org if preferred.
526
507
527
- Make sure you have the latest Python 2.5 from
508
+ Make sure you have at least the latest Python 2.5 from
528
509
529
510
```
530
511
http://www.python.org/download/mac/
@@ -536,7 +517,7 @@ Retrieve the python bindings toolkit SIP from
536
517
http://www.riverbankcomputing.com/software/sip/download
537
518
```
538
519
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
540
521
and (this installs by default into the Python framework):
541
522
542
523
```
@@ -552,42 +533,36 @@ system path -- this is not a good idea. Use this configure command instead of t
552
533
basic configure above:
553
534
554
535
```
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
556
538
```
557
539
558
540
__Snow Leopard notes__
559
541
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):
562
543
563
544
```
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
565
547
```
566
548
567
549
For 64-bit Qt (Qt Cocoa), use this configure line:
568
550
569
551
```
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
571
554
```
572
555
573
556
574
557
=== Additional Dependencies : PyQt ===
575
558
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
-
584
559
Retrieve the python bindings toolkit for Qt from
585
560
586
561
```
587
562
http://www.riverbankcomputing.com/software/pyqt/download
588
563
```
589
564
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
591
566
and (this installs by default into the Python framework):
592
567
593
568
```
@@ -600,7 +575,9 @@ sudo make install
600
575
601
576
__Leopard notes__
602
577
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:
604
581
605
582
```
606
583
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
@@ -612,7 +589,9 @@ Then make again.
612
589
613
590
__Snow Leopard notes__
614
591
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):
616
595
617
596
```
618
597
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
627
606
628
607
=== Additional Dependencies : Bison ===
629
608
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.
631
610
632
611
The version of bison available by default on Mac OS X 10.4 and older is too old so you need to
633
612
get a more recent one on your system. Download at least version 2.3 from:
@@ -666,9 +645,9 @@ sudo make install
666
645
667
646
== Install subversion for OSX ==
668
647
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 .
670
649
671
- The [http://sourceforge.net/projects/macsvn/ MacSVN] project has a downloadable
650
+ The [http://sourceforge.net/projects/macsvn/MacSVN] project has a downloadable
672
651
build of svn. If you are a GUI inclined person you may want to grab their gui
673
652
client too. Get the command line client here:
674
653
@@ -711,7 +690,7 @@ Now close and reopen your shell to get the updated vars.
711
690
== Check out QGIS from SVN ==
712
691
713
692
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) :
715
694
716
695
```
717
696
mkdir -p ~/dev/cpp cd ~/dev/cpp
@@ -756,92 +735,82 @@ and some bundling steps are available with scripts in the mac directory.
756
735
=== Configure the Cmake build ===
757
736
758
737
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
761
740
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 ...
763
742
764
743
```
765
744
cd qgis
766
745
mkdir build
767
746
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 ..
780
748
```
781
749
782
750
To use the application build of GRASS on OSX, you can optionally use the
783
751
following cmake invocation (minimum GRASS 6.3 required, substitute the GRASS
784
752
version as required):
785
753
786
754
```
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
+ ..
793
759
```
794
760
795
761
Or, to use a Unix-style build of GRASS, use the following cmake invocation
796
762
(minimum GRASS version as stated in the Qgis requirements, substitute the GRASS
797
763
path and version as required):
798
764
799
765
```
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
+ ..
805
780
```
806
781
807
782
__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.
808
783
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' :
810
785
811
786
```
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
+ ..
821
793
```
822
794
823
795
For 64-bit Qt (Cocoa) with GRASS-6.4:
824
796
825
797
```
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
+ ..
835
804
```
836
805
837
806
=== Configure the Xcode build ===
838
807
839
808
In the mac/xcode folder in the source, duplicate the 'qgis_user-template.xcconfig'
840
809
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
842
812
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.
845
814
846
815
See the mac/xcode/readme.rtf for details, if you need to customize the build.
847
816
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,
876
845
there have been compilation problems reported, so it is suggested that you disable
877
846
ccache support.
878
847
879
-
880
848
Alternatively, from within the mac/xcode directory, build with the command:
881
849
882
850
```
883
851
xcodebuild
884
852
```
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
- ```
893
853
894
854
The Qgis application will be found in the 'build/$SYSTEM/Release' folder in the xcode folder.
895
855
Copy this to whereever you like.
0 commit comments