From 4607ba8029f72e65d469d2e3805cfa23b1ea5f70 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 30 Nov 2011 15:30:11 +0800 Subject: [PATCH] support for android 4.0 --- cocos2dx/cocos2d.cpp | 2 +- install-templates-xcode.sh | 2 +- template/android/copy_files.sh | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cocos2dx/cocos2d.cpp b/cocos2dx/cocos2d.cpp index d408f92265..d56e771b64 100644 --- a/cocos2dx/cocos2d.cpp +++ b/cocos2dx/cocos2d.cpp @@ -29,7 +29,7 @@ namespace cocos2d { const char* cocos2dVersion() { - return "cocos2d v1.0.1"; + return "cocos2d-1.0.1-x-0.10.0"; } }//namespace cocos2d diff --git a/install-templates-xcode.sh b/install-templates-xcode.sh index c5987d234e..6c3324e400 100755 --- a/install-templates-xcode.sh +++ b/install-templates-xcode.sh @@ -2,7 +2,7 @@ echo 'cocos2d-x template installer' -COCOS2D_VER='cocos2d-1.0.1-x-0.9.1' +COCOS2D_VER='cocos2d-1.0.1-x-0.10.0' BASE_TEMPLATE_DIR="/Library/Application Support/Developer/Shared/Xcode" BASE_TEMPLATE_USER_DIR="$HOME/Library/Application Support/Developer/Shared/Xcode" diff --git a/template/android/copy_files.sh b/template/android/copy_files.sh index b49e8365f4..ce10c1a1ca 100644 --- a/template/android/copy_files.sh +++ b/template/android/copy_files.sh @@ -94,6 +94,16 @@ modify_layout(){ rm -f $APP_DIR/android/res/layout/helloworld_demo.xml } +# android.bat of android 4.0 don't create res/drawable-hdpi res/drawable-ldpi and res/drawable-mdpi. +# These work are done in ADT +copy_icon(){ + if [ ! -d $APP_DIR/android/res/drawable-hdpi ]; then + cp -r $HELLOWORLD_ROOT/android/res/drawable-hdpi $APP_DIR/android/res + cp -r $HELLOWORLD_ROOT/android/res/drawable-ldpi $APP_DIR/android/res + cp -r $HELLOWORLD_ROOT/android/res/drawable-mdpi $APP_DIR/android/res + fi +} + move_files_into_android copy_cpp_h_from_helloworld @@ -103,3 +113,4 @@ copy_build_native modify_androidmanifest modify_applicationdemo modify_layout +copy_icon