From 95a2696b6ba866e030b3c9dd4d58dad830337373 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 26 Jun 2012 12:09:23 +0800 Subject: [PATCH] fixed #1365: Some files of Resources folder which is copied by build_native.sh will lost authority in cygwin. --- HelloLua/proj.android/build_native.sh | 3 +++ HelloWorld/proj.android/build_native.sh | 3 +++ template/android/build_native.sh | 3 +++ testjs/proj.android/build_native.sh | 3 +++ tests/proj.android/build_native.sh | 3 +++ tools/lua_project_generator/template/android/build_native.sh | 3 +++ 6 files changed, 18 insertions(+) diff --git a/HelloLua/proj.android/build_native.sh b/HelloLua/proj.android/build_native.sh index 0b836bf1d3..37afad392c 100755 --- a/HelloLua/proj.android/build_native.sh +++ b/HelloLua/proj.android/build_native.sh @@ -62,6 +62,9 @@ cp $file $GAME_ANDROID_ROOT/assets fi done +# Change the authority of Resources folder. +chmod -R 666 $GAME_ANDROID_ROOT/assets + # build if [[ $buildexternalsfromsource ]]; then echo "Building external dependencies from source" diff --git a/HelloWorld/proj.android/build_native.sh b/HelloWorld/proj.android/build_native.sh index bb0c583c6c..7271cd3289 100755 --- a/HelloWorld/proj.android/build_native.sh +++ b/HelloWorld/proj.android/build_native.sh @@ -60,6 +60,9 @@ cp $file $HELLOWORLD_ROOT/assets fi done +# Change the authority of Resources folder. +chmod -R 666 $HELLOWORLD_ROOT/assets + if [[ $buildexternalsfromsource ]]; then echo "Building external dependencies from source" $NDK_ROOT_LOCAL/ndk-build -C $HELLOWORLD_ROOT $* \ diff --git a/template/android/build_native.sh b/template/android/build_native.sh index 32345d4bd9..4e3535962c 100644 --- a/template/android/build_native.sh +++ b/template/android/build_native.sh @@ -50,6 +50,9 @@ do fi done +# Change the authority of Resources folder. +chmod -R 666 $GAME_ANDROID_ROOT/assets + # copy icons (if they exist) file=$GAME_ANDROID_ROOT/assets/Icon-72.png if [ -f "$file" ]; then diff --git a/testjs/proj.android/build_native.sh b/testjs/proj.android/build_native.sh index bd92dfe50f..e7da87e18a 100755 --- a/testjs/proj.android/build_native.sh +++ b/testjs/proj.android/build_native.sh @@ -60,6 +60,9 @@ cp "$file" $TEST_JS_ROOT/assets fi done +# Change the authority of Resources folder. +chmod -R 666 $TEST_JS_ROOT/assets + if [[ $buildexternalsfromsource ]]; then echo "Building external dependencies from source" $NDK_ROOT_LOCAL/ndk-build -C $TEST_JS_ROOT $* \ diff --git a/tests/proj.android/build_native.sh b/tests/proj.android/build_native.sh index f2d6a51203..10322d529c 100755 --- a/tests/proj.android/build_native.sh +++ b/tests/proj.android/build_native.sh @@ -61,6 +61,9 @@ cp $file $TESTS_ROOT/assets fi done +# Change the authority of Resources folder. +chmod -R 666 $TESTS_ROOT/assets + # remove test_image_rgba4444.pvr.gz rm -f $TESTS_ROOT/assets/Images/test_image_rgba4444.pvr.gz diff --git a/tools/lua_project_generator/template/android/build_native.sh b/tools/lua_project_generator/template/android/build_native.sh index 8e4457cd4f..2ee20bfb9b 100755 --- a/tools/lua_project_generator/template/android/build_native.sh +++ b/tools/lua_project_generator/template/android/build_native.sh @@ -25,6 +25,9 @@ do fi done +# Change the authority of Resources folder. +chmod -R 666 $GAME_ANDROID_ROOT/assets + # build pushd $ANDROID_NDK_ROOT ./ndk-build -C $GAME_ANDROID_ROOT $*