Browse Source

Remove unnecessary TclTk bundling

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32348 15284696-431f-4ddb-bdfa-cd5b030d7da7
William Kyngesburye 17 years ago
parent
commit
7addbabeff
3 changed files with 12 additions and 95 deletions
  1. 1 47
      macosx/ReadMe.rtf
  2. 4 30
      macosx/app/Makefile
  3. 7 18
      macosx/app/grass.sh.in

+ 1 - 47
macosx/ReadMe.rtf

@@ -10,12 +10,6 @@
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 
 \fs24 \cf0 \
-\pard\tx1080\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\i \cf0 2008-3-30\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\i0 \cf0 \
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 \cf0 \ul \ulc0 Contents\
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
@@ -31,7 +25,6 @@ Building GRASS\
 	Leopard Notes*\
 	Building an Installer Package\
 	Bundling Libraries and Programs\
-Tcl/Tk\
 Developer Notes\
 Help Files*\
 Addon Modules\
@@ -97,15 +90,7 @@ With this option, the
 \f1\fs20 --prefix=/Applications
 \f0\fs24  yourself for configure.\
 \
-The makefile tries to figure out the Tcl/Tk prefix from the configuration.  This may not work in some cases.  All that is configured are the includes and libraries locations, but the bundling step needs to know the prefix.  This will only work if both Tcl and Tk have the same prefix.  If it has problems figuring out the Tcl/Tk prefix, set TCLTKPREFIX in the Terminal before running make:\
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\f1\fs20 \cf0 export TCLTKPREFIX=[/path/to/tcltk/prefix]\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\f0\fs24 \cf0 \
-It also tries to figure out the location of the GDAL programs, from the configured GDAL libs.  This is set in grass.sh, and if it doesn't correctly figure it out (some GRASS commands fail to find needed GDAL commands), set GDAL_BIN before running make:\
+The makefile tries to figure out the location of the GDAL programs, from the configured GDAL libs.  This is set in grass.sh, and if it doesn't correctly figure it out (some GRASS commands fail to find needed GDAL commands), set GDAL_BIN before running make:\
 \
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 
@@ -342,8 +327,6 @@ GRASS uses
 \f1\fs20 PATH
 \f0\fs24 , so helper programs installed there will be found.\
 \
-The Tcl/Tk bundling below is an example of bundling both libraries and programs.  This is hardwired into the install make target.\
-\
 There is NO need to bundle 
 \i everything
 \i0 .  Bundling readily available libraries and programs installed in standard locations is not necessary.  Some things you might want to bundle include:\
@@ -361,35 +344,6 @@ Things to leave out:\
 \
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 
-\b \cf0 Tcl/Tk\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\b0 \cf0 \
-By default, the application is built expecting a local copy of Tcl/Tk inside the application package (to simplify installation).  This will override any GRASS_WISH and GRASS_TCLSH environment setting you may have in your shell startup (ie .bash_profile).  
-\i This is currently hardwired to Tcl/Tk 8.4.
-\i0 \
-\
-If you want to try building GRASS using Tcl/Tk Aqua (not recommended), set TCLTK_INTERNAL to a space before compiling:\
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\f1\fs20 \cf0 export TCLTK_INTERNAL=" "\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\f0\fs24 \cf0 \
-Tcl/Tk Aqua has some cosmetic issues in general - widgets displayed from OSX are often too big and mess up layout, some widgets don't even use OSX equivalents (sliders are an example).  There are also problems with NVIZ that come and go.\
-\
-If you want to experiment with Tcl/Tk 8.5, configure with the tcltk option pointing to TclTk 8.5 binaries, then set TCLTKVER before compiling to 8.5:\
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\f1\fs20 \cf0 export TCLTKVER="8.5"\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
-\f0\fs24 \cf0 \
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-
 \b\fs28 \cf0 Developer Notes\
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 

+ 4 - 30
macosx/app/Makefile

@@ -12,9 +12,6 @@ ifndef MACOSX_APP_NAME
 MACOSX_APP_NAME = GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app
 endif
 APPDIR = $(ARCH_DISTDIR)/${MACOSX_APP_NAME}/Contents
-ifndef TCLTK_INTERNAL
-TCLTK_INTERNAL = \#
-endif
 MAKE_DIR_CMD = mkdir -p -m 755
 GRASS_VERSION_BUILD = `/bin/date "+%y%m%d"`
 
@@ -22,14 +19,6 @@ OBJS = Info.plist GRASS.scpt grass.sh main.o
 
 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 *$$,,"`
-endif
 # ugly hack - assume gdal prefix starts with -L flag
 ifndef GDAL_BIN
 GDAL_BIN = `echo "${GDALLIBS}" | sed -e "s,-L,," -e "s,/lib.*$$,/bin,"`
@@ -53,24 +42,6 @@ macosxapp: PkgInfo app.icns English.lproj/MainMenu.nib build_html_user_index.sh
 	-${INSTALL_DATA} $(OBJDIR)/GRASS.scpt ${APPDIR}/Resources/Scripts
 	-${INSTALL} build_html_user_index.sh ${APPDIR}/MacOS/etc
 	-${INSTALL} build_gui_user_menu.sh ${APPDIR}/MacOS/etc
-	@# TclTk embedding:
-ifdef OPENGL_X11
-	-${MAKE_DIR_CMD} ${APPDIR}/MacOS/bin
-	-${INSTALL} ${TCLTKPREFIX}/bin/tclsh${TCLTKVER} ${APPDIR}/MacOS/bin
-	-${INSTALL} ${TCLTKPREFIX}/bin/wish${TCLTKVER} ${APPDIR}/MacOS/bin
-	-${MAKE_DIR_CMD} ${APPDIR}/MacOS/lib
-	-${INSTALL} ${TCLTKPREFIX}/lib/libtcl${TCLTKVER}.dylib ${APPDIR}/MacOS/lib
-	-${INSTALL} ${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
-	-${INSTALL_DATA} ${TCLTKPREFIX}/include/tclPlatDecls.h ${APPDIR}/MacOS/include
-	-${INSTALL_DATA} ${TCLTKPREFIX}/include/tk.h ${APPDIR}/MacOS/include
-	-${INSTALL_DATA} ${TCLTKPREFIX}/include/tkDecls.h ${APPDIR}/MacOS/include
-	-${INSTALL_DATA} ${TCLTKPREFIX}/include/tkPlatDecls.h ${APPDIR}/MacOS/include
-endif
 
 $(OBJDIR)/main.o: main.m
 	$(MAKE_DIR_CMD) $(OBJDIR)
@@ -94,7 +65,10 @@ $(OBJDIR)/GRASS.scpt: GRASS.applescript
 
 $(OBJDIR)/grass.sh: grass.sh.in
 	$(MAKE_DIR_CMD) $(OBJDIR)
-	sed -e "s,@GDAL_BIN_PATH@,$(GDAL_BIN)," -e "s,@PROJ_BIN_PATH@,$(PROJ_BIN)," -e "s,@TCLTK_INTERNAL@,$(TCLTK_INTERNAL)," -e "s,@TCLTKVER@,$(TCLTKVER)," grass.sh.in > $(OBJDIR)/grass.sh
+	sed -e "s,@GDAL_BIN_PATH@,$(GDAL_BIN):," \
+	-e "s,@PROJ_BIN_PATH@,$(PROJ_BIN):," \
+	-e "s,@X11@,$(USE_X11),g" \
+	grass.sh.in > $(OBJDIR)/grass.sh
 
 clean:
 	-rm -rf $(OBJDIR) $(EXTRA_CLEAN_DIRS) $(EXTRA_CLEAN_FILES)

+ 7 - 18
macosx/app/grass.sh.in

@@ -7,7 +7,7 @@
 # PURPOSE:  	The source file for this shell script is in
 #   	    	macosx/app/grass.sh.in and is the grass startup script for
 #               the Mac OS X application build.
-# COPYRIGHT:    (C) 2000-2005 by the GRASS Development Team
+# 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
@@ -32,8 +32,8 @@ GISBASE_USER="$HOME/Library/GRASS/$grass_ver"
 GISBASE_SYSTEM="/Library/GRASS/$grass_ver"
 
 # for extra utils
-# hack - ideally user should have these in their PATH, but make sure here
-PATH="@GDAL_BIN_PATH@:@PROJ_BIN_PATH@:$PATH"
+# 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.
@@ -89,6 +89,8 @@ fi
 
 ### X11 stuff
 
+if [ "@X11@" ] ; then
+
 # start X11 if not running
 # some users may be annoyed by this, but X11 required for some stuff for now
 if [ -d "/Applications/Utilities/X11.app" ] ; then
@@ -113,27 +115,14 @@ if [ ! "$pathX11" ] ; then
 	fi
 fi
 
-# default to internal X11 Tcl/Tk
-@TCLTK_INTERNAL@if [ ! "$GRASS_TCLSH" ] ; then
-	GRASS_TCLSH="$GISBASE/bin/tclsh@TCLTKVER@"
-	export GRASS_TCLSH
-	GRASS_WISH="$GISBASE/bin/wish@TCLTKVER@"
-	export GRASS_WISH
-	# internal - force osxaqua off
-	unset osxaqua
-	# override TCL_LIBRARY to internal
-	TCL_LIBRARY="$GISBASE/lib/tcl@TCLTKVER@"
-	export TCL_LIBRARY
-	TK_LIBRARY="$GISBASE/lib/tk@TCLTKVER@"
-	export TK_LIBRARY
-@TCLTK_INTERNAL@fi
-
 # make sure there is a DISPLAY set
 if [ ! "$DISPLAY" ] ; then
 	DISPLAY=:0.0
 	export DISPLAY
 fi
 
+fi # X11
+
 ### end X11 block
 
 # if gisrc has text startup, switch back to Terminal (gotta duplicate some init.sh stuff)