diff --git a/README_windows.txt b/README_windows.txt index d33d3de669de..db7fdeb6d279 100644 --- a/README_windows.txt +++ b/README_windows.txt @@ -1,5 +1,6 @@ Procedure for setup of a windows build environment for QGIS Tim Sutton and Godofredo Contreras 2006 + CMake additions Magnus Homann 2007 With thanks to Tisham Dhar for preparing the initial msys environment --------------------------------------------------------------------------------- @@ -51,63 +52,50 @@ Currently you need to put it into that location in case you plan to create the NSIS installer because so far it contains hardcoded paths for this location. -Source changes: ---------------- +USING CMAKE : +----------- -Next you need to shift some files around. For convenience we've made an archive -that handles all the changes for you. Download it and unpack to qgis source directory: +Instead of shifting around files, you could use CMake. CMake compiles +raster, compaser, legend, gui and core libraries into one core +library. So it is not 100% compatible with 'normal' 0.8 Makefiles. -http://qgis.org/uploadfiles/msys/qgis-qmake-files.zip +Below are the steps to configure and make the source. The building +takes plac in a separate directory from the source. If you have built +the source with 'normal' Makefiels first, please do a make clean (or +remove and check out everything). Previoussly made intermediate files +can disturb the CMake process. -List of what has been changed / added by this archive to enable compilation: +As a background read http://wiki.qgis.org/qgiswiki/Building_with_CMake - - moved qgscsexception.h, qgsspatialrefsys* and qgscoordinatetransform* into core dir from gui - - moved qgspluginregistry.* from core to gui - - qgsspatialrefsys.cpp - commented out SRS validation using projection selector - - qgsspatialrefsys.cpp - commented out lines using qgsproject as it depends on gui stuff - - qgsdistancearea.cpp - commented out lines using qgsproject as it depends on - gui stuff and moved to core - - lexer and parser generated by genlexyacc.bat - - added custom qgsconfig.h and qgssvnversion.h +*) Make sure %QTDIR%\bin;c:\msys\local\bin;c:\msys\bin;c;\msys\mingw\bin is in your Path +*) Start a cmd.exe window ( Start -> Run -> cmd.exe ) if you don't have one already. -Building: ---------- +*) > mkdir build -Now open the qt command shell (or start "cmd" and run c:\Qt\4.2.0\bin\qtvars.bat) +*) > cd build -cd c:\dev\cpp\qgis -qmake -make +*) > cmakesetup .. -This will compile both debug and release version. To make just a one of them -use "make debug" or "make release" respectively. + If asked, you should chose 'MSYS Makefiles' as generator. -Note: debug version uses debug version of Qt library thus if linking fails -on not founding library QtSvgd4 (or similar), you need to compile them -as described in section for Qt. + All dependencies should be picked up automatically, if you have set + up the Paths correctly. The only thing you need to change is the + installation destination and/or set 'Debug'. -Running: (optional) --------- -After successfull make you can run QGIS directly from the directory -where it has been built: qgis-debug and/or qgis-release in qgis root dir. -You only need to add data files - we have provided an archive for convenience -which you can just unpack there and run QGIS: +*) Now, start sh.exe and run 'make.exe install' from within that shell -http://qgis.org/uploadfiles/msys/qgis_data.zip + It should now start compiling. The reason for this is that we use + the mingw compiler included in the msys tar, but that compiler is + not found from within sh.exe. (MSYS magic). So, if you delete + CMakeCache, you have to generate it from cmd.exe. -Then just run qgis.exe - -GDB: (optional) ----- - -If you plan to do some debugging, download and install gdb-6.3.2.exe from - -http://prdownloads.sourceforge.net/mingw/gdb-6.3-2.exe?download - -and install to c:\msys\mingw + Why not run make from cmd.exe? Because creating 'qgssvnversion.h' + requires the 'mv' command... +*) Make sure to copy all .dll:s needed to the same directory as the + qgis.exe binary is installed to, if not already done so. Create the installation package: (optional) -------------------------------- @@ -128,3 +116,4 @@ Now using windows explorer, enter the c:\dev\cpp\qgis\win_build directory and ri click on qgis.nsi and choose the option 'Compile NSIS Script'. Do the same for qgis-debug.nsi. Congratulations you should have two installable qgis setup files in the win_build directory now.. +