cocos2dx 命令解释

原创 2015年07月11日 10:25:31

A command line tool that lets you create, run, publish, debug, etc… your game. It is the swiss-army knife for cocos2d.

This command line tool is in its early stages.

Commands Required

There are at least 2 groups of requirement currently. One is for cocos game project, such as newcompilerun, another is for updating cocos framework, such as versioninstallupdate.

  • project
    • new
    • run
    • compile
    • list // open recent projects
    • deploy
    • clean
    • device
  • engine
    • version
    • udpate
  • help
  • assets converter // convert the textures, audios into best file format for target platform. We need a resource manager in framework to do this.

cocos project new

cocos project new <project-name> [-l <cpp|lua|js>] [-p <package name>] [-d <directory>] [-t <template>] [-help]



Must be. The name of your project, wihtout space.

-l <cpp|lua|js>

Must be. Select the programming language for the new game. It can be , or 

-p <package-name>

Optional. Set to "com.mycompany.mygame" by default

-d \<directory>

Optional. By default it will create the new project in your current path

-t \<template>

TBD. We will offer more templates like shooter game, super mardio game, isometric game tempaltes

cocos project run

cocos project run <target> [-m <mode>]

This command will call compile and deplot



Must be. Targets can be , , , etc.

-m <debug|release>

Optional Mode can be or . By default it's debug mode.

cocos project compile

cocos compile -p <platform> [-s <project_dir][-m <mode>] [-j <number>] [-a <architecture>] [--ap <android_platform>]

Compiles the current project to binrary

-s the project base directory

Optional. if not it specified, use current dir

-p <platfrom>

Must be. Should be [android|ios|linux|mac|win32].

-m <debug|release>

Optional. Mode can be or . By default it's debug mode. In release mode, this command will compile lua or javascript into bytecode. Use debug by default.

-j <number>

Optional. How many threads to do the compilation

-a <architeture>

Architecture can be <arm><armeabi><arm64><x86> or <all>

--ap <android_platform>

The android sdk platform number, valid android-platform are:[10|11|12|13|14|15|16|17|18|19]

cocos project deploy

cocos project deploy -t <target>

Installs the package to a target device.

-t <target>

Targets can be , , 

cocos project clean

cocos clean <all>

Clean the compiled sources and assets on all platforms. By default, it cleans only your game, but reserve the binary output for framework. If you inputs , then it will clean both your game and the cocos2d-x framework

If you have a nice design please do not hesitate to write your idea here.


win下eclipse一键打包cocos2dx的apk 命令

一、简介 1. cocos2dx3.0以上版本已提供python解决方案,不赘述。 2. cocos2dx打包是件麻烦,容易出错,消耗体力的硕大工程。经过多次摸索,终于可以抛弃各种中间工具,比...

cocos2dx 命令创建各平台工程,并自动打包Android apk的方法



下面介绍cocos2dx-v3.0通过setup.py设置环境变量及在命令行创建编译及运行win32工程、生成.apk文件,运行Android工程的方法 工具/原料 ...


我在使用 Cocos2dx - 3.11.1 版本时发现新建工程要用命令行。。。 用命令行??真是太不人性化了,作为处女座简直不能忍, 于是自己写了个 cocos2dx 命令行小工具,先上截图...


在能够运行coco2dx的示例之后,需要建立自己的程序 1.首先将将cocos加入到环境变量PATH, vim /etc/profile 加入 export PATH=/home/wang/...
  • 2016年11月07日 21:14
  • 227

【步兵 cocos2dx】texturePacker命令行

【步兵 cocos2dx】texturePacker命令行 By EOS.紧接上文,来讲讲texturePacker命令行的使用。虽然有经验的大部份都会用, 那就帮忙新手早些上路(车)吧~ 滴~滴~...



[cocos2dx 3.0 (五)] 使用游戏控制台Console + 添加用户自定义控制台命令

cocos2dx 3.0又出了新版本rc0,在beta2版本中使用Console在vs2012上存在bug,在rc0中已经都修复了,而且加了不少的新的控制台命令。游戏控制台是通过TCP来连接控制的,使...


转自: 感谢原博主分享,随喜赞叹! 在之前的AppDeleg...

[重新认识cocos2dx---工具篇] 一 cocos命令行之语言包MultiLanguage

多语言对于游戏程序的设计来说是很必要的,很意外的是在cocos命令行项目中也发现了这个,就试着分析一下,不喜勿喷。 主体程序是/bin/目录下的MultiLanguage.py和string.jso...
您举报文章:cocos2dx 命令解释