Skip to content

Commit 0364d65

Browse files
author
timlinux
committedNov 19, 2007
Further updates to install procedure:
- put markers beweeb chapters for clarity - moved Jurgens postgres notes into building with msvc part 1 - cleanups to building with msvc express notes git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7610 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+130
-69
lines changed

1 file changed

+130
-69
lines changed
 

‎INSTALL.t2t

Lines changed: 130 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ simply copy the commands listed in codeblocks that look like this:
5959
somecommand to be pasted
6060
```
6161

62+
% -----------------------------------------------------------------------------
63+
% ----Please leave this break marker here for clarity - it wont be rendered ---
64+
% -----------------------------------------------------------------------------
65+
6266
= General Build Notes =
6367

6468
At version 0.8.1 QGIS no longer uses the autotools for building. QGIS, like a
@@ -95,6 +99,9 @@ For complete information, see the wiki at:
9599

96100

97101

102+
% -----------------------------------------------------------------------------
103+
% ----Please leave this break marker here for clarity - it wont be rendered ---
104+
% -----------------------------------------------------------------------------
98105

99106
= Building under windows using msys =
100107

@@ -321,6 +328,9 @@ tree. Read the READMEfile there and follow the instructions. Next right click
321328
on qgis.nsi and choose the option 'Compile NSIS Script'.
322329

323330

331+
% -----------------------------------------------------------------------------
332+
% ----Please leave this break marker here for clarity - it wont be rendered ---
333+
% -----------------------------------------------------------------------------
324334

325335
= Building on Mac OSX using frameworks and cmake (QGIS > 0.8) =
326336

@@ -649,6 +659,10 @@ If all built without errors you can then install it:
649659
make install
650660
```
651661

662+
% -----------------------------------------------------------------------------
663+
% ----Please leave this break marker here for clarity - it wont be rendered ---
664+
% -----------------------------------------------------------------------------
665+
652666
= Building on GNU/Linux =
653667

654668
== Building QGIS with Qt4.x ==
@@ -872,6 +886,10 @@ $HOME/apps/bin/qgis
872886
If all has worked properly the QGIS application should start up and appear
873887
on your screen.
874888

889+
% -----------------------------------------------------------------------------
890+
% ----Please leave this break marker here for clarity - it wont be rendered ---
891+
% -----------------------------------------------------------------------------
892+
875893
= Creation of MSYS environment for compilation of Quantum GIS =
876894

877895
== Initial setup ==
@@ -1126,6 +1144,13 @@ copy contents of pgsql directory from the archive to ``c:\msys\local``
11261144
We're done with preparation of MSYS environment. Now you can delete all stuff in ``c:\msys\local\src`` - it takes quite a lot
11271145
of space and it's not necessary at all.
11281146

1147+
1148+
1149+
1150+
% -----------------------------------------------------------------------------
1151+
% ----Please leave this break marker here for clarity - it wont be rendered ---
1152+
% -----------------------------------------------------------------------------
1153+
11291154
= Building with MS Visual Studio =
11301155

11311156

@@ -1167,6 +1192,49 @@ Download the following packages and run the installers:
11671192

11681193
http://gnuwin32.sourceforge.net/downlinks/bison.php
11691194

1195+
=== To include PostgreSQL support in Qt ===
1196+
1197+
If you want to build Qt with PostgreSQL support you need to download
1198+
PostgreSQL, install it and create a library you can later link with Qt.
1199+
1200+
Download from .../binary/v8.2.5/win32/postgresql-8.2.5-1.zip from an
1201+
PostgreSQL.org Mirror and install.
1202+
1203+
PostgreSQL is currently build with MinGW and comes with headers and libraries
1204+
for MinGW. The headers can be used with Visual C++ out of the box, but the library
1205+
is only shipped in DLL and archive (.a) form and therefore cannot be used with
1206+
Visual C++ directly.
1207+
1208+
To create a library copy following sed script to the file mkdef.sed in
1209+
PostgreSQL lib directory:
1210+
1211+
```
1212+
/Dump of file / {
1213+
s/Dump of file \([^ ]*\)$/LIBRARY \1/p
1214+
a\
1215+
EXPORTS
1216+
}
1217+
/[ ]*ordinal hint/,/^[ ]*Summary/ {
1218+
/^[ ]\+[0-9]\+/ {
1219+
s/^[ ]\+[0-9]\+[ ]\+[0-9A-Fa-f]\+[ ]\+[0-9A-Fa-f]\+[ ]\+\([^ =]\+\).*$/ \1/p
1220+
}
1221+
}
1222+
```
1223+
1224+
and process execute in the Visual Studio C++ command line (from Programs menu):
1225+
1226+
```
1227+
cd c:\Program Files\PostgreSQL\8.2\bin
1228+
dumpbin /exports ..\bin\libpq.dll | sed -nf ../lib/mkdef.sed >..\lib\libpq.def
1229+
cd ..\lib
1230+
lib /def:libpq.def /machine:x86
1231+
```
1232+
1233+
You'll need an sed for that to work in your path (e.g. from cygwin or msys).
1234+
1235+
That's almost it. You only need to the include and lib path to INCLUDE and LIB
1236+
in vcvars.bat respectively.
1237+
11701238
=== Qt ===
11711239

11721240
Build Qt following the instructions here:
@@ -1299,6 +1367,9 @@ Build the ALL_BUILD project. This will build all the QGIS binaries along with al
12991367

13001368

13011369

1370+
% -----------------------------------------------------------------------------
1371+
% ----Please leave this break marker here for clarity - it wont be rendered ---
1372+
% -----------------------------------------------------------------------------
13021373

13031374

13041375
= Building under Windows using MSVC Express =
@@ -1322,6 +1393,7 @@ specific build documentation and support. Lets go over the process in a nutshell
13221393
before we begin:
13231394

13241395
* Install XP (I used a Parallels virtual machine)
1396+
* Install the premade libraries archive I have made for you
13251397
* Install Visual Studio Express 2005 sp1
13261398
* Install the Microsoft Platform SDK
13271399
* Install command line subversion client
@@ -1331,6 +1403,33 @@ before we begin:
13311403
* Compile QGIS
13321404
* Create setup.exe installer for QGIS
13331405

1406+
== Install the libraries archive ==
1407+
1408+
Half of the point of this section of the MSVC setup procedure is to make
1409+
things as simple as possible for you. To that end I have prepared an
1410+
archive that includes all dependencies needed to build QGIS except Qt
1411+
(which we will build further down). Fetch the archive from:
1412+
1413+
```
1414+
http://qgis.org/uploadfiles/msvc/qgis_msvc_deps_except_qt4.zip
1415+
```
1416+
1417+
Create the following directory structure:
1418+
1419+
```
1420+
c:\dev\cpp\
1421+
```
1422+
1423+
And then extract the libraries archive into a subdirectory of the above
1424+
directory so that you end up with:
1425+
1426+
```
1427+
c:\dev\cpp\qgislibs-release
1428+
```
1429+
1430+
/!\ Note that you are not obliged to use this directory layout, but you
1431+
should adjust any instructions that follow if you plan to do things
1432+
differently.
13341433

13351434
== Install Visual Studio Express 2005 ==
13361435

@@ -1515,9 +1614,11 @@ and replace it with this one:
15151614
@rem added by Tim
15161615
@set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;%INCLUDE%
15171616
@set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc;%INCLUDE%
1617+
@set INCLUDE=%INCLUDE%;C:\dev\cpp\qgislibs-release\include\postgres
15181618
@set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%LIB%
15191619
@rem added by Tim
15201620
@set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB%
1621+
@set LIB=%LIB%;C:\dev\cpp\qgislibs-release\lib
15211622
@set LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
15221623

15231624
@goto end
@@ -1530,9 +1631,35 @@ and replace it with this one:
15301631
@echo ERROR: VCINSTALLDIR variable is not set.
15311632
@goto end
15321633

1533-
:en
1634+
:end
1635+
1636+
```
1637+
1638+
== Environment Variables ==
1639+
1640+
Right click on 'My computer' then select the 'Advanced' tab. Click environment variables and
1641+
create or augment the following '''System''' variables (if they dont already exist):
15341642

15351643
```
1644+
Variable Name: Value:
1645+
--------------------------------------------------------------------------
1646+
EDITOR vim
1647+
INCLUDE C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\.
1648+
LIB C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\.
1649+
LIB_DIR C:\dev\cpp\qgislibs-release
1650+
PATH C:\Program Files\CMake 2.4\bin;
1651+
%SystemRoot%\system32;
1652+
%SystemRoot%;
1653+
%SystemRoot%\System32\Wbem;
1654+
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\.;
1655+
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\WinNT\;
1656+
C:\Program Files\svn\bin;C:\Program Files\Microsoft Visual Studio 8\VC\bin;
1657+
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;
1658+
"c:\Program Files\Microsoft Visual Studio 8\Common7\Tools";
1659+
c:\Qt\4.3.2\bin;
1660+
"C:\Program Files\PuTTY"
1661+
QTDIR c:\Qt\4.3.2
1662+
SVN_SSH "C:\\Program Files\\PuTTY\\plink.exe"
15361663

15371664
== Building Qt4.3.2 ==
15381665

@@ -1551,49 +1678,7 @@ Unpack the source to
15511678
c:\Qt\4.x.x\
15521679
```
15531680

1554-
=== To include PostgreSQL support in Qt ===
1555-
1556-
If you want to build Qt with PostgreSQL support you need to download
1557-
PostgreSQL, install it and create a library you can later link with Qt.
1558-
1559-
Download from .../binary/v8.2.5/win32/postgresql-8.2.5-1.zip from an
1560-
PostgreSQL.org Mirror and install.
1561-
1562-
PostgreSQL is currently build with MinGW and comes with headers and libraries
1563-
for MinGW. The headers can be used with Visual C++ out of the box, but the library
1564-
is only shipped in DLL and archive (.a) form and therefore cannot be used with
1565-
Visual C++ directly.
1566-
1567-
To create a library copy following sed script to the file mkdef.sed in
1568-
PostgreSQL lib directory:
1569-
1570-
```
1571-
/Dump of file / {
1572-
s/Dump of file \([^ ]*\)$/LIBRARY \1/p
1573-
a\
1574-
EXPORTS
1575-
}
1576-
/[ ]*ordinal hint/,/^[ ]*Summary/ {
1577-
/^[ ]\+[0-9]\+/ {
1578-
s/^[ ]\+[0-9]\+[ ]\+[0-9A-Fa-f]\+[ ]\+[0-9A-Fa-f]\+[ ]\+\([^ =]\+\).*$/ \1/p
1579-
}
1580-
}
1581-
```
1582-
1583-
and process execute in the Visual Studio C++ command line (from Programs menu):
1584-
1585-
cd c:\Program Files\PostgreSQL\8.2\bin
1586-
dumpbin /exports ..\bin\libpq.dll | sed -nf ../lib/mkdef.sed >..\lib\libpq.def
1587-
cd ..\lib
1588-
lib /def:libpq.def /machine:x86
1589-
1590-
You'll need an sed for that to work in your path (e.g. from cygwin or msys).
1591-
1592-
That's almost it. You only need to the include and lib path to INCLUDE and LIB
1593-
in vcvars.bat respectively.
1594-
1595-
1596-
== Compile Qt ==
1681+
=== Compile Qt ===
15971682

15981683
Open the Visual Studio C++ command line and cd to c:\Qt\4.x.x where you
15991684
extracted the source and enter:
@@ -1606,7 +1691,7 @@ Add -qt-sql-odbc -qt-sql-psql to the configure line if your want odbc and
16061691
PostgreSQL support build into Qt.
16071692

16081693

1609-
== Configure Visual C++ to use Qt ==
1694+
=== Configure Visual C++ to use Qt ===
16101695

16111696
After building configure the Visual Studio Express IDE to use Qt:
16121697

@@ -1654,30 +1739,6 @@ feel free to add some - I just needed QString and took the first hit in google
16541739
I could find.
16551740

16561741

1657-
== Environment Variables ==
1658-
1659-
Right click on 'My computer' then select the 'Advanced' tab. Click environment variables and
1660-
create or augment the following '''System''' variables:
1661-
1662-
```
1663-
Variable Name: Value:
1664-
--------------------------------------------------------------------------
1665-
EDITOR vim
1666-
INCLUDE C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\.
1667-
LIB C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\.
1668-
LIB_DIR C:\dev\cpp\qgislibs-release
1669-
PATH C:\Program Files\CMake 2.4\bin;%SystemRoot%\system32;
1670-
%SystemRoot%;
1671-
%SystemRoot%\System32\Wbem;
1672-
"c:\Program Files\Microsoft Visual Studio 8\Common7\Tools";
1673-
c:\Qt\4.3.2\bin;
1674-
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\.;
1675-
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\WinNT\;
1676-
C:\Program Files\svn\bin;C:\Program Files\Microsoft Visual Studio 8\VC\bin;
1677-
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;
1678-
"C:\Program Files\PuTTY"
1679-
QTDIR c:\Qt\4.3.2
1680-
SVN_SSH "C:\\Program Files\\PuTTY\\plink.exe"
16811742

16821743

16831744
== Install Python ==

0 commit comments

Comments
 (0)
Please sign in to comment.