cocos2d / cocos2d-console

cocos2d command line tool
152 stars 190 forks source link

`/Applications/Cocos/Cocos2d-x/` is hard coded for `gen-templates` command #396

Closed johnvuko closed 7 years ago

johnvuko commented 7 years ago

Hi, I work on MacOS, I have installed cocos2d in a custom folder, not with the installer but from the git. When I executed cocos gen-templates the templates files have /Applications/Cocos/Cocos2d-x/ inside. So when I generate a project with something like cocos new ProjectName -p projectname.com.name -l cpp -t binary my project doesn't work because the path for the files are not good.

I use cocos2d-x-3.13.1 and Cocos Console 2.1, I don't know very well the project but I see there is an environment variable named COCOS_X_ROOT which may be very useful for this.

Thank you

natural-law commented 7 years ago

Please don't use option -t binary in the command cocos new. It's supplied for Cocos Studio. Sorry for the confusion!

johnvuko commented 7 years ago

So you have to update your documentation http://cocos2d-x.org/docs/editors_and_tools/cocosCLTool/

And still, it may be very useful and it's a small change in the code.

natural-law commented 7 years ago

Thanks for your feedback!