SETTING UP COCOS2D-X 3.15 on Mac
- Create SDK folder in your Applications\Development folder.
- Download Latest cocos2d-x-3.15.1.zip and extract in SDK folder.
- Download Latest Apache ANT: apache-ant-1.10.1-bin and extract in SDK folder.
- Download Latest Android Studio: android-studio-ide-162.4069837-mac.dmg and install. Note SDK location: /Users/[username]/Library/Android/sdk
- Install latest NDK from Android Studio SDK Manager. Note NDK location: /Users/[username]/Library/Android/sdk/ndk-bundle
- Download Latest iOS SDK and Xcode from App Store
SETTING UP COCOS2D-X for ANDROID
- Open Terminal
- Move to “cd /Applications/Development/SDK/cocos2d-x-3.15.1”
- Type “python ./setup.py
- Setup NDK Root: /Users/[username]/Library/Android/sdk/ndk-bundle
- Setup SDK Root: /Users/[username]/Library/Android/sdk
- Setup ANT Root: /Applications/Development/SDK/apache-ant-1.10.1/bin
- Type “source /Users/melvin/.bash_profile” for changes to take effect
SETTING UP A NEW PROJECT
Type “cocos new GameTemplate -p eg.cocos2d.game -l cpp -d /Applications/Development/Game_Projects”
XCODE CHANGES (Using ElateGames_cocos2d-x_3.15_GameTemplate_Bare project)
- Open the Xcode project generated by cocos2d-x
- Add signing account. Note: Must have an Apple Developer Program
- Attach your iPhone/iPad/iPod device to your Mac.
You are ready to build on you device!
ANDROID STUDIO CHANGES (Using ElateGames_cocos2d-x_3.15_GameTemplate_Bare project)
- * Install missing platforms as needed: 22, 21
- * Install missing build tools as needed: 25.0.0
- * Update gradle as needed to 3.3
- Allow USB debugging on your device.
- * Note: If ProcessCpuTracker.cpp fails, add #include <unistd.h>