Welcome to my tutorial. This is the first time I'm using Cocos2D for a project so bear with me. First things first, we gotta download the needed files to setup the environment.
We will need the following:
- Your Windows 7 or 8 installed. Either 32-bit (x86) or 64-bit version (x64). Take note, I am running Windows 8 Pro 32-bit now.
- The latest stable version of Cocos2d-x from http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download
- The latest version of the Android SDK from http://developer.android.com/sdk/index.html#ExistingIDE
- The latest version of the Android NDK for your version of Windows from http://developer.android.com/tools/sdk/ndk/index.html
- As of this writing, I am using the latest version of the Java JDK (7u17) from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
- Notepad++ for editing unix-based text from http://notepad-plus-plus.org/download/
- The latest version of Cygwin from http://www.cygwin.com/setup.exe
Install the JDK, Cygwin and notepad++ to their default locations. Extract or install the Android SDK, NDK and Cocos2D to the C:\Andriod Folder. Here's how my C:\Android Folder looks like.
When installing Cygwin, make sure you search and add these packages:
autoconf, automake, binutils, gcc-core, gcc-g++, gcc4-core, gcc4-g++, gdb, pcre, pcre-devel, gawk, make
Setting up Cygwin
Edit the batch file create-android-project.bat using notepad++ (right-click on it in Windows Explorer)
Edit _CYGBIN, _ANDROIDTOOLS and _NDKROOT values in the batch file depending on your environment. If you followed what I did, use the configuration below:
Add the following Environment Variable in the end of file home\<youname>\.bash_profile
Executing the Batchfile
To be continued....