Building Cocos Creator project from command line

Building Cocos Creator project from command line
0.0 0


Creator will call cocos binary with native engine

Thanks for responding @jyinkailej!

Even for project code generation inside jsb-default/frameworks/runtime-src? As in the “Build” step, not the “Compile” step (as the Cocos Creator UI calls it).

If that’s the case, then I can definitely get Linux build working, given it’s relatively easy to get cocos2d-x set up and call the Linux version instead for the build. Otherwise, I’ll let you know how my adventures with darling go then. I bet I can make this work on Linux.


No, only native process will use cocos command, like compile, generate native project.

Other process depend on electron, we need to solve many problems with it.


@pandamicro I’ve seen that you plan to have a build template feature in version 1.4, what is the release date?
Thanks :slight_smile:


I think it already works?

That said, I don’t trust it (better to have more control for this kind of thing), so I use my own template and build script.


@jyinkailej Speaking of build scripts, were you able to take a look at having the build process generate an x86 Cocos library?

Given that you have confirmed with me that the compile process is just calling into the cocos binary, it shouldn’t be too difficult to add an option to build for x86 in the Cocos Creator editor UI, which just calls cocos like so:


Has the problem been solved?


Yes, and only on Mac and Windows, not Linux (it’s a little tricky even then, but still doable). I’m persevering to get a workaround going for Linux one way or another so that we can use Jenkins on our CI server to automate builds and deployment for my team.


Hello from Spain. My english is not as good as I’d like, so I apologize for any mistake although I hope I will be able to explain what I want to say.
I am new (just 1 week with it) with Cocos Creator and with Jenkins. I am trying to set up a CI server with Jenkins in a W10 machine.
When I do this:
c:\CocosCreator\CocosCreator.exe --path c:\Users\Alejandro\Desktop\cocosProjects\NewProject --build platform=web-desktop
directly in a Windows console or with a bat file all goes well. But when I try to do inside a Jenkins job, the job never finishes. I know you have talk about it months ago, but I would be gracefull for any ideas. Thank you very much in advance.


Getting a 404 on that creator-docs link. Here’s the same page on the cocos site: Publish with Command Line


We are using Kubernetes to doing all the things. Including the ci building and publishing by using the gitlab-ci. Currently some of our games written with phaser and we are going to switch another game engine. Our main requirements for a game engine are html5 support and can be built inside Linux/Docker. Without Linux support a game engine is useless. I hope cocos creator adds support Linux soon.