[GRASS-CVS] markus: grass6/macosx/app Makefile, 1.8,
1.8.2.1 build_gui_user_menu.sh, 1.5, 1.5.2.1 grass.sh.in, 1.12,
1.12.2.1
grass at intevation.de
grass at intevation.de
Sun Nov 18 03:31:44 EST 2007
Author: markus
Update of /grassrepository/grass6/macosx/app
In directory doto:/tmp/cvs-serv4947/app
Modified Files:
Tag: releasebranch_6_3
Makefile build_gui_user_menu.sh grass.sh.in
Log Message:
various fixes backported
Index: Makefile
===================================================================
RCS file: /grassrepository/grass6/macosx/app/Makefile,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -d -r1.8 -r1.8.2.1
--- Makefile 2 Oct 2007 16:21:04 -0000 1.8
+++ Makefile 18 Nov 2007 08:31:41 -0000 1.8.2.1
@@ -20,6 +20,10 @@
ARCH_OBJS := $(foreach obj,$(OBJS),$(OBJDIR)/$(obj))
+# if building on Leopard with TclTk 8.5, set this version to match
+ifndef TCLTKVER
+TCLTKVER = 8.4
+endif
# ugly hack - assume tcl and tk in same prefix, and same as TCLTKLIBPATH minus 'lib'
ifndef TCLTKPREFIX
TCLTKPREFIX = `echo "${TCLTKLIBPATH}" | sed -e "s,-L,," -e "s,/lib *$$,,"`
@@ -50,13 +54,13 @@
@# TclTk embedding:
ifdef OPENGL_X11
-${MAKE_DIR_CMD} ${APPDIR}/MacOS/bin
- -${INSTALL_BIN} ${TCLTKPREFIX}/bin/tclsh8.4 ${APPDIR}/MacOS/bin
- -${INSTALL_BIN} ${TCLTKPREFIX}/bin/wish8.4 ${APPDIR}/MacOS/bin
+ -${INSTALL_BIN} ${TCLTKPREFIX}/bin/tclsh${TCLTKVER} ${APPDIR}/MacOS/bin
+ -${INSTALL_BIN} ${TCLTKPREFIX}/bin/wish${TCLTKVER} ${APPDIR}/MacOS/bin
-${MAKE_DIR_CMD} ${APPDIR}/MacOS/lib
- -${INSTALL_BIN} ${TCLTKPREFIX}/lib/libtcl8.4.dylib ${APPDIR}/MacOS/lib
- -${INSTALL_BIN} ${TCLTKPREFIX}/lib/libtk8.4.dylib ${APPDIR}/MacOS/lib
- -cd ${TCLTKPREFIX}/lib ; tar cBf - tcl8.4 | (cd ${APPDIR}/MacOS/lib ; tar xBf - ) 2>/dev/null
- -cd ${TCLTKPREFIX}/lib ; tar cBf - tk8.4 | (cd ${APPDIR}/MacOS/lib ; tar xBf - ) 2>/dev/null
+ -${INSTALL_BIN} ${TCLTKPREFIX}/lib/libtcl${TCLTKVER}.dylib ${APPDIR}/MacOS/lib
+ -${INSTALL_BIN} ${TCLTKPREFIX}/lib/libtk${TCLTKVER}.dylib ${APPDIR}/MacOS/lib
+ -cd ${TCLTKPREFIX}/lib ; tar cBf - tcl${TCLTKVER} | (cd ${APPDIR}/MacOS/lib ; tar xBf - ) 2>/dev/null
+ -cd ${TCLTKPREFIX}/lib ; tar cBf - tk${TCLTKVER} | (cd ${APPDIR}/MacOS/lib ; tar xBf - ) 2>/dev/null
-${MAKE_DIR_CMD} ${APPDIR}/MacOS/include
-${INSTALL_DATA} ${TCLTKPREFIX}/include/tcl.h ${APPDIR}/MacOS/include
-${INSTALL_DATA} ${TCLTKPREFIX}/include/tclDecls.h ${APPDIR}/MacOS/include
@@ -87,7 +91,7 @@
$(OBJDIR)/grass.sh: grass.sh.in
$(MAKE_DIR_CMD) $(OBJDIR)
- sed -e "s, at GDAL_BIN_PATH@,$(GDAL_BIN)," -e "s, at PROJ_BIN_PATH@,$(PROJ_BIN)," -e "s, at TCLTK_INTERNAL@,$(TCLTK_INTERNAL)," grass.sh.in > $(OBJDIR)/grass.sh
+ sed -e "s, at GDAL_BIN_PATH@,$(GDAL_BIN)," -e "s, at PROJ_BIN_PATH@,$(PROJ_BIN)," -e "s, at TCLTK_INTERNAL@,$(TCLTK_INTERNAL)," -e "s, at TCLTKVER@,$(TCLTKVER)," grass.sh.in > $(OBJDIR)/grass.sh
clean:
-rm -rf $(OBJDIR) $(EXTRA_CLEAN_DIRS) $(EXTRA_CLEAN_FILES)
Index: build_gui_user_menu.sh
===================================================================
RCS file: /grassrepository/grass6/macosx/app/build_gui_user_menu.sh,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- build_gui_user_menu.sh 11 Sep 2007 02:10:10 -0000 1.5
+++ build_gui_user_menu.sh 18 Nov 2007 08:31:41 -0000 1.5.2.1
@@ -2,7 +2,6 @@
# Build addon menu files, from the global /Library/GRASS/$GRASS_MMVER/Modules
# and the user's $HOME/Library/GRASS/$GRASS_MMVER/Modules.
-# It builds a etc/gm/addons folder full of tcl .menu menu files.
# test files to make sure they are appropriate for adding to the GUI menu.
# Using 'file', assume executable binaries OK. Check scripts to see if they
@@ -15,12 +14,18 @@
GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
BINDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/bin"
BINDIRG="/Library/GRASS/$GRASS_MMVER/Modules/bin"
-MENUDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/etc/gm/addons"
+MENUDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/etc"
echo "Rebuilding Addon menu..."
+# clean up old .menu files
+if [ -d "$MENUDIR/gm/addons" ] ; then
+ rm -f "$MENUDIR/gm/addons/"*".menu"
+fi
+
+# just to make sure (startup should have created it)
mkdir -p "$MENUDIR"
-rm -f "$MENUDIR/"*.menu
+echo "# generated by grass startup" > "$MENUDIR/xtnmenu.dat"
# global addons:
if [ -d "$BINDIRG" ] ; then
@@ -29,18 +34,21 @@
else
CMDLISTG=""
fi
+CMDGFOUND=""
if [ "$CMDLISTG" != "" ] ; then
for i in $CMDLISTG
do
ftype="`file $BINDIRG/$i`"
if [ "`echo $ftype | grep 'Mach-O'`" ] || [ "`grep '#% *Module' $BINDIRG/$i`" ] ; then
- echo "command {[G_msg \"$i\"]} {} \"$i\" {} -command {execute $i }" > $MENUDIR/$i.menu
+ echo "main:$i:$i:$i" >> "$MENUDIR/xtnmenu.dat"
+ CMDGFOUND="1"
fi
done
fi
-# user addons pages:
+# user addons:
+CMDFIRST="1"
cd "$BINDIR"
CMDLIST=`ls -1 2> /dev/null | sort -u`
@@ -49,7 +57,11 @@
do
ftype="`file $BINDIR/$i`"
if [ "`echo $ftype | grep 'Mach-O'`" ] || [ "`grep '#% *Module' $BINDIR/$i`" ] ; then
- echo "command {[G_msg \"$i\"]} {} \"$i\" {} -command {execute $i }" > $MENUDIR/$i.menu
+ if [ "$CMDFIRST" ] && [ "$CMDGFOUND" ] ; then
+ echo "separator" >> "$MENUDIR/xtnmenu.dat"
+ CMDFIRST=""
+ fi
+ echo "main:$i:$i:$i" >> "$MENUDIR/xtnmenu.dat"
fi
done
fi
Index: grass.sh.in
===================================================================
RCS file: /grassrepository/grass6/macosx/app/grass.sh.in,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- grass.sh.in 7 Aug 2007 22:56:05 -0000 1.12
+++ grass.sh.in 18 Nov 2007 08:31:41 -0000 1.12.2.1
@@ -36,6 +36,7 @@
# for extra utils
# hack - ideally user should have these in their PATH, but make sure here
PATH="@GDAL_BIN_PATH@:@PROJ_BIN_PATH@:$PATH"
+export PATH
# add some OS X style app support paths, and create user one if missing.
mkdir -p "$GISBASE_USER/Modules/bin"
@@ -79,28 +80,36 @@
# start X11 if not running - no need to check if running when using 'open'
# some users may be annoyed by this, but X11 required for some stuff for now
if [ -d "/Applications/Utilities/X11.app" ] ; then
- open /Applications/Utilities/X11.app
+ # no need to start Leopard X11.app
+ if [ ! -d "/usr/X11" ] ; then
+ open /Applications/Utilities/X11.app
+ fi
fi
# xterm - make sure X11 is in PATH
-pathX11=`echo "$PATH" | grep '/usr/X11R6/bin'`
+pathX11=`echo "$PATH" | grep '/usr/X11\(R6\)\?/bin'`
if [ ! "$pathX11" ] ; then
- PATH="$PATH:/usr/X11R6/bin"
+ if [ -d "/usr/X11" ] ; then
+ PATH="$PATH:/usr/X11/bin"
+ export PATH
+ elif [ -d "/usr/X11R6" ] ; then
+ PATH="$PATH:/usr/X11R6/bin"
+ export PATH
+ fi
fi
-export PATH
# default to internal X11 Tcl/Tk
@TCLTK_INTERNAL at if [ ! "$GRASS_TCLSH" ] ; then
- GRASS_TCLSH="$GISBASE/bin/tclsh8.4"
+ GRASS_TCLSH="$GISBASE/bin/tclsh at TCLTKVER@"
export GRASS_TCLSH
- GRASS_WISH="$GISBASE/bin/wish8.4"
+ GRASS_WISH="$GISBASE/bin/wish at TCLTKVER@"
export GRASS_WISH
# internal - force osxaqua off
unset osxaqua
# override TCL_LIBRARY to internal
- TCL_LIBRARY="$GISBASE/lib/tcl8.4"
+ TCL_LIBRARY="$GISBASE/lib/tcl at TCLTKVER@"
export TCL_LIBRARY
- TK_LIBRARY="$GISBASE/lib/tk8.4"
+ TK_LIBRARY="$GISBASE/lib/tk at TCLTKVER@"
export TK_LIBRARY
@TCLTK_INTERNAL at fi
@@ -120,7 +129,7 @@
if [ ! "$GRASS_GUI" ] ; then
GRASS_GUI="tcltk"
fi
-if [ "$GRASS_GUI" != "tcltk" ] ; then
+if [ "$GRASS_GUI" = "text" ] ; then
osascript -e 'tell application "Terminal" to activate'
fi
More information about the grass-commit
mailing list