[Vm-dev] [commit][2994] Phhh... remember to include the Spur moniker in the -version output on linux

commits at squeakvm.org commits at squeakvm.org
Thu Jun 12 04:09:49 UTC 2014


Revision: 2994
Author:   eliot
Date:     2014-06-11 21:09:48 -0700 (Wed, 11 Jun 2014)
Log Message:
-----------
Phhh... remember to include the Spur moniker in the -version output on linux
(damn).

Add scripts to download the r2897 Cog & Spur VMs.
Make envvars.sh compute the OS OSREL and CPU.

Modified Paths:
--------------
    branches/Cog/image/buildsqueak45vmmakerimage.sh
    branches/Cog/image/envvars.sh
    branches/Cog/platforms/unix/vm/sqUnixMain.c

Added Paths:
-----------
    branches/Cog/image/get2897spurvm.sh
    branches/Cog/image/get2897vm.sh

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/image/buildsqueak45vmmakerimage.sh
===================================================================
--- branches/Cog/image/buildsqueak45vmmakerimage.sh	2014-06-12 00:39:24 UTC (rev 2993)
+++ branches/Cog/image/buildsqueak45vmmakerimage.sh	2014-06-12 04:09:48 UTC (rev 2994)
@@ -5,9 +5,6 @@
 cp -p $SQUEAK45.image CogVMMaker.image
 cp -p $SQUEAK45.changes CogVMMaker.changes
 
-OS=`uname -s`
-CPU=`uname -m`
-
 case $OS in
 Darwin)		VM="$SQUEAK45APP/Contents/MacOS/Squeak";;
 CYGWIN*)	VM="$SQUEAK45APP/SqueakConsole.exe";;

Modified: branches/Cog/image/envvars.sh
===================================================================
--- branches/Cog/image/envvars.sh	2014-06-12 00:39:24 UTC (rev 2993)
+++ branches/Cog/image/envvars.sh	2014-06-12 04:09:48 UTC (rev 2994)
@@ -2,3 +2,19 @@
 SQUEAK45APP=Squeak-4.5-All-in-One.app
 SQUEAK45RESOURCES=$SQUEAK45APP/Contents/Resources
 SQUEAK45=$SQUEAK45RESOURCES/Squeak4.5-13680
+
+# N.B. uname -r (OSREL) is not to be trusted on Mac OS X;
+# my 10.6.8 system reports its version as 10.8.0.  eem, june '14
+
+if test -x /usr/bin/uname; then
+	OS=`/usr/bin/uname -s`
+	OSREL=`/usr/bin/uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'`
+elif test -x /bin/uname; then
+	OS=`/bin/uname -s`
+	CPU=`/bin/uname -m`
+	OSREL=`/bin/uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'`
+else
+	OS=`uname -s`
+	CPU=`uname -m`
+	OSREL=`uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'`
+fi

Added: branches/Cog/image/get2897spurvm.sh
===================================================================
--- branches/Cog/image/get2897spurvm.sh	                        (rev 0)
+++ branches/Cog/image/get2897spurvm.sh	2014-06-12 04:09:48 UTC (rev 2994)
@@ -0,0 +1,84 @@
+#!/bin/sh
+# Sets the VM env var to the r2987 Cog Spur VM for the current platform.
+# will download and install the VM in this directory if necessary.
+#set -v
+. ./envvars.sh
+
+if wget --help >/dev/null ; then
+	true
+else
+	echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
+	 exit 1
+fi
+
+URL=http://www.mirandabanda.org/files/Cog/VM/VM.r2987/
+
+case "$OS" in
+Darwin)
+	VM=CogSpur.app/Contents/MacOS/Squeak
+	VMHASH=8d2bbd946a70e3992cca0fbc125d2f19
+	if [ ! -d CogSpur.app -o "`/sbin/md5 -q $VM`" != $VMHASH ]; then
+		VMARC=CogSpur.app-14.23.2987.tgz
+		ARCHASH=16fef44f099f1f89e6fcd1d53ea58b02
+		if [ ! -f "$VMARC" -o "`/sbin/md5 -q "$VMARC"`" != $ARCHASH ]; then
+			wget -c "$URL/$VMARC"
+			if [ ! -f "$VMARC" -o "`/sbin/md5 -q "$VMARC"`" != $ARCHASH ]; then
+				echo failed to get $VMARC \; file corrupted\? 1>&2
+				exit 2
+			fi
+		fi
+		tar xzf "$VMARC"
+		if [ ! -d CogSpur.app -o "`/sbin/md5 -q $VM`" != $VMHASH ]; then
+			echo failed to correctly extract CogSpur.app from $VMARC 1>&2
+			exit 3
+		fi
+	fi;;
+Linux)
+	VM=cogspurlinuxht/lib/squeak/4.0-2987/squeak
+	VMHASH=c2787117cf634c4561c7f7a22d748221
+	VMARC=cogspurlinuxht-14.23.2987.tgz
+	ARCHASH=40b943c9ab0dcc472b952167579b994f
+	if [ ! -d "`dirname $VM`" -o \
+		"`/usr/bin/md5sum "$VM" | sed 's/ .*$//'`" != $VMHASH ]; then
+		if [ ! -f "$VMARC" \
+			-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+			wget -c "$URL/$VMARC"
+			if [ ! -f "$VMARC" \
+				-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+				echo failed to get $VMARC \; file corrupted\? 1>&2
+				exit 2
+			fi
+		fi
+		tar xzf "$VMARC"
+		if [ ! -d "`dirname $VM`" \
+			-o "`/usr/bin/md5sum $VM | sed 's/ .*$//'`" != $VMHASH ]; then
+			echo failed to correctly extract "`dirname $VM`" from $VMARC 1>&2
+			exit 3
+		fi
+	fi
+	VM="cogspurlinuxht/squeak";;
+CYGWIN*)
+	VM=cogwin/SqueakConsole.exe
+	VMHASH=a68a3eab7db6713bed9f1560759f73ae
+	VMARC=cogwin-14.23.2987.tgz
+	ARCHASH=acd8291859bfe10a52d6ecb28271a673
+	if [ ! -d "`dirname $VM`" \
+			-o "`/usr/bin/md5sum "$VM" | sed 's/ .*$//'`" != $VMHASH ]; then
+		if [ ! -f "$VMARC" \
+			-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+			wget -c "$URL/$VMARC"
+			if [ ! -f "$VMARC" \
+				-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+				echo failed to get $VMARC \; file corrupted\? 1>&2
+				exit 2
+			fi
+		fi
+		unzip -q "$VMARC"
+		if [ ! -d "`dirname $VM`" \
+			-o "`/usr/bin/md5sum $VM | sed 's/ .*$//'`" != $VMHASH ]; then
+			echo failed to correctly extract "`dirname $VM`" from $VMARC 1>&2
+			exit 3
+		fi
+	fi;;
+*)	echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
+esac


Property changes on: branches/Cog/image/get2897spurvm.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/image/get2897vm.sh
===================================================================
--- branches/Cog/image/get2897vm.sh	                        (rev 0)
+++ branches/Cog/image/get2897vm.sh	2014-06-12 04:09:48 UTC (rev 2994)
@@ -0,0 +1,95 @@
+#!/bin/sh
+# Sets the VM env var to the r2987 Cog VM for the current platform.
+# will download and install the VM in this directory if necessary.
+#set -v
+. ./envvars.sh
+
+if wget --help >/dev/null ; then
+	true
+else
+	echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
+	 exit 1
+fi
+
+URL=http://www.mirandabanda.org/files/Cog/VM/VM.r2987/
+
+case "$OS" in
+Darwin)
+	VM=Cog.app/Contents/MacOS/Squeak
+	VMHASH=ec2962db9518aaea4fee1bc92007e635
+	if [ ! -d Cog.app -o "`/sbin/md5 -q $VM`" != $VMHASH ]; then
+		VMARC=Cog.app-14.23.2987.tgz
+		ARCHASH=0f84cf23e98ea03ee7e87ccc8ba756ec
+		if [ ! -f "$VMARC" -o "`/sbin/md5 -q "$VMARC"`" != $ARCHASH ]; then
+			wget -c "$URL/$VMARC"
+			if [ ! -f "$VMARC" -o "`/sbin/md5 -q "$VMARC"`" != $ARCHASH ]; then
+				echo failed to get $VMARC \; file corrupted\? 1>&2
+				exit 2
+			fi
+		fi
+		tar xzf "$VMARC"
+		if [ ! -d Cog.app -o "`/sbin/md5 -q $VM`" != $VMHASH ]; then
+			echo failed to correctly extract Cog.app from $VMARC 1>&2
+			exit 3
+		fi
+	fi;;
+Linux)
+	if expr $OSREL \> 2.6.12; then
+		VM=coglinuxht/lib/squeak/4.0-2987/squeak
+		VMHASH=6dc8912ed01875df67331d6cf592ac4b
+		VMARC=coglinuxht-14.23.2987.tgz
+		ARCHASH=e580c191aecce7c56fbe1900a5df2984
+	else
+		VM=coglinux/lib/squeak/4.0-2987/squeak
+		VMHASH=8afd4020caca229b8bba4bd6a79d6d83
+		VMARC=coglinux-14.23.2987.tgz
+		ARCHASH=19d9c28860758db4e2f25642837de3c3
+	fi
+	if [ ! -d "`dirname $VM`" -o \
+		"`/usr/bin/md5sum "$VM" | sed 's/ .*$//'`" != $VMHASH ]; then
+		if [ ! -f "$VMARC" \
+			-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+			wget -c "$URL/$VMARC"
+			if [ ! -f "$VMARC" \
+				-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+				echo failed to get $VMARC \; file corrupted\? 1>&2
+				exit 2
+			fi
+		fi
+		tar xzf "$VMARC"
+		if [ ! -d "`dirname $VM`" \
+			-o "`/usr/bin/md5sum $VM | sed 's/ .*$//'`" != $VMHASH ]; then
+			echo failed to correctly extract "`dirname $VM`" from $VMARC 1>&2
+			exit 3
+		fi
+	fi
+	if expr $OSREL \> 2.6.12; then
+		VM="coglinuxht/squeak"
+	else
+		VM="coglinux/squeak"
+	fi;;
+CYGWIN*)
+	VM=cogwin/SqueakConsole.exe
+	VMHASH=a68a3eab7db6713bed9f1560759f73ae
+	VMARC=cogwin-14.23.2987.tgz
+	ARCHASH=acd8291859bfe10a52d6ecb28271a673
+	if [ ! -d "`dirname $VM`" \
+			-o "`/usr/bin/md5sum "$VM" | sed 's/ .*$//'`" != $VMHASH ]; then
+		if [ ! -f "$VMARC" \
+			-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+			wget -c "$URL/$VMARC"
+			if [ ! -f "$VMARC" \
+				-o "`/usr/bin/md5sum "$VMARC" | sed 's/ .*$//'`" != $ARCHASH ]; then
+				echo failed to get $VMARC \; file corrupted\? 1>&2
+				exit 2
+			fi
+		fi
+		unzip -q "$VMARC"
+		if [ ! -d "`dirname $VM`" \
+			-o "`/usr/bin/md5sum $VM | sed 's/ .*$//'`" != $VMHASH ]; then
+			echo failed to correctly extract "`dirname $VM`" from $VMARC 1>&2
+			exit 3
+		fi
+	fi;;
+*)	echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
+esac


Property changes on: branches/Cog/image/get2897vm.sh
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Wed Jun 11 14:25:26 PDT 2014
   + Wed Jun 11 21:08:19 PDT 2014

Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixMain.c	2014-06-12 00:39:24 UTC (rev 2993)
+++ branches/Cog/platforms/unix/vm/sqUnixMain.c	2014-06-12 04:09:48 UTC (rev 2994)
@@ -1595,12 +1595,17 @@
   char *info= (char *)malloc(4096);
   info[0]= '\0';
 
+#if SPURVM
+# define ObjectMemory " Spur"
+#else
+# define ObjectMemory
+#endif
 #if defined(NDEBUG)
-# define BuildVariant "Production"
+# define BuildVariant "Production" ObjectMemory
 #elif DEBUGVM
-# define BuildVariant "Debug"
+# define BuildVariant "Debug" ObjectMemory
 # else
-# define BuildVariant "Assert"
+# define BuildVariant "Assert" ObjectMemory
 #endif
 
 #if ITIMER_HEARTBEAT



More information about the Vm-dev mailing list