Skip to content

Commit 6b37746

Browse files
author
timlinux
committedNov 9, 2007

File tree

2 files changed

+236
-153
lines changed

2 files changed

+236
-153
lines changed
 

‎INSTALL

Lines changed: 195 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -5,82 +5,85 @@
55

66
1. Introduction
77
2. General Build Note
8-
3. Building under windows using msys
9-
3.1. MSYS:
10-
3.2. Qt4.3
11-
3.3. Flex and Bison
12-
3.4. Python stuff: (optional)
13-
3.4.1. Download and install Python - use Windows installer
14-
3.4.2. Download SIP and PyQt4 sources
15-
3.4.3. Compile SIP
16-
3.4.4. Compile PyQt
17-
3.4.5. Final python notes
18-
3.5. Subversion:
19-
3.6. CMake:
20-
3.7. QGIS:
21-
3.8. Compiling:
22-
3.9. Configuration
23-
3.10. Compilation and installation
24-
3.11. Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)
25-
3.12. Create the installation package: (optional)
26-
4. Building on Mac OSX using frameworks and cmake (QGIS > 0.8)
27-
4.1. Install XCODE
28-
4.2. Install Qt4 from .dmg
29-
4.3. Install development frameworks for QGIS dependencies
30-
4.3.1. Additional Dependencies : GSL
31-
4.3.2. Additional Dependencies : Expat
32-
4.3.3. Additional Dependencies : SIP
33-
4.3.4. Additional Dependencies : PyQt
34-
4.3.5. Additional Dependencies : Bison
35-
4.4. Install CMAKE for OSX
36-
4.5. Install subversion for OSX
37-
4.6. Check out QGIS from SVN
38-
4.7. Configure the build
39-
4.8. GEOS Issues
40-
4.9. Building
41-
5. Building on GNU/Linux
42-
5.1. Building QGIS with Qt4.x
43-
5.2. Prepare apt
44-
5.3. Install Qt4
45-
5.4. Install additional software dependencies required by QGIS
46-
5.5. GRASS Specific Steps
47-
5.6. Setup ccache (Optional)
48-
5.7. Prepare your development environment
49-
5.8. Check out the QGIS Source Code
50-
5.9. Starting the compile
51-
5.10. Running QGIS
52-
6. Creation of MSYS environment for compilation of Quantum GIS
53-
6.1. Initial setup
54-
6.1.1. MSYS
55-
6.1.2. MinGW
56-
6.1.3. Flex and Bison
57-
6.2. Installing dependencies
58-
6.2.1. Getting ready
59-
6.2.2. GDAL level one
60-
6.2.3. GRASS
61-
6.2.4. GDAL level two
62-
6.2.5. GEOS
63-
6.2.6. SQLITE
64-
6.2.7. GSL
65-
6.2.8. EXPAT
66-
6.2.9. POSTGRES
67-
6.3. Cleanup
68-
7. Building with MS Visual Studio
69-
7.1. Setup Visual Studio
70-
7.1.1. Express Edition
71-
7.1.2. All Editions
72-
7.2. Download/Install Dependencies
73-
7.2.1. Flex and Bison
74-
7.2.2. Qt
75-
7.2.3. Proj.4
76-
7.2.4. GSL
8+
3. Building under Windows using MSVC Express
9+
3.1. System preparation
10+
3.2. Install Visual Studio Express 2005
11+
4. Building under windows using msys
12+
4.1. MSYS:
13+
4.2. Qt4.3
14+
4.3. Flex and Bison
15+
4.4. Python stuff: (optional)
16+
4.4.1. Download and install Python - use Windows installer
17+
4.4.2. Download SIP and PyQt4 sources
18+
4.4.3. Compile SIP
19+
4.4.4. Compile PyQt
20+
4.4.5. Final python notes
21+
4.5. Subversion:
22+
4.6. CMake:
23+
4.7. QGIS:
24+
4.8. Compiling:
25+
4.9. Configuration
26+
4.10. Compilation and installation
27+
4.11. Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)
28+
4.12. Create the installation package: (optional)
29+
5. Building on Mac OSX using frameworks and cmake (QGIS > 0.8)
30+
5.1. Install XCODE
31+
5.2. Install Qt4 from .dmg
32+
5.3. Install development frameworks for QGIS dependencies
33+
5.3.1. Additional Dependencies : GSL
34+
5.3.2. Additional Dependencies : Expat
35+
5.3.3. Additional Dependencies : SIP
36+
5.3.4. Additional Dependencies : PyQt
37+
5.3.5. Additional Dependencies : Bison
38+
5.4. Install CMAKE for OSX
39+
5.5. Install subversion for OSX
40+
5.6. Check out QGIS from SVN
41+
5.7. Configure the build
42+
5.8. GEOS Issues
43+
5.9. Building
44+
6. Building on GNU/Linux
45+
6.1. Building QGIS with Qt4.x
46+
6.2. Prepare apt
47+
6.3. Install Qt4
48+
6.4. Install additional software dependencies required by QGIS
49+
6.5. GRASS Specific Steps
50+
6.6. Setup ccache (Optional)
51+
6.7. Prepare your development environment
52+
6.8. Check out the QGIS Source Code
53+
6.9. Starting the compile
54+
6.10. Running QGIS
55+
7. Creation of MSYS environment for compilation of Quantum GIS
56+
7.1. Initial setup
57+
7.1.1. MSYS
58+
7.1.2. MinGW
59+
7.1.3. Flex and Bison
60+
7.2. Installing dependencies
61+
7.2.1. Getting ready
62+
7.2.2. GDAL level one
63+
7.2.3. GRASS
64+
7.2.4. GDAL level two
7765
7.2.5. GEOS
78-
7.2.6. GDAL
79-
7.2.7. PostGIS
80-
7.2.8. Expat
81-
7.2.9. CMake
82-
7.3. Building QGIS with CMAKE
83-
8. Authors and Acknowledgments
66+
7.2.6. SQLITE
67+
7.2.7. GSL
68+
7.2.8. EXPAT
69+
7.2.9. POSTGRES
70+
7.3. Cleanup
71+
8. Building with MS Visual Studio
72+
8.1. Setup Visual Studio
73+
8.1.1. Express Edition
74+
8.1.2. All Editions
75+
8.2. Download/Install Dependencies
76+
8.2.1. Flex and Bison
77+
8.2.2. Qt
78+
8.2.3. Proj.4
79+
8.2.4. GSL
80+
8.2.5. GEOS
81+
8.2.6. GDAL
82+
8.2.7. PostGIS
83+
8.2.8. Expat
84+
8.2.9. CMake
85+
8.3. Building QGIS with CMAKE
86+
9. Authors and Acknowledgments
8487

8588

8689
------------------------------------------------------------------------
@@ -138,11 +141,51 @@ For complete information, see the wiki at:
138141
http://wiki.qgis.org/qgiswiki/Building_with_CMake
139142

140143

141-
3. Building under windows using msys
144+
3. Building under Windows using MSVC Express
145+
============================================
146+
147+
/!\ Note: Building under MSVC is still a work in progress. In particular the
148+
following dont work yet: python, grass, postgis connections.
149+
150+
151+
3.1. System preparation
152+
=======================
153+
154+
I started with a clean XP install with Service Pack 2 and all patches applied.
155+
I have already compiled all the dependencies you need for gdal, expat etc,
156+
so this tutorial wont cover compiling those from source too. Since compiling
157+
these dependencies was a somewhat painful task I hope my precompiled libs
158+
will be adequate. If not I suggest you consult the individual projects for
159+
specific build documentation and support. Lets go over the process in a nutshell
160+
before we begin:
161+
162+
* Install XP (I used a Parallels virtual machine)
163+
* Install Visual Studio Express 2005 sp1
164+
* Install the Microsoft Platform SDK
165+
* Install command line subversion client
166+
* Install library dependencies bundle
167+
* Install Qt 4.3.2
168+
* Check out QGIS sources
169+
* Compile QGIS
170+
* Create setup.exe installer for QGIS
171+
172+
173+
3.2. Install Visual Studio Express 2005
174+
=======================================
175+
176+
Get this Visual Studio Express 2005 sp1 for C++ here:
177+
178+
http://msdn2.microsoft.com/en-us/express/aa975050.aspx
179+
180+
The above page is confusing as it has lots of other stuff on it - just scroll
181+
down until you find a link labelled "Download Visual C++ 2005 Express SP1 �"
182+
183+
184+
4. Building under windows using msys
142185
====================================
143186

144187

145-
3.1. MSYS:
188+
4.1. MSYS:
146189
==========
147190

148191
MSYS provides a unix style build environment under windows. We have created a
@@ -159,7 +202,7 @@ our pre-made one, detailed instructions are provided elsewhere in this
159202
document.
160203

161204

162-
3.2. Qt4.3
205+
4.2. Qt4.3
163206
==========
164207

165208
Download qt4.3 opensource precompiled edition exe and install (including the
@@ -195,7 +238,7 @@ following command:
195238

196239

197240

198-
3.3. Flex and Bison
241+
4.3. Flex and Bison
199242
===================
200243

201244
*** Note I think this section can be removed as it should be installed int the
@@ -206,23 +249,23 @@ http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=16424
206249
(the zip bin) and extract it into c:\msys\mingw\bin
207250

208251

209-
3.4. Python stuff: (optional)
252+
4.4. Python stuff: (optional)
210253
=============================
211254

212255
Follow this section in case you would like to use Python bindings for QGIS. To
213256
be able to compile bindings, you need to compile SIP and PyQt4 from sources as
214257
their installer doesn't include some development files which are necessary.
215258

216259

217-
3.4.1. Download and install Python - use Windows installer
260+
4.4.1. Download and install Python - use Windows installer
218261
==========================================================
219262

220263
(It doesn't matter to what folder you'll install it)
221264

222265
http://python.org/download/
223266

224267

225-
3.4.2. Download SIP and PyQt4 sources
268+
4.4.2. Download SIP and PyQt4 sources
226269
=====================================
227270

228271
http://www.riverbankcomputing.com/Downloads/sip4/
@@ -232,7 +275,7 @@ Extract each of the above zip files in a temporary directory. Make sure
232275
to get versions that match your current Qt installed version.
233276

234277

235-
3.4.3. Compile SIP
278+
4.4.3. Compile SIP
236279
==================
237280

238281

@@ -243,7 +286,7 @@ to get versions that match your current Qt installed version.
243286

244287

245288

246-
3.4.4. Compile PyQt
289+
4.4.4. Compile PyQt
247290
===================
248291

249292

@@ -254,14 +297,14 @@ to get versions that match your current Qt installed version.
254297

255298

256299

257-
3.4.5. Final python notes
300+
4.4.5. Final python notes
258301
=========================
259302

260303
/!\ You can delete the directories with unpacked SIP and PyQt4 sources after a
261304
successfull install, they're not needed anymore.
262305

263306

264-
3.5. Subversion:
307+
4.5. Subversion:
265308
================
266309

267310
In order to check out QGIS sources from the repository, you need Subversion
@@ -270,15 +313,15 @@ client. This installer should work fine:
270313
http://subversion.tigris.org/files/documents/15/36797/svn-1.4.3-setup.exe
271314

272315

273-
3.6. CMake:
316+
4.6. CMake:
274317
===========
275318

276319
CMake is build system used by Quantum GIS. Download it from here:
277320

278321
http://www.cmake.org/files/v2.4/cmake-2.4.6-win32-x86.exe
279322

280323

281-
3.7. QGIS:
324+
4.7. QGIS:
282325
==========
283326

284327
Start a cmd.exe window ( Start -> Run -> cmd.exe ) Create development
@@ -301,7 +344,7 @@ For svn 0.8 branch
301344

302345

303346

304-
3.8. Compiling:
347+
4.8. Compiling:
305348
===============
306349

307350
As a background read the generic building with CMake notes at the end of
@@ -325,7 +368,7 @@ Create build directory and set it as current directory:
325368

326369

327370

328-
3.9. Configuration
371+
4.9. Configuration
329372
==================
330373

331374

@@ -350,15 +393,15 @@ install prefix to its default c:\program files\
350393
When configuration is done, click 'OK' to exit the setup utility.
351394

352395

353-
3.10. Compilation and installation
396+
4.10. Compilation and installation
354397
==================================
355398

356399

357400
make make install
358401

359402

360403

361-
3.11. Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)
404+
4.11. Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)
362405
=================================================================================
363406

364407
Make sure to copy all .dll:s needed to the same directory as the qgis.exe
@@ -379,7 +422,7 @@ c:\msys\local\bin and c:\msys\local\lib directories, so the DLLs will be
379422
used from that place.
380423

381424

382-
3.12. Create the installation package: (optional)
425+
4.12. Create the installation package: (optional)
383426
=================================================
384427

385428
Downlad and install NSIS from (http://nsis.sourceforge.net/Main_Page)
@@ -389,21 +432,21 @@ tree. Read the READMEfile there and follow the instructions. Next right click
389432
on qgis.nsi and choose the option 'Compile NSIS Script'.
390433

391434

392-
4. Building on Mac OSX using frameworks and cmake (QGIS > 0.8)
435+
5. Building on Mac OSX using frameworks and cmake (QGIS > 0.8)
393436
==============================================================
394437

395438
In this approach I will try to avoid as much as possible building dependencies
396439
from source and rather use frameworks wherever possible.
397440

398441

399-
4.1. Install XCODE
442+
5.1. Install XCODE
400443
==================
401444

402445
I recommend to get the latest xcode dmg from the Apple XDC Web site. Install
403446
XCODE after the ~941mb download is complete.
404447

405448

406-
4.2. Install Qt4 from .dmg
449+
5.2. Install Qt4 from .dmg
407450
==========================
408451

409452
You need a minimum of Qt4.2. I suggest getting the latest (at time of writing).
@@ -439,7 +482,7 @@ Second change the default mkspec symlink so that it points to macx-g++:
439482

440483

441484

442-
4.3. Install development frameworks for QGIS dependencies
485+
5.3. Install development frameworks for QGIS dependencies
443486
=========================================================
444487

445488
Download William Kyngesburye's excellent all in one framework that includes
@@ -462,7 +505,7 @@ There are some additional dependencies that at the time of writing are not
462505
provided as frameworks so we will need to build these from source.
463506

464507

465-
4.3.1. Additional Dependencies : GSL
508+
5.3.1. Additional Dependencies : GSL
466509
====================================
467510

468511
Retrieve the Gnu Scientific Library from
@@ -483,7 +526,7 @@ Then extract it and build it to a prefix of /usr/local:
483526

484527

485528

486-
4.3.2. Additional Dependencies : Expat
529+
5.3.2. Additional Dependencies : Expat
487530
======================================
488531

489532
Get the expat sources:
@@ -502,7 +545,7 @@ Get the expat sources:
502545

503546

504547

505-
4.3.3. Additional Dependencies : SIP
548+
5.3.3. Additional Dependencies : SIP
506549
====================================
507550

508551
Retrieve the python bindings toolkit SIP from
@@ -523,7 +566,7 @@ Then extract and build it to a prefix of /usr/local:
523566

524567

525568

526-
4.3.4. Additional Dependencies : PyQt
569+
5.3.4. Additional Dependencies : PyQt
527570
=====================================
528571

529572
Make sure you have the latest python fom
@@ -559,7 +602,7 @@ Then extract and build it to a prefix of /usr/local:
559602

560603

561604

562-
4.3.5. Additional Dependencies : Bison
605+
5.3.5. Additional Dependencies : Bison
563606
======================================
564607

565608
The version of bison available by default on Mac OSX is too old so you need to
@@ -581,7 +624,7 @@ Now build and install it to a prefix of /usr/local :
581624

582625

583626

584-
4.4. Install CMAKE for OSX
627+
5.4. Install CMAKE for OSX
585628
==========================
586629

587630
Get the latest release from here:
@@ -599,7 +642,7 @@ At the time of writing the file I grabbed was:
599642
Once downloaded open the dmg and run the installer
600643

601644

602-
4.5. Install subversion for OSX
645+
5.5. Install subversion for OSX
603646
===============================
604647

605648
The http://sourceforge.net/projects/macsvn/ (MacSVN) project has a downloadable
@@ -642,7 +685,7 @@ old) that is installed by MacOSX
642685
Now close and reopen your shell to get the updated vars.
643686

644687

645-
4.6. Check out QGIS from SVN
688+
5.6. Check out QGIS from SVN
646689
============================
647690

648691
Now we are going to check out the sources for QGIS. First we will create a
@@ -689,7 +732,7 @@ this:
689732
I suggest you press 'p' to accept the key permanently.
690733

691734

692-
4.7. Configure the build
735+
5.7. Configure the build
693736
========================
694737

695738
CMake supports out of source build so we will create a 'build' dir for the
@@ -719,7 +762,7 @@ Kyngesburye for this hint):
719762

720763

721764

722-
4.8. GEOS Issues
765+
5.8. GEOS Issues
723766
================
724767

725768
I had some issues with GEOS headers so I made the following edits:
@@ -729,7 +772,7 @@ In file /Library/Frameworks/GEOS.framework/Headers/io.h, comment out line 61
729772
In file /Library/Frameworks/GEOS.framework/Headers/geom.h, comment out line 145
730773

731774

732-
4.9. Building
775+
5.9. Building
733776
=============
734777

735778
Now we can start the build process:
@@ -745,11 +788,11 @@ If all built without errors you can then install it:
745788

746789

747790

748-
5. Building on GNU/Linux
791+
6. Building on GNU/Linux
749792
========================
750793

751794

752-
5.1. Building QGIS with Qt4.x
795+
6.1. Building QGIS with Qt4.x
753796
=============================
754797

755798
*Requires:* Ubuntu Edgy / Debian derived distro
@@ -766,7 +809,7 @@ in use for a while, you may need to just skip those steps which are irrelevant
766809
to you.
767810

768811

769-
5.2. Prepare apt
812+
6.2. Prepare apt
770813
================
771814

772815
The packages qgis depends on to build are available in the "universe" component
@@ -785,7 +828,7 @@ Now update your local sources database:
785828

786829

787830

788-
5.3. Install Qt4
831+
6.3. Install Qt4
789832
================
790833

791834

@@ -831,13 +874,13 @@ Use the simple command line dialog that appears after running each of the
831874
above commands to select the Qt4 version of the relevant applications.
832875

833876

834-
5.4. Install additional software dependencies required by QGIS
877+
6.4. Install additional software dependencies required by QGIS
835878
==============================================================
836879

837880

838881
sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj \
839882
libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
840-
swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion \
883+
libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion \
841884
libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags \
842885
python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
843886

@@ -849,7 +892,7 @@ distributions (e.g. Debian or SuSE) only provide SIP < 4.5 and PyQt4 < 4.1. To i
849892
language bindings you may need to build and install those packages from source.
850893

851894

852-
5.5. GRASS Specific Steps
895+
6.5. GRASS Specific Steps
853896
=========================
854897

855898
/!\ *Note:* If you don't need to build with GRASS support, you can
@@ -864,7 +907,7 @@ Now you can install grass from dapper:
864907
/!\ You may need to explicitly state your grass version e.g. libgdal1-1.3.2-grass
865908

866909

867-
5.6. Setup ccache (Optional)
910+
6.6. Setup ccache (Optional)
868911
============================
869912

870913
You should also setup ccache to speed up compile times:
@@ -876,7 +919,7 @@ You should also setup ccache to speed up compile times:
876919

877920

878921

879-
5.7. Prepare your development environment
922+
6.7. Prepare your development environment
880923
=========================================
881924

882925
As a convention I do all my development work in $HOME/dev/<language>, so in
@@ -891,7 +934,7 @@ this:
891934
This directory path will be assumed for all instructions that follow.
892935

893936

894-
5.8. Check out the QGIS Source Code
937+
6.8. Check out the QGIS Source Code
895938
===================================
896939

897940
There are two ways the source can be checked out. Use the anonymous method
@@ -930,7 +973,7 @@ qgis.org certificate. Press 'p' to accept it permanently:
930973

931974

932975

933-
5.9. Starting the compile
976+
6.9. Starting the compile
934977
=========================
935978

936979
I compile my development version of QGIS into my ~/apps directory to avoid
@@ -972,7 +1015,7 @@ Now on with the build:
9721015
It may take a little while to build depending on your platform.
9731016

9741017

975-
5.10. Running QGIS
1018+
6.10. Running QGIS
9761019
==================
9771020

9781021
Now you can try to run QGIS:
@@ -985,15 +1028,15 @@ If all has worked properly the QGIS application should start up and appear
9851028
on your screen.
9861029

9871030

988-
6. Creation of MSYS environment for compilation of Quantum GIS
1031+
7. Creation of MSYS environment for compilation of Quantum GIS
9891032
==============================================================
9901033

9911034

992-
6.1. Initial setup
1035+
7.1. Initial setup
9931036
==================
9941037

9951038

996-
6.1.1. MSYS
1039+
7.1.1. MSYS
9971040
===========
9981041

9991042
This is the environment that supplies many utilities from UNIX world in Windows and is needed
@@ -1008,7 +1051,7 @@ Install to c:\msys
10081051
All stuff we're going to compile is going to get to this directory (resp. its subdirs).
10091052

10101053

1011-
6.1.2. MinGW
1054+
7.1.2. MinGW
10121055
============
10131056

10141057
Download from here:
@@ -1020,7 +1063,7 @@ Install to c:\msys\mingw
10201063
It suffices to download and install only g++ and mingw-make components.
10211064

10221065

1023-
6.1.3. Flex and Bison
1066+
7.1.3. Flex and Bison
10241067
=====================
10251068

10261069
Flex and Bison are tools for generation of parsers, they're needed for GRASS and also QGIS compilation.
@@ -1036,11 +1079,11 @@ Download the following packages:
10361079
Unpack them all to c:\msys\local
10371080

10381081

1039-
6.2. Installing dependencies
1082+
7.2. Installing dependencies
10401083
============================
10411084

10421085

1043-
6.2.1. Getting ready
1086+
7.2.1. Getting ready
10441087
====================
10451088

10461089
Paul Kelly did a great job and prepared a package of precompiled libraries for GRASS.
@@ -1066,7 +1109,7 @@ Moreover he also left the notes how to compile it (for those interested):
10661109
Unpack the whole package to c:\msys\local
10671110

10681111

1069-
6.2.2. GDAL level one
1112+
7.2.2. GDAL level one
10701113
=====================
10711114

10721115
Since Quantum GIS needs GDAL with GRASS support, we need to compile GDAL
@@ -1131,7 +1174,7 @@ Libtool on windows assumes a line length limit of 8192 for some reason and tries
11311174
Make and make install should be hassle free after this.
11321175

11331176

1134-
6.2.3. GRASS
1177+
7.2.3. GRASS
11351178
============
11361179

11371180
Grab sources from CVS or use a weekly snapshot, see:
@@ -1158,7 +1201,7 @@ By the way, these pages might be useful:
11581201
- http://geni.ath.cx/grass.html
11591202

11601203

1161-
6.2.4. GDAL level two
1204+
7.2.4. GDAL level two
11621205
=====================
11631206

11641207
At this stage, we'll use GDAL sources we've used before, only the compilation will be a bit different.
@@ -1182,7 +1225,7 @@ Then again, edit gdal-config and change line with CONFIG_LIBS
11821225
Now, GDAL should be able to work also with GRASS raster layers.
11831226

11841227

1185-
6.2.5. GEOS
1228+
7.2.5. GEOS
11861229
===========
11871230

11881231
Download the sources:
@@ -1212,7 +1255,7 @@ Now, in MSYS console, go to the source directory and run:
12121255

12131256

12141257

1215-
6.2.6. SQLITE
1258+
7.2.6. SQLITE
12161259
=============
12171260

12181261
You can use precompiled DLL, no need to compile from source:
@@ -1230,7 +1273,7 @@ Then download this archive:
12301273
and copy sqlite3.h to c:\msys\local\include
12311274

12321275

1233-
6.2.7. GSL
1276+
7.2.7. GSL
12341277
==========
12351278

12361279
Download sources:
@@ -1248,7 +1291,7 @@ Run from MSYS console in the source directory:
12481291

12491292

12501293

1251-
6.2.8. EXPAT
1294+
7.2.8. EXPAT
12521295
============
12531296

12541297
Download sources:
@@ -1266,7 +1309,7 @@ Run from MSYS console in the source directory:
12661309

12671310

12681311

1269-
6.2.9. POSTGRES
1312+
7.2.9. POSTGRES
12701313
===============
12711314

12721315
We're going to use precompiled binaries. Use the link below for download:
@@ -1276,26 +1319,26 @@ We're going to use precompiled binaries. Use the link below for download:
12761319
copy contents of pgsql directory from the archive to c:\msys\local
12771320

12781321

1279-
6.3. Cleanup
1322+
7.3. Cleanup
12801323
============
12811324

12821325
We're done with preparation of MSYS environment. Now you can delete all stuff in c:\msys\local\src - it takes quite a lot
12831326
of space and it's not necessary at all.
12841327

12851328

1286-
7. Building with MS Visual Studio
1329+
8. Building with MS Visual Studio
12871330
=================================
12881331

12891332
Note that this does not currently include GRASS or Python plugins.
12901333

12911334

1292-
7.1. Setup Visual Studio
1335+
8.1. Setup Visual Studio
12931336
========================
12941337

12951338
This section describes the setup required to allow Visual Studio to be used to build QGIS.
12961339

12971340

1298-
7.1.1. Express Edition
1341+
8.1.1. Express Edition
12991342
======================
13001343

13011344
The free Express Edition lacks the platform SDK which contains headers and so on that are needed when building QGIS. The platform SDK can be installed as described here:
@@ -1310,7 +1353,7 @@ You will also need to perform the edits described here to remove the need for a
13101353
http://www.codeproject.com/wtl/WTLExpress.asp
13111354

13121355

1313-
7.1.2. All Editions
1356+
8.1.2. All Editions
13141357
===================
13151358

13161359
You will need stdint.h and unistd.h. unistd.h comes with GnuWin32 version of flex & bison binaries (see later). stdint.h can be found here:
@@ -1319,13 +1362,13 @@ You will need stdint.h and unistd.h. unistd.h comes with GnuWin32 version of fle
13191362
Copy both of these to <vsinstalldir>\VC\include.
13201363

13211364

1322-
7.2. Download/Install Dependencies
1365+
8.2. Download/Install Dependencies
13231366
==================================
13241367

13251368
This section describes the downloading and installation of the various QGIS dependencies.
13261369

13271370

1328-
7.2.1. Flex and Bison
1371+
8.2.1. Flex and Bison
13291372
=====================
13301373

13311374
Flex and Bison are tools for generation of parsers, they're needed for GRASS and also QGIS compilation.
@@ -1337,15 +1380,15 @@ Download the following packages and run the installers:
13371380
http://gnuwin32.sourceforge.net/downlinks/bison.php
13381381

13391382

1340-
7.2.2. Qt
1383+
8.2.2. Qt
13411384
=========
13421385

13431386
Build Qt following the instructions here:
13441387

13451388
http://wiki.qgis.org/qgiswiki/Building_QT_4_with_Visual_C%2B%2B_2005
13461389

13471390

1348-
7.2.3. Proj.4
1391+
8.2.3. Proj.4
13491392
=============
13501393

13511394
Get proj.4 source from here:
@@ -1375,7 +1418,7 @@ Install by running the following in the top level directory setting PROJ_DIR as
13751418
This can also be added to a batch file.
13761419

13771420

1378-
7.2.4. GSL
1421+
8.2.4. GSL
13791422
==========
13801423

13811424
Get gsl source from here:
@@ -1384,7 +1427,7 @@ Get gsl source from here:
13841427
Build using the gsl.sln file
13851428

13861429

1387-
7.2.5. GEOS
1430+
8.2.5. GEOS
13881431
===========
13891432

13901433
Get geos from svn (svn checkout http://svn.refractions.net/geos/trunk geos).
@@ -1420,7 +1463,7 @@ Run the following in top level directory, setting GEOS_DIR as appropriate:
14201463
This can also be added to a batch file.
14211464

14221465

1423-
7.2.6. GDAL
1466+
8.2.6. GDAL
14241467
===========
14251468

14261469
Get gdal from svn (svn checkout https://svn.osgeo.org/gdal/branches/1.4/gdal gdal).
@@ -1440,7 +1483,7 @@ and
14401483

14411484

14421485

1443-
7.2.7. PostGIS
1486+
8.2.7. PostGIS
14441487
==============
14451488

14461489
Get PostGIS and the Windows version of PostgreSQL from here:
@@ -1449,7 +1492,7 @@ Get PostGIS and the Windows version of PostgreSQL from here:
14491492
Note the warning about not installing the version of PostGIS that comes with the PostgreSQL installer. Simply run the installers.
14501493

14511494

1452-
7.2.8. Expat
1495+
8.2.8. Expat
14531496
============
14541497

14551498
Get expat from here:
@@ -1460,7 +1503,7 @@ You'll need expat-win32bin-2.0.1.exe.
14601503
Simply run the executable to install expat.
14611504

14621505

1463-
7.2.9. CMake
1506+
8.2.9. CMake
14641507
============
14651508

14661509
Get CMake from here:
@@ -1469,7 +1512,7 @@ Get CMake from here:
14691512
You'll need cmake-<version>-win32-x86.exe. Simply run this to install CMake.
14701513

14711514

1472-
7.3. Building QGIS with CMAKE
1515+
8.3. Building QGIS with CMAKE
14731516
=============================
14741517

14751518
Get QGIS source from svn (svn co https://svn.qgis.org/repos/qgis/trunk/qgis qgis).
@@ -1499,7 +1542,7 @@ Build the ALL_BUILD project. This will build all the QGIS binaries along with al
14991542
You will also either need to add all the dependency dlls to the QGIS install directory or add their respective directories to your PATH.
15001543

15011544

1502-
8. Authors and Acknowledgments
1545+
9. Authors and Acknowledgments
15031546
==============================
15041547

15051548
The follwing people have contributed to this document:

‎INSTALL.t2t

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,46 @@ of cmake and provides some clues to build QGIS.
6767
For complete information, see the wiki at:
6868
http://wiki.qgis.org/qgiswiki/Building_with_CMake
6969

70+
= Building under Windows using MSVC Express =
71+
72+
/!\ Note: Building under MSVC is still a work in progress. In particular the
73+
following dont work yet: python, grass, postgis connections.
74+
75+
== System preparation ==
76+
77+
I started with a clean XP install with Service Pack 2 and all patches applied.
78+
I have already compiled all the dependencies you need for gdal, expat etc,
79+
so this tutorial wont cover compiling those from source too. Since compiling
80+
these dependencies was a somewhat painful task I hope my precompiled libs
81+
will be adequate. If not I suggest you consult the individual projects for
82+
specific build documentation and support. Lets go over the process in a nutshell
83+
before we begin:
84+
85+
* Install XP (I used a Parallels virtual machine)
86+
* Install Visual Studio Express 2005 sp1
87+
* Install the Microsoft Platform SDK
88+
* Install command line subversion client
89+
* Install library dependencies bundle
90+
* Install Qt 4.3.2
91+
* Check out QGIS sources
92+
* Compile QGIS
93+
* Create setup.exe installer for QGIS
94+
95+
96+
== Install Visual Studio Express 2005 ==
97+
98+
Get this Visual Studio Express 2005 sp1 for C++ here:
99+
100+
101+
http://msdn2.microsoft.com/en-us/express/aa975050.aspx
102+
103+
The above page is confusing as it has lots of other stuff on it - just scroll
104+
down until you find a link labelled "Download Visual C++ 2005 Express SP1 �"
105+
106+
107+
108+
109+
70110
= Building under windows using msys =
71111

72112
== MSYS: ==
@@ -706,7 +746,7 @@ above commands to select the Qt4 version of the relevant applications.
706746
```
707747
sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj \
708748
libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
709-
swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion \
749+
libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion \
710750
libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags \
711751
python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
712752
```

0 commit comments

Comments
 (0)
Please sign in to comment.