[Scummvm-cvs-logs] scummvm master -> f8e93ea9f79d6d59fbcf97b219251e6c0fbeb9c7

wjp wjp at usecode.org
Tue Sep 11 21:14:59 CEST 2012


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8a796d0766 CONFIGURE: Move engine base support strings to configure.engines
1b20f731d1 CONFIGURE: Clean up subengine string generation
f8e93ea9f7 CONFIGURE: Clarify all-games status output checks


Commit: 8a796d07663ecc21b951a4de587883688ca8f93b
    https://github.com/scummvm/scummvm/commit/8a796d07663ecc21b951a4de587883688ca8f93b
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-09-11T12:11:25-07:00

Commit Message:
CONFIGURE: Move engine base support strings to configure.engines

Changed paths:
    configure
    engines/configure.engines



diff --git a/configure b/configure
index 4281cbc..ca906db 100755
--- a/configure
+++ b/configure
@@ -72,7 +72,8 @@ add_engine() {
 	set_var _engine_${1}_build "${3}"
 	set_var _engine_${1}_build_default "${3}"
 	set_var _engine_${1}_subengines "${4}"
-	set_var _engine_${1}_deps "${5}"
+	set_var _engine_${1}_base "${5}"
+	set_var _engine_${1}_deps "${6}"
 	for sub in ${4}; do
 		set_var _engine_${sub}_sub "yes"
 		set_var _engine_${sub}_parent "${1}"
@@ -510,6 +511,11 @@ get_engine_dependencies() {
 	get_var _engine_$1_deps
 }
 
+# Get the base engine game support description
+get_engine_base() {
+	get_var _engine_$1_base
+}
+
 # Ask if this is a subengine
 get_engine_sub() {
 	sub=`get_var _engine_$1_sub`
@@ -694,13 +700,7 @@ get_engine_build_string() {
 
 	# The engine should be shown, build the string
 	if test $show = yes ; then
-		build_string_func=get_${1}_build_string
-		if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then
-			engine_string=`$build_string_func $1 $engine_build $2`
-		else
-			engine_string=`get_subengines_build_string $1 $engine_build "" $2`
-		fi
-
+		engine_string=`get_subengines_build_string $1 $engine_build $2`
 		engine_string="`get_engine_name $1` $engine_string"
 	fi
 
@@ -710,11 +710,17 @@ get_engine_build_string() {
 # Get the string about building subengines
 get_subengines_build_string() {
 	parent_engine=$1
-	subengine_string=$3
-	parent_status=$4
+	parent_status=$3
 	parent_engine_build_default=`get_engine_build_default $parent_engine`
+	subengine_string=""
 	all=yes
 
+	# If the base engine isn't built at all, no need to list subengines
+	# in any of the possible categories.
+	if test `get_engine_build $parent_engine` = no; then
+		return
+	fi
+
 	# If the base engine is built by default, we can never return "[all games]"
 	# as work-in-progress.
 	if test "$parent_status" = wip ; then
@@ -723,6 +729,11 @@ get_subengines_build_string() {
 		fi
 	fi
 
+	# In the static/dynamic categories, also display the engine's base games.
+	if test -n "`get_engine_subengines $parent_engine`" -a $request_status != no -a $request_status != wip; then
+		subengine_string="[`get_engine_base $parent_engine`]"
+	fi
+
 	for subeng in `get_engine_subengines $parent_engine` ; do
 		subengine_build=`get_engine_build $subeng`
 		subengine_build_default=`get_engine_build_default $subeng`
@@ -749,72 +760,6 @@ get_subengines_build_string() {
 	echo "$subengine_string"
 }
 
-# Engine specific build strings
-# TODO: Clean this up (and specify these base strings in configure.engines?)
-get_scumm_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip ; then
-			base="[v0-v6 games]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-get_saga_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip; then
-			base="[ITE]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-get_agos_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip; then
-			base="[AGOS 1 games]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-get_groovie_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip; then
-			base="[7th Guest]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-get_kyra_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip; then
-			base="[Legend of Kyrandia 1-3]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-get_sci_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip; then
-			base="[SCI 0-1.1 games]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-get_mohawk_build_string() {
-	if test `get_engine_build $1` != no ; then
-		if test $2 != no -a "$3" != wip; then
-			base="[Living Books]"
-		fi
-		get_subengines_build_string $1 $2 "$base" $3
-	fi
-}
-
-
 #
 # Greet user
 #
diff --git a/engines/configure.engines b/engines/configure.engines
index f2feb55..404992b 100644
--- a/engines/configure.engines
+++ b/engines/configure.engines
@@ -1,9 +1,10 @@
 # This file is included from the main "configure" script
-add_engine scumm "SCUMM" yes "scumm_7_8 he"
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine scumm "SCUMM" yes "scumm_7_8 he" "v0-v6 games"
 add_engine scumm_7_8 "v7 & v8 games" yes
 add_engine he "HE71+ games" yes
 add_engine agi "AGI" yes
-add_engine agos "AGOS" yes "agos2"
+add_engine agos "AGOS" yes "agos2" "AGOS 1 games"
 add_engine agos2 "AGOS 2 games" yes
 add_engine cge "CGE" yes
 add_engine cine "Cinematique evo 1" yes
@@ -13,30 +14,30 @@ add_engine draci "Dragon History" yes
 add_engine drascula "Drascula: The Vampire Strikes Back" yes
 add_engine dreamweb "Dreamweb" yes
 add_engine gob "Gobli*ns" yes
-add_engine groovie "Groovie" yes "groovie2"
+add_engine groovie "Groovie" yes "groovie2" "7th Guest"
 add_engine groovie2 "Groovie 2 games" no
 add_engine hugo "Hugo Trilogy" yes
-add_engine kyra "Kyra" yes "lol eob"
+add_engine kyra "Kyra" yes "lol eob" "Legend of Kyrandia 1-3"
 add_engine lol "Lands of Lore" yes
 add_engine eob "Eye of the Beholder" no
 add_engine lastexpress "The Last Express" no
 add_engine lure "Lure of the Temptress" yes
 add_engine made "MADE" yes
-add_engine mohawk "Mohawk" yes "cstime myst riven"
+add_engine mohawk "Mohawk" yes "cstime myst riven" "Living Books"
 add_engine cstime "Where in Time is Carmen Sandiego?" no
 add_engine riven "Riven: The Sequel to Myst" no
 add_engine myst "Myst" no
 add_engine parallaction "Parallaction" yes
 add_engine queen "Flight of the Amazon Queen" yes
-add_engine saga "SAGA" yes "ihnm saga2"
+add_engine saga "SAGA" yes "ihnm saga2" "ITE"
 add_engine ihnm "IHNM" yes
 add_engine saga2 "SAGA 2 games" no
-add_engine sci "SCI" yes "sci32"
+add_engine sci "SCI" yes "sci32" "SCI 0-1.1 games"
 add_engine sci32 "SCI32 games" no
 add_engine sky "Beneath a Steel Sky" yes
 add_engine sword1 "Broken Sword" yes
 add_engine sword2 "Broken Sword II" yes
-add_engine sword25 "Broken Sword 2.5" no "" "png zlib"
+add_engine sword25 "Broken Sword 2.5" no "" "" "png zlib"
 add_engine teenagent "Teen Agent" yes
 add_engine testbed "TestBed: the Testing framework" no
 add_engine tinsel "Tinsel" yes
@@ -46,4 +47,4 @@ add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
 add_engine tony "Tony Tough and the Night of Roasted Moths" no
 add_engine tsage "TsAGE" yes
 add_engine tucker "Bud Tucker in Double Trouble" yes
-add_engine wintermute "Wintermute" no "" "png zlib vorbis"
+add_engine wintermute "Wintermute" no "" "" "png zlib vorbis"


Commit: 1b20f731d1c06a524742cdbdc82109f583b3d4f8
    https://github.com/scummvm/scummvm/commit/1b20f731d1c06a524742cdbdc82109f583b3d4f8
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-09-11T12:12:52-07:00

Commit Message:
CONFIGURE: Clean up subengine string generation

Changed paths:
    configure



diff --git a/configure b/configure
index ca906db..a92509c 100755
--- a/configure
+++ b/configure
@@ -660,27 +660,37 @@ prepare_engine_build_strings() {
 
 # Get the string about building an engine
 get_engine_build_string() {
+	engine=$1
+	request_status=$2
 	engine_string=""
 	engine_build=`get_engine_build $1`
-	engine_build_default=`get_engine_build_default $1`
+	engine_build_default=`get_engine_build_default $engine`
 	show=no
 
+	# Convert static/dynamic to yes to ease the check of subengines
+	if test $engine_build = no; then
+		subengine_filter=no
+	else
+		subengine_filter=yes
+	fi
+
 	# Check if the current engine should be shown for the current status
-	if test $engine_build = $2 ; then
+	if test $engine_build = $request_status ; then
 		show=yes
 	else
 		# Test for disabled sub-engines
-		if test $2 = no ; then
-			for subeng in `get_engine_subengines $1` ; do
+		if test $request_status = no ; then
+			for subeng in `get_engine_subengines $engine` ; do
 				if test `get_engine_build $subeng` = no ; then
-					engine_build=no
+					# In this case we to display _disabled_ subengines
+					subengine_filter=no
 					show=yes
 				fi
 			done
 		fi
 		# Test for enabled wip sub-engines
-		if test $2 = wip ; then
-			for subeng in `get_engine_subengines $1` ; do
+		if test $request_status = wip ; then
+			for subeng in `get_engine_subengines $engine` ; do
 				if test `get_engine_build $subeng` != no -a `get_engine_build_default $subeng` = no ; then
 					show=yes
 				fi
@@ -688,20 +698,16 @@ get_engine_build_string() {
 		fi
 	fi
 
-	# Convert static/dynamic to yes to ease the check of subengines
-	if test $engine_build != no ; then
-		engine_build=yes
-	fi
 
 	# Check if it is a wip engine
-	if test "$2" = "wip" -a "$engine_build" != "no" -a  "$engine_build_default" = no; then
+	if test "$request_status" = "wip" -a "$engine_build" != "no" -a  "$engine_build_default" = no; then
 		show=yes
 	fi
 
 	# The engine should be shown, build the string
 	if test $show = yes ; then
-		engine_string=`get_subengines_build_string $1 $engine_build $2`
-		engine_string="`get_engine_name $1` $engine_string"
+		engine_string=`get_subengines_build_string $engine $subengine_filter $request_status`
+		engine_string="`get_engine_name $engine` $engine_string"
 	fi
 
 	echo "$engine_string"
@@ -710,7 +716,8 @@ get_engine_build_string() {
 # Get the string about building subengines
 get_subengines_build_string() {
 	parent_engine=$1
-	parent_status=$3
+	subengine_filter=$2
+	request_status=$3
 	parent_engine_build_default=`get_engine_build_default $parent_engine`
 	subengine_string=""
 	all=yes
@@ -723,7 +730,7 @@ get_subengines_build_string() {
 
 	# If the base engine is built by default, we can never return "[all games]"
 	# as work-in-progress.
-	if test "$parent_status" = wip ; then
+	if test "$request_status" = wip ; then
 		if test $parent_engine_build_default = yes ; then
 			all=no
 		fi
@@ -737,7 +744,10 @@ get_subengines_build_string() {
 	for subeng in `get_engine_subengines $parent_engine` ; do
 		subengine_build=`get_engine_build $subeng`
 		subengine_build_default=`get_engine_build_default $subeng`
-		if test \( $subengine_build = $2 -a "$parent_status" != wip \) -o \( "$parent_status" = wip -a $subengine_build != no -a "$subengine_build_default" = no \) ; then
+
+		# Display this subengine if it matches the filter, unless it is
+		# a stable subengine in the WIP request.
+		if test $subengine_build = $subengine_filter -a \! \( "$request_status" = wip -a "$subengine_build_default" = yes \) ; then
 			s="[`get_engine_name $subeng`]"
 			if test -n "$subengine_string"; then
 				subengine_string="$subengine_string $s"
@@ -749,7 +759,7 @@ get_subengines_build_string() {
 		fi
 	done
 
-	if test $2 != no ; then
+	if test $subengine_filter != no ; then
 		if test -n "$subengine_string" ; then
 			if test $all = yes ; then
 				subengine_string="[all games]"


Commit: f8e93ea9f79d6d59fbcf97b219251e6c0fbeb9c7
    https://github.com/scummvm/scummvm/commit/f8e93ea9f79d6d59fbcf97b219251e6c0fbeb9c7
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-09-11T12:12:52-07:00

Commit Message:
CONFIGURE: Clarify all-games status output checks

Changed paths:
    configure



diff --git a/configure b/configure
index a92509c..0085939 100755
--- a/configure
+++ b/configure
@@ -720,7 +720,6 @@ get_subengines_build_string() {
 	request_status=$3
 	parent_engine_build_default=`get_engine_build_default $parent_engine`
 	subengine_string=""
-	all=yes
 
 	# If the base engine isn't built at all, no need to list subengines
 	# in any of the possible categories.
@@ -728,13 +727,23 @@ get_subengines_build_string() {
 		return
 	fi
 
-	# If the base engine is built by default, we can never return "[all games]"
-	# as work-in-progress.
-	if test "$request_status" = wip ; then
-		if test $parent_engine_build_default = yes ; then
+	all=yes
+	# If there are no subengines, never display "[all games]" (for brevity).
+	if test -z "`get_engine_subengines $parent_engine`"; then
+		all=no
+	fi
+	# If the base engine does not fit the category we're displaying here
+	# (WIP or Skipped), we should never show "[all games]"
+	if test "$request_status" = wip; then
+		if test $parent_engine_build_default = yes; then
 			all=no
 		fi
 	fi
+	if test "$request_status" = no; then
+		# If we're here, the parent engine is built, so no need to check that.
+		all=no
+	fi
+
 
 	# In the static/dynamic categories, also display the engine's base games.
 	if test -n "`get_engine_subengines $parent_engine`" -a $request_status != no -a $request_status != wip; then
@@ -759,12 +768,9 @@ get_subengines_build_string() {
 		fi
 	done
 
-	if test $subengine_filter != no ; then
-		if test -n "$subengine_string" ; then
-			if test $all = yes ; then
-				subengine_string="[all games]"
-			fi
-		fi
+	# Summarize the full list, where applicable
+	if test $all = yes ; then
+		subengine_string="[all games]"
 	fi
 
 	echo "$subengine_string"






More information about the Scummvm-git-logs mailing list