cocos 3.16 生成预编译库模板

  1. 打开模板功能
    不知道什么原因,cocos 3.16关闭了模板功能,因此使用cocos -h命令时,无法显示gen-templates参数。
    打开的方式也挺简单,打开tools/cocos2d-console/bin/cocos2d.ini文件,修改将28行“#plugin_generate.TemplateGenerator”前的注释去掉。

  2. 生成预编译库
    cocos gen-libs

  3. 生成模板
    cocos new -t binary

  4. 生成工程
    cocos new test -p com.test.test1 -t binary -l lua --portrait

    如果要生成竖屏,还需要修改config.json文件中的"isLandscape"为false

posted @ 2017-10-17 09:47  gAmesaceR  阅读(953)  评论(0编辑  收藏  举报