[GRASS-SVN] r41720 - in grass/trunk: . include/Make lib/init mswindows mswindows/osgeo4w

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 4 14:19:58 EDT 2010


Author: martinl
Date: 2010-04-04 14:19:57 -0400 (Sun, 04 Apr 2010)
New Revision: 41720

Added:
   grass/trunk/lib/init/grass.sh
Removed:
   grass/trunk/lib/init/functions.sh
   grass/trunk/lib/init/grass.bat
   grass/trunk/lib/init/grass.src
   grass/trunk/lib/init/init.bat
   grass/trunk/lib/init/init.sh
   grass/trunk/lib/init/prompt.sh
Modified:
   grass/trunk/Makefile
   grass/trunk/include/Make/Install.make
   grass/trunk/lib/init/Makefile
   grass/trunk/lib/init/grass.py
   grass/trunk/mswindows/GRASS-Installer.nsi
   grass/trunk/mswindows/osgeo4w/package.sh
Log:
remove init sh/bat scripts (replaced by python scripts)

Modified: grass/trunk/Makefile
===================================================================
--- grass/trunk/Makefile	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/Makefile	2010-04-04 18:19:57 UTC (rev 41720)
@@ -9,7 +9,7 @@
 # PURPOSE:  	It provides the commands necessary to compile, install,
 #		clean, and uninstall GRASS
 #		See INSTALL file for explanations.
-# COPYRIGHT:    (C) 2002,2004 by the GRASS Development Team
+# COPYRIGHT:    (C) 2002,2004,2010 by the GRASS Development Team
 #
 #               This program is free software under the GNU General Public
 #   	    	License (>=v2). Read the file COPYING that comes with GRASS
@@ -63,7 +63,6 @@
 	$(MAKE) subdirs
 	$(MAKE) $(FILES_DST)
 	$(MAKE) manifests
-	$(MAKE) $(ARCH_DISTDIR)/$(GRASS_NAME).tmp
 	@if [ `wc -l < "$(ERRORLOG)"` -gt 5 ] ; then \
 		echo "--"     >> $(ERRORLOG) ; \
 		echo "In case of errors please change into the directory with error and run 'make'." >> $(ERRORLOG) ; \
@@ -89,9 +88,6 @@
 $(ARCH_DISTDIR)/%: %
 	$(INSTALL_DATA) $< $@
 
-$(ARCH_DISTDIR)/$(GRASS_NAME).tmp: $(ARCH_BINDIR)/$(GRASS_NAME)
-	$(INSTALL) $< $@
-
 LIBDIRS = \
 	lib/external/shapelib \
 	lib/datetime \

Modified: grass/trunk/include/Make/Install.make
===================================================================
--- grass/trunk/include/Make/Install.make	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/include/Make/Install.make	2010-04-04 18:19:57 UTC (rev 41720)
@@ -81,12 +81,11 @@
 real-install:
 	test -d $(INST_DIR) || $(MAKE_DIR_CMD) $(INST_DIR)
 	test -d $(UNIX_BIN) || $(MAKE_DIR_CMD) $(UNIX_BIN)
-	-sed -e "s#^GISBASE.*#GISBASE=$(INST_DIR)#" $(ARCH_BINDIR)/$(GRASS_NAME).sh > $(UNIX_BIN)/$(GRASS_NAME).sh
-	-sed -e 's#^gisbase = ".*"#gisbase = "$(INST_DIR)"#' $(ARCH_BINDIR)/$(GRASS_NAME) > $(UNIX_BIN)/$(GRASS_NAME)
+	-$(INSTALL) $(ARCH_BINDIR)/$(GRASS_NAME) $(UNIX_BIN)/$(GRASS_NAME)
 	-chmod a+x $(UNIX_BIN)/$(GRASS_NAME)
 ifneq ($(strip $(MINGW)),)
-	-sed -e "s#WINGISBASE=.*#WINGISBASE=$(INST_DIR)#" $(ARCH_BINDIR)/$(GRASS_NAME).bat > $(UNIX_BIN)/$(GRASS_NAME).bat
-	-chmod a+x $(UNIX_BIN)/$(GRASS_NAME).bat
+	-$(INSTALL) $(ARCH_BINDIR)/$(GRASS_NAME).py $(UNIX_BIN)/$(GRASS_NAME).py
+	-chmod a+x $(UNIX_BIN)/$(GRASS_NAME).py
 endif
 	-tar cBCf $(GISBASE) - . | tar xBCf $(INST_DIR) - 2>/dev/null
 	-sed 's#'$(GISBASE)'#'$(INST_DIR)'#g' $(GISBASE)/etc/fontcap > $(INST_DIR)/etc/fontcap

Modified: grass/trunk/lib/init/Makefile
===================================================================
--- grass/trunk/lib/init/Makefile	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/Makefile	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,19 +1,3 @@
-#############################################################################
-#
-# MODULE:   	GRASS Initialization
-# AUTHOR(S):	Original author unknown - probably CERL
-#   	    	Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
-#               Markus Neteler, Andrea Antonello
-# PURPOSE:  	To create the various scripts and programs which are required
-#   	    	to start GRASS.
-# COPYRIGHT:    (C) 2000-2008 by the GRASS Development Team
-#
-#               This program is free software under the GNU General Public
-#   	    	License (>=v2). Read the file COPYING that comes with GRASS
-#   	    	for details.
-#
-#############################################################################
-
 MODULE_TOPDIR = ../..
 
 include $(MODULE_TOPDIR)/include/Make/Other.make
@@ -30,10 +14,7 @@
 LIBES = $(GISLIB) $(DATETIMELIB)
 
 FILES = \
-	$(ARCH_BINDIR)/$(START_UP).sh \
-	$(ETC)/Init.sh \
-	$(ETC)/functions.sh \
-	$(ETC)/prompt.sh \
+	$(ARCH_BINDIR)/$(START_UP) \
 	$(ETC)/clean_temp$(EXE) \
 	$(ETC)/lock$(EXE) \
 	$(ETC)/run$(EXE) \
@@ -61,31 +42,22 @@
 ifneq ($(strip $(MINGW)),)
 	FILES += \
 		$(ARCH_BINDIR)/$(START_UP).py \
-		$(ARCH_BINDIR)/$(START_UP).bat \
-		$(ETC)/winlocale$(EXE) \
-		$(ETC)/Init.bat
-else
-	FILES += \
-		$(ARCH_BINDIR)/$(START_UP)
-
+		$(ETC)/winlocale$(EXE)
 endif
 
 default: $(FILES)
 
-$(ARCH_BINDIR)/$(START_UP).sh: grass.src
+ifneq ($(strip $(MINGW)),)
+$(ARCH_BINDIR)/$(START_UP): grass.sh
 	@test -d $(ARCH_BINDIR) || (echo 'ARCH_BINDIR($(ARCH_BINDIR))' not found; exit 1)
 	@test -w $(ARCH_BINDIR) || (echo 'ARCH_BINDIR($(ARCH_BINDIR))' not writeable; exit 1)
 	rm -f $@ ; true
-	sed -e 's#GISBASE_VALUE#$(GISBASE)#' $< > $@
+	sed \
+	-e 's#@BINDIR@#$(ARCH_BINDIR)#' \
+	$< > $@
 	chmod a+x $@
+endif
 
-$(ARCH_BINDIR)/$(START_UP).bat: grass.bat
-	@test -d $(ARCH_BINDIR) || (echo 'ARCH_BINDIR($(ARCH_BINDIR))' not found; exit 1)
-	@test -w $(ARCH_BINDIR) || (echo 'ARCH_BINDIR($(ARCH_BINDIR))' not writeable; exit 1)
-	rm -f $@
-	sed -e 's#GISBASE_VALUE#$(RUN_GISBASE)#' $< | tr '/' '\\' > $@
-	chmod a+x $@
-
 ifneq ($(strip $(MINGW)),)
 $(ARCH_BINDIR)/$(START_UP).py: grass.py
 else
@@ -102,29 +74,6 @@
 	$< > $@
 	chmod +x $@
 
-$(ETC)/Init.sh: init.sh
-	rm -f $@
-	sed \
-	-e 's#@GRASS_VERSION_NUMBER@#$(GRASS_VERSION_NUMBER)#' \
-	-e 's#@LD_LIBRARY_PATH_VAR@#$(LD_LIBRARY_PATH_VAR)#g' \
-	-e 's#@START_UP@#$(START_UP)#' \
-	-e 's#@CONFIG_PROJSHARE@#$(PROJSHARE)#' \
-	-e 's#@GRASS_CONFIG_DIR@#$(GRASS_CONFIG_DIR)#' \
-	$< > $@
-	chmod +x $@
-
-$(ETC)/Init.bat: init.bat
-	rm -f $@
-	sed \
-	-e 's#GRASS_VERSION_NUMBER#$(GRASS_VERSION_NUMBER)#' \
-	-e 's#CONFIG_PROJSHARE#$(PROJSHARE)#' \
-	-e 's#@GRASS_CONFIG_DIR@#$(GRASS_CONFIG_DIR)#' \
-	$< > $@
-	chmod +x $@
-
-$(ETC)/functions.sh: functions.sh
-	$(INSTALL_DATA) $< $@
-
 $(ETC)/echo$(EXE) $(ETC)/run$(EXE): $(ETC)/%$(EXE): $(OBJDIR)/%.o
 	$(call linker_base,$(LINK),$(LDFLAGS),$(MANIFEST_OBJ))
 
@@ -153,4 +102,3 @@
 
 $(ETC)/%: %
 	$(INSTALL) $< $@
-

Deleted: grass/trunk/lib/init/functions.sh
===================================================================
--- grass/trunk/lib/init/functions.sh	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/functions.sh	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,780 +0,0 @@
-# all exits after setting up $tmp should also tidy it up
-cleanup_tmpdir()
-{
-    # remove session files from tmpdir
-    rm -rf "$tmp"
-}
-
-help_message()
-{
-    cat <<-EOF
-	Usage:
-	  $CMD_NAME [-h | -help | --help] [-v | --version] [-c]
-		  [-text | -gui | -wxpython | -wx]
-		  [[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]
-	
-	Flags:
-	  -h or -help or --help          print this help message
-	  -v or --version                show version information and exit
-	  -c                             create given mapset if it doesn\'t exist
-	  -text                          use text based interface
-	                                   and set as default
-	  -gui                           use graphical user interface ($DEFAULT_GUI by default)
-	                                   and set as default
-	  -wxpython or -wx               use wxPython based graphical user interface
-	                                   and set as default
-	
-	Parameters:
-	  GISDBASE                       initial database (path to GIS data)
-	  LOCATION_NAME                  initial location
-	  MAPSET                         initial mapset
-	
-	  GISDBASE/LOCATION_NAME/MAPSET  fully qualified initial mapset directory
-	
-	Environment variables relevant for startup:
-	  GRASS_GUI                      select GUI (text, gui, wxpython)
-	  GRASS_WISH                     set wish shell name to override 'wish'
-	  GRASS_HTML_BROWSER             set html web browser for help pages
-	  GRASS_ADDON_PATH               set additional path(s) to local GRASS modules
-	  GRASS_BATCH_JOB                shell script to be processed as batch job
-	  GRASS_PYTHON                   set python shell name to override 'python'
-	EOF
-}
-
-create_tmp()
-{
-## use TMPDIR if it exists, otherwise /tmp
-    tmp="${TMPDIR-/tmp}/grass7-$USER-$GIS_LOCK"
-    (umask 077 && mkdir "$tmp") || (
-	echo "Cannot create temporary directory! Exiting." 1>&2
-	exit 1
-    )
-}
-
-create_gisrc()
-{
-    # Set the session grassrc file
-    GISRC="$tmp/gisrc"
-    export GISRC
-
-    # remove invalid GISRC file to avoid disturbing error messages:
-    cat "$GISRCRC" 2>/dev/null| grep UNKNOWN >/dev/null
-    if [ $? -eq 0 ] ; then
-       rm -f "$GISRCRC"
-    fi
-    
-    # Copy the global grassrc file to the session grassrc file
-    if [ -f "$GISRCRC" ] ; then
-	cp "$GISRCRC" "$GISRC"
-	if [ $? -eq 1 ] ; then
-	    echo "Cannot copy '$GISRCRC' to '$GISRC'"
-	    cleanup_tmpdir
-	    exit 1
-	fi
-    fi
-}
-
-read_gui()
-{
-    # At this point the GRASS user interface variable has been set from the
-    # command line, been set from an external environment variable, or is 
-    # not set. So we check if it is not set
-    if [ ! "$GRASS_GUI" ] ; then
-    
-	# Check for a reference to the GRASS user interface in the grassrc file
-	if [ -f "$GISRC" ] ; then
-	    GRASS_GUI=`awk '/GRASS_GUI/ {print $2}' "$GISRC"`
-	fi
-	
-	# Set the GRASS user interface to the default if needed
-	if [ ! "$GRASS_GUI" ] ; then
-	    GRASS_GUI="$DEFAULT_GUI"
-	fi
-    fi
-    
-    if [ "$GRASS_GUI" = "gui" ] ; then
-	GRASS_GUI="$DEFAULT_GUI"
-    fi
-
-    # FIXME oldtcltk, gis.m, d.m no longer exist
-    case "$GRASS_GUI" in
-    d.m | oldtcltk | gis.m)
-	GRASS_GUI="$DEFAULT_GUI"
-	;;
-    esac
-}
-
-get_locale()
-{
-    if [ "$LC_ALL" ] ; then
-	LCL=`echo "$LC_ALL" | sed 's/\(..\)\(.*\)/\1/'`
-    elif [ "$LC_MESSAGES" ] ; then
-	LCL=`echo "$LC_MESSAGES" | sed 's/\(..\)\(.*\)/\1/'`
-    else
-	LCL=`echo "$LANG" | sed 's/\(..\)\(.*\)/\1/'`
-    fi
-}
-
-set_paths()
-{
-    if [ -n "$GRASS_ADDON_PATH" ] ; then
-	PATH="$GISBASE/bin:$GISBASE/scripts:$GRASS_ADDON_PATH:$PATH"
-    else
-	PATH="$GISBASE/bin:$GISBASE/scripts:$PATH"
-    fi
-    export PATH
-
-    # Set PYTHONPATH to find GRASS Python modules
-    if [ ! "$PYTHONPATH" ] ; then
-	PYTHONPATH="$GISBASE/etc/python"
-    else
-	PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH"
-    fi
-    export PYTHONPATH
-
-    # Add python to list of executable extensions to search for in MS-Windows PATH
-    if [ "$MINGW" ] ; then
-	PATHEXT="${PATHEXT};.PY"
-	export PATHEXT
-    fi
-}
-
-set_defaults()
-{
-    # GRASS_PAGER
-    if [ ! "$GRASS_PAGER" ] ; then
-	if [ -x /bin/more ] || [ -x /usr/bin/more ] ; then
-	    GRASS_PAGER=more
-	elif [ -x /bin/less ] || [ -x /usr/bin/less ] ; then
-	    GRASS_PAGER=less
-	elif [ "$MINGW" ] ; then
-	    GRASS_PAGER=more
-	else
-	    GRASS_PAGER=cat
-	fi
-	export GRASS_PAGER
-    fi
-
-    # GRASS_WISH
-    if [ ! "$GRASS_WISH" ] ; then
-	GRASS_WISH=wish
-	export GRASS_WISH
-    fi
-
-    # GRASS_PYTHON
-    if [ ! "$GRASS_PYTHON" ] ; then
-        if [ "$MACOSX" ] ; then
-            GRASS_PYTHON=pythonw
-        else
-            GRASS_PYTHON=python
-        fi
-        export GRASS_PYTHON
-    fi
-
-    # GRASS_GNUPLOT
-    if [ ! "$GRASS_GNUPLOT" ] ; then
-	GRASS_GNUPLOT="gnuplot -persist"
-	export GRASS_GNUPLOT
-    fi
-}
-
-set_browser()
-{
-    # GRASS_HTML_BROWSER
-    if [ ! "$GRASS_HTML_BROWSER" ] ; then
-	if [ "$MACOSX" ] ; then
-	    # OSX doesn't execute browsers from the shell PATH - route thru a script
-	    GRASS_HTML_BROWSER="$ETC/html_browser_mac.sh"
-	    GRASS_HTML_BROWSER_MACOSX="-b com.apple.helpviewer"
-	    export GRASS_HTML_BROWSER_MACOSX
-
-	elif [ "$MINGW" -o "$CYGWIN" ] ; then
-	    # MinGW startup moved to into init.bat
-	    iexplore="$SYSTEMDRIVE/Program Files/Internet Explorer/iexplore.exe"
-	    if [ -f "$iexplore" ] ; then
-		GRASS_HTML_BROWSER=$iexplore
-	    else
-		GRASS_HTML_BROWSER="iexplore"
-	    fi
-
-	else
-	    # the usual suspects
-	    BROWSERS="htmlview konqueror mozilla mozilla-firefox firefox opera netscape dillo"
-	    for BROWSER in $BROWSERS ; do
-		for i in `echo "$PATH" | sed 's/^:/.:/ ; s/::/:.:/g ; s/:$/:./ ; s/:/ /g'` ; do
-		    if [ -f "$i/$BROWSER" ] ; then  
-			GRASS_HTML_BROWSER="$BROWSER"
-			break
-		    fi
-		done
-		if [ -n "$GRASS_HTML_BROWSER" ] ; then
-		    break
-		fi
-	    done
-	fi
-
-    elif [ "$MACOSX" ] ; then
-	# OSX doesn't execute browsers from the shell PATH - route thru a script
-	GRASS_HTML_BROWSER_MACOSX="-b $GRASS_HTML_BROWSER"
-	export GRASS_HTML_BROWSER_MACOSX
-	GRASS_HTML_BROWSER="$ETC/html_browser_mac.sh"
-    fi
-
-    if [ ! "$GRASS_HTML_BROWSER" ] ; then
-	echo "WARNING: Searched for a web browser, but none found." 1>&2
-	# even so we set konqueror to make lib/gis/parser.c happy:
-	GRASS_HTML_BROWSER=konqueror
-    fi
-    export GRASS_HTML_BROWSER
-}
-
-grass_intro()
-{
-    if [ ! -f "$GISBASE/locale/$LCL/etc/grass_intro" ] ; then
-	cat "$ETC/grass_intro"
-    else
-	cat "$GISBASE/locale/$LCL/etc/grass_intro"
-    fi
-
-    echo
-    echo "Hit RETURN to continue"
-    read ans
-
-    #for convenience, define pwd as GISDBASE:
-    cat > "$GISRC" <<-EOF
-	GISDBASE: $PWD
-	LOCATION_NAME: <UNKNOWN>
-	MAPSET: <UNKNOWN>
-	EOF
-}
-
-check_gui()
-{
-    # Check if we are running X windows by checking the DISPLAY variable
-    if [ "$DISPLAY" -o "$MINGW" ] ; then
-
-	# Check if python is working properly
-	if [ "$GRASS_GUI" = "wxpython" ]; then
-	    echo 'variable=True' | "$GRASS_PYTHON" >/dev/null 2>&1
-	fi
-	# ok
-	if [ "$?" = 0 ] ; then
-	    # Set the wxpython base directory
-	    WXPYTHONGRASSBASE="$ETC/gui/wxpython"
-	else
-	    # Python was not found - switch to text interface mode
-	    cat <<-EOF
-		
-		WARNING: The python command does not work as expected!
-		Please check your GRASS_PYTHON environment variable.
-		Use the -help option for details.
-		Switching to text based interface mode.
-		
-		Hit RETURN to continue.
-
-		EOF
-	    read ans
-
-	    GRASS_GUI="text"
-	fi
-    else
-	# Display a message if a graphical interface was expected
-	if [ "$GRASS_GUI" != "text" ] ; then
-	    # Set the interface mode to text
-	    cat <<-EOF
-		
-		WARNING: It appears that the X Windows system is not active.
-		A graphical based user interface is not supported.
-		Switching to text based interface mode.
-		
-		Hit RETURN to continue
-
-		EOF
-	    read ans
-
-	    GRASS_GUI="text"
-	fi
-    fi
-
-    # Save the user interface variable in the grassrc file - choose a temporary
-    # file name that should not match another file
-    if [ -f "$GISRC" ] ; then
-	awk '$1 !~ /GRASS_GUI/ {print}' "$GISRC" > "$GISRC.$$"
-	echo "GRASS_GUI: $GRASS_GUI" >> "$GISRC.$$"
-	mv -f "$GISRC.$$" "$GISRC"
-    fi
-}
-
-non_interactive()
-{
-    # Try non-interactive startup
-    L=
-    
-    if [ "$1" = "-" ] ; then
-	
-	if [ "$LOCATION" ] ; then
-	    L="$LOCATION"
-	fi
-    else
-	L="$1"
-    fi
-
-    if [ "$L" ] ; then
-	if [ "$L" = "." ] ; then
-	    L=$PWD
-	elif [ `echo "$L" | cut -c 1` != "/" ] ; then
-	    L="$PWD/$L"
-	fi
-
-	MAPSET=`basename "$L"`
-	L=`dirname "$L"`
-	
-	if [ "$L" != "." ] ; then
-	    LOCATION_NAME=`basename "$L"`
-	    L=`dirname "$L"`
-	    
-	    if [ "$L" != "." ] ; then
-		GISDBASE="$L"
-	    fi
-	fi
-    fi
-
-    #strip off white space from LOCATION_NAME and MAPSET: only supported for $GISDBASE
-    MAPSET=`echo $MAPSET | sed 's+ ++g'`
-    LOCATION_NAME=`echo $LOCATION_NAME | sed 's+ ++g'`
-
-    if [ "$GISDBASE" -a "$LOCATION_NAME" -a "$MAPSET" ] ; then
-	LOCATION="$GISDBASE/$LOCATION_NAME/$MAPSET"
-
-	if [ ! -r "$LOCATION/WIND" ] ; then
-	    if [ "$LOCATION_NAME" = "PERMANENT" ] ; then
-		echo "$LOCATION: Not a valid GRASS location"
-		cleanup_tmpdir
-		exit 1
-	    else
-		   # the user wants to create mapset on the fly
-		if [ -n "$CREATE_NEW" ] && [ "$CREATE_NEW" -eq 1 ] ; then
-		    if [ ! -f "$GISDBASE/$LOCATION_NAME/PERMANENT/DEFAULT_WIND" ] ; then
-			echo "The LOCATION \"$LOCATION_NAME\" does not exist. Please create it first"
-			cleanup_tmpdir
-			exit 1
-		    else
-			mkdir -p "$LOCATION"
-			cp "$GISDBASE/$LOCATION_NAME/PERMANENT/DEFAULT_WIND" "$LOCATION/WIND"
-			echo "Missing WIND file fixed"
-		    fi
-		else
-		    echo "$LOCATION: Not a valid GRASS location"
-		    cleanup_tmpdir
-		    exit 1
-		fi
-	    fi
-	fi
-
-	if [ -s "$GISRC" ] ; then
-	    sed -e "s|^GISDBASE:.*$|GISDBASE: $GISDBASE|; \
-		s|^LOCATION_NAME:.*$|LOCATION_NAME: $LOCATION_NAME|; \
-		s|^MAPSET:.*$|MAPSET: $MAPSET|" "$GISRC" > "$GISRC.$$"
-	    
-	    if [ $? -eq 0 ] ; then
-		mv -f "$GISRC.$$" "$GISRC"
-	    else
-		rm -f "$GISRC.$$"
-		echo "Failed to create new $GISRC"
-		LOCATION=
-	    fi
-	else
-	    cat > "$GISRC" <<-EOF
-		GISDBASE: $GISDBASE
-		LOCATION_NAME: $LOCATION_NAME
-		MAPSET: $MAPSET
-		EOF
-	fi
-    else
-	echo "GISDBASE, LOCATION_NAME and MAPSET variables not set properly."
-	echo "Interactive startup needed."
-	cleanup_tmpdir
-	exit 1
-    fi
-}
-
-set_data()
-{
-    # User selects LOCATION and MAPSET if not set
-    if [ ! "$LOCATION" ] ; then
-    
-	case "$GRASS_GUI" in
-    
-	    # Check for text interface
-	    text)
-		;;
-	    
-	    # Check for GUI
-	    wxpython)
-		gui_startup
-		;;
-	    *)
-		# Shouldn't need this but you never know
-		echo "ERROR: Invalid user interface specified - <$GRASS_GUI>."
-		echo "Use the --help option to see valid interface names."
-		cleanup_tmpdir
-		exit 1
-		;;
-	esac
-    fi
-}
-
-gui_startup()
-{
-    if [ "$GRASS_GUI" = "wxpython" ] ; then
-	# eval `foo` will return subshell return code and not app foo return code!!!?
-	eval '"$GRASS_PYTHON" "$WXPYTHONGRASSBASE/gis_set.py"'
-	thetest=$?
-    fi
-
-    case $thetest in
-	1)
-	    # The startup script printed an error message so wait
-	    # for user to read it
-	    cat <<-EOF
-		Error in GUI startup. If necessary, please
-		report this error to the GRASS developers.
-		Switching to text mode now.
-
-		Hit RETURN to continue...
-
-		EOF
-	    read ans
-
-	    exec "$CMD_NAME" -text
-	    cleanup_tmpdir
-	    exit 1
-	    ;;
-
-	0)
-	    # These checks should not be necessary with real init stuff
-	    if [ "$LOCATION_NAME" = "##NONE##" ] || [ "$LOCATION_NAME" = "##ERROR##" ] ; then
-		echo "The selected location is not a valid GRASS location"
-		cleanup_tmpdir
-		exit 1
-	    fi
-	    ;;
-
-	2)
-	    # User wants to exit from GRASS
-	    echo "Received EXIT message from GUI."
-	    echo "GRASS is not started. Bye."
-	    cleanup_tmpdir
-	    exit 0
-	    ;;
-	*)
-	    echo "ERROR: Invalid return code from GUI startup script."
-	    echo "Please advise GRASS developers of this error."
-	    cleanup_tmpdir
-	    exit 1
-	    ;;
-    esac
-}
-
-read_gisrc()
-{
-    GISDBASE=`g.gisenv GISDBASE`
-    LOCATION_NAME=`g.gisenv LOCATION_NAME`
-    MAPSET=`g.gisenv MAPSET`
-
-    if [ -z "$GISDBASE" ] || [ -z "$LOCATION_NAME" ] || [ -z "$MAPSET" ] ; then
-	cat <<-EOF
-	ERROR: Reading data path information from g.gisenv.
-	GISDBASE=[$GISDBASE]
-	LOCATION_NAME=[$LOCATION_NAME]
-	MAPSET=[$MAPSET]
-	
-	Check the <$GISRCRC> file.
-	EOF
-
-	cleanup_tmpdir
-	exit 1
-    fi
-
-    LOCATION="${GISDBASE?}/${LOCATION_NAME?}/${MAPSET?}"
-}
-
-check_lock()
-{
-    # Check for concurrent use
-    lockfile="$LOCATION/.gislock"
-    "$ETC/lock" "$lockfile" $$
-    case $? in
-	0) ;;
-	2)
-	    echo "$USER is currently running GRASS in selected mapset (file $lockfile found). Concurrent use not allowed."
-	    cleanup_tmpdir
-	    exit 1 ;;
-	*)
-	    echo Unable to properly access "$lockfile"
-	    echo Please notify system personel.
-	    cleanup_tmpdir
-	    exit 1 ;;
-    esac
-}
-
-make_fontcap()
-{
-if [ "$GRASS_FONT_CAP" ] && [ ! -f "$GRASS_FONT_CAP" ] ; then
-	echo "Building user fontcap ..."
-	g.mkfontcap
-fi
-}
-
-check_shell()
-{
-    # cygwin has many problems with the shell setup
-    # below, so i hardcoded everything here.
-    if [ "$CYGWIN" ] ; then
-        sh="cygwin"
-        shellname="GNU Bash (Cygwin)"
-        export SHELL=/usr/bin/bash.exe
-        export OSTYPE=cygwin
-    else 
-        sh=`basename "$SHELL"`
-        case "$sh" in
-            ksh)  shellname="Korn Shell";;
-            csh)  shellname="C Shell" ;;
-            tcsh) shellname="TC Shell" ;;
-            bash) shellname="Bash Shell" ;;
-            sh)   shellname="Bourne Shell";;
-            *)    shellname=shell;;
-        esac
-    fi
-
-    # check for SHELL
-    if [ ! -x "$SHELL" ] ; then
-        echo "ERROR: The SHELL variable is not set" 1>&2
-        rm -f "$lockfile"
-        cleanup_tmpdir
-        exit 1
-    fi
-}
-
-check_batch_job()
-{
-    # hack to process batch jobs:
-    if [ -n "$GRASS_BATCH_JOB" ] ; then
-       # defined, but ...
-       if [ ! -f "$GRASS_BATCH_JOB" ] ; then
-          # wrong file
-          echo "Job file '$GRASS_BATCH_JOB' has been defined in"
-          echo "the 'GRASS_BATCH_JOB' variable but not found. Exiting."
-          echo
-          echo "Use 'unset GRASS_BATCH_JOB' to disable batch job processing."
-          cleanup_tmpdir
-          exit 1
-       else
-          # right file, but ...
-          if [ ! -x "$GRASS_BATCH_JOB" ] ; then
-             echo "ERROR: change file permission to 'executable' for '$GRASS_BATCH_JOB'"
-             cleanup_tmpdir
-             exit 1
-          else
-             echo "Executing '$GRASS_BATCH_JOB' ..."
-             GRASS_GUI="text"
-             SHELL="$GRASS_BATCH_JOB"
-          fi
-       fi
-    fi
-}
-
-start_gui()
-{
-    # Start the chosen GUI, or if in text-mode, don't.
-    if [ "$GRASS_DEBUG" -ne 0 ] ; then
-       echo "GRASS GUI is <$GRASS_GUI>"
-    fi
-    
-    case "$GRASS_GUI" in
-        wxpython)
-            "$GRASS_PYTHON" "$WXPYTHONGRASSBASE/wxgui.py" &
-            ;;
-        # Ignore others
-        *)
-            ;;
-    esac
-}
-
-clear_screen()
-{
-if [ "$MINGW" ] ; then
-	:
-# TODO: uncomment when PDCurses works.
-#	cls
-else
-	if [ -z "$GRASS_BATCH_JOB" ] && [ "$GRASS_DEBUG" -eq 0 ] ; then
-	   tput clear
-	fi
-fi
-}
-
-show_banner()
-{
-    cat <<EOF
-          __________  ___   __________    _______________
-         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
-        / / __/ /_/ / /| | \__ \\\\_  \\   / / __ / / \\__ \\ 
-       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ / 
-       \____/_/ |_/_/  |_/____/____/   \____/___//____/  
-
-EOF
-}
-
-say_hello()
-{
-    if [ -f "$GISBASE/locale/$LCL/etc/welcome" ] ; then
-	cat "$GISBASE/locale/$LCL/etc/welcome"
-    else
-	cat "$ETC/welcome"
-    fi
-
-}
-
-show_info()
-{
-    cat <<-EOF
-	GRASS homepage:                          http://grass.osgeo.org/
-	This version running through:            $shellname ($SHELL)
-	Help is available with the command:      g.manual -i
-	See the licence terms with:              g.version -c
-	EOF
-    case "$GRASS_GUI" in
-    wxpython)
-        echo "If required, restart the GUI with:       g.gui wxpython"
-        ;;
-    *)
-        echo "Start the GUI with:                      g.gui $DEFAULT_GUI"
-        ;;
-    esac
-
-    echo "When ready to quit enter:                exit"
-    echo
-}
-
-csh_startup()
-{
-    USERHOME="$HOME"      # save original home
-    HOME="$LOCATION"
-    export HOME
-    cshrc="$HOME/.cshrc"
-    tcshrc="$HOME/.tcshrc"
-    rm -f "$cshrc" "$tcshrc"
-    echo "set home = $USERHOME" > "$cshrc"
-    echo "set history = 3000 savehist = 3000  noclobber ignoreeof" >> "$cshrc"
-    echo "set histfile = $HOME/.history" >> "$cshrc"
-
-    echo "set prompt = '\\" >> "$cshrc"
-    echo "Mapset <${MAPSET}> in Location <${LOCATION_NAME}> \\" >> "$cshrc"
-    echo "GRASS $GRASS_VERSION > '" >> "$cshrc"
-    echo 'set BOGUS=``;unset BOGUS' >> "$cshrc"
-
-    if [ -r "$USERHOME/.grass.cshrc" ]
-    then
-	cat "$USERHOME/.grass.cshrc" >> "$cshrc"
-    fi
-
-    if [ -r "$USERHOME/.cshrc" ]
-    then
-	grep '^ *set  *mail *= *' "$USERHOME/.cshrc" >> "$cshrc"
-    fi
-
-    if [ -r "$USERHOME/.tcshrc" ]
-    then
-	grep '^ *set  *mail *= *' "$USERHOME/.tcshrc" >> "$cshrc"
-    fi
-
-    if [ -r "$USERHOME/.login" ]
-    then
-	grep '^ *set  *mail *= *' "$USERHOME/.login" >> "$cshrc"
-    fi
-
-    echo "set path = ( $PATH ) " | sed 's/:/ /g' >> "$cshrc"
-
-    cp "$cshrc" "$tcshrc"
-    "$ETC/run" "$SHELL"
-    EXIT_VAL=$?
-
-    HOME="$USERHOME"
-    export HOME
-}
-
-bash_startup()
-{
-    # save command history in mapset dir and remember more
-    export HISTFILE="$LOCATION/.bash_history"
-    if [ -z "$HISTSIZE" ] && [ -z "$HISTFILESIZE" ] ; then 
-	export HISTSIZE=3000
-    fi
-
-    # instead of changing $HOME, start bash with: --rcfile "$LOCATION/.bashrc" ?
-    #   if so, must care be taken to explicity call .grass.bashrc et al for
-    #   non-interactive bash batch jobs?
-    USERHOME="$HOME"      # save original home
-    HOME="$LOCATION"      # save .bashrc in $LOCATION
-    export HOME
-    bashrc="$HOME/.bashrc"
-    rm -f "$bashrc"
-    echo "test -r ~/.alias && . ~/.alias" >> "$bashrc"
-    echo "PS1='GRASS $GRASS_VERSION ($LOCATION_NAME):\w > '" >> "$bashrc"
-    echo "PROMPT_COMMAND=$GISBASE/etc/prompt.sh" >> "$bashrc"
-
-    if [ -r "$USERHOME/.grass.bashrc" ]
-    then
-        cat "$USERHOME/.grass.bashrc" >> "$bashrc"
-    fi
-
-    echo "export PATH=\"$PATH\"" >> "$bashrc"
-    echo "export HOME=\"$USERHOME\"" >> "$bashrc" # restore user home path
-
-    "$ETC/run" "$SHELL"
-    EXIT_VAL=$?
-
-    HOME="$USERHOME"
-    export HOME
-}
-
-default_startup()
-{
-    if [ "$MINGW" ] ; then
-	GRASS_MAJOR_VERSION=`echo "$GRASS_VERSION" | cut -f1 -d.`
-	PS1="GRASS $GRASS_MAJOR_VERSION> "
-	export PS1
-
-	# "$ETC/run" doesn't work at all???
-	"$SHELL"
-	rm -rf "$LOCATION/.tmp"/*  # remove GUI session files from .tmp
-    else
-	PS1="GRASS $GRASS_VERSION ($LOCATION_NAME):\w > "
-	export PS1
-
-	"$ETC/run" "$SHELL"
-	EXIT_VAL=$?
-    fi
-}
-
-done_message()
-{
-    if [ -x "$GRASS_BATCH_JOB" ] ; then
-        echo "Batch job '$GRASS_BATCH_JOB' (defined in GRASS_BATCH_JOB variable) was executed."
-        echo "Goodbye from GRASS GIS"
-	exit $EXIT_VAL
-    else
-        echo "Done."
-        echo
-        echo "Goodbye from GRASS GIS"
-        echo
-    fi
-}
-
-clean_temp()
-{
-    echo "Cleaning up temporary files ..."
-    "$ETC/clean_temp" > /dev/null
-}
-

Deleted: grass/trunk/lib/init/grass.bat
===================================================================
--- grass/trunk/lib/init/grass.bat	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/grass.bat	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,33 +0,0 @@
- at echo off
-rem #########################################################################
-rem #
-rem #		GRASS Initialization
-rem #
-rem #########################################################################
-
-rem *******Environment variables***********
-rem Uncomment and set the following values if they differ from the indicated default
-
-rem Directory where your .grass7/rc file will be stored
-rem set HOME=%USERPROFILE%
-
-rem Name of the wish (Tk) executable
-rem set GRASS_WISH=wish.exe
-
-rem Path to the shell command 
-rem (adjust to where you installed msys or another shell)
-rem set GRASS_SH=c:\msys\1.0\bin\sh.exe
-
-rem Path to utilities used by some scripts, such as awk, sed, etc
-rem (adjust to where you installed msys, gnuwin32, or other similar utilises)
-rem set PATH=c:\msys\1.0\bin;c:\msys\1.0\lib;%PATH%
-
-rem Path to your web browser
-rem set GRASS_HTML_BROWSER=%SYSTEMDRIVE%/PROGRA~1/INTERN~1/IEXPLORE.EXE
-
-rem Path to the proj files (notably the epsg projection list)
-rem set GRASS_PROJSHARE=c:/grass/share/proj
-
-set WINGISBASE=GISBASE_VALUE
-"%WINGISBASE%\etc\Init.bat" %*
-

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/grass.py	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 #############################################################################
 #
-# MODULE:   	GRASS initialization
+# MODULE:   	GRASS initialization (Python)
 # AUTHOR(S):	Original author unknown - probably CERL
 #               Andreas Lange - Germany - andreas.lange at rhein-main.de
 #   	    	Huidae Cho - Korea - grass4u at gmail.com

Copied: grass/trunk/lib/init/grass.sh (from rev 41704, grass/trunk/lib/init/grass.src)
===================================================================
--- grass/trunk/lib/init/grass.sh	                        (rev 0)
+++ grass/trunk/lib/init/grass.sh	2010-04-04 18:19:57 UTC (rev 41720)
@@ -0,0 +1,31 @@
+#! /bin/sh
+#############################################################################
+#
+# MODULE:   	GRASS initialization (Shell)
+# AUTHOR(S):	Original author unknown - probably CERL
+#               Andreas Lange - Germany - andreas.lange at rhein-main.de
+#   	    	Huidae Cho - Korea - grass4u at gmail.com
+#   	    	Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
+#   	    	Markus Neteler - Germany/Italy - neteler at itc.it
+#		Hamish Bowman - New Zealand - hamish_b at yahoo,com
+# PURPOSE:  	Sets up some environment variables.
+#               It also parses any remaining command line options for
+#               setting the GISDBASE, LOCATION, and/or MAPSET.
+#               Finally it starts GRASS with the appropriate user
+#   	    	interface and cleans up after it is finished.
+# COPYRIGHT:    (C) 2000-2010 by the GRASS Development Team
+#
+#               This program is free software under the GNU General
+#   	    	Public License (>=v2). Read the file COPYING that
+#   	    	comes with GRASS for details.
+#
+#############################################################################
+
+trap "echo 'User break!' ; exit" 2 3 9 15
+
+if [ -z "$GRASS_PYTHON" ] ; then
+    GRASS_PYTHON=python
+fi
+export GRASS_PYTHON
+
+exec $GRASS_PYTHON "@BINDIR@/grass70.py" "$@" &

Deleted: grass/trunk/lib/init/grass.src
===================================================================
--- grass/trunk/lib/init/grass.src	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/grass.src	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,25 +0,0 @@
-#! /bin/sh
-#############################################################################
-#
-# MODULE:   	GRASS Initialization
-# AUTHOR(S):	Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
-# PURPOSE:  	The source file for this shell script is in
-#   	    	lib/init/grass.src and is the grass startup script. It
-#   	    	requires a source file because the definition of GISBASE
-#   	    	is not known until compile time and is substituted from the
-#   	    	Makefile. Any command line options are passed to Init.sh.
-# COPYRIGHT:    (C) 2000-2005 by the GRASS Development Team
-#
-#               This program is free software under the GNU General Public
-#   	    	License (>=v2). Read the file COPYING that comes with GRASS
-#   	    	for details.
-#
-#############################################################################
-
-trap "echo 'User break!' ; exit" 2 3 9 15
-
-# Set the GISBASE variable
-GISBASE="GISBASE_VALUE"
-export GISBASE
-
-exec "$GISBASE/etc/Init.sh" "$@"

Deleted: grass/trunk/lib/init/init.bat
===================================================================
--- grass/trunk/lib/init/init.bat	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/init.bat	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,176 +0,0 @@
- at echo off
-rem #########################################################################
-rem
-rem  MODULE:   	GRASS Initialization
-rem  AUTHOR(S):	Paul Kelly
-rem             Some updates by Martin Landa <landa.martin gmail.com>
-rem  PURPOSE:  	The source file for this batch script is lib/init/init.bat.
-rem             It sets up some environment variables, default GISRC file
-rem             if necessary, etc. prior to starting GRASS proper.
-rem             It is intended to be a native Windows replacement for Init.bat,
-rem             but does not (yet) contain all the same functionality.
-rem
-rem             In particular also, GUI mode prints nothing to the terminal
-rem             and does not expect or provide an interactive terminal
-rem             running in addition to the GUI display.
-rem 
-rem  COPYRIGHT: (C) 2006, 2008, 2010 by the GRASS Development Team
-rem
-rem             This program is free software under the GNU General Public
-rem   	    	License (>=v2). Read the file COPYING that comes with GRASS
-rem   	    	for details.
-rem
-rem #########################################################################
-
-set SAVEPATH=%PATH%
-rem DON'T include scripts directory in PATH - .bat files in bin directory
-rem are used to run scripts on Windows
-if "%GRASS_ADDON_PATH%"=="" set PATH=%WINGISBASE%\bin;%WINGISBASE%\scripts;%WINGISBASE%\lib;%PATH%
-if not "%GRASS_ADDON_PATH%"=="" set PATH=%WINGISBASE%\bin;%WINGISBASE%\lib;%GRASS_ADDON_PATH%;%PATH%
-
-set PYTHONPATH=%PYTHONPATH%;%WINGISBASE%\etc\python;%WINGISBASE%\etc\gui\wxpython
-set PATHEXT=%PATHEXT%;.PY
-
-set GRASS_VERSION=GRASS_VERSION_NUMBER
-if "%HOME%"=="" set HOME=%USERPROFILE%
-set WINGISRC=%HOME%\.grass7\rc
-rem Make sure %GISRC% is set so g.dirseps will work
-rem (not actually used)
-set GISRC=junk
-
-rem Generate GISBASE by converting dirsep characters from \ to /
-FOR /F "usebackq delims==" %%i IN (`g.dirseps -g "%WINGISBASE%"`) DO @set GISBASE=%%i
-
-if not "%LANG%"=="" goto langset
-FOR /F "usebackq delims==" %%i IN (`"%WINGISBASE%\etc\winlocale"`) DO @set LANG=%%i
-:langset
-
-set GRASS_PAGER=more
-if "%GRASS_WISH%"=="" set GRASS_WISH=wish.exe
-if "%GRASS_SH%"=="" set GRASS_SH=c:\msys\1.0\bin\sh.exe
-
-rem Should do something with "assoc .html" and ftype here but would require
-rem a new g.manual.bat too so leaving it like this for now...
-if "%GRASS_HTML_BROWSER%"=="" set GRASS_HTML_BROWSER=%SYSTEMDRIVE%/PROGRA~1/INTERN~1/IEXPLORE.EXE
-
-if "%GRASS_PROJSHARE%"=="" set GRASS_PROJSHARE=CONFIG_PROJSHARE
-
-rem Add python scripts to the PATHEXT variable
-set PATHEXT=%PATHEXT%;.PY
-
-if "%1" == "-version" goto displaylicence
-if "%1" == "-v" goto displaylicence
-
-if "%1" == "-text" goto settextmode
-:aftertextcheck
-
-if "%1" == "-gui" goto setguimode
-if "%1" == "-wx" goto setguimode
-if "%1" == "-wxpython" goto setguimode
-
-:afterguicheck
-
-if exist "%WINGISRC%" (
-   set HAVE_GISRC=true
-   goto aftercreategisrc
-)
-
-set HAVE_GISRC=false
-rem Create an initial GISRC file based on current directory
-if not exist "%HOME%\.grass7" (
-   mkdir "%HOME%\.grass7"
-)
-"%WINGISBASE%\etc\echo" "GISDBASE: %HOME%" | g.dirseps -g > "%WINGISRC%"
-"%WINGISBASE%\etc\echo" "LOCATION_NAME: <UNKNOWN>" >> "%WINGISRC%"
-"%WINGISBASE%\etc\echo" "MAPSET: <UNKNOWN>" >> "%WINGISRC%"
-
-:aftercreategisrc
-
-rem Now set the real GISRC
-FOR /F "usebackq delims==" %%i IN (`g.dirseps -g "%WINGISRC%"`) DO @set GISRC=%%i
-
-rem Set GRASS_GUI
-if "%GRASS_GUI%" == "" (
-  FOR /F "usebackq delims==" %%i IN (`g.gisenv "get=GRASS_GUI"`) DO @set GRASS_GUI=%%i
-) else (
-  g.gisenv "set=GRASS_GUI=%GRASS_GUI%"
-)
-
-rem Set wxpython as default if not specified elsewhere
-if "%GRASS_GUI%"=="" set GRASS_GUI=wxpython
-
-rem Clean out old .tmp files from the mapset
-if "%HAVE_GISRC%"=="true" (
-  "%WINGISBASE%\etc\clean_temp" > NUL:
-)
-set HAVE_GISRC=
-
-if "%GRASS_GUI%"=="text" goto text
-
-rem if return ok, wxpython start:
-if %errorlevel% == 2 goto exitinit
-
-"%WINGISBASE%\etc\clean_temp" > NUL:
-rem goto exitinit
-
-:wxpython
-
-%GRASS_PYTHON% "%GISBASE%/etc/gui/wxpython/gis_set.py"
-if %errorlevel% == 2 goto exitinit
-%GRASS_PYTHON% "%GISBASE%/etc/gui/wxpython/wxgui.py"
-
-goto exitinit
-
-:text
-
-"%WINGISBASE%\etc\set_data"
-
-if %errorlevel% == 1 goto exitinit
-
-rem Get LOCATION_NAME to use in prompt
-FOR /F "usebackq delims==" %%i IN (`g.gisenv "get=LOCATION_NAME"`) DO @set LOCATION_NAME=%%i
-
-type "%WINGISBASE%\etc\welcome"
-
-"%WINGISBASE%\etc\echo" ""
-"%WINGISBASE%\etc\echo" "GRASS homepage:                          http://grass.osgeo.org/"
-"%WINGISBASE%\etc\echo" "This version running thru:               Windows Command Shell (cmd.exe)"
-"%WINGISBASE%\etc\echo" "When ready to quit enter:                exit"
-"%WINGISBASE%\etc\echo" "Help is available with the command:      g.manual -i"
-"%WINGISBASE%\etc\echo" "See the licence terms with:              g.version -c"
-"%WINGISBASE%\etc\echo" ""
-
-prompt GRASS %GRASS_VERSION% $C%LOCATION_NAME%$F$G 
-
-cmd.exe
-
-prompt
-goto exitinit
-
-:displaylicence
-
-type "%WINGISBASE%\etc\license"
-goto exitinit
-
-:settextmode
-
-set GRASS_GUI=text
-shift
-
-goto aftertextcheck
-
-:setguimode
-
-set GRASS_GUI=wxpython
-shift
-
-goto afterguicheck
-
-:exitinit
-
-rem Clean out old .tmp files from the mapset
-"%WINGISBASE%\etc\clean_temp" > NUL:
-
-set PATH=%SAVEPATH%
-set SAVEPATH=
-exit /b

Deleted: grass/trunk/lib/init/init.sh
===================================================================
--- grass/trunk/lib/init/init.sh	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/init.sh	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,269 +0,0 @@
-#!/bin/sh
-#############################################################################
-#
-# MODULE:   	GRASS Initialization
-# AUTHOR(S):	Original author unknown - probably CERL
-#               Andreas Lange - Germany - andreas.lange at rhein-main.de
-#   	    	Huidae Cho - Korea - grass4u at gmail.com
-#   	    	Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
-#   	    	Markus Neteler - Germany/Italy - neteler at itc.it
-#		Hamish Bowman - New Zealand - hamish_b at yahoo,com
-# PURPOSE:  	The source file for this shell script is in
-#   	    	src/general/init/init.sh. It sets up some environment
-#   	    	variables and the lock file. It also parses any remaining
-#   	    	command line options for setting the GISDBASE, LOCATION, and/or
-#   	    	MAPSET. Finally it starts GRASS with the appropriate user
-#   	    	interface and cleans up after it is finished.
-# COPYRIGHT:    (C) 2000-2009 by the GRASS Development Team
-#
-#               This program is free software under the GNU General Public
-#   	    	License (>=v2). Read the file COPYING that comes with GRASS
-#   	    	for details.
-#
-#############################################################################
-
-trap "echo 'User break!' ; exit" 2 3 15
-
-. "$GISBASE/etc/functions.sh"
-
-# Set default GUI
-DEFAULT_GUI="wxpython"
-
-# the following is only meant to be an internal variable for debugging this script.
-#  use 'g.gisenv set="DEBUG=[0-5]"' to turn GRASS debug mode on properly.
-if [ -z "$GRASS_DEBUG" ] ; then
-   GRASS_DEBUG=0
-fi
-
-# GRASS_SH is normally just for Windows when not started from a bourne 
-# shell. But when starting from Init.sh is still needed for GRASS_GUI (still true for GRASS 7?)
-GRASS_SH=/bin/sh
-export GRASS_SH
-
-# Set GRASS version number for R interface etc (must be an env_var for MS-Windows)
-GRASS_VERSION="@GRASS_VERSION_NUMBER@"
-export GRASS_VERSION
-
-# Get the command name
-CMD_NAME=@START_UP@
-
-# Get the system name
-SYSTEM=`uname -s`
-case $SYSTEM in
-MINGW*)
-	MINGW=1
-	;;
-CYGWIN*)
-	CYGWIN=1
-	;;
-Darwin*)
-	MACOSX=1
-	;;
-esac
-
-# Set the GIS_LOCK variable to current process id
-GIS_LOCK=$$
-export GIS_LOCK
-
-# Set the config subdir
-if [ ! "$GRASS_CONFIG_DIR" ] ; then
-	GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@
-	export GRASS_CONFIG_DIR
-fi
-
-# Set the global grassrc file
-if [ -n "$GRASS_BATCH_JOB" ] ; then
-	GISRCRC="$HOME/$GRASS_CONFIG_DIR/rc.`uname -n`"
-	if [ ! -f "$GISRCRC" ] ; then
-		GISRCRC="$HOME/$GRASS_CONGIG_DIR/rc"
-	fi
-else
-	GISRCRC="$HOME/$GRASS_CONFIG_DIR/rc"
-fi
-
-# Set PATH to GRASS bin, ETC to GRASS etc
-ETC="$GISBASE/etc"
-
-# Set the username and working directory
-if [ "$MINGW" ] ; then
-	PWD=`pwd -W`
-	USER="$USERNAME"
-	if [ ! "$USER" ] ; then
-		USER="user_name"
-	fi
-else
-	PWD=`pwd`
-	USER="`whoami`"
-fi
-
-# Parse the command-line options
-# This can't be put into a function as it modifies argv
-for i in "$@" ; do
-    case "$i" in
-    # Check if the user asked for the version
-    -v|--version)
-        cat "$GISBASE/etc/license"
-        exit
-        ;;
-
-    # Check if the user asked for help
-    help|-h|-help|--help)
-        help_message
-        exit
-        ;;
-
-    # Check if the -text flag was given
-    -text)
-        GRASS_GUI="text"
-        shift
-        ;;
-
-    # Check if the -gui flag was given
-    -gui)
-        GRASS_GUI="$DEFAULT_GUI"
-        shift
-        ;;
-
-    # Check if the -wxpython flag was given
-    -wxpython | -wx)
-        GRASS_GUI="wxpython"
-        shift
-        ;;
-
-    # Check if the user wants to create a new mapset
-    -c)
-        CREATE_NEW=1
-        shift
-        ;;
-    esac
-done
-
-# Create the temporary directory and session grassrc file
-create_tmp
-
-# Create the session grassrc file
-create_gisrc
-
-# Ensure GRASS_GUI is set
-read_gui
-
-# Get Locale name
-get_locale
-
-# Set PATH, PYTHONPATH
-set_paths
-
-# Set LD_LIBRARY_PATH (etc) to find GRASS shared libraries
-if [ ! "$@LD_LIBRARY_PATH_VAR@" ] ; then
-    @LD_LIBRARY_PATH_VAR@="$GISBASE/lib"
-else
-    @LD_LIBRARY_PATH_VAR@="$GISBASE/lib:$@LD_LIBRARY_PATH_VAR@"
-fi
-export @LD_LIBRARY_PATH_VAR@
-
-# Set GRASS_PAGER, GRASS_WISH, GRASS_PYTHON, GRASS_GNUPLOT
-set_defaults
-
-# Set GRASS_HTML_BROWSER
-set_browser
-
-#predefine monitor size for certain architectures
-if [ "$HOSTTYPE" = "arm" ] ; then
-   #small monitor on ARM (iPAQ, zaurus... etc)
-   GRASS_HEIGHT=320
-   GRASS_WIDTH=240
-   export GRASS_HEIGHT GRASS_WIDTH
-fi
-
-if [ ! "$GRASS_PROJSHARE" ] ; then
-    GRASS_PROJSHARE=@CONFIG_PROJSHARE@
-    export GRASS_PROJSHARE
-fi
-
-# First time user - GISRC is defined in the GRASS script
-if [ ! -f "$GISRC" ] ; then
-    grass_intro
-else
-    clean_temp
-fi
-
-echo "Starting GRASS ..."
-
-# Check that the GUI works
-check_gui "$@"
-
-# Parsing argument to get LOCATION
-if [ ! "$1" ] ; then
-    # Try interactive startup
-    LOCATION=
-else
-    non_interactive "$@"
-fi
-
-# User selects LOCATION and MAPSET if not set
-set_data
-
-# Set GISDBASE, LOCATION_NAME, MAPSET, LOCATION from $GISRC
-read_gisrc
-
-# Check .gislock file
-check_lock
-
-# build user fontcap if specified but not present
-make_fontcap
-
-# predefine default driver if DB connection not defined
-#  is this really needed?? Modules should call this when/if required.
-if [ ! -e "$LOCATION/VAR" ] ; then
-   db.connect -c --quiet
-fi
-
-trap "" 2 3 15
-
-check_shell
-
-check_batch_job
-
-start_gui
-
-clear_screen
-# Display the version and license info
-if [ -n "$GRASS_BATCH_JOB" ] ; then
-  say_hello
-else
-  show_banner
-  say_hello
-  show_info
-fi
-
-case "$sh" in
-csh|tcsh)
-    csh_startup
-    ;;
-
-bash|msh|cygwin)
-    bash_startup
-    ;;
-
-*)
-    default_startup
-    ;;
-esac
-
-trap 2 3 15
-
-clear_screen
-
-clean_temp
-
-rm -f "$lockfile"
-
-# Save GISRC
-cp "$GISRC" "$GISRCRC"
-
-cleanup_tmpdir
-
-#### after this point no more grass modules may be called ####
-
-done_message
-

Deleted: grass/trunk/lib/init/prompt.sh
===================================================================
--- grass/trunk/lib/init/prompt.sh	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/lib/init/prompt.sh	2010-04-04 18:19:57 UTC (rev 41720)
@@ -1,9 +0,0 @@
-#!/bin/sh
-LOCATION="`g.gisenv GISDBASE`/`g.gisenv LOCATION_NAME`/`g.gisenv MAPSET`"
-if test -d "$LOCATION/grid3/G3D_MASK" && test -f "$LOCATION/cell/MASK" ; then
-    echo [Raster and Volume MASKs present]
-elif test -f "$LOCATION/cell/MASK" ; then
-    echo [Raster MASK present]
-elif test -d "$LOCATION/grid3/G3D_MASK" ; then
-    echo [Volume MASK present]
-fi

Modified: grass/trunk/mswindows/GRASS-Installer.nsi
===================================================================
--- grass/trunk/mswindows/GRASS-Installer.nsi	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/mswindows/GRASS-Installer.nsi	2010-04-04 18:19:57 UTC (rev 41720)
@@ -598,8 +598,8 @@
 	FileWrite $0 '@echo off$\r$\n'
 	FileWrite $0 'rem #########################################################################$\r$\n'
 	FileWrite $0 'rem #$\r$\n'
-	FileWrite $0 'rem # File dynamically created by NSIS installer script;$\r$\n'
-	FileWrite $0 'rem # Written by Marco Pasetti;$\r$\n'
+	FileWrite $0 'rem # File dynamically created by NSIS installer script$\r$\n'
+	FileWrite $0 'rem # Written by Marco Pasetti$\r$\n'
 	FileWrite $0 'rem #$\r$\n'
 	FileWrite $0 'rem #########################################################################$\r$\n'
 	FileWrite $0 'rem #$\r$\n'
@@ -637,7 +637,7 @@
 	FileWrite $0 'if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python$\r$\n'
 	FileWrite $0 '$\r$\n'
 	FileWrite $0 'set WINGISBASE=%GRASSDIR%$\r$\n'
-	FileWrite $0 '"%WINGISBASE%\etc\Init.bat" %*'
+	FileWrite $0 '%GRASS_PYTHON% "%WINGISBASE%\grass70.py" %*'
 	FileClose $0
 	done_create_grass_command.bat:
 	
@@ -686,36 +686,19 @@
   
 	;create the $INSTALL_DIR\bin grass_command
 	ClearErrors
-	FileOpen $0 $INSTALL_DIR\bin\${GRASS_COMMAND} w
+	FileOpen $0 $INSTALL_DIR\${GRASS_COMMAND}.sh w
 	IfErrors done_create_grass_command
 	FileWrite $0 '#! /bin/sh$\r$\n'
 	FileWrite $0 '#########################################################################$\r$\n'
 	FileWrite $0 '#$\r$\n'
-	FileWrite $0 '# File dynamically created by NSIS installer script;$\r$\n'
-	FileWrite $0 '# Written by Marco Pasetti;$\r$\n'
+	FileWrite $0 '# File dynamically created by NSIS installer script$\r$\n'
+	FileWrite $0 '# Written by Marco Pasetti$\r$\n'
 	FileWrite $0 '#$\r$\n'
 	FileWrite $0 '#########################################################################$\r$\n'
 	FileWrite $0 '#$\r$\n'
-	FileWrite $0 '# MODULE:   	GRASS Initialization$\r$\n'
-	FileWrite $0 '# AUTHOR(S):	Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th$\r$\n'
-	FileWrite $0 '# PURPOSE:  	The source file for this shell script is in$\r$\n'
-	FileWrite $0 '#   	    	lib/init/grass.src and is the grass startup script. It$\r$\n'
-	FileWrite $0 '#   	    	requires a source file because the definition of GISBASE$\r$\n'
-	FileWrite $0 '#   	    	is not known until compile time and is substituted from the$\r$\n'
-	FileWrite $0 '#   	    	Makefile. Any command line options are passed to Init.sh.$\r$\n'
-	FileWrite $0 '# COPYRIGHT:  	(C) 2000-2009 by the GRASS Development Team$\r$\n'
+	FileWrite $0 '# GRASS Initialization$\r$\n'
 	FileWrite $0 '#$\r$\n'
-	FileWrite $0 '#             	This program is free software under the GNU General Public$\r$\n'
-	FileWrite $0 '#   	    	License (>=v2). Read the file COPYING that comes with GRASS$\r$\n'
-	FileWrite $0 '#   	    	for details.$\r$\n'
-	FileWrite $0 '#$\r$\n'
 	FileWrite $0 '#########################################################################$\r$\n'
-	FileWrite $0 '#$\r$\n'
-	FileWrite $0 '# Modified by Marco Pasetti$\r$\n'
-	FileWrite $0 '# added the export PATH instruction to let GRASS work from$\r$\n'
-	FileWrite $0 '# the MSYS environment in the dynamic NSIS installation$\r$\n'
-	FileWrite $0 '#$\r$\n'
-	FileWrite $0 '#########################################################################$\r$\n'
 	FileWrite $0 '$\r$\n'
 	FileWrite $0 'trap "echo '
 	FileWrite $0 "'User break!' ; "
@@ -743,7 +726,7 @@
 	FileWrite $0 'GRASS_PROJSHARE="$INSTALL_DIR\proj"$\r$\n'
 	FileWrite $0 'export GRASS_PROJSHARE$\r$\n'
 	FileWrite $0 '$\r$\n'
-	FileWrite $0 'exec "$$GISBASE/etc/Init.sh" "$$@"'
+	FileWrite $0 '"$$GRASS_PYTHON $$GISBASE/grass70.py" "$$@"'
 	FileClose $0
 	done_create_grass_command:
 

Modified: grass/trunk/mswindows/osgeo4w/package.sh
===================================================================
--- grass/trunk/mswindows/osgeo4w/package.sh	2010-04-04 17:00:25 UTC (rev 41719)
+++ grass/trunk/mswindows/osgeo4w/package.sh	2010-04-04 18:19:57 UTC (rev 41720)
@@ -35,7 +35,7 @@
 	./configure \
 		--with-libs="$OSGEO4W_ROOT_MSYS/apps/gdal-16/lib $OSGEO4W_ROOT_MSYS/lib" \
 		--with-includes="$OSGEO4W_ROOT_MSYS/apps/gdal-16/include $OSGEO4W_ROOT_MSYS/include" \
-		--exec-prefix=$OSGEO4W_ROOT_MSYS/bin \
+		--exec-prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
 		--libexecdir=$OSGEO4W_ROOT_MSYS/bin \
 		--prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
 		--includedir=$OSGEO4W_ROOT_MSYS/include \



More information about the grass-commit mailing list