Skip to content

Commit 96f0b6c

Browse files
author
homann
committed
Build instructions for Win32 updated
git-svn-id: http://svn.osgeo.org/qgis/trunk@6552 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 32b8dff commit 96f0b6c

File tree

1 file changed

+31
-42
lines changed

1 file changed

+31
-42
lines changed

README_windows.txt

+31-42
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Procedure for setup of a windows build environment for QGIS
22
Tim Sutton and Godofredo Contreras 2006
3+
CMake additions Magnus Homann 2007
34
With thanks to Tisham Dhar for preparing the initial msys environment
45
---------------------------------------------------------------------------------
56

@@ -51,63 +52,50 @@ Currently you need to put it into that location in case you plan to create
5152
the NSIS installer because so far it contains hardcoded paths for this location.
5253

5354

54-
Source changes:
55-
---------------
55+
USING CMAKE :
56+
-----------
5657

57-
Next you need to shift some files around. For convenience we've made an archive
58-
that handles all the changes for you. Download it and unpack to qgis source directory:
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.
5961

60-
http://qgis.org/uploadfiles/msys/qgis-qmake-files.zip
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.
6167

62-
List of what has been changed / added by this archive to enable compilation:
68+
As a background read http://wiki.qgis.org/qgiswiki/Building_with_CMake
6369

64-
- moved qgscsexception.h, qgsspatialrefsys* and qgscoordinatetransform* into core dir from gui
65-
- moved qgspluginregistry.* from core to gui
66-
- qgsspatialrefsys.cpp - commented out SRS validation using projection selector
67-
- qgsspatialrefsys.cpp - commented out lines using qgsproject as it depends on gui stuff
68-
- qgsdistancearea.cpp - commented out lines using qgsproject as it depends on
69-
gui stuff and moved to core
70-
- lexer and parser generated by genlexyacc.bat
71-
- added custom qgsconfig.h and qgssvnversion.h
70+
*) Make sure %QTDIR%\bin;c:\msys\local\bin;c:\msys\bin;c;\msys\mingw\bin is in your Path
7271

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

74-
Building:
75-
---------
74+
*) > mkdir build
7675

77-
Now open the qt command shell (or start "cmd" and run c:\Qt\4.2.0\bin\qtvars.bat)
76+
*) > cd build
7877

79-
cd c:\dev\cpp\qgis
80-
qmake
81-
make
78+
*) > cmakesetup ..
8279

83-
This will compile both debug and release version. To make just a one of them
84-
use "make debug" or "make release" respectively.
80+
If asked, you should chose 'MSYS Makefiles' as generator.
8581

86-
Note: debug version uses debug version of Qt library thus if linking fails
87-
on not founding library QtSvgd4 (or similar), you need to compile them
88-
as described in section for Qt.
82+
All dependencies should be picked up automatically, if you have set
83+
up the Paths correctly. The only thing you need to change is the
84+
installation destination and/or set 'Debug'.
8985

90-
Running: (optional)
91-
--------
9286

93-
After successfull make you can run QGIS directly from the directory
94-
where it has been built: qgis-debug and/or qgis-release in qgis root dir.
95-
You only need to add data files - we have provided an archive for convenience
96-
which you can just unpack there and run QGIS:
87+
*) Now, start sh.exe and run 'make.exe install' from within that shell
9788

98-
http://qgis.org/uploadfiles/msys/qgis_data.zip
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.
9993

100-
Then just run qgis.exe
101-
102-
GDB: (optional)
103-
----
104-
105-
If you plan to do some debugging, download and install gdb-6.3.2.exe from
106-
107-
http://prdownloads.sourceforge.net/mingw/gdb-6.3-2.exe?download
108-
109-
and install to c:\msys\mingw
94+
Why not run make from cmd.exe? Because creating 'qgssvnversion.h'
95+
requires the 'mv' command...
11096

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.
11199

112100
Create the installation package: (optional)
113101
--------------------------------
@@ -128,3 +116,4 @@ Now using windows explorer, enter the c:\dev\cpp\qgis\win_build directory and ri
128116
click on qgis.nsi and choose the option 'Compile NSIS Script'. Do the same
129117
for qgis-debug.nsi. Congratulations you should have two installable qgis
130118
setup files in the win_build directory now..
119+

0 commit comments

Comments
 (0)