cocos2dx 命令解释

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 asnew,compile,monospace; font-size:12px; padding:0.2em 0px; margin:0px">run,another is for updating cocos framework,monospace; font-size:12px; padding:0.2em 0px; margin:0px">version,monospace; font-size:12px; padding:0.2em 0px; margin:0px">install,monospace; font-size:12px; padding:0.2em 0px; margin:0px">update.

  • 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]

OPTIONS

<project-name>

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

<target>

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].

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

-j <number>

Optional. How many threads to do the compilation

-a <architeture>

Architecture can be<arm>,monospace; font-size:12px; padding:0.2em 0px; margin:0px"><armeabi>,monospace; font-size:12px; padding:0.2em 0px; margin:0px"><arm64>,monospace; font-size:12px; padding:0.2em 0px; margin:0px"><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.

相关文章

操作步骤 1、创建cocos2d-x工程 2、新建 Scene1.cpp Scene1.h Scene1.h代码 #ifndef __SCENE1_H__#defi...
开发环境:OS(WINDOWS 8.1 X64 企业版) cocos2d-x 2.2.1 vs2010 想给vs安装上cocos的模版,执行Install...
把创建项目做成一个批处理,当创建项目时可以省时省力很多。 操作步骤 1、在 E:cocos2d-x-2.2.1toolspr...
https://www.cnblogs.com/JiaoQing/p/3906780.html 四个响应函数 1 EventListenerPhysicsContact* evC...
转载于 http://www.cnblogs.com/kenkofox/p/3926797.html 熟悉js的dom事件或者flash事件的,基本都能立...
ScrollView(滚动容器)加载大量item时会导致游戏界面的卡顿,严重时整个界面会出现卡死的情况。最近项...