issue #1454: Updated TestJavascript/proj.android/build_native.sh.

This commit is contained in:
James Chen 2012-08-31 21:30:58 +08:00
parent 9ba5a1bfef
commit e7e954045a
1 changed files with 13 additions and 31 deletions

View File

@ -53,21 +53,12 @@ fi
mkdir "$APP_ANDROID_ROOT"/assets
copy_resources_into_assets(){
for file in $1/*; do
if [ -d "$file" ]; then
copy_resources_into_assets "$file"
else
cp -f "$file" "$APP_ANDROID_ROOT"/assets
fi
done
}
# copy resources
for file in "$APP_ROOT"/Resources/*
do
if [ -d "$file" ]; then
cp -rf "$file" "$APP_ANDROID_ROOT"/assets
cp -rf "$file" "$APP_ANDROID_ROOT"/assets
fi
@ -78,40 +69,31 @@ done
for file in "$APP_ANDROID_ROOT"/assets/Images/*; do
if [ -d "$file" ];then
copy_resources_into_assets "$file"
else
cp -f "$file" "$APP_ANDROID_ROOT"/assets
cp -rf "$file" "$APP_ANDROID_ROOT"/assets
fi
done
rm -rf "$APP_ANDROID_ROOT"/assets/Images
for file in "$APP_ANDROID_ROOT"/assets/Fonts/*; do
if [ -d "$file" ];then
copy_resources_into_assets "$file"
else
cp -f "$file" "$APP_ANDROID_ROOT"/assets
cp -f "$file" "$APP_ANDROID_ROOT"/assets
fi
done
rm -rf "$APP_ANDROID_ROOT"/assets/Fonts
rm -f "$APP_ANDROID_ROOT"/assets/landscape-1024x1024-rgba8888.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/test_image_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/test_1021x1024_a8.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/test_1021x1024_rgb888.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/test_1021x1024_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/test_1021x1024_rgba8888.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/test_image_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/texture1024x1024_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/PlanetCute-1024x1024-rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/landscape-1024x1024-rgba8888.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/test_image_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_a8.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_rgb888.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/test_1021x1024_rgba8888.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/test_image_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/texture1024x1024_rgba4444.pvr.gz
rm -f "$APP_ANDROID_ROOT"/assets/Images/PlanetCute-1024x1024-rgba4444.pvr.gz
# copy js
if [ -d "$APP_ROOT/js" ]; then
cp -rf "$APP_ROOT/js" "$APP_ANDROID_ROOT"/assets
fi
if [[ "$buildexternalsfromsource" ]]; then
echo "Building external dependencies from source"
"$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \