mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developPerformace
This commit is contained in:
commit
01ee83364e
|
@ -61,6 +61,7 @@ build_*_vc10/
|
|||
*.xcscheme
|
||||
*.xcworkspacedata
|
||||
*.xcuserstate
|
||||
*.xccheckout
|
||||
xcschememanagement.plist
|
||||
build/
|
||||
.DS_Store
|
||||
|
|
1
AUTHORS
1
AUTHORS
|
@ -539,6 +539,7 @@ Developers:
|
|||
pktangyue
|
||||
Fixing a bug that CCScale9Sprite::setInsetLeft/XXX can't work for rotated sprite frame.
|
||||
Fixing a bug that Color and Opacity of Scale9Sprite will not be changed when it's added to NodeRGBA and run with FadeIn/Out actions.
|
||||
Adding *.xccheckout to gitignore.
|
||||
|
||||
jllust
|
||||
Fixing a bug that CCLabelBMFont crashes in glDrawElements of CCTextureAtlas::drawNumberOfQuads sometimes.
|
||||
|
|
|
@ -22,7 +22,7 @@ cocos2d-x is:
|
|||
How to start a new game
|
||||
-----------------------
|
||||
|
||||
1. Download the code from [Github][3] or from [cocos2d download site][4]
|
||||
1. Download the code from [cocos2d download site][4]
|
||||
|
||||
2. Run the `create-multi-platform-projects.py` script
|
||||
|
||||
|
@ -138,7 +138,7 @@ Contact us
|
|||
[1]: http://www.cocos2d-x.org "cocos2d-x"
|
||||
[2]: http://www.cocos2d-iphone.org "cocos2d for iPhone"
|
||||
[3]: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download
|
||||
[4]: https://github.com/cocos2d/cocos2d-x/tree/develop
|
||||
[4]: http://www.cocos2d-x.org/download/version#Cocos2d-x
|
||||
[5]: http://www.box2d.org "Box2D"
|
||||
[6]: http://www.chipmunk-physics.net "Chipmunk2D"
|
||||
[7]: http://esotericsoftware.com/ "http://esotericsoftware.com/"
|
||||
|
|
|
@ -209,6 +209,7 @@ void SpriteFrameCache::addSpriteFramesWithFile(const char *pszPlist, Texture2D *
|
|||
Dictionary *dict = Dictionary::createWithContentsOfFileThreadSafe(fullPath.c_str());
|
||||
|
||||
addSpriteFramesWithDictionary(dict, pobTexture);
|
||||
dict->release();
|
||||
}
|
||||
|
||||
void SpriteFrameCache::addSpriteFramesWithFile(const char* plist, const char* textureFileName)
|
||||
|
@ -275,6 +276,7 @@ void SpriteFrameCache::addSpriteFramesWithFile(const char *pszPlist)
|
|||
{
|
||||
CCLOG("cocos2d: SpriteFrameCache: Couldn't load texture");
|
||||
}
|
||||
dict->release();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,6 +353,7 @@ void SpriteFrameCache::removeSpriteFramesFromFile(const char* plist)
|
|||
{
|
||||
_loadedFileNames->erase(ret);
|
||||
}
|
||||
dict->release();
|
||||
}
|
||||
|
||||
void SpriteFrameCache::removeSpriteFramesFromDictionary(Dictionary* dictionary)
|
||||
|
|
|
@ -564,7 +564,22 @@ void AssetsManager::Helper::update(float dt)
|
|||
_messageQueueMutex.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
//remove unnecessary message
|
||||
std::list<Message*>::iterator it;
|
||||
Message *proMsg = nullptr;
|
||||
for (it = _messageQueue->begin(); it != _messageQueue->end(); ++it)
|
||||
{
|
||||
if((*it)->what == ASSETSMANAGER_MESSAGE_PROGRESS)
|
||||
{
|
||||
if (proMsg)
|
||||
{
|
||||
_messageQueue->remove(proMsg);
|
||||
delete (ProgressMessage*)proMsg->obj;
|
||||
delete proMsg;
|
||||
}
|
||||
proMsg = *it;
|
||||
}
|
||||
}
|
||||
// Gets message
|
||||
msg = *(_messageQueue->begin());
|
||||
_messageQueue->pop_front();
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="AssetsManager"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
xcopy /e /q /r /y %BINDINGS_JS_ROOT%\* %APP_ANDROID_ROOT%\assets
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,84 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="HelloCpp"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,84 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="SimpleGame"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,84 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="TestCpp"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,90 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="CocosDragonJS"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -p Run make with -j8 option to take advantage of multiple processors
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-p" set PARALLEL_BUILD_FLAG=\-j8
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
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
|
|
@ -0,0 +1,90 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="CrystalCraze"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -p Run make with -j8 option to take advantage of multiple processors
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-p" set PARALLEL_BUILD_FLAG=\-j8
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
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
|
|
@ -0,0 +1,90 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="MoonWarriors"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -p Run make with -j8 option to take advantage of multiple processors
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-p" set PARALLEL_BUILD_FLAG=\-j8
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
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
|
|
@ -0,0 +1,90 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="TestJavascript"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -p Run make with -j8 option to take advantage of multiple processors
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-p" set PARALLEL_BUILD_FLAG=\-j8
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
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
|
|
@ -0,0 +1,90 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="WatermelonWithMe"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -p Run make with -j8 option to take advantage of multiple processors
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-p" set PARALLEL_BUILD_FLAG=\-j8
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
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
|
|
@ -0,0 +1,87 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="HelloLua"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy common luaScript
|
||||
xcopy /e /q /r /y %APP_ROOT%\..\..\scripting\lua\script\* %APP_ANDROID_ROOT%\assets
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,87 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="TestLua"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy common luaScript
|
||||
xcopy /e /q /r /y %APP_ROOT%\..\..\scripting\lua\script\* %APP_ANDROID_ROOT%\assets
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,84 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="HelloCpp"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
|
@ -0,0 +1,90 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="HelloJavascript"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -p Run make with -j8 option to take advantage of multiple processors
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-p" set PARALLEL_BUILD_FLAG=\-j8
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
set BINDINGS_JS_ROOT=%APP_ROOT%\..\..\scripting\javascript\bindings\js
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy bindings/*.js into assets' root
|
||||
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
|
|
@ -0,0 +1,87 @@
|
|||
@echo off
|
||||
|
||||
set APPNAME="HelloLua"
|
||||
|
||||
set buildexternalsfromsource=
|
||||
set PARALLEL_BUILD_FLAG=
|
||||
|
||||
goto :getopts
|
||||
|
||||
:usage
|
||||
echo Build C/C++ code for %APPNAME% using Android NDK
|
||||
echo OPTIONS:
|
||||
echo -s Build externals from source
|
||||
echo -h this help
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:def
|
||||
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:getopts
|
||||
set "par=%~1"
|
||||
if "%par%"=="" (goto :L)
|
||||
if "%~1"=="-s" set /a buildexternalsfromsource=1
|
||||
if "%~1"=="-h" goto :usage
|
||||
shift
|
||||
goto :getopts
|
||||
|
||||
:L
|
||||
set NDK_ROOT=%NDK_ROOT%
|
||||
if "%NDK_ROOT%"=="" goto:def
|
||||
|
||||
rem check toolchains
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.8 (goto :toolchains48)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.7 (goto :toolchains47)
|
||||
if exist %NDK_ROOT%\toolchains\arm-linux-androideabi-4.6 (goto :toolchains46)
|
||||
echo "Couldn't find the gcc toolchain."
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:toolchains48
|
||||
set NDK_TOOLCHAIN_VERSION=4.8
|
||||
goto :InitPath
|
||||
:toolchains47
|
||||
set NDK_TOOLCHAIN_VERSION=4.7
|
||||
goto :InitPath
|
||||
:toolchains46
|
||||
set NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
:InitPath
|
||||
|
||||
set COCOS2DX_ROOT=%~dp0..\..\..
|
||||
set APP_ROOT=%~dp0..
|
||||
set APP_ANDROID_ROOT=%~dp0
|
||||
|
||||
if "%buildexternalsfromsource%"=="1" (goto :MODULE1) else (goto :MODULE2)
|
||||
:MODULE1
|
||||
echo "Building external dependencies from source"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\source
|
||||
goto :COPY_RES
|
||||
:MODULE2
|
||||
echo "Using prebuilt externals"
|
||||
set NDK_MODULE_PATH=%COCOS2DX_ROOT%;%COCOS2DX_ROOT%\cocos2dx\platform\third_party\android\prebuilt
|
||||
|
||||
:COPY_RES
|
||||
echo NDK_ROOT = %NDK_ROOT%
|
||||
echo COCOS2DX_ROOT=%COCOS2DX_ROOT%
|
||||
echo APP_ROOT=%APP_ROOT%
|
||||
echo APP_ANDROID_ROOT=%APP_ANDROID_ROOT%
|
||||
echo NDK_TOOLCHAIN_VERSION=%NDK_TOOLCHAIN_VERSION%
|
||||
|
||||
rem make sure assets is exist
|
||||
if exist %APP_ANDROID_ROOT%\assets rd /q /s %APP_ANDROID_ROOT%\assets
|
||||
|
||||
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
|
||||
|
||||
rem copy common luaScript
|
||||
xcopy /e /q /r /y %APP_ROOT%\..\..\scripting\lua\script\* %APP_ANDROID_ROOT%\assets
|
||||
|
||||
call %NDK_ROOT%\ndk-build.cmd NDK_LOG=0 V=0
|
||||
pause
|
Loading…
Reference in New Issue