노력과 삽질 퇴적물
HTML5: cocos2d-js 기초 (1) 본문
0. 필요한 파일
파일명 |
예시 경로 |
cocos2d-x-3.16.zip [#] | D:\dev_lib\cocos2d_3 |
Python 2.7.15 [#] | C:\Python\Python27 > 환경병수 추가 필요 |
apache-ant-1.10.3-bin [#] | D:\dev_lib\apache-ant |
Android SDK [#] | D:\dev_lib\android-sdk-windows |
android-ndk-r17-windows-x86_64.zip [#] | D:\dev_lib\android_ndk |
1. 환경설정
1 | PS D:\dev_lib\cocos2d_3> ./setup.py | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | Setting up cocos2d-x... ->Check environment variable COCOS_CONSOLE_ROOT ->Search for environment variable COCOS_CONSOLE_ROOT... ->COCOS_CONSOLE_ROOT not found ->Add directory "D:\dev_lib\cocos2d_3\tools\cocos2d-console\bin" into PATH succeed! ... ... ... ... ... ... ->Check environment variable NDK_ROOT ->Search for environment variable NDK_ROOT... ->NDK_ROOT not found ->Search for command ndk-build in system... ->Command ndk-build not found ->Please enter the path of NDK_ROOT (or press Enter to skip):D:\dev_lib\android_ndk -> Add NDK_ROOT environment variable... ->Added NDK_ROOT=D:\dev_lib\android_ndk ->Check environment variable ANDROID_SDK_ROOT ->Search for environment variable ANDROID_SDK_ROOT... ->ANDROID_SDK_ROOT not found ->Search for command android in system... ->Command android not found ->Please enter the path of ANDROID_SDK_ROOT (or press Enter to skip):D:\dev_lib\android-sdk-windows -> Add ANDROID_SDK_ROOT environment variable... ->Added ANDROID_SDK_ROOT=D:\dev_lib\android-sdk-windows ->Check environment variable ANT_ROOT ->Search for environment variable ANT_ROOT... ->ANT_ROOT not found ->Search for command ant in system... ->Command ant not found ->Please enter the path of ANT_ROOT (or press Enter to skip):D:\dev_lib\apache-ant\bin | cs |
2. 샘플프로젝트
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | PS D:\workspace_html5> cocos new Tester.full -l js Cocos collects data when the command-line tools are used for development. This data is examined in the aggregate only and is used to continually innovate and improve Cocos products. This data is anonymous and includes, but is not limited to, a unique hardware identifier, version number our software and information on which tools and/or services in Cocos products are being used and how they are being used. We take your privacy seriously and we do not share or sell any of this data. You can opt-out from sharing this data with us, but by sharing you help contribute to growth of Cocos. Do you agree to sent the data? [Y]es, [N]o n > Copy template into D:\workspace_html5\Tester > Copying directory from cocos root directory... > Copying files from template directory... > Copying Cocos2d-x files... > Rename project name from 'HelloJavascript' to 'Tester' > Replace the project name from 'HelloJavascript' to 'Tester' > Replace the project package name from 'org.cocos2dx.hellojavascript' to 'org.cocos2dx.Tester' > Replace the Mac bundle id from 'org.cocos2dx.hellojavascript' to 'org.cocos2dx.Tester' > Replace the iOS bundle id from 'org.cocos2dx.hellojavascript' to 'org.cocos2dx.Tester' | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 | PS D:\workspace_html5\Tester.full> cocos compile -p web -m release --advanced Building mode: release running: 'D:\dev_lib\apache-ant\bin\ant -f D:\workspace_html5\Tester.full\publish\html5\build.xml' Unable to locate tools.jar. Expected to find it in C:\Java\jre1.8.0_121\lib\tools.jar Buildfile: D:\workspace_html5\Tester.full\publish\html5\build.xml compile: [jscomp] Compiling 157 file(s) with 42 extern(s) [jscomp] 0 error(s), 0 warning(s) BUILD SUCCESSFUL Total time: 9 seconds | cs |
기타. 참조자료
궁극의 잡 블로그 :: [cocos2d-x 3.0 rc0] 새로운 시작
기타. 변경이력
일자 |
변경이력 |
2018-05-23 | 초안. |
'📂기초 및 세팅 note > 언어. 스크립트 계열' 카테고리의 다른 글
루아: 기초정리(2) (0) | 2019.06.06 |
---|---|
루아: 기초정리(1) (0) | 2019.05.26 |
파이썬3: 기초정리(2) (0) | 2018.05.18 |
파이썬3: 기초정리(1) (0) | 2018.05.14 |
PHP: 기초정리(1) (0) | 2015.04.06 |