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

dhewg dhewg at wiibrew.org
Sat Apr 9 18:44:24 CEST 2011


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

Summary:
e2a0c09692 CONFIGURE: Use FORCE_RTL for the Wii backend
44ab256101 CONFIGURE: Use FORCE_RTL for the Android backend
90f47c7b1d ANDOID: Replace mkmanifest.pl with sh/sed code
b0351e1b85 ANDROID: Automate the Manifest's versionCode


Commit: e2a0c096924df7ba2ba0c0d8888341563e6e3995
    https://github.com/scummvm/scummvm/commit/e2a0c096924df7ba2ba0c0d8888341563e6e3995
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-09T03:48:41-07:00

Commit Message:
CONFIGURE: Use FORCE_RTL for the Wii backend

Changed paths:
    configure



diff --git a/configure b/configure
index 75a64e0..035d6c3 100755
--- a/configure
+++ b/configure
@@ -3092,7 +3092,7 @@ case $_backend in
 		DEFINES="$DEFINES -DSDL_BACKEND"
 		;;
 	wii)
-		DEFINES="$DEFINES -D__WII__ -DGEKKO"
+		DEFINES="$DEFINES -D__WII__ -DGEKKO -DFORCE_RTL"
 		case $_host_os in
 		gamecube)
 			LIBS="$LIBS -lgxflux -liso9660 -lfat -logc -ldb"


Commit: 44ab256101c8beec0860538127c2c7d602366c71
    https://github.com/scummvm/scummvm/commit/44ab256101c8beec0860538127c2c7d602366c71
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-09T03:49:41-07:00

Commit Message:
CONFIGURE: Use FORCE_RTL for the Android backend

Changed paths:
    configure



diff --git a/configure b/configure
index 035d6c3..f74ee96 100755
--- a/configure
+++ b/configure
@@ -3002,7 +3002,7 @@ case $_backend in
 		# than pick up anything unhygenic from the Android libs.
 		LIBS="-Wl,-Bstatic $static_libs"
 		LIBS="$LIBS -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM"
-		DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
+		DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DFORCE_RTL"
 		;;
 	dc)
 		INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include'


Commit: 90f47c7b1d9725c13d972a0e2a61b2cd966bbab5
    https://github.com/scummvm/scummvm/commit/90f47c7b1d9725c13d972a0e2a61b2cd966bbab5
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-09T09:39:35-07:00

Commit Message:
ANDOID: Replace mkmanifest.pl with sh/sed code

Removes build dependencies like perl and its XML modules

Changed paths:
  A dists/android/mkplugin.sh
  A dists/android/plugin-manifest.xml
  A dists/android/plugin-manifest.xml.in
  A dists/android/plugin-strings.xml
  R dists/android/mkmanifest.pl
    backends/platform/android/android.mk
    tools/update-version.pl



diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index 01ebf73..fdb0f80 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -110,14 +110,13 @@ $(FILE_DEX_PLUGIN): $(CLASSES_PLUGIN)
 	@$(MKDIR) -p $(@D)
 	$(DX) --dex --output=$@ $(PATH_BUILD_CLASSES_PLUGIN_TOP)
 
-$(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml: $(PATH_DIST)/mkmanifest.pl $(srcdir)/configure $(PATH_DIST)/AndroidManifest.xml
-	$(PATH_DIST)/mkmanifest.pl --id=$* --configure=$(srcdir)/configure \
-		--version-name=$(VERSION) \
-		--version-code=$(ANDROID_PLUGIN_VERSIONCODE) \
-		--stringres=$(PATH_STAGE_PREFIX).$*/res/values/strings.xml \
-		--manifest=$(PATH_BUILD)/$*/AndroidManifest.xml \
-		--master-manifest=$(PATH_DIST)/AndroidManifest.xml \
-		--unpacklib=mylib/armeabi/lib$*.so
+$(PATH_BUILD)/%/AndroidManifest.xml: $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $(PATH_DIST)/plugin-manifest.xml
+	@$(MKDIR) -p $(@D)
+	$(PATH_DIST)/mkplugin.sh $(srcdir)/configure $* $(PATH_DIST)/plugin-manifest.xml $(ANDROID_PLUGIN_VERSIONCODE) $@
+
+$(PATH_STAGE_PREFIX).%/res/values/strings.xml: $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $(PATH_DIST)/plugin-manifest.xml
+	@$(MKDIR) -p $(@D)
+	$(PATH_DIST)/mkplugin.sh $(srcdir)/configure $* $(PATH_DIST)/plugin-strings.xml $(ANDROID_PLUGIN_VERSIONCODE) $@
 
 $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scummvm.png
 	@$(MKDIR) -p $(@D)
diff --git a/dists/android/mkmanifest.pl b/dists/android/mkmanifest.pl
deleted file mode 100755
index 62caa64..0000000
--- a/dists/android/mkmanifest.pl
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/perl
-
-use File::Basename qw(dirname);
-use File::Path qw(mkpath);
-use IO::File;
-use XML::Writer;
-use XML::Parser;
-use Getopt::Long;
-
-use warnings;
-use strict;
-
-use constant ANDROID => 'http://schemas.android.com/apk/res/android';
-
-my $id;
-my $package_versionName;
-my $package_versionCode;
-my $configure = 'configure';
-my $stringres = 'res/string/values.xml';
-my $manifest = 'AndroidManifest.xml';
-my $master_manifest;
-my @unpack_libs;
-GetOptions('id=s' => \$id,
-	   'version-name=s' => \$package_versionName,
-	   'version-code=i' => \$package_versionCode,
-	   'configure=s' => \$configure,
-	   'stringres=s' => \$stringres,
-	   'manifest=s' => \$manifest,
-	   'master-manifest=s' => \$master_manifest,
-	   'unpacklib=s' => \@unpack_libs,
-    ) or die;
-die "Missing required arg"
-    unless $id and $package_versionName and $package_versionCode;
-
-
-sub grope_engine_info {
-    my $configure = shift;
-    my @ret;
-    while (<$configure>) {
-	m/^add_engine \s+ (\w+) \s+ "(.*?)" \s+ \w+ (?:\s+ "([\w\s]*)")?/x
-	    or next;
-	my $subengines = $3 || '';
-	my %info = (id => $1, name => $2,
-		    subengines => [split / /, $subengines]);
-	push @ret, \%info;
-    }
-    return @ret;
-}
-
-sub read_constraints {
-    my $manifest = shift;
-    my @constraints;
-    my $parser = new XML::Parser Handlers => {
-	Start => sub {
-	    my $expat = shift;
-	    my $elem = shift;
-	    return if $elem !~
-		/^(uses-configuration|supports-screens|uses-sdk)$/;
-	    my @constraint = ($elem);
-	    while (@_) {
-		my $attr = shift;
-		my $value = shift;
-		$attr = [ANDROID, $attr] if $attr =~ s/^android://;
-		push @constraint, $attr, $value;
-	    }
-	    push @constraints, \@constraint;
-	},
-    };
-    $parser->parse($manifest);
-    return @constraints;
-}
-
-sub print_stringres {
-    my $output = shift;
-    my $info = shift;
-
-    my $writer = new XML::Writer(OUTPUT => $output, ENCODING => 'utf-8',
-				 DATA_MODE => 1, DATA_INDENT => 2);
-
-    $writer->xmlDecl();
-    $writer->startTag('resources');
-
-    while (my ($k,$v) = each %$info) {
-	$writer->dataElement('string', $v, name => $k);
-    }
-
-    $writer->endTag('resources');
-    $writer->end();
-}
-
-sub print_manifest {
-    my $output = shift;
-    my $info = shift;
-    my $constraints = shift;
-
-    my $writer = new XML::Writer(OUTPUT => $output, ENCODING => 'utf-8',
-				 DATA_MODE => 1, DATA_INDENT => 2,
-				 NAMESPACES => 1,
-				 PREFIX_MAP => {ANDROID, 'android'});
-
-    $writer->xmlDecl();
-
-    $writer->startTag(
-	'manifest',
-	'package' => "org.inodes.gus.scummvm.plugin.$info->{name}",
-	[ANDROID, 'versionCode'] => $package_versionCode,
-	[ANDROID, 'versionName'] => $package_versionName,
-	[ANDROID, 'installLocation'] => 'preferExternal',
-	);
-
-    $writer->startTag(
-	'application',
-	[ANDROID, 'label'] => '@string/app_name',
-	[ANDROID, 'description'] => '@string/app_desc',
-	[ANDROID, 'icon'] => '@drawable/scummvm',
-	);
-
-    $writer->startTag(
-	'receiver',
-	[ANDROID, 'name'] => 'org.inodes.gus.scummvm.PluginProvider',
-	[ANDROID, 'process'] => 'org.inodes.gus.scummvm');
-
-    $writer->startTag('intent-filter');
-    $writer->emptyTag('action', [ANDROID, 'name'] =>
-		      'org.inodes.gus.scummvm.action.PLUGIN_QUERY');
-    $writer->emptyTag('category', [ANDROID, 'name'] =>
-		      'android.intent.category.INFO');
-    $writer->endTag('intent-filter');
-    $writer->emptyTag(
-	'meta-data',
-	[ANDROID, 'name'] => 'org.inodes.gus.scummvm.meta.UNPACK_LIB',
-	[ANDROID, 'value'] => $_)
-	for @{$info->{unpack_libs}};
-
-    $writer->endTag('receiver');
-    $writer->endTag('application');
-
-    $writer->emptyTag('uses-permission', [ANDROID, 'name'] =>
-		      'org.inodes.gus.scummvm.permission.SCUMMVM_PLUGIN');
-
-    $writer->emptyTag(@$_) foreach @$constraints;
-
-    $writer->endTag('manifest');
-    $writer->end();
-}
-
-
-my %engines;
-for my $engine (grope_engine_info(new IO::File $configure, 'r')) {
-    $engines{$engine->{id}} = $engine;
-}
-
-my @games = ($id, @{$engines{$id}{subengines}});
-my $games_desc = join('; ', map $engines{$_}{name}, @games);
-
-my @constraints = read_constraints(new IO::File $master_manifest, 'r');
-
-print "Writing $stringres ...\n";
-mkpath(dirname($stringres));
-print_stringres(IO::File->new($stringres, 'w'),
-		{app_name => qq{ScummVM plugin: "$id"},
-		 app_desc => "Game engine for: $games_desc",
-		});
-
-print "Writing $manifest ...\n";
-mkpath(dirname($manifest));
-print_manifest(IO::File->new($manifest, 'w'),
-	       {name => $id, unpack_libs => \@unpack_libs}, \@constraints);
-
-exit 0;
diff --git a/dists/android/mkplugin.sh b/dists/android/mkplugin.sh
new file mode 100755
index 0000000..f464313
--- /dev/null
+++ b/dists/android/mkplugin.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ $# -ne 5 ]; then
+	echo "usage: $0 configure plugin template versioncode target"
+	exit 1
+fi
+
+CONFIGURE=$1
+PLUGIN_NAME=$2
+TEMPLATE=$3
+PLUGIN_VERSION_CODE=$4
+TARGET=$5
+
+PLUGIN_DESC=`sed -n s/add_engine\s$PLUGIN_NAME\s\"\(.\+\)\"\s.*/\1/p` < $CONFIGURE
+
+sed "s|@PLUGIN_NAME@|$PLUGIN_NAME|;s|@PLUGIN_VERSION_CODE@|$PLUGIN_VERSION_CODE|;s|@PLUGIN_DESC@|$PLUGIN_DESC|" < $TEMPLATE > $TARGET
+
diff --git a/dists/android/plugin-manifest.xml b/dists/android/plugin-manifest.xml
new file mode 100644
index 0000000..2442d3f
--- /dev/null
+++ b/dists/android/plugin-manifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+		package="org.inodes.gus.scummvm.plugin. at PLUGIN_NAME@"
+		android:versionCode="@PLUGIN_VERSION_CODE@"
+		android:versionName="1.3.0git"
+		android:installLocation="preferExternal">
+
+	<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="8" />
+
+	<application android:label="@string/app_name"
+			android:description="@string/app_desc"
+			android:icon="@drawable/scummvm">
+		<receiver android:name="org.inodes.gus.scummvm.PluginProvider"
+				android:process="org.inodes.gus.scummvm">
+			<intent-filter>
+				<action android:name="org.inodes.gus.scummvm.action.PLUGIN_QUERY"/>
+				<category android:name="android.intent.category.INFO"/>
+			</intent-filter>
+			<meta-data android:name="org.inodes.gus.scummvm.meta.UNPACK_LIB"
+					android:value="mylib/armeabi/lib at PLUGIN_NAME@.so" />
+		</receiver>
+	</application>
+
+	<uses-permission android:name="org.inodes.gus.scummvm.permission.SCUMMVM_PLUGIN"/>
+	<uses-configuration android:reqFiveWayNav="true"
+			android:reqKeyboardType="qwerty"/>
+
+	<uses-configuration android:reqTouchScreen="finger"
+			android:reqKeyboardType="qwerty"/>
+
+	<uses-configuration android:reqTouchScreen="stylus"
+			android:reqKeyboardType="qwerty"/>
+</manifest>
+
diff --git a/dists/android/plugin-manifest.xml.in b/dists/android/plugin-manifest.xml.in
new file mode 100644
index 0000000..c941b2f
--- /dev/null
+++ b/dists/android/plugin-manifest.xml.in
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+		package="org.inodes.gus.scummvm.plugin. at PLUGIN_NAME@"
+		android:versionCode="@PLUGIN_VERSION_CODE@"
+		android:versionName="@VERSION@"
+		android:installLocation="preferExternal">
+
+	<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="8" />
+
+	<application android:label="@string/app_name"
+			android:description="@string/app_desc"
+			android:icon="@drawable/scummvm">
+		<receiver android:name="org.inodes.gus.scummvm.PluginProvider"
+				android:process="org.inodes.gus.scummvm">
+			<intent-filter>
+				<action android:name="org.inodes.gus.scummvm.action.PLUGIN_QUERY"/>
+				<category android:name="android.intent.category.INFO"/>
+			</intent-filter>
+			<meta-data android:name="org.inodes.gus.scummvm.meta.UNPACK_LIB"
+					android:value="mylib/armeabi/lib at PLUGIN_NAME@.so" />
+		</receiver>
+	</application>
+
+	<uses-permission android:name="org.inodes.gus.scummvm.permission.SCUMMVM_PLUGIN"/>
+	<uses-configuration android:reqFiveWayNav="true"
+			android:reqKeyboardType="qwerty"/>
+
+	<uses-configuration android:reqTouchScreen="finger"
+			android:reqKeyboardType="qwerty"/>
+
+	<uses-configuration android:reqTouchScreen="stylus"
+			android:reqKeyboardType="qwerty"/>
+</manifest>
+
diff --git a/dists/android/plugin-strings.xml b/dists/android/plugin-strings.xml
new file mode 100644
index 0000000..363503f
--- /dev/null
+++ b/dists/android/plugin-strings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+	<string name="app_name">ScummVM plugin: "@PLUGIN_NAME@"</string>
+	<string name="app_desc">Game engine for: @PLUGIN_DESC@</string>
+</resources>
+
diff --git a/tools/update-version.pl b/tools/update-version.pl
index 81aa5c2..91e9e24 100755
--- a/tools/update-version.pl
+++ b/tools/update-version.pl
@@ -41,6 +41,7 @@ my @subs_files = qw(
 	dists/irix/scummvm.spec
 	dists/wii/meta.xml
 	dists/android/AndroidManifest.xml
+	dists/android/plugin-manifest.xml
 	backends/platform/psp/README.PSP
 	);
 


Commit: b0351e1b85a550ec4f2422d4439e5ce17150f5a3
    https://github.com/scummvm/scummvm/commit/b0351e1b85a550ec4f2422d4439e5ce17150f5a3
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-09T09:40:04-07:00

Commit Message:
ANDROID: Automate the Manifest's versionCode

Changed paths:
    backends/platform/android/android.mk
    dists/android/AndroidManifest.xml
    dists/android/AndroidManifest.xml.in



diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index fdb0f80..7cf6587 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -1,7 +1,7 @@
 # Android specific build targets
 
 # These must be incremented for each market upload
-#ANDROID_VERSIONCODE = 6  Specified in dists/android/AndroidManifest.xml.in
+ANDROID_VERSIONCODE = 6
 ANDROID_PLUGIN_VERSIONCODE = 6
 
 JAVA_FILES = \
@@ -72,7 +72,8 @@ PATH_GEN = $(PATH_GEN_TOP)/$(PATH_REL)
 PATH_CLASSES_MAIN = $(PATH_BUILD_CLASSES_MAIN_TOP)/$(PATH_REL)
 PATH_CLASSES_PLUGIN = $(PATH_BUILD_CLASSES_PLUGIN_TOP)/$(PATH_REL)
 
-FILE_MANIFEST = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST_SRC = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST = $(PATH_BUILD)/AndroidManifest.xml
 FILE_DEX = $(PATH_BUILD)/classes.dex
 FILE_DEX_PLUGIN = $(PATH_BUILD)/plugins/classes.dex
 FILE_RESOURCES = resources.ap_
@@ -87,6 +88,9 @@ CLASSES_PLUGIN = $(addprefix $(PATH_CLASSES_PLUGIN)/, $(JAVA_FILES_PLUGIN:%.java
 APK_MAIN = scummvm.apk
 APK_PLUGINS = $(patsubst plugins/lib%.so, scummvm-engine-%.apk, $(PLUGINS))
 
+$(FILE_MANIFEST): $(FILE_MANIFEST_SRC)
+	sed "s/@ANDROID_VERSIONCODE@/$(ANDROID_VERSIONCODE)/" < $< > $@
+
 $(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8)
 	@$(MKDIR) -p $(PATH_GEN_TOP)
 	$(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR8)
diff --git a/dists/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml
index 68c58d9..cae1f36 100644
--- a/dists/android/AndroidManifest.xml
+++ b/dists/android/AndroidManifest.xml
@@ -3,7 +3,7 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 		package="org.inodes.gus.scummvm"
-		android:versionCode="6"
+		android:versionCode="@ANDROID_VERSIONCODE@"
 		android:versionName="1.3.0git"
 		android:installLocation="preferExternal">
 
diff --git a/dists/android/AndroidManifest.xml.in b/dists/android/AndroidManifest.xml.in
index 7a75b6f..a8d40bd 100644
--- a/dists/android/AndroidManifest.xml.in
+++ b/dists/android/AndroidManifest.xml.in
@@ -3,7 +3,7 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 		package="org.inodes.gus.scummvm"
-		android:versionCode="6"
+		android:versionCode="@ANDROID_VERSIONCODE@"
 		android:versionName="@VERSION@"
 		android:installLocation="preferExternal">
 






More information about the Scummvm-git-logs mailing list