Eclipse.bat: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<source lang= | <source lang=text> | ||
@echo off | @echo off | ||
SETLOCAL | SETLOCAL | ||
Line 13: | Line 13: | ||
:: User Home | :: User Home | ||
set HOME=%HOMEDRIVE%\%HOMEPATH% | set "HOME=%HOMEDRIVE%\%HOMEPATH%" | ||
:: GRASS Database | :: GRASS Database | ||
set GISDBASE=%HOME%\grassdata | set "GISDBASE=%HOME%\grassdata" | ||
set LOCATION_NAME=nc_spm_08_grass7 | set "LOCATION_NAME=nc_spm_08_grass7" | ||
set MAPSET=user1 | set "MAPSET=user1" | ||
::set MAPSET=PERMANENT | ::set "MAPSET=PERMANENT" | ||
::set GUI=wxpython | ::set "GUI=wxpython" | ||
set GUI=text | set "GUI=text" | ||
:: Set Debug Message Level | :: Set Debug Message Level | ||
Line 30: | Line 30: | ||
:: 5 - each cell (raster) or point (vector) | :: 5 - each cell (raster) or point (vector) | ||
set MESSAGE_LEVEL=^1 | set "MESSAGE_LEVEL=^1" | ||
set MINGW_HOME=C:\OSGeo4W | set "MINGW_HOME=C:\OSGeo4W" | ||
set MSYS_HOME=C:\OSGeo4W\apps\msys | set "MSYS_HOME=C:\OSGeo4W\apps\msys" | ||
:: Python Interpreter and Libraries | :: Python Interpreter and Libraries | ||
set PYTHONHOME=C:\OSGeo4W\apps\Python27 | set "PYTHONHOME=C:\OSGeo4W\apps\Python27" | ||
set PYTHONPATH=C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python;C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython | set "PYTHONPATH=C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python;C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython" | ||
:: Build tools and utilities | :: Build tools and utilities | ||
set TOOLS=C:\OSGeo4W\bin;C:\OSGeo4W\apps\msys\bin;C:\OSGeo4W\apps\Python27 | set "TOOLS=C:\OSGeo4W\bin;C:\OSGeo4W\apps\msys\bin;C:\OSGeo4W\apps\Python27" | ||
:: GISBASE needs to be set to the top-level directory | :: GISBASE needs to be set to the top-level directory | ||
:: of the GRASS installation. | :: of the GRASS installation. | ||
set GISBASE=C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32 | set "GISBASE=C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32" | ||
:: GISRC needs to contain the absolute path to a file containing | :: GISRC needs to contain the absolute path to a file containing | ||
:: settings for GISDBASE, LOCATION_NAME and MAPSET. | :: settings for GISDBASE, LOCATION_NAME and MAPSET. | ||
set GISRC=%HOME%\gisrc | set "GISRC=%HOME%\gisrc" | ||
:: Create GISRC file | :: Create GISRC file | ||
Line 67: | Line 67: | ||
::type %GISRC% | ::type %GISRC% | ||
set PROJ=C:\OSGeo4W\share\proj | set "PROJ=C:\OSGeo4W\share\proj" | ||
set GLIB=%GISBASE%\lib | set "GLIB=%GISBASE%\lib" | ||
set GBIN=%GISBASE%\bin | set "GBIN=%GISBASE%\bin" | ||
set GSCRIPTS=%GISBASE%\scripts | set "GSCRIPTS=%GISBASE%\scripts" | ||
:: PATH needs to include %GISBASE%\bin and %GISBASE%\scripts and %GISBASE%\libs. | :: PATH needs to include %GISBASE%\bin and %GISBASE%\scripts and %GISBASE%\libs. | ||
set PATH=%PATH%;%TOOLS%;%GBIN%;%GLIB%;%GSCRIPTS%;%PROJ% | set PATH=%PATH%;%TOOLS%;%GBIN%;%GLIB%;%GSCRIPTS%;%PROJ% | ||
Revision as of 15:49, 30 August 2015
@echo off
SETLOCAL
::
:: Reference:
:: http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly
::
echo.
echo. Eclipse 4.5 (Mars) 32-bit for GRASS Development
:: User Home
set "HOME=%HOMEDRIVE%\%HOMEPATH%"
:: GRASS Database
set "GISDBASE=%HOME%\grassdata"
set "LOCATION_NAME=nc_spm_08_grass7"
set "MAPSET=user1"
::set "MAPSET=PERMANENT"
::set "GUI=wxpython"
set "GUI=text"
:: Set Debug Message Level
:: 0 - silence
:: 1 - message is printed once or few times per module
:: 3 - each row (raster) or line (vector)
:: 5 - each cell (raster) or point (vector)
set "MESSAGE_LEVEL=^1"
set "MINGW_HOME=C:\OSGeo4W"
set "MSYS_HOME=C:\OSGeo4W\apps\msys"
:: Python Interpreter and Libraries
set "PYTHONHOME=C:\OSGeo4W\apps\Python27"
set "PYTHONPATH=C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python;C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython"
:: Build tools and utilities
set "TOOLS=C:\OSGeo4W\bin;C:\OSGeo4W\apps\msys\bin;C:\OSGeo4W\apps\Python27"
:: GISBASE needs to be set to the top-level directory
:: of the GRASS installation.
set "GISBASE=C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32"
:: GISRC needs to contain the absolute path to a file containing
:: settings for GISDBASE, LOCATION_NAME and MAPSET.
set "GISRC=%HOME%\gisrc"
:: Create GISRC file
:: Examples:
:: ./demolocation/grassrc.tmpl
:: ./dist.i686-pc-mingw32/demolocation/.grassrc71
echo GISDBASE: %GISDBASE%>> %GISRC%
echo LOCATION_NAME: %LOCATION_NAME%> %GISRC%
echo MAPSET: %MAPSET%>> %GISRC%
echo GUI: %GUI%>> %GISRC%
echo DEBUG: %MESSAGE_LEVEL%>> %GISRC%
::type %GISRC%
set "PROJ=C:\OSGeo4W\share\proj"
set "GLIB=%GISBASE%\lib"
set "GBIN=%GISBASE%\bin"
set "GSCRIPTS=%GISBASE%\scripts"
:: PATH needs to include %GISBASE%\bin and %GISBASE%\scripts and %GISBASE%\libs.
set PATH=%PATH%;%TOOLS%;%GBIN%;%GLIB%;%GSCRIPTS%;%PROJ%
echo.
echo. HOME : %HOME%
echo. GISBASE : %GISBASE%
echo. GISRC : %GISRC%
echo. GISDBASE : %GISDBASE%
echo. LOCATION_NAME : %LOCATION_NAME%
echo. MAPSET : %MAPSET%
echo. PYTHONPATH : %PYTHONPATH%
echo. PYTHONHOME : %PYTHONHOME%
C:\eclipse-4.5-mars-32bit\eclipse.exe
ENDLOCAL