Minor build script tweaks to make android auto-buildable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28156 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7b68b7e9dc
commit
a8ed339ba5
3 changed files with 34 additions and 21 deletions
|
@ -16,22 +16,20 @@ compiling the java files will fail.
|
||||||
|
|
||||||
* Build instructions
|
* Build instructions
|
||||||
|
|
||||||
Use this as your build folder, using '../tools/configure' etc.
|
1. Create a separate build folder. Do not build in this source directory.
|
||||||
$ ../tools/configure # type 200, then chose A for android and your screen resolution
|
|
||||||
$ make
|
|
||||||
|
|
||||||
|
2. Run "../tools/configure". Choose target 200, then chose 'A' for Android
|
||||||
|
and input your screen resolution.
|
||||||
|
|
||||||
After the build finished, build the zip file which contains codecs and themes (the binary is a separate file):
|
3. Run "make"
|
||||||
$ make zip
|
|
||||||
|
|
||||||
Once you have the zip, pack it and the binary into the apk
|
4. Run "make zip". This has to be run the first time, and any time themes
|
||||||
$ make apk
|
or plugins have changed. Otherwise you may skip it.
|
||||||
|
|
||||||
Side 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.
|
5. Run "make apk"
|
||||||
Not recreating it will save time because it's only unzipped on the device if it's newer than what's on the device
|
|
||||||
|
|
||||||
You can install that on your device or emulator with the following command:
|
6. Optional. Install on your target/emulator, using the following command:
|
||||||
$ $ANDROID_SDK_PATH/tools/adb install -r bin/Rockbox.apk
|
"$ANDROID_SDK_PATH/tools/adb install -r rockbox.apk"
|
||||||
|
|
||||||
|
|
||||||
[1]: http://developer.android.com/sdk/index.html
|
[1]: http://developer.android.com/sdk/index.html
|
||||||
|
|
|
@ -41,11 +41,11 @@ JAVA_SRC := $(wildcard $(ANDROID_DIR)/src/$(PACKAGE_PATH)/*.java)
|
||||||
JAVA_OBJ := $(call java2class,$(subst $(ANDROID)/src/$(PACKAGE_PATH),$(ANDROID)/bin/$(PACKAGE_PATH),$(JAVA_SRC)))
|
JAVA_OBJ := $(call java2class,$(subst $(ANDROID)/src/$(PACKAGE_PATH),$(ANDROID)/bin/$(PACKAGE_PATH),$(JAVA_SRC)))
|
||||||
|
|
||||||
LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
|
LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
|
||||||
TEMP_APK := $(BUILDDIR)/bin/_Rockbox.apk
|
TEMP_APK := $(BUILDDIR)/bin/_rockbox.apk
|
||||||
TEMP_APK2 := $(BUILDDIR)/bin/__Rockbox.apk
|
TEMP_APK2 := $(BUILDDIR)/bin/__rockbox.apk
|
||||||
DEX := $(BUILDDIR)/bin/classes.dex
|
DEX := $(BUILDDIR)/bin/classes.dex
|
||||||
AP_ := $(BUILDDIR)/bin/resources.ap_
|
AP_ := $(BUILDDIR)/bin/resources.ap_
|
||||||
APK := $(BUILDDIR)/bin/Rockbox.apk
|
APK := $(BUILDDIR)/rockbox.apk
|
||||||
|
|
||||||
_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
|
_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
|
||||||
DIRS := $(subst ___,bin,$(_DIRS))
|
DIRS := $(subst ___,bin,$(_DIRS))
|
||||||
|
@ -53,6 +53,8 @@ DIRS += $(subst ___,gen,$(_DIRS))
|
||||||
DIRS += $(subst ___,data,$(_DIRS))
|
DIRS += $(subst ___,data,$(_DIRS))
|
||||||
DIRS += $(BUILDDIR)/libs/armeabi
|
DIRS += $(BUILDDIR)/libs/armeabi
|
||||||
|
|
||||||
|
CLEANOBJS += bin gen libs data
|
||||||
|
|
||||||
$(R_JAVA) $(AP_): $(MANIFEST)
|
$(R_JAVA) $(AP_): $(MANIFEST)
|
||||||
$(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m \
|
$(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m \
|
||||||
-J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res \
|
-J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res \
|
||||||
|
@ -106,6 +108,3 @@ $(DIRS):
|
||||||
dirs: $(DIRS)
|
dirs: $(DIRS)
|
||||||
|
|
||||||
apk: $(APK)
|
apk: $(APK)
|
||||||
|
|
||||||
clean::
|
|
||||||
$(SILENT)rm -f $(BUILDDIR)/bin/$(PACKAGE_PATH)/*.class $(R_JAVA) $(TEMP_APK) $(TEMP_APK2) $(APK) $(DEX) $(BUILDDIR)/_rockbox.zip $(AP_) $(LIBS)
|
|
||||||
|
|
16
tools/configure
vendored
16
tools/configure
vendored
|
@ -53,7 +53,12 @@ prefixtools () {
|
||||||
|
|
||||||
app_get_platform() {
|
app_get_platform() {
|
||||||
echo "Select your platform: (S)DL, (A)ndroid (default: Android)"
|
echo "Select your platform: (S)DL, (A)ndroid (default: Android)"
|
||||||
|
if [ -z "$ARG_PLATFORM" ]; then
|
||||||
choice=`input`
|
choice=`input`
|
||||||
|
else
|
||||||
|
choice="$APP_PLATFORM"
|
||||||
|
fi
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
s|S*) app_platform="sdl" ;;
|
s|S*) app_platform="sdl" ;;
|
||||||
*|a|A*) app_platform="android" ;;
|
*|a|A*) app_platform="android" ;;
|
||||||
|
@ -61,10 +66,18 @@ app_get_platform() {
|
||||||
|
|
||||||
echo "Selected $app_platform platform"
|
echo "Selected $app_platform platform"
|
||||||
echo "Enter the LCD width (default: 320)"
|
echo "Enter the LCD width (default: 320)"
|
||||||
|
if [ -z "$ARG_LCDWIDTH" ]; then
|
||||||
app_lcd_width=`input`
|
app_lcd_width=`input`
|
||||||
|
else
|
||||||
|
app_lcd_width=`$ARG_LCDWIDTH`
|
||||||
|
fi
|
||||||
if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
|
if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
|
||||||
echo "Enter the LCD height (default: 480)"
|
echo "Enter the LCD height (default: 480)"
|
||||||
|
if [ -z "$ARG_LCDHEIGHT" ]; then
|
||||||
app_lcd_height=`input`
|
app_lcd_height=`input`
|
||||||
|
else
|
||||||
|
app_lcd_height="$ARG_LCDHEIGHT"
|
||||||
|
fi
|
||||||
if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
|
if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
|
||||||
echo "Selected $app_lcd_width x $app_lcd_height resolution"
|
echo "Selected $app_lcd_width x $app_lcd_height resolution"
|
||||||
|
|
||||||
|
@ -945,6 +958,9 @@ for arg in "$@"; do
|
||||||
--no-ccache) ARG_CCACHE=0;;
|
--no-ccache) ARG_CCACHE=0;;
|
||||||
--encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
|
--encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
|
--language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
|
||||||
|
--lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
|
||||||
|
--lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
|
||||||
|
--platform=*) ARG_PLATFORM=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
|
--ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
|
--rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
|
--target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
|
||||||
|
|
Loading…
Reference in a new issue