create-android-project.bat 这文件在哪 我下载的是cocos2d-x最新的稳定版 2.20

发布于 2021-11-19 04:31:31 字数 58 浏览 824 评论 2

create-android-project.bat 这文件在哪 我下载的是cocos2d-x最新的稳定版 2.20

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

勿忘初心 2021-11-23 05:28:32

解压完后,就在主目录下面

奢望 2021-11-21 15:18:02

管你那个版本 自己在其他版本 上拷贝过来改改不就完了吗?

自己改改:

@echo off
:: This script is used to create an android project.
:: You should modify _ANDROIDTOOLS _CYGBIN _NDKROOT to work under your environment.
:: Don't change it until you know what you do.

setlocal

:: Check if it was run under cocos2d-x root
if not exist "%cd%create-android-project.bat" echo Error!!! You should run it under cocos2dx root & pause & exit 2	

if not exist "%~dpn0.sh" echo Script "%~dpn0.sh" not found & pause & exit 3

:: modify it to work under your environment	 
set _CYGBIN=D:/commons/Cygwin1.7/bin
if not exist "%_CYGBIN%" echo Couldn't find Cygwin at "%_CYGBIN%" & pause & exit 4

:: modify it to work under your environment
set _ANDROIDTOOLS=D:/commons/android_sdk/tools
if not exist "%_ANDROIDTOOLS%" echo Couldn't find android sdk tools at "%_ANDROIDTOOLS%" & pause & exit 5

:: modify it to work under your environment
set _NDKROOT=D:/commons/android_sdk/android-ndk-r8e
if not exist "%_NDKROOT%" echo Couldn't find ndk at "%_NDKROOT%" & pause & exit 6

:: create android project
set /P _PACKAGEPATH=Please enter your package path. For example: org.cocos2dx.example:
set /P _PROJECTNAME=Please enter your project name:
if exist "%CD%%_PROJECTNAME%" echo "%_PROJECTNAME%" exists, please use another name & pause & exit 7
echo "Now cocos2d-x suppurts Android 2.1-update1, 2.2, 2.3 & 3.0"
echo "Other versions have not tested."
call "%_ANDROIDTOOLS%android.bat" list targets
set /P _TARGETID=Please input target id:
set _PROJECTDIR=%CD%%_PROJECTNAME%

echo Create android project
mkdir %_PROJECTDIR%
echo Create Android project inside proj.android
call "%_ANDROIDTOOLS%android.bat" create project -n %_PROJECTNAME% -t %_TARGETID% -k %_PACKAGEPATH% -a %_PROJECTNAME% -p %_PROJECTDIR%proj.android
call "%_ANDROIDTOOLS%android.bat" update project -l ../../cocos2dx/platform/android/java -p %_PROJECTDIR%proj.android
:: Resolve ___.sh to /cygdrive based *nix path and store in %_CYGSCRIPT%
for /f "delims=" %%A in ('%_CYGBIN%cygpath.exe "%~dpn0.sh"') do set _CYGSCRIPT=%%A

:: Resolve current dir to cygwin path
for /f "delims=" %%A in ('%_CYGBIN%cygpath.exe "%cd%"') do set _CURRENTDIR=%%A

:: Resolve ndk dir to cygwin path
for /f "delims=" %%A in ('%_CYGBIN%cygpath.exe "%_NDKROOT%"') do set _NDKROOT=%%A
	 
:: Throw away temporary env vars and invoke script, passing any args that were passed to us
endlocal & %_CYGBIN%bash --login "%_CYGSCRIPT%" %_CURRENTDIR% %_PROJECTNAME% %_NDKROOT% %_PACKAGEPATH% "windows"

pause

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文