I have Cocos2d-x 3.13.1 and successfully pre-built the library for every platform. When I do this:
cocos new game -p com.company.game -l cpp -t binary
I get:
Template named 'binary' is not found.
Multiple templates detected!
You can select one via -t arguments.
Or choose one now:
1 default
Select one (input number and press enter):
I donāt believe thereās a pre-built template available yet? There should be, however, and ideally with a selection of the versions you have prebuilt.
Iām following this guide to set it all up. Iām using the head of v3 branch. I basically done:
$ git clone https://github.com/cocos2d/cocos2d-x.git
$ cd cocos2d-x
cocos2d-x $ python download-deps.py
cocos2d-x $ git submodule update --init
cocos2d-x $ ./setup.py
cocos2d-x $ cocos gen-libs -c -ap android-25
I now have three folders under cocos2d-x/prepbuilt:
ios, mac and android
When I now do:
cocos2d-x $ cocos new binary-test -p com.company-binary-test -l cpp -d . -t binary
I get:
"Template named ābinaryā is not found.
Multiple templates detected!
You can select one via -t arguments.
Or choose one now:
1 default
Select one (input number and press enter):"
And looking under template folder there is only one: default.
So how do I generate a project with the prebuilt libraries?
Maybe it should be listed a bit clearly under āCreating pre-built libraries to use instead of source code.ā or under āUsing the pre-built libraries in your projects.ā Itās easy to miss.
Honestly if none of these work well for you Iād suggest learning how to use pre-built libraries for each platform separate from cocos2d-x. So search āxcode static librariesā, āandroid studio gradle static librariesā, ācmake static librariesā, āwin32 ā¦ā, etc. For the most part if you just build the library itself (open the platformās project: cocos2d_libs.xcodeproj, etc), learn how to build static/dynamic library, then create a new project (or use cocos create) and learn how to link with a static/dynamic library separately (you can delete the cocos2d folder copied over as the normal template.
I think this will help you in the long-run if you are a programmer and want to learn build processes for future projects.
/Applications/Cocos/cocos2d-x/tools/cocos2d-console/bin/cocos.py 2.3 - cocos console: A command line tool for Cocos2d-x.
Available commands:
run Compiles, deploy and run project on the target.
gen-libs Generate prebuilt libs of engine. The libs will be placed in āprebuiltā folder of the engine root path.
luacompile Encrypt and/or compile lua files.
deploy Compile and deploy a project to a device/simulator.
package Manage package for cocos.
compile Compile projects to binary.
gen-simulator Generate Cocos Simulator.
new Creates a new project.
jscompile Compile and/or compress js files.
Available arguments:
-h, --help Show this help information.
-v, --version Show the version of this command tool.
āol [āenā, āzhā, āzh_trā] Specify the language of output messages.
āagreement [āyā, ānā] Skip the agreement with specified value.
The new docs will come out in a few weeks. I put up beta versions here: slackmoehrle.github.io, although I probably should put up a new beta, this one is weeks old.