[commit] r2504 - Move editing of version number into Info.plist into various makevm scripts.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2504 - Move editing of version number into Info.plist into various makevm scripts.

commits-3
 
Author: eliot
Date: 2011-10-28 15:38:32 -0700 (Fri, 28 Oct 2011)
New Revision: 2504

Added:
   branches/Cog/scripts/versionInfoPlist
Modified:
   branches/Cog/macbuild/makevm
   branches/Cog/nsbuild/macbuild/CoreVM.plist
   branches/Cog/nsbuild/macbuild/makevm
   branches/Cog/nscogbuild/macbuild/CoreVM.plist
   branches/Cog/nscogbuild/macbuild/makevm
   branches/Cog/scripts/mkvmarchives
Log:
Move editing of version number into Info.plist into various makevm scripts.
xcode strips out comments when building the foo.app/Contents/Info.plist and so
there are no <!--version--> markers left to notice later on in the build chain.


Modified: branches/Cog/macbuild/makevm
===================================================================
--- branches/Cog/macbuild/makevm 2011-10-25 18:52:29 UTC (rev 2503)
+++ branches/Cog/macbuild/makevm 2011-10-28 22:38:32 UTC (rev 2504)
@@ -65,6 +65,7 @@
 else
  mv build/$BUILD_CONFIGURATION/Croquet.app "$DEST"
 fi
+../scripts/versionInfoPlist ../platforms CoreVM.plist "$DEST/Contents/Info.plist"
 
 # Build the Float plugin
 echo

Modified: branches/Cog/nsbuild/macbuild/CoreVM.plist
===================================================================
--- branches/Cog/nsbuild/macbuild/CoreVM.plist 2011-10-25 18:52:29 UTC (rev 2503)
+++ branches/Cog/nsbuild/macbuild/CoreVM.plist 2011-10-28 22:38:32 UTC (rev 2504)
@@ -76,11 +76,11 @@
  <key>CFBundleExecutable</key>
  <string>Newspeak Virtual Machine</string>
  <key>CFBundleGetInfoString</key>
- <string>Newspeak Virtual Machine 4.0.0 http://newspeaklanguage.org</string>
+ <string>Newspeak Virtual Machine 4.0.0 http://newspeaklanguage.org</string><!--version-->
  <key>CFBundleShortVersionString</key>
- <string>Newspeak Virtual Machine 4.0.0</string>
+ <string>Newspeak Virtual Machine 4.0.0</string><!--version-->
  <key>CFBundleVersion</key>
- <string>4.0.0</string>
+ <string>4.0.0</string><!--version-->
  <key>CFBundleIconFile</key>
  <string>Newspeak Virtual Machine.icns</string>
  <key>CFBundleIdentifier</key>

Modified: branches/Cog/nsbuild/macbuild/makevm
===================================================================
--- branches/Cog/nsbuild/macbuild/makevm 2011-10-25 18:52:29 UTC (rev 2503)
+++ branches/Cog/nsbuild/macbuild/makevm 2011-10-28 22:38:32 UTC (rev 2504)
@@ -58,6 +58,8 @@
  mv build/$BUILD_CONFIGURATION/Newspeak\ Virtual\ Machine.app "$DEST"
 fi
 
+../../scripts/versionInfoPlist ../../platforms CoreVM.plist "$DEST/Contents/Info.plist"
+
 if false; then
 # Build the BochsIA32Plugin
 # N.B. To build the plugin you also have to build the Bochs libraries in

Modified: branches/Cog/nscogbuild/macbuild/CoreVM.plist
===================================================================
--- branches/Cog/nscogbuild/macbuild/CoreVM.plist 2011-10-25 18:52:29 UTC (rev 2503)
+++ branches/Cog/nscogbuild/macbuild/CoreVM.plist 2011-10-28 22:38:32 UTC (rev 2504)
@@ -122,11 +122,11 @@
  <key>CFBundleExecutable</key>
  <string>Newspeak Virtual Machine</string>
  <key>CFBundleGetInfoString</key>
- <string>Newspeak Virtual Machine 4.0.0 http://newspeaklanguage.org</string>
+ <string>Newspeak Virtual Machine 4.0.0 http://newspeaklanguage.org</string><!--version-->
  <key>CFBundleShortVersionString</key>
- <string>Newspeak Virtual Machine 4.0.0</string>
+ <string>Newspeak Virtual Machine 4.0.0</string><!--version-->
  <key>CFBundleVersion</key>
- <string>4.0.0</string>
+ <string>4.0.0</string><!--version-->
  <key>CFBundleIconFile</key>
  <string>Newspeak Virtual Machine.icns</string>
  <key>CFBundleIdentifier</key>

Modified: branches/Cog/nscogbuild/macbuild/makevm
===================================================================
--- branches/Cog/nscogbuild/macbuild/makevm 2011-10-25 18:52:29 UTC (rev 2503)
+++ branches/Cog/nscogbuild/macbuild/makevm 2011-10-28 22:38:32 UTC (rev 2504)
@@ -57,6 +57,7 @@
 else
  mv build/$BUILD_CONFIGURATION/Newspeak\ Virtual\ Machine.app "$DEST"
 fi
+../../scripts/versionInfoPlist ../../platforms CoreVM.plist "$DEST/Contents/Info.plist"
 
 if false; then
 # Build the BochsIA32Plugin

Modified: branches/Cog/scripts/mkvmarchives
===================================================================
--- branches/Cog/scripts/mkvmarchives 2011-10-25 18:52:29 UTC (rev 2503)
+++ branches/Cog/scripts/mkvmarchives 2011-10-28 22:38:32 UTC (rev 2504)
@@ -45,8 +45,6 @@
  done
 fi
 EXES=
-REV=`grep 'SvnRawRevisionString.*Rev:' platforms/Cross/vm/sqSCCSVersion.h \
- | sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/'`
 if [ -n "$CL" ]; then
  rm -rf coglinux.tgz
  COPYFILE_DISABLE=1 tar czf coglinux.tgz coglinux
@@ -61,7 +59,6 @@
  test -d Cog.app || mkdir Cog.app
  rm -rf Cog.app/* Cog.app.tgz
  (cd macbuild/Fast.app>/dev/null;tar cf - *)|(cd Cog.app;tar xvf -)
- ex "+g/<.--version-->/s/0\([< ]\)/$REV\1/" +w +q Cog.app/Contents/Info.plist
  tar czf Cog.app.tgz Cog.app
  EXES="$EXES Cog.app/Contents/MacOS/Croquet"
 fi
@@ -69,7 +66,6 @@
  test -d CogMT.app || mkdir CogMT.app
  rm -rf CogMT.app/* CogMT.app.tgz
  (cd macbuild/FastMT.app>/dev/null;tar cf - *)|(cd CogMT.app;tar xvf -)
- ex "+g/<.--version-->/s/0\([< ]\)/$REV\1/" +w +q CogMT.app/Contents/Info.plist
  tar czf CogMT.app.tgz CogMT.app
  EXES="$EXES CogMT.app/Contents/MacOS/Croquet"
 fi
@@ -111,7 +107,6 @@
  test -d Newspeak\ Virtual\ Machine.app || mkdir Newspeak\ Virtual\ Machine.app
  rm -rf Newspeak\ Virtual\ Machine.app/* Newspeak\ Virtual\ Machine.app.tgz
  (cd $NSB/macbuild/Fast.app>/dev/null;tar cf - *)|(cd Newspeak\ Virtual\ Machine.app;tar xvf -)
- ex "+g/<.--version-->/s/0\([< ]\)/$REV\1/" +w +q Newspeak\ Virtual\ Machine.app/Contents/Info.plist
  tar czf Newspeak\ Virtual\ Machine.app.tgz Newspeak\ Virtual\ Machine.app
  EXES="$EXES Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine"
 fi

Added: branches/Cog/scripts/versionInfoPlist
===================================================================
--- branches/Cog/scripts/versionInfoPlist                        (rev 0)
+++ branches/Cog/scripts/versionInfoPlist 2011-10-28 22:38:32 UTC (rev 2504)
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Script to edit an Info.plist based on a reference CoreVM.plist where lines
+# marked with <!--version--> contain unedited version numbers.  Necessary
+# because xcode strips out comments when building an Info.plist.
+# e.g. ../scripts/versionInfoPlist ../platforms CoreVM.plist Fast.app/Contents/Info.plist
+#
+IFS="
+"
+if [ $# != 3 ]; then
+ echo usage: $0 platformDir referencePlist toBeEditedPlist 1>&2
+ exit 1
+fi
+REV=`grep 'SvnRawRevisionString.*Rev:' "$1/Cross/vm/sqSCCSVersion.h" \
+ | sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/'`
+for p in `grep -e --version-- "$2" \
+ | sed 's/^[ ]*\(.*\)<!--version-->/\1/' \
+ | sed 's./.\\\\/.g'` # double up for ex command below
+do
+ ex "+g/$p/s/0\([< ]\)/$REV\1/" +w +q "$3"
+done


Property changes on: branches/Cog/scripts/versionInfoPlist
___________________________________________________________________
Added: svn:executable
   + *