cocos2d/cocos2d-console

Feature request: possibility of using JS binding library in CPP project

mathieubr opened this issue · 0 comments

Hi,

When creating a new project with "cocos new -l cpp ..." ; the cocos tool purposefully avoids adding the "cocos/scripting" and "external/spidermonkey" directories to the resulting Visual Studio project. Hence I cannot use the scripting engine.

Whereas if I create using "cocos new -l js" I get everything but the project is javascript-based...

Adding those libraries into the project after the fact is very hard (I spent the whole day on it and still am experiencing dependencies issues).

My current project is developed in C++ but I would like to include some Javascript for user-created content (level information and interaction routines, for example, that could be loaded into the game without having to rebuild).

Is it possible to add a secondary flag to cocos new with for example "-s js" to allow for inclusion of those libraries at project generation time?

Kind regards,

mathieu