summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2010-09-24 12:03:15 +0000
committerBjörn Stenberg <bjorn@haxx.se>2010-09-24 12:03:15 +0000
commita8ed339ba573e48b82d0fdda348a748e142f803d (patch)
tree0da6f943aa977339b2da6edada5343db7076165a
parent7b68b7e9dc7315818c7c295b8839d6e023d72a2c (diff)
downloadrockbox-a8ed339ba573e48b82d0fdda348a748e142f803d.tar.gz
rockbox-a8ed339ba573e48b82d0fdda348a748e142f803d.zip
Minor build script tweaks to make android auto-buildable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28156 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--android/README20
-rw-r--r--android/android.make11
-rwxr-xr-xtools/configure24
3 files changed, 34 insertions, 21 deletions
diff --git a/android/README b/android/README
index 6c9d2ad4c6..8f0a85cabb 100644
--- a/android/README
+++ b/android/README
@@ -16,22 +16,20 @@ compiling the java files will fail.
16 16
17* Build instructions 17* Build instructions
18 18
19Use this as your build folder, using '../tools/configure' etc. 191. Create a separate build folder. Do not build in this source directory.
20 $ ../tools/configure # type 200, then chose A for android and your screen resolution
21 $ make
22 20
212. Run "../tools/configure". Choose target 200, then chose 'A' for Android
22 and input your screen resolution.
23 23
24After the build finished, build the zip file which contains codecs and themes (the binary is a separate file): 243. Run "make"
25 $ make zip
26 25
27Once you have the zip, pack it and the binary into the apk 264. Run "make zip". This has to be run the first time, and any time themes
28 $ make apk 27 or plugins have changed. Otherwise you may skip it.
29 28
30Side note: You don't necessarily need to recreate the zip once you have it, only if you're unsure or if you know its content changed. 295. Run "make apk"
31Not recreating it will save time because it's only unzipped on the device if it's newer than what's on the device
32 30
33You can install that on your device or emulator with the following command: 316. Optional. Install on your target/emulator, using the following command:
34 $ $ANDROID_SDK_PATH/tools/adb install -r bin/Rockbox.apk 32 "$ANDROID_SDK_PATH/tools/adb install -r rockbox.apk"
35 33
36 34
37[1]: http://developer.android.com/sdk/index.html 35[1]: http://developer.android.com/sdk/index.html
diff --git a/android/android.make b/android/android.make
index f611d5d5a1..492c0127cb 100644
--- a/android/android.make
+++ b/android/android.make
@@ -41,11 +41,11 @@ JAVA_SRC := $(wildcard $(ANDROID_DIR)/src/$(PACKAGE_PATH)/*.java)
41JAVA_OBJ := $(call java2class,$(subst $(ANDROID)/src/$(PACKAGE_PATH),$(ANDROID)/bin/$(PACKAGE_PATH),$(JAVA_SRC))) 41JAVA_OBJ := $(call java2class,$(subst $(ANDROID)/src/$(PACKAGE_PATH),$(ANDROID)/bin/$(PACKAGE_PATH),$(JAVA_SRC)))
42 42
43LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so 43LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
44TEMP_APK := $(BUILDDIR)/bin/_Rockbox.apk 44TEMP_APK := $(BUILDDIR)/bin/_rockbox.apk
45TEMP_APK2 := $(BUILDDIR)/bin/__Rockbox.apk 45TEMP_APK2 := $(BUILDDIR)/bin/__rockbox.apk
46DEX := $(BUILDDIR)/bin/classes.dex 46DEX := $(BUILDDIR)/bin/classes.dex
47AP_ := $(BUILDDIR)/bin/resources.ap_ 47AP_ := $(BUILDDIR)/bin/resources.ap_
48APK := $(BUILDDIR)/bin/Rockbox.apk 48APK := $(BUILDDIR)/rockbox.apk
49 49
50_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH) 50_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
51DIRS := $(subst ___,bin,$(_DIRS)) 51DIRS := $(subst ___,bin,$(_DIRS))
@@ -53,6 +53,8 @@ DIRS += $(subst ___,gen,$(_DIRS))
53DIRS += $(subst ___,data,$(_DIRS)) 53DIRS += $(subst ___,data,$(_DIRS))
54DIRS += $(BUILDDIR)/libs/armeabi 54DIRS += $(BUILDDIR)/libs/armeabi
55 55
56CLEANOBJS += bin gen libs data
57
56$(R_JAVA) $(AP_): $(MANIFEST) 58$(R_JAVA) $(AP_): $(MANIFEST)
57 $(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m \ 59 $(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m \
58 -J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res \ 60 -J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res \
@@ -106,6 +108,3 @@ $(DIRS):
106dirs: $(DIRS) 108dirs: $(DIRS)
107 109
108apk: $(APK) 110apk: $(APK)
109
110clean::
111 $(SILENT)rm -f $(BUILDDIR)/bin/$(PACKAGE_PATH)/*.class $(R_JAVA) $(TEMP_APK) $(TEMP_APK2) $(APK) $(DEX) $(BUILDDIR)/_rockbox.zip $(AP_) $(LIBS)
diff --git a/tools/configure b/tools/configure
index c7c75a2593..e716439ca2 100755
--- a/tools/configure
+++ b/tools/configure
@@ -53,7 +53,12 @@ prefixtools () {
53 53
54app_get_platform() { 54app_get_platform() {
55 echo "Select your platform: (S)DL, (A)ndroid (default: Android)" 55 echo "Select your platform: (S)DL, (A)ndroid (default: Android)"
56 choice=`input` 56 if [ -z "$ARG_PLATFORM" ]; then
57 choice=`input`
58 else
59 choice="$APP_PLATFORM"
60 fi
61
57 case $choice in 62 case $choice in
58 s|S*) app_platform="sdl" ;; 63 s|S*) app_platform="sdl" ;;
59 *|a|A*) app_platform="android" ;; 64 *|a|A*) app_platform="android" ;;
@@ -61,10 +66,18 @@ app_get_platform() {
61 66
62 echo "Selected $app_platform platform" 67 echo "Selected $app_platform platform"
63 echo "Enter the LCD width (default: 320)" 68 echo "Enter the LCD width (default: 320)"
64 app_lcd_width=`input` 69 if [ -z "$ARG_LCDWIDTH" ]; then
70 app_lcd_width=`input`
71 else
72 app_lcd_width=`$ARG_LCDWIDTH`
73 fi
65 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi 74 if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
66 echo "Enter the LCD height (default: 480)" 75 echo "Enter the LCD height (default: 480)"
67 app_lcd_height=`input` 76 if [ -z "$ARG_LCDHEIGHT" ]; then
77 app_lcd_height=`input`
78 else
79 app_lcd_height="$ARG_LCDHEIGHT"
80 fi
68 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi 81 if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
69 echo "Selected $app_lcd_width x $app_lcd_height resolution" 82 echo "Selected $app_lcd_width x $app_lcd_height resolution"
70 83
@@ -945,6 +958,9 @@ for arg in "$@"; do
945 --no-ccache) ARG_CCACHE=0;; 958 --no-ccache) ARG_CCACHE=0;;
946 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;; 959 --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
947 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;; 960 --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
961 --lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
962 --lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
963 --platform=*) ARG_PLATFORM=`echo "$arg" | cut -d = -f 2`;;
948 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;; 964 --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
949 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;; 965 --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
950 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;; 966 --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
@@ -956,7 +972,7 @@ for arg in "$@"; do
956 --no-eabi) ARG_ARM_EABI=0;; 972 --no-eabi) ARG_ARM_EABI=0;;
957 --thumb) ARG_ARM_THUMB=1;; 973 --thumb) ARG_ARM_THUMB=1;;
958 --no-thumb) ARG_ARM_THUMB=0;; 974 --no-thumb) ARG_ARM_THUMB=0;;
959 --prefix=*) PREFIX=`echo "$arg" | cut -d = -f 2`;; 975 --prefix=*) PREFIX=`echo "$arg" | cut -d = -f 2`;;
960 --help) help;; 976 --help) help;;
961 *) err=1; echo "[ERROR] Option '$arg' unsupported";; 977 *) err=1; echo "[ERROR] Option '$arg' unsupported";;
962 esac 978 esac