Search code examples
pythonmacoscocos2d-x

cannot create new cocos2dx project using create_project.py


I've installed cocos2dx in my mac and I am able to run a samplegame from the cocos2dx samples. Now I'm trying to create a new project using the create_project.py.

But I got this message in terminal

Trace back (most recent call last):

File "/Users/../cocos2d-x-2.2.1/tools/project-creator/create_project.py", line 191, in shutil.copytree(context["src_project_path"], context["dst_project_path"], True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 168, in copytree OSError: [Errno 2] No such file or directory: '/Users/../../../template/multi-platform-cpp'

I've followed this tutorial.

This link will show you the script.

please help me with this.


Solution

  • I had the same problem and I used this command:

    $ python create_project.py -project MyGame -package com.MyCompany.AwesomeGame -language cpp
    

    instead of:

    $ ./create_project.py -project PROJECT_NAME -package PACKAGE_NAME -language PROGRAMING_LANGUAGE
    

    I created the project without problems.

    I've followed this tutorial.