@@ -48,6 +48,8 @@ Tim Sutton 2007
48
48
4.6. Setup ccache (Optional)
49
49
4.7. Prepare your development environment
50
50
4.8. Check out the QGIS Source Code
51
+ 4.9. Starting the compile
52
+ 4.10. Running QGIS
51
53
5. Further help and information
52
54
6. Authors and Acknowledgments
53
55
@@ -207,7 +209,8 @@ Start a cmd.exe window ( Start -> Run -> cmd.exe ) Create development
207
209
directory and move into it
208
210
209
211
210
- md c:\dev\cpp cd c:\dev\cpp
212
+ md c:\dev\cpp
213
+ cd c:\dev\cpp
211
214
212
215
213
216
Check out sources from SVN For svn head:
@@ -240,7 +243,9 @@ properties so you can just type qtvars.bat when you open the cmd console.
240
243
Create build directory and set it as current directory:
241
244
242
245
243
- cd c:\dev\cpp\qgis md build cd build
246
+ cd c:\dev\cpp\qgis
247
+ md build
248
+ cd build
244
249
245
250
246
251
@@ -251,10 +256,10 @@ Create build directory and set it as current directory:
251
256
cmakesetup ..
252
257
253
258
254
- /!\ NOTE: You must include the '..' above.
259
+ /!\ NOTE: You must include the '..' above.
255
260
256
261
Click 'Configure' button. When asked, you should choose 'MinGW Makefiles'
257
- as generator.
262
+ as generator.
258
263
259
264
There's a problem with MinGW Makefiles on Win2K. If you're compiling on this
260
265
platform, use 'MSYS Makefiles' generator instead.
@@ -652,184 +657,187 @@ to you.
652
657
The packages qgis depends on to build are available in the "universe" component
653
658
of Ubuntu. This is not activated by default, so you need to activate it:
654
659
655
- 1. Edit your /etc/apt/sources.list file. 2. Uncomment the all the lines
656
- starting with "deb"
660
+ 1. Edit your /etc/apt/sources.list file.
661
+ 2. Uncomment the all the lines starting with "deb"
662
+
663
+ Also you will need to be running (K)Ubuntu 'edgy' or higher in order for
664
+ all dependencies to be met.
665
+
666
+ Now update your local sources database:
657
667
658
- Also you will need to be running (K)Ubuntu 'edgy' in order for all
659
- dependencies to be met.
660
668
661
- Now update your local sources database:
669
+ sudo apt-get update
662
670
663
- ```
664
- sudo apt-get update
665
- ```
666
671
667
672
668
673
4.3. Install Qt4
669
674
================
670
675
671
- ```
672
- sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev \
673
- libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
674
- qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
675
- ```
676
-
677
- /!\ *A Special Note:* If you are following this set of instructions on
678
- a system where you already have Qt3 development tools installed, there will
679
- be a conflict between Qt3 tools and Qt4 tools. For example, qmake will
680
- point to the Qt3 version not the Qt4. Ubuntu Qt4 and Qt3 packages are
681
- designed to live alongside each other. This means that for example if you
682
- have them both installed you will have three qmake exe's:
683
-
684
- ```
685
- /usr/bin/qmake -> /etc/alternatives/qmake
686
- /usr/bin/qmake-qt3
687
- /usr/bin/qmake-qt4
688
- ```
689
-
690
- The same applies to all other Qt binaries. You will notice above that the
691
- canonical 'qmake' is managed by apt alternatives, so before we start to
692
- build QGIS, we need to make Qt4 the default. To return Qt3 to default later
693
- you can use this same process.
694
-
695
- You can use apt alternatives to correct this so that the Qt4 version of
696
- applications is used in all cases:
697
-
698
- ```
699
- sudo update-alternatives --config qmake
700
- sudo update-alternatives --config uic
701
- sudo update-alternatives --config designer
702
- sudo update-alternatives --config assistant
703
- sudo update-alternatives --config qtconfig
704
- sudo update-alternatives --config moc
705
- sudo update-alternatives --config lupdate
706
- sudo update-alternatives --config lrelease
707
- sudo update-alternatives --config linguist
708
- ```
709
-
710
- Use the simple command line dialog that appears after running each of the
711
- above commands to select the Qt4 version of the relevant applications.
676
+
677
+ sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev \
678
+ libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
679
+ qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
680
+
681
+
682
+ /!\ *A Special Note:* If you are following this set of instructions on
683
+ a system where you already have Qt3 development tools installed, there will
684
+ be a conflict between Qt3 tools and Qt4 tools. For example, qmake will
685
+ point to the Qt3 version not the Qt4. Ubuntu Qt4 and Qt3 packages are
686
+ designed to live alongside each other. This means that for example if you
687
+ have them both installed you will have three qmake exe's:
688
+
689
+
690
+ /usr/bin/qmake -> /etc/alternatives/qmake
691
+ /usr/bin/qmake-qt3
692
+ /usr/bin/qmake-qt4
693
+
694
+
695
+ The same applies to all other Qt binaries. You will notice above that the
696
+ canonical 'qmake' is managed by apt alternatives, so before we start to
697
+ build QGIS, we need to make Qt4 the default. To return Qt3 to default later
698
+ you can use this same process.
699
+
700
+ You can use apt alternatives to correct this so that the Qt4 version of
701
+ applications is used in all cases:
702
+
703
+
704
+ sudo update-alternatives --config qmake
705
+ sudo update-alternatives --config uic
706
+ sudo update-alternatives --config designer
707
+ sudo update-alternatives --config assistant
708
+ sudo update-alternatives --config qtconfig
709
+ sudo update-alternatives --config moc
710
+ sudo update-alternatives --config lupdate
711
+ sudo update-alternatives --config lrelease
712
+ sudo update-alternatives --config linguist
713
+
714
+
715
+ Use the simple command line dialog that appears after running each of the
716
+ above commands to select the Qt4 version of the relevant applications.
712
717
713
718
714
719
4.4. Install additional software dependencies required by QGIS
715
720
==============================================================
716
721
717
- ```
718
- sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj libtool \
719
- libgdal-doc libhdf4g-dev libhdf4g-run autoconf2.13 automake1.9 python-dev \
720
- swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion gsl-bin \
721
- libsqlite3-dev sqlite3 ccache make libpq-dev flex bison firefox
722
- ```
722
+
723
+ sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj libtool \
724
+ libgdal-doc libhdf4g-dev libhdf4g-run autoconf2.13 automake1.9 python-dev \
725
+ swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion gsl-bin \
726
+ libsqlite3-dev sqlite3 ccache make libpq-dev flex bison firefox
727
+
723
728
724
729
725
730
4.5. GRASS Specific Steps
726
731
=========================
727
732
728
- /!\ *Note:* If you don't need to build with GRASS support, you can
729
- skip this section.
733
+ /!\ *Note:* If you don't need to build with GRASS support, you can
734
+ skip this section.
735
+
736
+ Now you can install grass from dapper:
737
+
730
738
731
- Now you can install grass from dapper:
739
+ sudo apt-get install grass libgrass-dev libgdal1-grass
732
740
733
- ```
734
- sudo apt-get install grass libgrass-dev libgdal1-grass
735
- ```
736
741
737
742
738
743
4.6. Setup ccache (Optional)
739
744
============================
740
745
741
- You should also setup ccache to speed up compile times:
746
+ You should also setup ccache to speed up compile times:
747
+
748
+
749
+ cd /usr/local/bin
750
+ sudo ln -s /usr/bin/ccache gcc
751
+ sudo ln -s /usr/bin/ccache g++
742
752
743
- ```
744
- cd /usr/local/bin
745
- sudo ln -s /usr/bin/ccache gcc
746
- sudo ln -s /usr/bin/ccache g++
747
- ```
748
753
749
754
750
755
4.7. Prepare your development environment
751
756
=========================================
752
757
753
- As a convention I do all my development work in $HOME/dev/<language>, so in
754
- this case we will create a work environment for C++ development work like
755
- this:
758
+ As a convention I do all my development work in $HOME/dev/<language>, so in
759
+ this case we will create a work environment for C++ development work like
760
+ this:
761
+
762
+
763
+ mkdir -p ${HOME}/dev/cpp
764
+ cd ${HOME}/dev/cpp
756
765
757
- ```
758
- mkdir -p ${HOME}/dev/cpp
759
- cd ${HOME}/dev/cpp
760
- ```
761
766
762
- This directory path will be assumed for all instructions that follow.
767
+ This directory path will be assumed for all instructions that follow.
763
768
764
769
765
770
4.8. Check out the QGIS Source Code
766
771
===================================
767
772
768
- There are two ways the source can be checked out. Use the anonymous method
769
- if you do not have edit privaleges for the QGIS source repository, or use
770
- the developer checkout if you have permissions to commit source code
771
- changes.
773
+ There are two ways the source can be checked out. Use the anonymous method
774
+ if you do not have edit privaleges for the QGIS source repository, or use
775
+ the developer checkout if you have permissions to commit source code
776
+ changes.
777
+
778
+ 1. Anonymous Checkout
779
+
780
+
781
+ cd ${HOME}/dev/cpp
782
+ svn co https://svn.qgis.org/repos/qgis/trunk/qgis qgis
783
+
772
784
773
- 1. Anonymous Checkout
785
+ 2. Developer Checkout
774
786
775
- ```
776
- cd ${HOME}/dev/cpp
777
- svn co https://svn.qgis.org/repos/qgis/trunk/qgis qgis
778
- ```
779
787
780
- 2. Developer Checkout
788
+ cd ${HOME}/dev/cpp
789
+ svn co --username <yourusername> https://svn.qgis.org/repos/qgis/trunk/qgis qgis
781
790
782
- ```
783
- cd ${HOME}/dev/cpp
784
- svn co --username <yourusername> https://svn.qgis.org/repos/qgis/trunk/qgis qgis
785
- ```
786
791
787
- The first time you check out the source you will be prompted to accept the
788
- qgis.org certificate. Press 'p' to accept it permanently:
792
+ The first time you check out the source you will be prompted to accept the
793
+ qgis.org certificate. Press 'p' to accept it permanently:
789
794
790
- ```
791
- Error validating server certificate for 'https://svn.qgis.org:443':
792
795
793
- - The certificate is not issued by a trusted authority. Use the
794
- fingerprint to validate the certificate manually! Certificate
795
- information:
796
- - Hostname: svn.qgis.org
797
- - Valid: from Apr 1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
798
- - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
799
- - Fingerprint:
800
- 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject,
801
- accept (t)emporarily or accept (p)ermanently?
802
- ```
796
+ Error validating server certificate for 'https://svn.qgis.org:443':
797
+ - The certificate is not issued by a trusted authority. Use the
798
+ fingerprint to validate the certificate manually! Certificate
799
+ information:
800
+ - Hostname: svn.qgis.org
801
+ - Valid: from Apr 1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
802
+ - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
803
+ - Fingerprint:
804
+ 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject,
805
+ accept (t)emporarily or accept (p)ermanently?
803
806
804
- == Starting the compile ==
805
807
806
- I compile my development version of QGIS into my ~/apps directory to avoid
807
- conflicts with Ubuntu packages that may be under /usr. This way for example
808
- you can use the binary packages of QGIS on your system along side with your
809
- development version. I suggest you do something similar:
810
808
811
- ```
812
- mkdir -p ${HOME}/apps
813
- ```
809
+ 4.9. Starting the compile
810
+ =========================
811
+
812
+ I compile my development version of QGIS into my ~/apps directory to avoid
813
+ conflicts with Ubuntu packages that may be under /usr. This way for example
814
+ you can use the binary packages of QGIS on your system along side with your
815
+ development version. I suggest you do something similar:
816
+
817
+
818
+ mkdir -p ${HOME}/apps
819
+
820
+
821
+ The script will carry on to build QGIS - it may take a little while to go
822
+ and have a cup of your favourite beverage while you wait...
823
+
824
+
825
+ 4.10. Running QGIS
826
+ ==================
814
827
815
- The script will carry on to build QGIS - it may take a little while to go
816
- and have a cup of your favourite beverage while you wait...
828
+ Once the compile is complete it should pop up a page in firefox with unit
829
+ test results. At the time of writing the unit tests are just stubs - we
830
+ still need to create the test implementations - so dont worry to much about
831
+ their output at the moment.
817
832
818
- == Running QGIS ==
833
+ Now you can try to run QGIS:
819
834
820
- Once the compile is complete it should pop up a page in firefox with unit
821
- test results. At the time of writing the unit tests are just stubs - we
822
- still need to create the test implementations - so dont worry to much about
823
- their output at the moment.
824
835
825
- Now you can try to run QGIS:
836
+ $HOME/apps/bin/qgis
826
837
827
- ```
828
- $HOME/apps/bin/qgis
829
- ```
830
838
831
- If all has worked properly the QGIS application should start up and appear
832
- on your screen.
839
+ If all has worked properly the QGIS application should start up and appear
840
+ on your screen.
833
841
834
842
835
843
5. Further help and information
0 commit comments