aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-12-03 16:41:00 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-03 16:41:00 -0800
commit51e8424b90a592619034f13b162cb5f6d0fee3d0 (patch)
treedc50a020295572b4020ea147b0f3999d113ea523
parentae4812d7514dbea69f72da2386c573b63f54160b (diff)
parentdc3dd741551c323bb853782656c0d693db98ecdc (diff)
downloadexternal_qemu-51e8424b90a592619034f13b162cb5f6d0fee3d0.zip
external_qemu-51e8424b90a592619034f13b162cb5f6d0fee3d0.tar.gz
external_qemu-51e8424b90a592619034f13b162cb5f6d0fee3d0.tar.bz2
am dc3dd741: am a383d02c: Extract emulator major version number from SDK Tools package revision.
Merge commit 'dc3dd741551c323bb853782656c0d693db98ecdc' into eclair-mr2-plus-aosp * commit 'dc3dd741551c323bb853782656c0d693db98ecdc': Extract emulator major version number from SDK Tools package revision.
-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 982c0cd..a9939c1 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 922a0e4..742fe21 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
@@ -385,6 +394,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;