Changes between Initial Version and Version 1 of CompileOnWindows


Ignore:
Timestamp:
Mar 10, 2009, 2:03:04 PM (15 years ago)
Author:
neteler
Comment:

Started documentation, much based on http://wiki.qgis.org/qgiswiki/BuildingFromSource and http://www.webalice.it/marco.pasetti/qgis+grass/BuildFromSource.html

Legend:

Unmodified
Added
Removed
Modified
  • CompileOnWindows

    v1 v1  
     1[[TOC]]
     2
     3== An overview of the dependencies required for building ==
     4
     5We use a simplified approach with pre-built libraries for all the GRASS dependencies.
     6
     7=== Install the environment for compilation (MingW) ===
     8
     9MSYS supplies many utilities from UNIX world in Windows:
     10
     111. Download the '''MSYS installer''' from [http://sourceforge.net/project/showfiles.php?group_id=2435 here]: -> MSYS Base System (currently MSYS-1.0.11) -> MSYS-1.0.xx-yyyymmdd-dll.tar.gz (i386)
     12
     13    Install to c:\msys
     14    At the command prompt question for post install, type n and then enter.
     15
     162. Download the '''MSYS coreutils package''' from [http://sourceforge.net/project/showfiles.php?group_id=2435 here]: -> MSYS Base System (currently MSYS-1.0.11) -> coreutils-5.97-MSYS-1.0.xx-snapshot-src.tar.bz2 (i386)
     17
     18    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)
     19
     203. Download the '''MinGW installer''' from [http://sourceforge.net/project/showfiles.php?group_id=2435 here]: -> Automated MinGW Installer -> MinGW 5.x.y (currently MinGW 5.1.4)
     21
     22    Select "Download and Install Current Version";
     23    Install only "g++ compiler" and "MinGW Make";
     24    Install to c:\msys\mingw
     25
     264. Download and install Python from [http://python.org/download/ here]: use their Windows installer to install it on your system (doesn't matter where).
     27
     285. Get wxPython
     29
     30  ... ? package from OSGeo4W?
     31
     32=== Compiling and Installing PROJ4 ===
     33
     34* Source Code: http://download.osgeo.org/proj/proj-4.6.1.tar.gz  (Unpack to c:\msys\local\src\)
     35* Datum shift grids: http://download.osgeo.org/proj/proj-datumgrid-1.4.zip (Unpack to c:\msys\local\src\proj-4.6.0\nad\)
     36
     37... ? TBD
     38
     39=== Compiling and Installing GDAL ===
     40
     41...? TBD
     42
     43=== Compiling and Installing GRASS (6.4.0) ===
     44
     45Download the GRASS source code from [http://grass.osgeo.org/grass64/source/snapshot/ here].
     46
     47Unpack to c:\msys\local\src
     48
     49In MSYS console, type:
     50
     51{{{
     52cd /usr/local/src/grass-6.4.0
     53./configure \
     54--prefix=/usr/local \
     55--with-includes=/usr/local/include \
     56--with-libs=/usr/local/lib \
     57--disable-x11 \
     58--without-x \
     59--with-cxx \
     60--enable-shared \
     61--enable-largefile \
     62--with-opengl=windows \
     63--with-fftw \
     64--with-freetype \
     65--with-proj-share=/usr/local/share/proj \
     66--with-gdal=/usr/local/bin/gdal-config \
     67--with-tcltk --with-tcltk-includes=/usr/local/tcl-tk/include --with-tcltk-libs=/usr/local/tcl-tk/bin \
     68--with-sqlite --with-sqlite-includes=/usr/local/sqlite/include --with-sqlite-libs=/usr/local/sqlite/lib \
     69--with-postgres --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib
     70}}}
     71
     72When finished, you should have the following screen output:
     73
     74{{{
     75GRASS is now configured for:  i686-pc-mingw32
     76
     77 Source directory:            /usr/local/src/grass-6.4.0
     78 Build directory:             /usr/local/src/grass-6.4.0
     79 Installation directory:      ${prefix}/grass-6.4.0
     80 Startup script in directory: ${exec_prefix}/bin
     81 C compiler:                  gcc -g -O2
     82 C++ compiler:                c++ -g -O2
     83 Building shared libraries:   yes
     84 64bit support:               no
     85 OpenGL platform:             Windows
     86
     87  NVIZ:                       yes
     88
     89  BLAS support:               no
     90  C++ support:                yes
     91  DWG support:                no
     92  FFMPEG support:             no
     93  FFTW support:               yes
     94  FreeType support:           yes
     95  GDAL support:               yes
     96  GLw support:                no
     97  JPEG support:               yes
     98  LAPACK support:             no
     99  Large File Support (LFS):   yes
     100  Motif support:              no
     101  MySQL support:              no
     102  NLS support:                no
     103  ODBC support:               no
     104  OGR support:                yes
     105  OpenGL support:             yes
     106  PNG support:                yes
     107  PostgreSQL support:         yes
     108  Python support:             no
     109  Readline support:           no
     110  SQLite support:             yes
     111  Tcl/Tk support:             yes
     112  wxWidgets support:          no
     113  TIFF support:               yes
     114  X11 support:                no
     115  MacOSX application:         no
     116}}}
     117
     118Having GRASS successfully configured, now you can compile it:
     119
     120{{{
     121export PATH="/usr/local/bin:/usr/local/tcl-tk/bin:/usr/local/sqlite/bin:/usr/local/pgsql/lib:$PATH"
     122make
     123}}}
     124
     125When finished, you should have the following compilation log:
     126
     127{{{
     128GRASS GIS compilation log
     129-------------------------
     130Started compilation: Mon Feb 16 10:11:17 GMT 2009
     131--
     132Errors in:
     133/usr/local/src/grass-6.4.0/raster/r.li/r.li.daemon
     134/usr/local/src/grass-6.4.0/raster/r.li/r.li.edgedensity
     135/usr/local/src/grass-6.4.0/raster/r.li/r.li.patchdensity
     136/usr/local/src/grass-6.4.0/raster/r.li/r.li.patchnum
     137/usr/local/src/grass-6.4.0/raster/r.li/r.li.shape
     138/usr/local/src/grass-6.4.0/raster/r.li/r.li.simpson
     139/usr/local/src/grass-6.4.0/raster/r.li/r.li.shannon
     140/usr/local/src/grass-6.4.0/raster/r.li/r.li.mps
     141/usr/local/src/grass-6.4.0/raster/r.li/r.li.mpa
     142/usr/local/src/grass-6.4.0/raster/r.li/r.li.padcv
     143/usr/local/src/grass-6.4.0/raster/r.li/r.li.padsd
     144/usr/local/src/grass-6.4.0/raster/r.li/r.li.padrange
     145/usr/local/src/grass-6.4.0/raster/r.li/r.li.cwed
     146/usr/local/src/grass-6.4.0/raster/r.li/r.li.richness
     147/usr/local/src/grass-6.4.0/raster/r.li/r.li.dominance
     148--
     149In case of errors please change into the directory with error and run 'make'.
     150If you get multiple errors, you need to deal with them in the order they
     151appear in the error log. If you get an error building a library, you will
     152also get errors from anything which uses the library.
     153--
     154Finished compilation: Mon Feb 16 10:11:17 GMT 2009
     155make: *** [default] Error 1
     156}}}
     157
     158The best way to check it, is to open c:\msys\local\src\grass-6.4.0\error.log using your favourite web client.
     159
     160Then install GRASS:
     161
     162    make install
     163
     164Now GRASS should be installed in c:\msys\local\grass-6.4.0\
     165
     166The startup grass64.bat file should be in c:\msys\local\bin\grass64.bat
     167
     168
     169See also: grass64/mswindows/osgeo4w/package.sh for a scripted approach in the OSGeo4W environment.
     170
     171== TODO ==
     172
     173Describe installations of:
     174* GDAL-GRASS-plugin
     175* SQLite
     176* PostgreSQL
     177* Freetype ?
     178* FFTW