Eclipse.bat

From GRASS-Wiki
Revision as of 01:25, 1 September 2015 by ⚠️Jrobparsons (talk | contribs) (Updated variable names to be common with GRASS startup.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
@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

:: top-level directory of the OSGeo4W installation

set OSGEO4W_ROOT=C:\OSGeo4W

:: top-level directory of the GRASS installation

set GISBASE=%OSGEO4W_ROOT%\src\grass7_trunk\dist.i686-pc-mingw32

:: User Home

if not defined HOME set HOME=%USERPROFILE%

:: GRASS Database

set GISDBASE=%HOME%\grassdata

:: GRASS Location and Mapset for this session

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=0

set MINGW_HOME=%OSGEO4W_ROOT%
set MSYS_HOME=%OSGEO4W_ROOT%\apps\msys

set PROJ_LIB=%OSGEO4W_ROOT%\share\proj
set GDAL_DATA=%OSGEO4W_ROOT%\share\gdal
set GDAL_DRIVER_PATH=%OSGEO4W_ROOT%\bin\gdalplugins
set GEOTIFF_CSV=%OSGEO4W_ROOT%\share\epsg_csv

:: Python Interpreter and Libraries

set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python27

set PYTHONPATH=%OSGEO4W_ROOT%\apps\grass\grass-7.1.svn\etc\python
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\grass\grass-7.1.svn\gui\wxpython

:: GRASS environment

set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe
set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj

:: 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%
echo.

::type %GISRC%

set PATH=%PATH%;%OSGEO4W_ROOT%\bin
set PATH=%PATH%;%OSGEO4W_ROOT%\share\proj
set PATH=%PATH%;%OSGEO4W_ROOT%\apps\msys\bin
set PATH=%PATH%;%OSGEO4W_ROOT%\apps\Python27
set PATH=%PATH%;%OSGEO4W_ROOT%\apps\Python27\Scripts
set PATH=%PATH%;%GISBASE%\bin
set PATH=%PATH%;%GISBASE%\lib
set PATH=%PATH%;%GISBASE%\scripts

echo.
echo. HOME            : %HOME%
echo. GISBASE         : %GISBASE%
echo. GISRC           : %GISRC%
echo. GISDBASE        : %GISDBASE%
echo. LOCATION_NAME   : %LOCATION_NAME%
echo. MAPSET          : %MAPSET%
echo. MESSAGE_LEVEL   : %MESSAGE_LEVEL%
echo. PYTHONPATH      : %PYTHONPATH%
echo. PYTHONHOME      : %PYTHONHOME%
::echo. PATH            : %PATH%
echo.

C:\eclipse-4.5-mars-32bit\eclipse.exe

ENDLOCAL