Search code examples
c++cocos2d-x

How to create project in cocos2dx 3.0 beta?


I'm trying to create project in cocos2dx 3.0 beta but command line shows error as

H:\cocos2dx\package\cocos2d-x-3.0beta\tools\project-creator>./create_project.py -n TestCPP -k com.san.testcpp -l cpp '.' is not recognized as an internal or external command, operable program or batch file.

Can anybody show me steps to create project in cocos2dx 3.0 . Any help would be appreciated.

Thanx


Solution

  • From the path that you provided it seems that you are on a Windows machine, and you are trying yo start the creator "the unix way".

    Do you have python installed? If so, do you have it in your PATH? Here are the general steps to get it running:

    1. Install python (I'm not sure how it is with cocos2d-x 3.0, but with previous versions you had to use python 2.x, you can try a newer version). Let's say you install it in C:\python
    2. [Optional] Add C:\python to your PATH system variable and restart the cmd tool.
    3. If you added to PATH : navigate to where you have the create_project.py and simply run python.exe create_project.py [parameters]
    4. If you didn't add to PATH, the above command becomes a little longer : C:\python\python.exe create_project.py [parameters]

    That's it.