Thanks for you reply, I used the `-c` option to compile the js file now, and I don’t know how to use the compiled jsc file.
I’ll remove the `-c` option and retry again !
James Chen wrote:
If you didn’t use `-c` opinion, the generated jsc files will have the same folder structure as the original one.
Then you just need to invoke `ScriptingCore::getInstance()->runScript(“wxg-jsb.js”)` is enough, no need to call `runScript(“wxg-jsb.jsc”)`.
Justin Zhang wrote:
> Yes, I have compiled js to jsc file follow the help, but how to load the jsc file to game, and before the code is like this:
> now if can do like this: ScriptingCore::getInstance()->runScript(“wxg-jsb.jsc”)?
> I try do like this, but wrong, could you gave me some same to load jsc file to game? Thank you very much
> James Chen wrote:
> > Please refer to the README file at https://github.com/cocos2d/cocos2d-console/blob/develop/README.md> > Also, you could get help from python cocos2d.py jscompile —help.