METS BLOG

METS BLOG

Cocos2D-X Windows setup environment

I always forget how to setup cocos2d-x environment in general, so I decided to make a short post. Even though this is for windows same environment variables will need to be defined in other OS.

What you are going to need

  • Cocos2d-X
  • Android Native Development Kit
  • Android Software Development Kit
  • Apache Ant
  • Python 2.7
  • Append your path to Python installation folder to your ‘Path’ environment variable ex ;C:Python27
  • Add new environment variable COCOS_CONSOLE_ROOT with value like C:pathcocos2d-xtoolscocos2d-consolebin
  • Add new environment variable NDK_ROOT with value like C:pathndk
  • Add new environment variable ANDROID_SDK_ROOT with value like C:pathsdk
  • Add new environment variable ANT_ROOT with value like C:antbin

After you have done all that try running the file setup.py(it is under cocos2d-x folder) in command line, if it can find all the variables you are good to go and start setting up your IDE.

Create a new multi-platform project:
Execute this command cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany from
C:pathcocos2d-xtoolscocos2d-consolebin


Leave a Reply

Your email address will not be published. Required fields are marked *