From 6f7cb44c6209748bbefb53e7bd258ec6de3a0fdd Mon Sep 17 00:00:00 2001 From: folecr Date: Tue, 28 Aug 2012 17:03:20 -0700 Subject: [PATCH] Build script magic to deal with Image and Fonts on Android. * Copy Images/* and Fonts/* into assets * Ignore assets/Images and assets/Fonts directories when packaging --- .../proj.android/ant.properties | 2 +- .../proj.android/build_native.sh | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/samples/TestJavascript/proj.android/ant.properties b/samples/TestJavascript/proj.android/ant.properties index f8af38bfb4..ce44c76b37 100644 --- a/samples/TestJavascript/proj.android/ant.properties +++ b/samples/TestJavascript/proj.android/ant.properties @@ -1 +1 @@ -aapt.ignore.assets="!*.pvr.gz:!*.gz:!.svn:!.git:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" +aapt.ignore.assets="!*.pvr.gz:!*.gz:!Images:!Fonts:!.svn:!.git:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" diff --git a/samples/TestJavascript/proj.android/build_native.sh b/samples/TestJavascript/proj.android/build_native.sh index 76f0f0c203..432f9caa01 100755 --- a/samples/TestJavascript/proj.android/build_native.sh +++ b/samples/TestJavascript/proj.android/build_native.sh @@ -65,6 +65,29 @@ if [ -f "$file" ]; then fi done +# extra magic to deal with Images and Fonts for android +for file in "$APP_ROOT"/Resources/Images/* +do +if [ -d "$file" ]; then + cp -rf "$file" "$APP_ANDROID_ROOT"/assets +fi + +if [ -f "$file" ]; then + cp "$file" "$APP_ANDROID_ROOT"/assets +fi +done + +for file in "$APP_ROOT"/Resources/Fonts/* +do +if [ -d "$file" ]; then + cp -rf "$file" "$APP_ANDROID_ROOT"/assets +fi + +if [ -f "$file" ]; then + cp "$file" "$APP_ANDROID_ROOT"/assets +fi +done + # copy js if [ -d "$APP_ROOT/js" ]; then cp -rf "$APP_ROOT/js" "$APP_ANDROID_ROOT"/assets