Skip to content

Commit 4e92435

Browse files
author
wonder
committed
Updated windows compilation notes and added a section for python bindings.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6926 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 713be40 commit 4e92435

File tree

1 file changed

+65
-37
lines changed

1 file changed

+65
-37
lines changed

README_windows.txt

+65-37
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ under windows (rather than using a cross compiler under linux).
1010
Note: The process for building under windows is still being sorted out so
1111
check this document regularly for updates.
1212

13-
Msys:
13+
MSYS:
1414
-----
1515
get this:
1616

@@ -23,6 +23,7 @@ for creating and decompressing files here:
2323

2424
http://www.7-zip.org/
2525

26+
2627
Qt4.2:
2728
------
2829

@@ -31,75 +32,102 @@ download and install of mingw) from here:
3132

3233
http://www.trolltech.com/developer/downloads/qt/windows
3334

34-
Edit C:\Qt\4.2.0\bin\qtvars.bat and add the following line (the second is only
35-
needed if you like vim in your shell):
35+
Edit C:\Qt\4.2.3\bin\qtvars.bat and add the following line:
3636

3737
set PATH=%PATH%;C:\msys\local\bin;c:\msys\local\lib
38-
set PATH=%PATH%;"c:\Program Files\Vim\vim70\
3938

40-
If you plan to do some debugging, you'll need to complie debug version of Qt:
41-
C:\Qt\4.2.0\bin\qtvars.bat compile_debug
39+
If you plan to do some debugging, you'll need to compile debug version of Qt:
40+
C:\Qt\4.2.3\bin\qtvars.bat compile_debug
41+
42+
43+
Python stuff: (optional)
44+
-------------
45+
46+
Follow this section in case you would like to use Python bindings for QGIS.
47+
48+
*) Download and install Python - use Windows installer
49+
(It doesn't matter to what folder you'll install it)
50+
51+
http://python.org/download/
52+
53+
*) Download and install PyQt4 - use binary package for Windows
54+
(Binary package includes also SIP - no need to compile it manually)
55+
56+
http://riverbankcomputing.co.uk/pyqt/download.php
4257

4358

4459
QGIS:
4560
-----
46-
Check out to c:\dev\cpp\qgis:
4761

48-
cd c:\dev\cpp
49-
svn co https://svn.qgis.org/repos/qgis/trunk/qgis
62+
*) Start a cmd.exe window ( Start -> Run -> cmd.exe )
5063

51-
Currently you need to put it into that location in case you plan to create
52-
the NSIS installer because so far it contains hardcoded paths for this location.
64+
*) Create development directory and move into it
5365

66+
> md c:\dev\cpp
67+
> cd c:\dev\cpp
68+
69+
*) Check out sources from SVN
5470

55-
USING CMAKE :
56-
-----------
71+
> svn co https://svn.qgis.org/repos/qgis/trunk/qgis
5772

58-
Instead of shifting around files, you could use CMake. CMake compiles
59-
raster, compaser, legend, gui and core libraries into one core
60-
library. So it is not 100% compatible with 'normal' 0.8 Makefiles.
73+
Currently you need to put it into that location in case you plan to create
74+
the NSIS installer because so far it contains hardcoded paths for this location.
6175

62-
Below are the steps to configure and make the source. The building
63-
takes plac in a separate directory from the source. If you have built
64-
the source with 'normal' Makefiels first, please do a make clean (or
65-
remove and check out everything). Previoussly made intermediate files
66-
can disturb the CMake process.
6776

68-
As a background read http://wiki.qgis.org/qgiswiki/Building_with_CMake
77+
Compiling:
78+
----------
6979

70-
*) Make sure %QTDIR%\bin;c:\msys\local\bin;c:\msys\bin;c;\msys\mingw\bin is in your Path
80+
As a background read http://wiki.qgis.org/qgiswiki/Building_with_CMake
7181

7282
*) Start a cmd.exe window ( Start -> Run -> cmd.exe ) if you don't have one already.
7383

74-
*) > mkdir build
84+
*) Add paths to compiler and our MSYS environment:
85+
86+
> c:\Qt\4.2.3\bin\qtvars.bat
87+
88+
*) Create build directory and set it as current directory:
7589

76-
*) > cd build
90+
> cd c:\dev\cpp\qgis
91+
> md build
92+
> cd build
7793

78-
*) > cmakesetup ..
94+
*) Configuration
7995

80-
If asked, you should chose 'MSYS Makefiles' as generator.
96+
> cmakesetup ..
97+
98+
Click 'Configure' button.
99+
When asked, you should choose 'MinGW Makefiles' as generator.
100+
101+
There's a problem with MinGW Makefiles on Win2K. If you're compiling on this
102+
platform, use 'MSYS Makefiles' generator instead.
81103

82104
All dependencies should be picked up automatically, if you have set
83105
up the Paths correctly. The only thing you need to change is the
84-
installation destination and/or set 'Debug'.
106+
installation destination (CMAKE_INSTALL_PREFIX) and/or set 'Debug'.
85107

108+
When configuration is done, click 'OK' to exit the setup utility.
86109

87-
*) Now, start sh.exe and run 'make.exe install' from within that shell
110+
*) Compilation and installation
111+
112+
> make
113+
> make install
88114

89-
It should now start compiling. The reason for this is that we use
90-
the mingw compiler included in the msys tar, but that compiler is
91-
not found from within sh.exe. (MSYS magic). So, if you delete
92-
CMakeCache, you have to generate it from cmd.exe.
115+
*) Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)
93116

94-
Why not run make from cmd.exe? Because creating 'qgssvnversion.h'
95-
requires the 'mv' command...
117+
Make sure to copy all .dll:s needed to the same directory as the
118+
qgis.exe binary is installed to, if not already done so, otherwise
119+
QGIS will complain about missing libraries when started.
120+
121+
Other possibility is to run qgis.exe when your path contains
122+
c:\msys\local\bin and c:\msys\local\lib directories, so the DLLs
123+
will be used from that place.
96124

97-
*) Make sure to copy all .dll:s needed to the same directory as the
98-
qgis.exe binary is installed to, if not already done so.
99125

100126
Create the installation package: (optional)
101127
--------------------------------
102128

129+
[ TO BE UPDATED FOR 0.9 RELEASE ]
130+
103131
Downlad and install NSIS from (http://nsis.sourceforge.net/Main_Page)
104132

105133
Download both the QGIS debug and release installer packages from

0 commit comments

Comments
 (0)