From e181f7a4d257cfef1cff4c51a592184c11c62d08 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Thu, 10 Oct 2013 17:10:37 +0800 Subject: [PATCH 1/5] fix copy resource error. --- .../CocosDragonJS/proj.android/build_native.cmd | 7 ++++--- .../CrystalCraze/proj.android/build_native.cmd | 7 ++++--- .../MoonWarriors/proj.android/build_native.cmd | 13 ++++++++++--- .../TestJavascript/proj.android/build_native.cmd | 4 ++-- .../WatermelonWithMe/proj.android/build_native.cmd | 7 ++++--- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd b/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd index 42f2a1ea62..4c955ca9d3 100644 --- a/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd +++ b/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd @@ -56,7 +56,8 @@ exit /b 1 set COCOS2DX_ROOT=%~dp0..\..\..\.. set APP_ROOT=%~dp0.. set APP_ANDROID_ROOT=%~dp0 -set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js +set RESROUCE_ROOT="%APP_ROOT%\..\Shared\games\CocosDragonJS\Published files Android" +set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\..\scripting\javascript\bindings\js if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2) :MODULE1 @@ -81,10 +82,10 @@ mkdir %APP_ANDROID_ROOT%\assets mkdir %APP_ANDROID_ROOT%\assets\res rem copy Resources/* into assets' root -xcopy /e /q /r /y %APP_ROOT%\Resources\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 pause \ No newline at end of file diff --git a/samples/Javascript/CrystalCraze/proj.android/build_native.cmd b/samples/Javascript/CrystalCraze/proj.android/build_native.cmd index 65ffdf7ff4..8142e226eb 100644 --- a/samples/Javascript/CrystalCraze/proj.android/build_native.cmd +++ b/samples/Javascript/CrystalCraze/proj.android/build_native.cmd @@ -56,7 +56,8 @@ exit /b 1 set COCOS2DX_ROOT=%~dp0..\..\..\.. set APP_ROOT=%~dp0.. set APP_ANDROID_ROOT=%~dp0 -set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js +set RESROUCE_ROOT="%APP_ROOT%\..\Shared\games\CrystalCraze\Published-Android" +set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\..\scripting\javascript\bindings\js if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2) :MODULE1 @@ -81,10 +82,10 @@ mkdir %APP_ANDROID_ROOT%\assets mkdir %APP_ANDROID_ROOT%\assets\res rem copy Resources/* into assets' root -xcopy /e /q /r /y %APP_ROOT%\Resources\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 pause \ No newline at end of file diff --git a/samples/Javascript/MoonWarriors/proj.android/build_native.cmd b/samples/Javascript/MoonWarriors/proj.android/build_native.cmd index df9a678400..3b4b392695 100644 --- a/samples/Javascript/MoonWarriors/proj.android/build_native.cmd +++ b/samples/Javascript/MoonWarriors/proj.android/build_native.cmd @@ -56,7 +56,8 @@ exit /b 1 set COCOS2DX_ROOT=%~dp0..\..\..\.. set APP_ROOT=%~dp0.. set APP_ANDROID_ROOT=%~dp0 -set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js +set RESROUCE_ROOT="%APP_ROOT%\..\Shared\games\MoonWarriors\res" +set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\..\scripting\javascript\bindings\js if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2) :MODULE1 @@ -81,10 +82,16 @@ mkdir %APP_ANDROID_ROOT%\assets mkdir %APP_ANDROID_ROOT%\assets\res rem copy Resources/* into assets' root -xcopy /e /q /r /y %APP_ROOT%\Resources\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets + +rem copy MoonWarriors js +xcopy /e /q /r /y %RESROUCE_ROOT%\..\src\* %APP_ANDROID_ROOT%\assets + +rem copy MoonWarriors-native.js +xcopy /e /q /r /y %RESROUCE_ROOT%\..\*.js %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 pause \ No newline at end of file diff --git a/samples/Javascript/TestJavascript/proj.android/build_native.cmd b/samples/Javascript/TestJavascript/proj.android/build_native.cmd index bd20500549..19ee06dd56 100644 --- a/samples/Javascript/TestJavascript/proj.android/build_native.cmd +++ b/samples/Javascript/TestJavascript/proj.android/build_native.cmd @@ -56,7 +56,7 @@ exit /b 1 set COCOS2DX_ROOT=%~dp0..\..\..\.. set APP_ROOT=%~dp0.. set APP_ANDROID_ROOT=%~dp0 -set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js +set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\..\scripting\javascript\bindings\js if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2) :MODULE1 @@ -81,7 +81,7 @@ mkdir %APP_ANDROID_ROOT%\assets mkdir %APP_ANDROID_ROOT%\assets\res rem copy Resources/* into assets' root -xcopy /e /q /r /y %APP_ROOT%\Resources\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %APP_ROOT%\..\Shared\tests\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets diff --git a/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd b/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd index 79ebcef46b..ce604f9b7f 100644 --- a/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd +++ b/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd @@ -56,7 +56,8 @@ exit /b 1 set COCOS2DX_ROOT=%~dp0..\..\..\.. set APP_ROOT=%~dp0.. set APP_ANDROID_ROOT=%~dp0 -set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js +set RESROUCE_ROOT="%APP_ROOT%\..\Shared\games\WatermelonWithMe" +set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\..\scripting\javascript\bindings\js if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2) :MODULE1 @@ -81,10 +82,10 @@ mkdir %APP_ANDROID_ROOT%\assets mkdir %APP_ANDROID_ROOT%\assets\res rem copy Resources/* into assets' root -xcopy /e /q /r /y %APP_ROOT%\Resources\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 pause \ No newline at end of file From 312d761390333fc08606086211d2b6ac5f4ec189 Mon Sep 17 00:00:00 2001 From: LinWenhai Date: Thu, 10 Oct 2013 18:01:45 +0800 Subject: [PATCH 2/5] Update build_native.cmd --- .../Javascript/CocosDragonJS/proj.android/build_native.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd b/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd index 4c955ca9d3..349e2aa5d7 100644 --- a/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd +++ b/samples/Javascript/CocosDragonJS/proj.android/build_native.cmd @@ -85,7 +85,7 @@ rem copy Resources/* into assets' root xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 -pause \ No newline at end of file +pause From f861d6d2fc6694e706fb41bad6402c8b61e0198a Mon Sep 17 00:00:00 2001 From: LinWenhai Date: Thu, 10 Oct 2013 18:03:15 +0800 Subject: [PATCH 3/5] fix incomplete copy --- samples/Javascript/CrystalCraze/proj.android/build_native.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Javascript/CrystalCraze/proj.android/build_native.cmd b/samples/Javascript/CrystalCraze/proj.android/build_native.cmd index 8142e226eb..6c248549ae 100644 --- a/samples/Javascript/CrystalCraze/proj.android/build_native.cmd +++ b/samples/Javascript/CrystalCraze/proj.android/build_native.cmd @@ -85,7 +85,7 @@ rem copy Resources/* into assets' root xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 -pause \ No newline at end of file +pause From 8c6a4815887547b86a99ef89772a5381eb678d99 Mon Sep 17 00:00:00 2001 From: LinWenhai Date: Thu, 10 Oct 2013 18:06:59 +0800 Subject: [PATCH 4/5] fix incomplete copy --- .../Javascript/MoonWarriors/proj.android/build_native.cmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/Javascript/MoonWarriors/proj.android/build_native.cmd b/samples/Javascript/MoonWarriors/proj.android/build_native.cmd index 3b4b392695..d2dbb3a7e8 100644 --- a/samples/Javascript/MoonWarriors/proj.android/build_native.cmd +++ b/samples/Javascript/MoonWarriors/proj.android/build_native.cmd @@ -88,10 +88,10 @@ rem copy MoonWarriors js xcopy /e /q /r /y %RESROUCE_ROOT%\..\src\* %APP_ANDROID_ROOT%\assets rem copy MoonWarriors-native.js -xcopy /e /q /r /y %RESROUCE_ROOT%\..\*.js %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %RESROUCE_ROOT%\..\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 -pause \ No newline at end of file +pause From 83ab7128e759ab1d6c82a5576ee1a89579766543 Mon Sep 17 00:00:00 2001 From: LinWenhai Date: Thu, 10 Oct 2013 18:07:36 +0800 Subject: [PATCH 5/5] fix incomplete copy --- .../Javascript/WatermelonWithMe/proj.android/build_native.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd b/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd index ce604f9b7f..9594dada6b 100644 --- a/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd +++ b/samples/Javascript/WatermelonWithMe/proj.android/build_native.cmd @@ -85,7 +85,7 @@ rem copy Resources/* into assets' root xcopy /e /q /r /y %RESROUCE_ROOT%\* %APP_ANDROID_ROOT%\assets rem copy bindings/*.js into assets' root -xcopy /e /q /r /y %BINDINGS_JS_ROOT%\*.js %APP_ANDROID_ROOT%\assets +xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets call %NDK_ROOT%\ndk-build.cmd %PARALLEL_BUILD_FLAG% NDK_LOG=0 V=0 -pause \ No newline at end of file +pause