Skip to content

Commit ddd3b27

Browse files
committedAug 5, 2012
Updated Mac build notes and INSTALL
- Added ccache optional setup to Mac notes - Added cmake options to handle external libspatialindex - Fixed some Mac notes typos - Rebuilt INSTALL and INSTALL.html, which were outdated
1 parent 136a65c commit ddd3b27

File tree

3 files changed

+668
-86
lines changed

3 files changed

+668
-86
lines changed
 

‎INSTALL

Lines changed: 276 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Quantum GIS (QGIS)
22
Building QGIS from source - step by step
3-
Tuesday June 05, 2012
3+
Saturday August 04, 2012
44

55

6-
Last Updated: Tuesday June 05, 2012
7-
Last Change : Tuesday June 05, 2012
6+
Last Updated: Saturday August 04, 2012
7+
Last Change : Saturday July 21, 2012
88

99

1010
1. Introduction
@@ -32,7 +32,14 @@ Last Change : Tuesday June 05, 2012
3232
5.6. Configure the build
3333
5.7. Building
3434
5.8. Post-Install
35-
6. Authors and Acknowledgments
35+
6. Setting up the WCS test server on GNU/Linux
36+
6.1. Preparation
37+
6.2. Setup mapserver
38+
6.3. Create a home page
39+
6.4. Now deploy it
40+
6.5. Debugging
41+
7. Setting up a Jenkins Build Server
42+
8. Authors and Acknowledgments
3643

3744

3845
1. Introduction
@@ -54,8 +61,8 @@ always welcome for indicating possible mistakes.
5461

5562
You can download this document as part of the Quantum GIS 'User and
5663
Installation Guide' in HTML and PDF format via http://www.qgis.org. A current
57-
version is also available at the wiki, see:
58-
http://www.qgis.org/wiki/Installation_Guide
64+
version is also available at:
65+
http://www.qgis.org/api/INSTALL.html
5966

6067
Translations of this document can also be downloaded at the documentation area
6168
of the Quantum GIS project at http://www.qgis.org. More information is
@@ -672,21 +679,22 @@ directory or add their respective directories to your PATH.
672679
4.1.4. Packaging
673680
================
674681

675-
To create a windows 'all in one' standalone package under ubuntu (yes you
676-
read correctly) do the following:
682+
To create a standalone installer there is a perl script named 'creatensis.pl'
683+
in 'qgis/ms-windows/osgeo4w'. It downloads all required packages from OSGeo4W
684+
and repackages them into an installer using NSIS.
677685

678-
sudo apt-get install nsis
686+
The script can either be run on Windows, but also can be run on Linux.
679687

680-
Now
688+
On Debian/Ubuntu you can just install the 'nsis' package.
681689

682-
cd qgis/ms-windows/osgeo4w
690+
NSIS for Windows can be downloaded at:
683691

684-
And run the nsis creation script:
692+
http://nsis.sourceforge.net
685693

686-
creatensis.pl
694+
And Perl for Windows (including other requirements like 'wget', 'unzip', 'tar'
695+
and 'bzip2') is available at:
687696

688-
When the script completes, it should have created a QGIS installer executable
689-
in the ms-windows directory (using the QGIS binaries from OSGEO4W).
697+
http://cygwin.com
690698

691699

692700
4.1.5. Packaging your own build of QGIS
@@ -840,13 +848,13 @@ to get versions that match your current Qt installed version.
840848
successfull install, they're not needed anymore.
841849

842850

843-
4.2.5. Subversion
844-
=================
851+
4.2.5. git
852+
==========
845853

846-
In order to check out QGIS sources from the repository, you need Subversion
847-
client. This installer should work fine:
854+
In order to check out QGIS sources from the repository, you need a git client.
855+
This installer should work fine:
848856

849-
http://www.sliksvn.com/pub/Slik-Subversion-1.6.13-win32.msi
857+
http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe
850858

851859

852860
4.2.6. CMake
@@ -866,15 +874,9 @@ directory and move into it
866874
md c:\dev\cpp
867875
cd c:\dev\cpp
868876

869-
Check out sources from SVN:
877+
Check out sources from GIT:
870878

871-
For svn trunk:
872-
873-
svn co https://svn.osgeo.org/qgis/trunk/qgis
874-
875-
For svn 1.5 branch
876-
877-
svn co https://svn.osgeo.org/qgis/branches/Release-1_5_0 qgis1.5.0
879+
git clone git://github.com/qgis/Quantum-GIS.git
878880

879881

880882
4.2.8. Compiling
@@ -1268,6 +1270,42 @@ Double-click the source tarball, then cd to the source folder and:
12681270
sudo make install
12691271

12701272

1273+
5.3.1. Optional Setup: ccache
1274+
=============================
1275+
1276+
Setup ccache to significantly speed up compile times after initial build.
1277+
(Switching git branches will again cause longer initial build times unless
1278+
separate build directories are used for each branch.)
1279+
1280+
Get the latest source release from here:
1281+
1282+
http://ccache.samba.org/
1283+
1284+
Double-click the source tarball to unpack, then, in Terminal.app, cd to the
1285+
source folder and:
1286+
1287+
./configure
1288+
make
1289+
sudo make install
1290+
1291+
After install, symbolically link compilers to /usr/local/bin/ccache.
1292+
(Note: this differs from instructions at http://ccache.samba.org/manual.html
1293+
Changing the /usr/bin:/usr/local/bin order in PATH is not recommended on OS X.
1294+
1295+
sudo mkdir /usr/local/bin/compilers && cd /usr/local/bin/compilers
1296+
sudo ln -s ../ccache gcc
1297+
sudo ln -s ../ccache g++
1298+
sudo ln -s ../ccache cc
1299+
sudo ln -s ../ccache c++
1300+
1301+
Add the following to the end of your ~/.bash_profile (and optionally ~/.bashrc)
1302+
to allow your login shell to discover the symbolically linked compilers before
1303+
/usr/bin compilers and to easily toggle using ccache off, by commenting out the
1304+
line and starting a new login session in Terminal.
1305+
1306+
export PATH=/usr/local/bin/compilers:$PATH
1307+
1308+
12711309
5.4. Install development frameworks for QGIS dependencies
12721310
=========================================================
12731311

@@ -1456,7 +1494,7 @@ For 64-bit Qt (Qt Cocoa), use this configure line:
14561494

14571495
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
14581496

1459-
Snow Leopard system Python
1497+
Lion system Python
14601498

14611499
Similar to Snow Leopard, you should install outside the system Python path.
14621500
But you don't need the arch option:
@@ -1665,6 +1703,8 @@ In a Terminal cd to the qgis source folder previously downloaded, then:
16651703
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
16661704
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
16671705
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
1706+
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
1707+
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
16681708
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
16691709
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
16701710
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -1687,8 +1727,10 @@ script and add arch flags to the configuration:
16871727
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
16881728
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
16891729
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
1690-
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
1691-
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
1730+
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
1731+
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
1732+
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
1733+
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
16921734
-D BISON_EXECUTABLE=/usr/local/bin/bison \
16931735
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
16941736
..
@@ -1762,7 +1804,203 @@ for instructions on setting up Apache fastcgi and testing Mapserver, including
17621804
installing the mod-fastcgi that is missing on Lion.
17631805

17641806

1765-
6. Authors and Acknowledgments
1807+
6. Setting up the WCS test server on GNU/Linux
1808+
==============================================
1809+
1810+
Requires: Ubuntu / Debian derived distro
1811+
1812+
These notes are for Ubuntu - other versions and Debian derived distros may
1813+
require slight variations in package names.
1814+
1815+
1816+
6.1. Preparation
1817+
================
1818+
1819+
Note the git repo below will change to the default QGIS repo once this work
1820+
is integrated into master.
1821+
1822+
git remote add blazek git://github.com/blazek/Quantum-GIS.git
1823+
git fetch blazek
1824+
git branch --track wcs2 blazek/wcs2
1825+
git checkout wcs2
1826+
cd /var/www/
1827+
sudo mkdir wcs
1828+
sudo chown timlinux wcs
1829+
cd wcs/
1830+
mkdir cgi-bin
1831+
cd cgi-bin/
1832+
1833+
1834+
6.2. Setup mapserver
1835+
====================
1836+
1837+
`sudo apt-get install cgi-mapserver`
1838+
1839+
Set the contents of cgi-bin/wcstest-1.9.0 to:
1840+
1841+
#! /bin/sh
1842+
MS_MAPFILE=/var/www/wcs/testdata/qgis-1.9.0/raster/wcs.map
1843+
export MS_MAPFILE
1844+
/usr/lib/cgi-bin/mapserv
1845+
1846+
Then do:
1847+
1848+
chmod +x cgi-bin/wcstest-1.9.0
1849+
mkdir -p /var/www/wcs/testdata/qgis-1.9.0/raster/
1850+
cd /var/www/wcs/testdata/qgis-1.9.0/raster/
1851+
cp -r /home/timlinux/Quantum-GIS/tests/testdata/raster/* .
1852+
1853+
Edit wcs.map and set the shapepath to this:
1854+
1855+
SHAPEPATH "/var/www/wcs/testdata/qgis-1.9.0/raster"
1856+
1857+
Then create /var/www/wcs/7-wcs.qgis.org.conf setting the contents to this:
1858+
1859+
<VirtualHost *:80>
1860+
ServerName wcs.qgis.org
1861+
ServerAdmin tim@linfiniti.com
1862+
1863+
LogLevel warn
1864+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined
1865+
CustomLog /var/log/apache2/wcs_qgis.org/access.log combined
1866+
ErrorLog /var/log/apache2/wcs_qgis.org/error.log
1867+
1868+
DocumentRoot /var/www/wcs/html
1869+
1870+
ScriptAlias /cgi-bin/ /var/www/wcs/cgi-bin/
1871+
<Directory "/var/www/wcs/cgi-bin">
1872+
AllowOverride None
1873+
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
1874+
Order allow,deny
1875+
Allow from all
1876+
</Directory>
1877+
1878+
RewriteEngine on
1879+
RewriteRule /1.9.0/wcs /cgi-bin/wcstest-1.9.0 [PT]
1880+
1881+
</VirtualHost>
1882+
1883+
1884+
6.3. Create a home page
1885+
=======================
1886+
1887+
mkdir html
1888+
vim html/index.html
1889+
1890+
Set the contents to:
1891+
1892+
This is the test platform for QGIS' wcs client. You can use these services
1893+
from QGIS directly (to try out WCS for example) by pointing your QGIS to:
1894+
http://wcs.qgis.org/1.9.0/wcs
1895+
1896+
1897+
6.4. Now deploy it
1898+
==================
1899+
1900+
sudo mkdir /var/log/apache2/wcs_qgis.org
1901+
sudo chown www-data /var/log/apache2/wcs_qgis.org
1902+
cd /etc/apache2/sites-available/
1903+
sudo ln -s /var/www/wcs/7-wcs.qgis.org.conf .
1904+
cd /var/www/wcs/
1905+
sudo a2ensite 7-wcs.qgis.org.conf
1906+
sudo /etc/init.d/apache2 reload
1907+
1908+
1909+
6.5. Debugging
1910+
==============
1911+
1912+
sudo tail -f /var/log/apache2/wcs_qgis.org/error.log
1913+
1914+
1915+
7. Setting up a Jenkins Build Server
1916+
====================================
1917+
1918+
Assumption: You know how to make a working build environment and want to
1919+
deploy it under Jenkins for continuous integration testing now.
1920+
1921+
These notes are terse, I will expand on them later as the need arises. The
1922+
procedure is:
1923+
1924+
- Install Jenkins and get it configured according to your own preferences
1925+
- Make sure you have the git, github, junit etc plugins installed. A complete
1926+
list of the plugins I have installed follows (note that you almost certainly
1927+
don't need evey plugin listed here):
1928+
- External Monitor Job Type Plugin
1929+
- LDAP Plugin
1930+
- pam-auth
1931+
- javadoc
1932+
- ant
1933+
- Jenkins Subversion Plug-in
1934+
- Git Plugin
1935+
- Maven 2 Project Plugin
1936+
- Jenkins SLOCCount Plug-in
1937+
- Jenkins Sounds plugin
1938+
- Jenkins Translation Assistance plugin
1939+
- ruby-runtime
1940+
- Jenkins CVS Plug-in
1941+
- Coverage/Complexity Scatter Plot PlugIn
1942+
- Status Monitor Plugin
1943+
- Git Parameter Plug-In
1944+
- github-api
1945+
- GitHub plugin
1946+
- Jenkins Violations plugin
1947+
- git-notes Plugin
1948+
- Twitter plugin
1949+
- Jenkins Cobertura Plugin
1950+
- Jenkins Gravatar plugin
1951+
- Jenkins SSH Slaves plugin
1952+
- Create a Job called 'QGIS'
1953+
- Use the following options for your job:
1954+
- Job Name: QGIS
1955+
- Job Type: Build a free-style software project
1956+
- Tick enable project based security (you need to elsewhere configure your
1957+
Jenkins security to per project settings)
1958+
- Allow Anonymous user Read and Discover access
1959+
- Set the github project to https://github.com/qgis/Quantum-GIS/
1960+
- Set source code management to Git
1961+
- Set repository url to git://github.com/qgis/Quantum-GIS.git
1962+
- In advanced repository url settings set refspec to :
1963+
1964+
+refs/heads/master:refs/remotes/origin/master
1965+
1966+
1967+
- Set branch to build to master
1968+
- Repository Browser: Auto
1969+
- Build triggers: set to Poll SCM and set schedule to * * * * * (polls every minute)
1970+
- Build - Execute shell and set shell script to:
1971+
1972+
cd build
1973+
cmake ..
1974+
xvfb-run --auto-servernum --server-num=1 \
1975+
--server-args="-screen 0 1024x768x24" \
1976+
make Experimental || true
1977+
if [ -f Testing/TAG ] ; then
1978+
xsltproc ../tests/ctest2junix.xsl \
1979+
Testing/`head -n 1 < Testing/TAG`/Test.xml > \
1980+
CTestResults.xml
1981+
fi
1982+
1983+
1984+
- Add Junit post build action and set 'Publish Junit test result report' to:
1985+
build/CTestResults.xml
1986+
- Email notification: Send separate e-mails to individuals who broke the build
1987+
- Jenkins sounds - set up sounds for Failure, Success and Unstable.
1988+
- Save
1989+
1990+
Now open the Job dash board and push something to QGIS and wait a minute to
1991+
validate automated builds work.
1992+
1993+
Note: You will need to log in to the Jenkins user account and go to
1994+
/var/lib/jenkins/jobs/QGIS/workspace, then make a build directory and run
1995+
the initial cmake setup and then do test build. This process is the same as
1996+
described elsewhere in this doc.
1997+
1998+
I based some of the set up from this nice blog article here:
1999+
2000+
* http://alexott.blogspot.com/2012/03/jenkins-cmakectest.html
2001+
2002+
2003+
8. Authors and Acknowledgments
17662004
==============================
17672005

17682006
The following people have contributed to this document:
@@ -1791,6 +2029,12 @@ The following people have contributed to this document:
17912029
- Tim Sutton 2006
17922030
- Debian package section: Juergen Fischer 2008
17932031

2032+
- WCS Test Server Section
2033+
- Tim Sutton, Radim Blazek 2012
2034+
2035+
- Jenkins CI Configuration
2036+
- Tim Sutton 2012
2037+
17942038
- Latex Generator
17952039
- Tim Sutton 2011
17962040

‎doc/INSTALL.html

Lines changed: 346 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
66
<TITLE>Quantum GIS (QGIS)</TITLE>
77

8-
<!-- Included /home/fischer/src/qgis/qgis/doc/style.css -->
8+
<!-- Included style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -77,13 +77,13 @@
7777
<DIV CLASS="header" ID="header">
7878
<H1>Quantum GIS (QGIS)</H1>
7979
<H2>Building QGIS from source - step by step</H2>
80-
<H3>Friday May 11, 2012</H3>
80+
<H3>Saturday August 04, 2012</H3>
8181
</DIV>
8282

8383
<DIV CLASS="body" ID="body">
8484
<P>
85-
Last Updated: Friday May 11, 2012
86-
Last Change : Friday May 11, 2012
85+
Last Updated: Saturday August 04, 2012
86+
Last Change : Saturday July 21, 2012
8787
</P>
8888
<DIV CLASS="toc">
8989

@@ -119,7 +119,16 @@ <H3>Friday May 11, 2012</H3>
119119
<LI><A HREF="#toc24">5.7. Building</A>
120120
<LI><A HREF="#toc25">5.8. Post-Install</A>
121121
</UL>
122-
<LI><A HREF="#toc26">Authors and Acknowledgments</A>
122+
<LI><A HREF="#toc26">Setting up the WCS test server on GNU/Linux</A>
123+
<UL>
124+
<LI><A HREF="#toc27">6.1. Preparation</A>
125+
<LI><A HREF="#toc28">6.2. Setup mapserver</A>
126+
<LI><A HREF="#toc29">6.3. Create a home page</A>
127+
<LI><A HREF="#toc30">6.4. Now deploy it</A>
128+
<LI><A HREF="#toc31">6.5. Debugging</A>
129+
</UL>
130+
<LI><A HREF="#toc32">Setting up a Jenkins Build Server</A>
131+
<LI><A HREF="#toc33">Authors and Acknowledgments</A>
123132
</OL>
124133

125134
</DIV>
@@ -146,8 +155,8 @@ <H1>1. Introduction</H1>
146155
<P>
147156
You can download this document as part of the Quantum GIS 'User and
148157
Installation Guide' in HTML and PDF format via <A HREF="http://www.qgis.org">http://www.qgis.org</A>. A current
149-
version is also available at the wiki, see:
150-
<A HREF="http://www.qgis.org/wiki/Installation_Guide">http://www.qgis.org/wiki/Installation_Guide</A>
158+
version is also available at:
159+
<A HREF="http://www.qgis.org/api/INSTALL.html">http://www.qgis.org/api/INSTALL.html</A>
151160
</P>
152161
<P>
153162
Translations of this document can also be downloaded at the documentation area
@@ -930,14 +939,16 @@ <H3>4.1.2. Other tools and dependencies</H3>
930939
<UL>
931940
<LI>expat
932941
<LI>fcgi
933-
<LI>gdal17
942+
<LI>gdal
934943
<LI>grass
935944
<LI>gsl-devel
936945
<LI>iconv
937946
<LI>pyqt4
938947
<LI>qt4-devel
939948
<LI>qwt5-devel-qt4
940949
<LI>sip
950+
<LI>spatialite
951+
<LI>libspatialindex-devel
941952
</UL>
942953

943954
<P>
@@ -1047,34 +1058,29 @@ <H3>4.1.3. Setting up the Visual Studio project with CMake</H3>
10471058
<H3>4.1.4. Packaging</H3>
10481059

10491060
<P>
1050-
To create a windows 'all in one' standalone package under ubuntu (yes you
1051-
read correctly) do the following:
1061+
To create a standalone installer there is a perl script named 'creatensis.pl'
1062+
in 'qgis/ms-windows/osgeo4w'. It downloads all required packages from OSGeo4W
1063+
and repackages them into an installer using NSIS.
10521064
</P>
1053-
1054-
<div class="code"><PRE>
1055-
sudo apt-get install nsis
1056-
</PRE></div>
1057-
10581065
<P>
1059-
Now
1066+
The script can either be run on Windows, but also can be run on Linux.
10601067
</P>
1061-
1062-
<div class="code"><PRE>
1063-
cd qgis/ms-windows/osgeo4w
1064-
</PRE></div>
1065-
10661068
<P>
1067-
And run the nsis creation script:
1069+
On Debian/Ubuntu you can just install the 'nsis' package.
10681070
</P>
1069-
1070-
<div class="code"><PRE>
1071-
creatensis.pl
1072-
</PRE></div>
1073-
10741071
<P>
1075-
When the script completes, it should have created a QGIS installer executable
1076-
in the ms-windows directory (using the QGIS binaries from OSGEO4W).
1072+
NSIS for Windows can be downloaded at:
1073+
</P>
1074+
<BLOCKQUOTE>
1075+
<A HREF="http://nsis.sourceforge.net">http://nsis.sourceforge.net</A>
1076+
</BLOCKQUOTE>
1077+
<P>
1078+
And Perl for Windows (including other requirements like 'wget', 'unzip', 'tar'
1079+
and 'bzip2') is available at:
10771080
</P>
1081+
<BLOCKQUOTE>
1082+
<A HREF="http://cygwin.com">http://cygwin.com</A>
1083+
</BLOCKQUOTE>
10781084

10791085
<H3>4.1.5. Packaging your own build of QGIS</H3>
10801086

@@ -1258,14 +1264,14 @@ <H4>4.2.4.5. Final python notes</H4>
12581264
successfull install, they're not needed anymore.
12591265
</P>
12601266

1261-
<H3>4.2.5. Subversion</H3>
1267+
<H3>4.2.5. git</H3>
12621268

12631269
<P>
1264-
In order to check out QGIS sources from the repository, you need Subversion
1265-
client. This installer should work fine:
1270+
In order to check out QGIS sources from the repository, you need a git client.
1271+
This installer should work fine:
12661272
</P>
12671273
<P>
1268-
<A HREF="http://www.sliksvn.com/pub/Slik-Subversion-1.6.13-win32.msi">http://www.sliksvn.com/pub/Slik-Subversion-1.6.13-win32.msi</A>
1274+
<A HREF="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe</A>
12691275
</P>
12701276

12711277
<H3>4.2.6. CMake</H3>
@@ -1290,22 +1296,11 @@ <H3>4.2.7. QGIS</H3>
12901296
</PRE></div>
12911297

12921298
<P>
1293-
Check out sources from SVN:
1294-
</P>
1295-
<P>
1296-
For svn trunk:
1297-
</P>
1298-
1299-
<div class="code"><PRE>
1300-
svn co https://svn.osgeo.org/qgis/trunk/qgis
1301-
</PRE></div>
1302-
1303-
<P>
1304-
For svn 1.5 branch
1299+
Check out sources from GIT:
13051300
</P>
13061301

13071302
<div class="code"><PRE>
1308-
svn co https://svn.osgeo.org/qgis/branches/Release-1_5_0 qgis1.5.0
1303+
git clone git://github.com/qgis/Quantum-GIS.git
13091304
</PRE></div>
13101305

13111306
<H3>4.2.8. Compiling</H3>
@@ -1803,6 +1798,55 @@ <H2>5.3. Install CMake for OSX</H2>
18031798
sudo make install
18041799
</PRE></div>
18051800

1801+
<H3>5.3.1. Optional Setup: ccache</H3>
1802+
1803+
<P>
1804+
Setup ccache to significantly speed up compile times after initial build.
1805+
(Switching git branches will again cause longer initial build times unless
1806+
separate build directories are used for each branch.)
1807+
</P>
1808+
<P>
1809+
Get the latest source release from here:
1810+
</P>
1811+
<P>
1812+
<A HREF="http://ccache.samba.org/">http://ccache.samba.org/</A>
1813+
</P>
1814+
<P>
1815+
Double-click the source tarball to unpack, then, in Terminal.app, cd to the
1816+
source folder and:
1817+
</P>
1818+
1819+
<div class="code"><PRE>
1820+
./configure
1821+
make
1822+
sudo make install
1823+
</PRE></div>
1824+
1825+
<P>
1826+
After install, symbolically link compilers to /usr/local/bin/ccache.
1827+
(Note: this differs from instructions at <A HREF="http://ccache.samba.org/manual.html">http://ccache.samba.org/manual.html</A>
1828+
Changing the /usr/bin:/usr/local/bin order in PATH is not recommended on OS X.
1829+
</P>
1830+
1831+
<div class="code"><PRE>
1832+
sudo mkdir /usr/local/bin/compilers &amp;&amp; cd /usr/local/bin/compilers
1833+
sudo ln -s ../ccache gcc
1834+
sudo ln -s ../ccache g++
1835+
sudo ln -s ../ccache cc
1836+
sudo ln -s ../ccache c++
1837+
</PRE></div>
1838+
1839+
<P>
1840+
Add the following to the end of your ~/.bash_profile (and optionally ~/.bashrc)
1841+
to allow your login shell to discover the symbolically linked compilers before
1842+
/usr/bin compilers and to easily toggle using ccache off, by commenting out the
1843+
line and starting a new login session in Terminal.
1844+
</P>
1845+
1846+
<div class="code"><PRE>
1847+
export PATH=/usr/local/bin/compilers:$PATH
1848+
</PRE></div>
1849+
18061850
<A NAME="toc21"></A>
18071851
<H2>5.4. Install development frameworks for QGIS dependencies</H2>
18081852

@@ -2064,7 +2108,7 @@ <H3>5.4.6. Additional Dependencies: PyQt</H3>
20642108
</PRE></div>
20652109

20662110
<P>
2067-
<U>Snow Leopard system Python</U>
2111+
<U>Lion system Python</U>
20682112
</P>
20692113
<P>
20702114
Similar to Snow Leopard, you should install outside the system Python path.
@@ -2340,6 +2384,8 @@ <H2>5.6. Configure the build</H2>
23402384
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
23412385
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
23422386
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
2387+
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
2388+
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
23432389
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
23442390
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
23452391
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -2367,8 +2413,10 @@ <H2>5.6. Configure the build</H2>
23672413
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
23682414
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
23692415
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
2370-
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
2371-
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
2416+
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
2417+
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
2418+
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
2419+
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
23722420
-D BISON_EXECUTABLE=/usr/local/bin/bison \
23732421
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
23742422
..
@@ -2479,7 +2527,244 @@ <H2>5.8. Post-Install</H2>
24792527
</P>
24802528

24812529
<A NAME="toc26"></A>
2482-
<H1>6. Authors and Acknowledgments</H1>
2530+
<H1>6. Setting up the WCS test server on GNU/Linux</H1>
2531+
2532+
<P>
2533+
<B>Requires:</B> Ubuntu / Debian derived distro
2534+
</P>
2535+
<P>
2536+
These notes are for Ubuntu - other versions and Debian derived distros may
2537+
require slight variations in package names.
2538+
</P>
2539+
2540+
<A NAME="toc27"></A>
2541+
<H2>6.1. Preparation</H2>
2542+
2543+
<P>
2544+
Note the git repo below will change to the default QGIS repo once this work
2545+
is integrated into master.
2546+
</P>
2547+
<P>
2548+
git remote add blazek git://github.com/blazek/Quantum-GIS.git
2549+
git fetch blazek
2550+
git branch --track wcs2 blazek/wcs2
2551+
git checkout wcs2
2552+
cd /var/www/
2553+
sudo mkdir wcs
2554+
sudo chown timlinux wcs
2555+
cd wcs/
2556+
mkdir cgi-bin
2557+
cd cgi-bin/
2558+
</P>
2559+
2560+
<A NAME="toc28"></A>
2561+
<H2>6.2. Setup mapserver</H2>
2562+
2563+
<P>
2564+
<CODE>`sudo apt-get install cgi-mapserver`</CODE>
2565+
</P>
2566+
<P>
2567+
Set the contents of cgi-bin/wcstest-1.9.0 to:
2568+
</P>
2569+
2570+
<div class="code"><PRE>
2571+
#! /bin/sh
2572+
MS_MAPFILE=/var/www/wcs/testdata/qgis-1.9.0/raster/wcs.map
2573+
export MS_MAPFILE
2574+
/usr/lib/cgi-bin/mapserv
2575+
</PRE></div>
2576+
2577+
<P>
2578+
Then do:
2579+
</P>
2580+
2581+
<div class="code"><PRE>
2582+
chmod +x cgi-bin/wcstest-1.9.0
2583+
mkdir -p /var/www/wcs/testdata/qgis-1.9.0/raster/
2584+
cd /var/www/wcs/testdata/qgis-1.9.0/raster/
2585+
cp -r /home/timlinux/Quantum-GIS/tests/testdata/raster/* .
2586+
</PRE></div>
2587+
2588+
<P>
2589+
Edit wcs.map and set the shapepath to this:
2590+
</P>
2591+
2592+
<div class="code"><PRE>
2593+
SHAPEPATH "/var/www/wcs/testdata/qgis-1.9.0/raster"
2594+
</PRE></div>
2595+
2596+
<P>
2597+
Then create /var/www/wcs/7-wcs.qgis.org.conf setting the contents to this:
2598+
</P>
2599+
2600+
<div class="code"><PRE>
2601+
&lt;VirtualHost *:80&gt;
2602+
ServerName wcs.qgis.org
2603+
ServerAdmin tim@linfiniti.com
2604+
2605+
LogLevel warn
2606+
LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined
2607+
CustomLog /var/log/apache2/wcs_qgis.org/access.log combined
2608+
ErrorLog /var/log/apache2/wcs_qgis.org/error.log
2609+
2610+
DocumentRoot /var/www/wcs/html
2611+
2612+
ScriptAlias /cgi-bin/ /var/www/wcs/cgi-bin/
2613+
&lt;Directory "/var/www/wcs/cgi-bin"&gt;
2614+
AllowOverride None
2615+
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
2616+
Order allow,deny
2617+
Allow from all
2618+
&lt;/Directory&gt;
2619+
2620+
RewriteEngine on
2621+
RewriteRule /1.9.0/wcs /cgi-bin/wcstest-1.9.0 [PT]
2622+
2623+
&lt;/VirtualHost&gt;
2624+
</PRE></div>
2625+
2626+
<A NAME="toc29"></A>
2627+
<H2>6.3. Create a home page</H2>
2628+
2629+
<div class="code"><PRE>
2630+
mkdir html
2631+
vim html/index.html
2632+
</PRE></div>
2633+
2634+
<P>
2635+
Set the contents to:
2636+
</P>
2637+
2638+
<div class="code"><PRE>
2639+
This is the test platform for QGIS' wcs client. You can use these services
2640+
from QGIS directly (to try out WCS for example) by pointing your QGIS to:
2641+
http://wcs.qgis.org/1.9.0/wcs
2642+
</PRE></div>
2643+
2644+
<A NAME="toc30"></A>
2645+
<H2>6.4. Now deploy it</H2>
2646+
2647+
<div class="code"><PRE>
2648+
sudo mkdir /var/log/apache2/wcs_qgis.org
2649+
sudo chown www-data /var/log/apache2/wcs_qgis.org
2650+
cd /etc/apache2/sites-available/
2651+
sudo ln -s /var/www/wcs/7-wcs.qgis.org.conf .
2652+
cd /var/www/wcs/
2653+
sudo a2ensite 7-wcs.qgis.org.conf
2654+
sudo /etc/init.d/apache2 reload
2655+
</PRE></div>
2656+
2657+
<A NAME="toc31"></A>
2658+
<H2>6.5. Debugging</H2>
2659+
2660+
<div class="code"><PRE>
2661+
sudo tail -f /var/log/apache2/wcs_qgis.org/error.log
2662+
</PRE></div>
2663+
2664+
<A NAME="toc32"></A>
2665+
<H1>7. Setting up a Jenkins Build Server</H1>
2666+
2667+
<P>
2668+
<B>Assumption:</B> You know how to make a working build environment and want to
2669+
deploy it under Jenkins for continuous integration testing now.
2670+
</P>
2671+
<P>
2672+
These notes are terse, I will expand on them later as the need arises. The
2673+
procedure is:
2674+
</P>
2675+
2676+
<UL>
2677+
<LI>Install Jenkins and get it configured according to your own preferences
2678+
<LI>Make sure you have the git, github, junit etc plugins installed. A complete
2679+
list of the plugins I have installed follows (note that you almost certainly
2680+
don't need evey plugin listed here):
2681+
<UL>
2682+
<LI>External Monitor Job Type Plugin
2683+
<LI>LDAP Plugin
2684+
<LI>pam-auth
2685+
<LI>javadoc
2686+
<LI>ant
2687+
<LI>Jenkins Subversion Plug-in
2688+
<LI>Git Plugin
2689+
<LI>Maven 2 Project Plugin
2690+
<LI>Jenkins SLOCCount Plug-in
2691+
<LI>Jenkins Sounds plugin
2692+
<LI>Jenkins Translation Assistance plugin
2693+
<LI>ruby-runtime
2694+
<LI>Jenkins CVS Plug-in
2695+
<LI>Coverage/Complexity Scatter Plot PlugIn
2696+
<LI>Status Monitor Plugin
2697+
<LI>Git Parameter Plug-In
2698+
<LI>github-api
2699+
<LI>GitHub plugin
2700+
<LI>Jenkins Violations plugin
2701+
<LI>git-notes Plugin
2702+
<LI>Twitter plugin
2703+
<LI>Jenkins Cobertura Plugin
2704+
<LI>Jenkins Gravatar plugin
2705+
<LI>Jenkins SSH Slaves plugin
2706+
</UL>
2707+
<LI>Create a Job called 'QGIS'
2708+
<LI>Use the following options for your job:
2709+
<UL>
2710+
<LI>Job Name: QGIS
2711+
<LI>Job Type: Build a free-style software project
2712+
<LI>Tick enable project based security (you need to elsewhere configure your
2713+
Jenkins security to per project settings)
2714+
<LI>Allow Anonymous user Read and Discover access
2715+
<LI>Set the github project to <A HREF="https://github.com/qgis/Quantum-GIS/">https://github.com/qgis/Quantum-GIS/</A>
2716+
<LI>Set source code management to Git
2717+
<LI>Set repository url to git://github.com/qgis/Quantum-GIS.git
2718+
<LI>In advanced repository url settings set refspec to :
2719+
<P></P>
2720+
2721+
<div class="code"><PRE>
2722+
+refs/heads/master:refs/remotes/origin/master
2723+
</PRE></div>
2724+
2725+
<P></P>
2726+
<LI>Set branch to build to master
2727+
<LI>Repository Browser: Auto
2728+
<LI>Build triggers: set to Poll SCM and set schedule to <CODE>* * * * *</CODE> (polls every minute)
2729+
<LI>Build - Execute shell and set shell script to:
2730+
<P></P>
2731+
2732+
<div class="code"><PRE>
2733+
cd build
2734+
cmake ..
2735+
xvfb-run --auto-servernum --server-num=1 \
2736+
--server-args="-screen 0 1024x768x24" \
2737+
make Experimental || true
2738+
if [ -f Testing/TAG ] ; then
2739+
xsltproc ../tests/ctest2junix.xsl \
2740+
Testing/`head -n 1 &lt; Testing/TAG`/Test.xml &gt; \
2741+
CTestResults.xml
2742+
fi
2743+
</PRE></div>
2744+
2745+
<P></P>
2746+
<LI>Add Junit post build action and set 'Publish Junit test result report' to:
2747+
<CODE>build/CTestResults.xml</CODE>
2748+
<LI>Email notification: Send separate e-mails to individuals who broke the build
2749+
<LI>Jenkins sounds - set up sounds for Failure, Success and Unstable.
2750+
<LI>Save
2751+
</UL>
2752+
<P></P>
2753+
Now open the Job dash board and push something to QGIS and wait a minute to
2754+
validate automated builds work.
2755+
<P></P>
2756+
<B>Note:</B> You will need to log in to the Jenkins user account and go to
2757+
/var/lib/jenkins/jobs/QGIS/workspace, then make a <CODE>build</CODE> directory and run
2758+
the initial cmake setup and then do test build. This process is the same as
2759+
described elsewhere in this doc.
2760+
<P></P>
2761+
I based some of the set up from this nice blog article here:
2762+
<P></P>
2763+
* <A HREF="http://alexott.blogspot.com/2012/03/jenkins-cmakectest.html">http://alexott.blogspot.com/2012/03/jenkins-cmakectest.html</A>
2764+
</UL>
2765+
2766+
<A NAME="toc33"></A>
2767+
<H1>8. Authors and Acknowledgments</H1>
24832768

24842769
<P>
24852770
The following people have contributed to this document:
@@ -2520,6 +2805,16 @@ <H1>6. Authors and Acknowledgments</H1>
25202805
<LI>Debian package section: Juergen Fischer 2008
25212806
<P></P>
25222807
</UL>
2808+
<LI>WCS Test Server Section
2809+
<UL>
2810+
<LI>Tim Sutton, Radim Blazek 2012
2811+
<P></P>
2812+
</UL>
2813+
<LI>Jenkins CI Configuration
2814+
<UL>
2815+
<LI>Tim Sutton 2012
2816+
<P></P>
2817+
</UL>
25232818
<LI>Latex Generator
25242819
<UL>
25252820
<LI>Tim Sutton 2011
@@ -2528,5 +2823,5 @@ <H1>6. Authors and Acknowledgments</H1>
25282823

25292824
</DIV>
25302825
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
2531-
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/qgis/debian/build/doc/INSTALL.html -t html /home/fischer/src/qgis/qgis/doc/INSTALL.t2t -->
2826+
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
25322827
</BODY></HTML>

‎doc/osx.t2t

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,45 @@ make
120120
sudo make install
121121
```
122122

123+
=== Optional Setup: ccache ===
124+
125+
Setup ccache to significantly speed up compile times after initial build.
126+
(Switching git branches will again cause longer initial build times unless
127+
separate build directories are used for each branch.)
128+
129+
Get the latest source release from here:
130+
131+
http://ccache.samba.org/
132+
133+
Double-click the source tarball to unpack, then, in Terminal.app, cd to the
134+
source folder and:
135+
136+
```
137+
./configure
138+
make
139+
sudo make install
140+
```
141+
142+
After install, symbolically link compilers to /usr/local/bin/ccache.
143+
(Note: this differs from instructions at http://ccache.samba.org/manual.html
144+
Changing the /usr/bin:/usr/local/bin order in PATH is not recommended on OS X.
145+
146+
```
147+
sudo mkdir /usr/local/bin/compilers && cd /usr/local/bin/compilers
148+
sudo ln -s ../ccache gcc
149+
sudo ln -s ../ccache g++
150+
sudo ln -s ../ccache cc
151+
sudo ln -s ../ccache c++
152+
```
153+
154+
Add the following to the end of your ~/.bash_profile (and optionally ~/.bashrc)
155+
to allow your login shell to discover the symbolically linked compilers before
156+
/usr/bin compilers and to easily toggle using ccache off, by commenting out the
157+
line and starting a new login session in Terminal.
158+
159+
```
160+
export PATH=/usr/local/bin/compilers:$PATH
161+
```
123162

124163
== Install development frameworks for QGIS dependencies ==
125164

@@ -320,7 +359,7 @@ For 64-bit Qt (Qt Cocoa), use this configure line:
320359
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
321360
```
322361

323-
__Snow Leopard system Python__
362+
__Lion system Python__
324363

325364
Similar to Snow Leopard, you should install outside the system Python path.
326365
But you don't need the arch option:
@@ -542,6 +581,8 @@ cd build
542581
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
543582
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
544583
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
584+
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
585+
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
545586
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
546587
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
547588
-D BISON_EXECUTABLE=/usr/local/bin/bison \
@@ -566,8 +607,10 @@ sudo chmod +x /usr/local/bin/python32
566607
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
567608
-D CMAKE_BUILD_TYPE=MinSizeRel -D ENABLE_TESTS=FALSE \
568609
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
569-
-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
570-
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
610+
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
611+
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
612+
-D QWT_LIBRARY=/usr/local/qwt-5.2.2/lib/libqwt.dylib \
613+
-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.2/include \
571614
-D BISON_EXECUTABLE=/usr/local/bin/bison \
572615
-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
573616
..

0 commit comments

Comments
 (0)
Please sign in to comment.