aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-07-28 05:44:41 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-07-28 05:44:41 +0000
commit57260bba8692c3c0ff32380203b3f4c1ad95c8de (patch)
tree2adbd1c9854947b2ebf681fa7966c7ab3fe65b24
parent8e23ebf9a66d312e6c9d4479617f04edf86f3f45 (diff)
fixed up the tracking down of the Wish.app to support both Mac OS X/Intel and the auto-builds
svn path=/trunk/; revision=5420
-rw-r--r--packages/darwin_app/Makefile15
-rwxr-xr-xscripts/find-wish.app.sh24
2 files changed, 31 insertions, 8 deletions
diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile
index 3768c4a9..4cf1d7eb 100644
--- a/packages/darwin_app/Makefile
+++ b/packages/darwin_app/Makefile
@@ -17,14 +17,15 @@ BUILDLAYOUT_DIR = $(CWD)/..
# download TclTkAquaStandalone-8.?.*.dmg from http://tcltkaqua.sourceforge.net/
# and mount it. The files will be copied from the mounted .dmg image.
#WISH = /Applications/Utilities/Wish\ Shell.app
-TCLTK := $(shell /bin/ls -1r TclTkAquaStandalone-8.?.*.dmg|head -1|sed 's/\.dmg//')
-TCKTK_BUGFIX_VERSION := $(shell echo $(TCLTK) | \
+TCLTK := $(shell /bin/ls -1r TclTkAquaStandalone-8.?.*.dmg|head -n 1|sed 's/\.dmg//')
+TCLTK_BUGFIX_VERSION := $(shell echo $(TCLTK) | \
sed 's|TclTkAquaStandalone-[0-9]\.[0-9]\.\([0-9]*\)|\1|')
+WISH_SOURCE = $(shell $(scripts_src)/find-wish.app.sh)
# Wish Shell.app changed to Wish.app in TclTk 8.4.10
-WISH_NAME := $(shell ( test $(TCKTK_BUGFIX_VERSION) -ge 10 && echo Wish ) \
- || echo Wish Shell )
-WISH = "/Volumes/$(TCLTK)/$(WISH_NAME).app"
+WISH_NAME := $(shell ( test -d $(WISH_SOURCE)/Wish.app && echo Wish) \
+ || echo Wish Shell)
+WISH = "$(WISH_SOURCE)/$(WISH_NAME).app"
WISH_CONTENTS = "$(WISH)/Contents"
@@ -94,7 +95,6 @@ extended_app_install:
# check here for a reference on how to do this:
# http://cvs.sourceforge.net/viewcvs.py/tkcvs/tkcvs-proj/PackApp?rev=1.4
darwin_app_wrapper: Info.plist
- test -d /Volumes/$(TCLTK) || hdiutil mount $(TCLTK).dmg
# copy Wish Shell.app from default install location
# note: use the "standalone" Wish shell to make a "standalone" pd app
install -d "$(PD_APP_CONTENTS)/MacOS"
@@ -113,7 +113,6 @@ darwin_app_wrapper: Info.plist
install -m0644 -p *.icns "$(PD_APP_CONTENTS)/Resources"
mv "$(PD_APP_CONTENTS)/MacOS/${WISH_NAME}" \
"$(PD_APP_CONTENTS)/MacOS/${PD_APP_NAME}"
-# diskutil eject /Volumes/$(TCLTK)
#------------------------------------------------------------------------------#
@@ -241,7 +240,7 @@ test_locations:
@echo "PACKAGE_NAME: $(PACKAGE_NAME)"
@echo "PACKAGE_VERSION: $(PACKAGE_VERSION)"
@echo "WISH_NAME: $(WISH_NAME)"
- @echo "TCKTK_BUGFIX_VERSION: $(TCKTK_BUGFIX_VERSION)"
+ @echo "TCLTK_BUGFIX_VERSION: $(TCLTK_BUGFIX_VERSION)"
@echo "CWD $(CWD)"
@echo "DESTDIR $(DESTDIR)"
@echo "PREFIX $(prefix)"
diff --git a/scripts/find-wish.app.sh b/scripts/find-wish.app.sh
new file mode 100755
index 00000000..2e9e48f8
--- /dev/null
+++ b/scripts/find-wish.app.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+cvs_root_dir=`echo $0 | sed 's|\(.*\)/.*$|\1|'`/..
+cd $cvs_root_dir
+cvs_root_dir=`pwd`
+
+TCLTK=`/bin/ls -1r ${cvs_root_dir}/packages/darwin_app/TclTkAquaStandalone-8.?.*.dmg|head -n 1|sed 's|.*/\(.*\)\.dmg|\1|'`
+
+if [ "x${TCLTK}" != "x" ]; then
+ test -d /Volumes/${TCLTK} || \
+ hdiutil mount ${cvs_root_dir}/packages/darwin_app/${TCLTK}.dmg
+ echo "/Volumes/${TCLTK}"
+else
+ if [ -d "/Library/Frameworks/Tk.framework/Resources" ]; then
+ echo "/Library/Frameworks/Tk.framework/Resources"
+ else
+ if [ -d "/System/Library/Frameworks/Tk.framework/Resources" ]; then
+ echo "/System/Library/Frameworks/Tk.framework/Resources"
+ fi
+ fi
+fi
+
+exit
+