Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated windows compilation notes and added a section for python bind…
…ings.

git-svn-id: http://svn.osgeo.org/qgis/trunk@6926 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed May 3, 2007
1 parent b65fba8 commit 900c171
Showing 1 changed file with 65 additions and 37 deletions.
102 changes: 65 additions & 37 deletions README_windows.txt
Expand Up @@ -10,7 +10,7 @@ under windows (rather than using a cross compiler under linux).
Note: The process for building under windows is still being sorted out so
check this document regularly for updates.

Msys:
MSYS:
-----
get this:

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

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


Qt4.2:
------

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

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

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

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

If you plan to do some debugging, you'll need to complie debug version of Qt:
C:\Qt\4.2.0\bin\qtvars.bat compile_debug
If you plan to do some debugging, you'll need to compile debug version of Qt:
C:\Qt\4.2.3\bin\qtvars.bat compile_debug


Python stuff: (optional)
-------------

Follow this section in case you would like to use Python bindings for QGIS.

*) Download and install Python - use Windows installer
(It doesn't matter to what folder you'll install it)

http://python.org/download/

*) Download and install PyQt4 - use binary package for Windows
(Binary package includes also SIP - no need to compile it manually)

http://riverbankcomputing.co.uk/pyqt/download.php


QGIS:
-----
Check out to c:\dev\cpp\qgis:

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

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.
*) Create development directory and move into it

> md c:\dev\cpp
> cd c:\dev\cpp

*) Check out sources from SVN

USING CMAKE :
-----------
> svn co https://svn.qgis.org/repos/qgis/trunk/qgis

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

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.

As a background read http://wiki.qgis.org/qgiswiki/Building_with_CMake
Compiling:
----------

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

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

*) > mkdir build
*) Add paths to compiler and our MSYS environment:

> c:\Qt\4.2.3\bin\qtvars.bat

*) Create build directory and set it as current directory:

*) > cd build
> cd c:\dev\cpp\qgis
> md build
> cd build

*) > cmakesetup ..
*) Configuration

If asked, you should chose 'MSYS Makefiles' as generator.
> cmakesetup ..

Click 'Configure' button.
When asked, you should choose 'MinGW Makefiles' as generator.

There's a problem with MinGW Makefiles on Win2K. If you're compiling on this
platform, use 'MSYS Makefiles' generator instead.

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'.
installation destination (CMAKE_INSTALL_PREFIX) and/or set 'Debug'.

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

*) Now, start sh.exe and run 'make.exe install' from within that shell
*) Compilation and installation

> make
> make install

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.
*) Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)

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, otherwise
QGIS will complain about missing libraries when started.

Other possibility is to run qgis.exe when your path contains
c:\msys\local\bin and c:\msys\local\lib directories, so the DLLs
will be used from that place.

*) 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)
--------------------------------

[ TO BE UPDATED FOR 0.9 RELEASE ]

Downlad and install NSIS from (http://nsis.sourceforge.net/Main_Page)

Download both the QGIS debug and release installer packages from
Expand Down

0 comments on commit 900c171

Please sign in to comment.