changeset 53:9c679ea4d8b6 v0.10-pre3

Fixed up version string inclusion
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Fri, 01 Jun 2007 03:50:00 -0400
parents b1856c4c46a3
children 51f62586e6bc
files atcgame/mainmenu.py scripts/gen-ver-string.sh
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/atcgame/mainmenu.py	Fri Jun 01 03:47:47 2007 -0400
+++ b/atcgame/mainmenu.py	Fri Jun 01 03:50:00 2007 -0400
@@ -23,12 +23,16 @@
 	import utils
 
 	import colors
-
-	import __version__
 except ImportError, err:
 	print "Couldn't load module %s" % (err)
 	sys.exit()
 
+
+try:
+	from __version__ import version
+except ImportError, err:
+	version = "?"
+
 size = width, height = 1024, 768
 
 def main(datadir_arg):
@@ -38,7 +42,7 @@
 	# Init
 	pygame.init()
 	screen = pygame.display.set_mode(size)
-	pygame.display.set_caption('Air Traffic Controller (' + __version__.version + ')')
+	pygame.display.set_caption('Air Traffic Controller (' + version + ')')
 	
 	# background music
 	try:
--- a/scripts/gen-ver-string.sh	Fri Jun 01 03:47:47 2007 -0400
+++ b/scripts/gen-ver-string.sh	Fri Jun 01 03:50:00 2007 -0400
@@ -18,6 +18,6 @@
 
 echo "	VERSION = $tagname"
 
-diff tmp.$$ atcgame/__version__.py > /dev/null
+diff tmp.$$ atcgame/__version__.py > /dev/null 2> /dev/null
 [ $? -ne 0 ] && mv tmp.$$ atcgame/__version__.py
 rm -f tmp.$$