aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-12-03 13:50:00 -0800
committerDavid 'Digit' Turner <digit@google.com>2009-12-03 14:02:39 -0800
commita383d02cb57dd7dadd382654175e51354073a139 (patch)
treee691a100f4590b63979bdd125ecb798154e46b3f
parent8b657e5deaa03b989b0b36791fcf2aa6b2882656 (diff)
downloadexternal_qemu-a383d02cb57dd7dadd382654175e51354073a139.zip
external_qemu-a383d02cb57dd7dadd382654175e51354073a139.tar.gz
external_qemu-a383d02cb57dd7dadd382654175e51354073a139.tar.bz2
Extract emulator major version number from SDK Tools package revision.
The minor version number is now always 0, this makes the next version number "5.0" currently in the eclair branch.
-rw-r--r--CHANGES.TXT14
-rw-r--r--Makefile.android11
-rwxr-xr-xandroid-configure.sh12
-rw-r--r--android/android.h3
-rw-r--r--android/main.c6
5 files changed, 40 insertions, 6 deletions
diff --git a/CHANGES.TXT b/CHANGES.TXT
index d84d195..35a519b 100644
--- a/CHANGES.TXT
+++ b/CHANGES.TXT
@@ -17,10 +17,20 @@ Versions:
1.11 => SDK 1.6_r1
1.12 => SDK 2.0
1.13 => SDK 2.0.1 (but wrongly tagged 1.12)
- 1.14 => current
+ 5.0 => current
==============================================================================
-Changes between 1.14 and 1.13
+Changes between 5.0 and 1.13
+
+IMPORTANT CHANGES:
+
+- Starting from this release, the emulator's version number will match the
+ corresponding Android SDK Tools package revision number. The exact number
+ is extracted at build time from the Android source tree.
+
+ The minor number will now be stuck to 0 since each official emulator
+ release is supposed to match a corresponding SDK Tools release.
+
OTHER:
diff --git a/Makefile.android b/Makefile.android
index e9a71c3..da06cc6 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -365,6 +365,17 @@ LOCAL_CFLAGS := $(MY_CFLAGS) $(LOCAL_CFLAGS)
# add the build ID to the default macro definitions
LOCAL_CFLAGS += -DANDROID_BUILD_ID="$(strip $(BUILD_ID))-$(strip $(BUILD_NUMBER))"
+# For non-standalone builds, extract the major version number from the Android SDK
+# tools revision number.
+ifneq ($(BUILD_STANDALONE_EMULATOR),true)
+ ANDROID_SDK_TOOLS_REVISION := $(shell awk -F= '/Pkg.Revision/ { print $$2; }' sdk/files/tools_source.properties)
+endif
+
+ANDROID_SDK_TOOLS_REVISION := $(strip $(ANDROID_SDK_TOOLS_REVISION))
+ifdef ANDROID_SDK_TOOLS_REVISION
+ LOCAL_CFLAGS += -DANDROID_SDK_TOOLS_REVISION=$(ANDROID_SDK_TOOLS_REVISION)
+endif
+
# include the Zlib sources
#
LOCAL_SRC_FILES += $(ZLIB_SOURCES)
diff --git a/android-configure.sh b/android-configure.sh
index 84e4535..26ea251 100755
--- a/android-configure.sh
+++ b/android-configure.sh
@@ -149,6 +149,15 @@ if [ "$IN_ANDROID_BUILD" = "yes" ] ; then
OPTION_TARGETS="$OPTION_TARGETS $HOST_BIN/emulator$EXE"
log "Targets : TARGETS=$OPTION_TARGETS"
fi
+
+ # find the Android SDK Tools revision number
+ TOOLS_PROPS=$ANDROID_TOP/sdk/files/tools_source.properties
+ if [ -f $TOOLS_PROPS ] ; then
+ ANDROID_SDK_TOOLS_REVISION=`awk -F= '/Pkg.Revision/ { print $2; }' $TOOLS_PROPS 2> /dev/null`
+ log "Tools : Found tools revision number $ANDROID_SDK_TOOLS_REVISION"
+ else
+ log "Tools : Could not locate $TOOLS_PROPS !?"
+ fi
fi # IN_ANDROID_BUILD = no
@@ -377,6 +386,9 @@ echo "BUILD_STANDALONE_EMULATOR := true" >> $config_mk
if [ $OPTION_DEBUG = yes ] ; then
echo "BUILD_DEBUG_EMULATOR := true" >> $config_mk
fi
+if [ -n "$ANDROID_SDK_TOOLS_REVISION" ] ; then
+ echo "ANDROID_SDK_TOOLS_REVISION := $ANDROID_SDK_TOOLS_REVISION" >> $config_mk
+fi
# Build the config-host.h file
#
diff --git a/android/android.h b/android/android.h
index b19d8d3..ca6cfaf 100644
--- a/android/android.h
+++ b/android/android.h
@@ -12,9 +12,6 @@
#ifndef _qemu_android_h
#define _qemu_android_h
-#define ANDROID_VERSION_MAJOR 1
-#define ANDROID_VERSION_MINOR 14
-
#define CONFIG_SHAPER 1
#include <stdlib.h>
diff --git a/android/main.c b/android/main.c
index 45ea968..e791efe 100644
--- a/android/main.c
+++ b/android/main.c
@@ -76,7 +76,11 @@ AndroidRotation android_framebuffer_rotation;
#define STRINGIFY(x) _STRINGIFY(x)
#define _STRINGIFY(x) #x
-#define VERSION_STRING STRINGIFY(ANDROID_VERSION_MAJOR)"."STRINGIFY(ANDROID_VERSION_MINOR)
+#ifdef ANDROID_SDK_TOOLS_REVISION
+# define VERSION_STRING STRINGIFY(ANDROID_SDK_TOOLS_REVISION)".0"
+#else
+# define VERSION_STRING "standalone"
+#endif
#define KEYSET_FILE "default.keyset"
SkinKeyset* android_keyset;