Version 9 (modified by 16 years ago) ( diff ) | ,
---|
Table of Contents
An overview of the dependencies required for building with MingW
We use a simplified approach with pre-built libraries for all the GRASS dependencies.
Install the environment for compilation (MingW)
MSYS supplies many utilities from UNIX world in Windows:
- Download the MSYS installer from here.
Install to c:\msys At the command prompt question for post install, type n and then enter.
- Download the MSYS coreutils package from here: -> MSYS Base System (currently MSYS-1.0.11)
Unpack it to a temporary folder, then copy all the content of the coreutils-5.97 folder to c:\msys (overwrite the existing files when asked)
- Download the MinGW installer from here
- Run and select "Download and Install, "Current Version";
- Install only "g++ compiler" and "MinGW Make";
- Install to c:\msys\mingw (so, into a new folder) - this will download various tools and install them
- Download and install Python 2.x from here: use their Windows installer to install it on your system (doesn't matter where).
- Download and install wxPython from here (select version according to Python version taken above)
- more?
Compiling and Installing PROJ4
(untested)
Install to c:\msys
Compiling and Installing GDAL
(untested)
Install to c:\msys
Compiling and Installing GRASS (6.4.0)
- Download the latest GRASS 6.4.0 source code from here.
- Unpack to c:\msys\local\src (create these folders first)
To compile, type in MSYS console:
# Note: this needs to be updated, see also grass64/mswindows/osgeo4w/package.sh cd /usr/local/src/grass-6.4.svn_src_snapshot_2009_03_07 ./configure \ --prefix=/usr/local \ --with-includes=/usr/local/include \ --with-libs=/usr/local/lib \ --disable-x11 \ --without-x \ --with-cxx \ --enable-shared \ --enable-largefile \ --with-opengl=windows \ --with-fftw \ --with-freetype \ --with-proj-share=/usr/local/share/proj \ --with-gdal=/usr/local/bin/gdal-config \ --with-tcltk --with-tcltk-includes=/usr/local/tcl-tk/include --with-tcltk-libs=/usr/local/tcl-tk/bin \ --with-sqlite --with-sqlite-includes=/usr/local/sqlite/include --with-sqlite-libs=/usr/local/sqlite/lib \ --with-postgres --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib
When finished, you should have the following screen output:
GRASS is now configured for: i686-pc-mingw32 Source directory: /usr/local/src/grass-6.4.0 Build directory: /usr/local/src/grass-6.4.0 Installation directory: ${prefix}/grass-6.4.0 Startup script in directory: ${exec_prefix}/bin C compiler: gcc -g -O2 C++ compiler: c++ -g -O2 Building shared libraries: yes 64bit support: no OpenGL platform: Windows NVIZ: yes BLAS support: no C++ support: yes DWG support: no FFMPEG support: no FFTW support: yes FreeType support: yes GDAL support: yes GLw support: no JPEG support: yes LAPACK support: no Large File Support (LFS): yes Motif support: no MySQL support: no NLS support: no ODBC support: no OGR support: yes OpenGL support: yes PNG support: yes PostgreSQL support: yes Python support: no Readline support: no SQLite support: yes Tcl/Tk support: yes wxWidgets support: no TIFF support: yes X11 support: no MacOSX application: no
Having GRASS successfully configured, now you can compile it:
export PATH="/usr/local/bin:/usr/local/tcl-tk/bin:/usr/local/sqlite/bin:/usr/local/pgsql/lib:$PATH" make
When finished, you should have the following compilation log:
GRASS GIS compilation log ------------------------- Started compilation: Mon Feb 16 10:11:17 GMT 2009 -- Errors in: /usr/local/src/grass-6.4.0/raster/r.li/r.li.daemon /usr/local/src/grass-6.4.0/raster/r.li/r.li.edgedensity /usr/local/src/grass-6.4.0/raster/r.li/r.li.patchdensity /usr/local/src/grass-6.4.0/raster/r.li/r.li.patchnum /usr/local/src/grass-6.4.0/raster/r.li/r.li.shape /usr/local/src/grass-6.4.0/raster/r.li/r.li.simpson /usr/local/src/grass-6.4.0/raster/r.li/r.li.shannon /usr/local/src/grass-6.4.0/raster/r.li/r.li.mps /usr/local/src/grass-6.4.0/raster/r.li/r.li.mpa /usr/local/src/grass-6.4.0/raster/r.li/r.li.padcv /usr/local/src/grass-6.4.0/raster/r.li/r.li.padsd /usr/local/src/grass-6.4.0/raster/r.li/r.li.padrange /usr/local/src/grass-6.4.0/raster/r.li/r.li.cwed /usr/local/src/grass-6.4.0/raster/r.li/r.li.richness /usr/local/src/grass-6.4.0/raster/r.li/r.li.dominance -- In case of errors please change into the directory with error and run 'make'. If you get multiple errors, you need to deal with them in the order they appear in the error log. If you get an error building a library, you will also get errors from anything which uses the library. -- Finished compilation: Mon Feb 16 10:11:17 GMT 2009 make: *** [default] Error 1
Currently r.li.* cannot be compiled on Windows.
The best way to check details, is to open c:\msys\local\src\grass-6.4.0\error.log using your favourite web client/editor.
Installation
Then install GRASS:
make install
Now GRASS should be installed in c:\msys\local\grass-6.4.0\
Usage
The startup grass64.bat file should be in c:\msys\local\bin\grass64.bat
If using the grass64.sh instead, add to that file:
# Set the PYTHONPATH PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH"
See also: grass64/mswindows/osgeo4w/package.sh for a scripted approach in the OSGeo4W environment.
TODO
Describe installations of:
- GDAL-GRASS-plugin
- SQLite
- PostgreSQL
- Freetype ?
- FFTW
Building with MS Visual Studio
- TODO - see building QGIS instructions
See also
- GRASS package page in OSGeo4W
- Develop your own GRASS modules on MS-Windows
- http://wiki.qgis.org/qgiswiki/BuildingFromSource by QGIS Team
- http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html by Marco Pasetti
- http://www.webalice.it/marco.pasetti/qgis+grass/BuildFromSource.html by Marco Pasetti