Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands required #27

Open
lihex opened this issue Feb 19, 2014 · 19 comments
Open

commands required #27

lihex opened this issue Feb 19, 2014 · 19 comments

Comments

@lihex
Copy link
Contributor

lihex commented Feb 19, 2014

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 new, compile, run, another is for updating cocos framework, such as version, install, 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

OPTIONS

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

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

@maomaoispan
Copy link

How to use jscompile?
Thank you!

@lihex
Copy link
Contributor Author

lihex commented Apr 19, 2014

you can use cocos jscompile --help for query the help info and it offers a template cfg file for compile comfiguration, then you will quickly find how to use it.

@maomaoispan
Copy link

Thank you very much!

2014-04-19 14:28 GMT+08:00 lihex [email protected]:

you can use cocos jscompile --help for query the help info and it offers a
temple for compile comfiguration, then you will quickly find how to use it


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-40862336
.

@dongdongcpk
Copy link

It is not work when I input cocos clean, it's said no this command. How can I use it?

@ashikahmad
Copy link

I have set-up cocos2d-js which includes cocos2d-x within it. But in this case, all cocos2d-x templates are in a different directory than the default template directory set for js. So even if I have all the templates for cpp, running something like cocos new proj1 -l cpp doesn't work.

I think, it would be great if we can have -p <template_dir> instead of -p <template> as parameter. Then it will not be necessary to have all templates in same directory.

Please, correct me, if I am thinking in a wrong direction. Thanks.

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec.h to my project in vs2013

4 similar comments
@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec.h to my project in vs2013

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec.h to my project in vs2013

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec.h to my project in vs2013

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec.h to my project in vs2013

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec2.h to my project in vs2013

3 similar comments
@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec2.h to my project in vs2013

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec2.h to my project in vs2013

@v5inter
Copy link

v5inter commented May 28, 2014

i used cocos 3.1 command to create my test project,but i dont konw how to manage lib in created win32 project in vs2013, thus, Vec2.h cant used in my project, is there any parameter for this command to manage lib ? If Someone can tell me how to add Vec2.h to my project in vs2013

@jonnyijapan
Copy link

"clean" does not exist!

Error: argument 'clean' not found

@rangercyh
Copy link

have no clean

@Ronalses
Copy link

Ronalses commented Aug 2, 2016

hola, saludos a todos!!
con cocos2d-x en la version actual puedo programar en Js y compilar para todas las plataformas?
saludos

@bitmal
Copy link

bitmal commented Sep 11, 2016

The function, run_shell(cmd, cwd), in build_console.py returns exit status 1 when I run it. I can't seem to figure out what is going on...

natural-law pushed a commit to natural-law/cocos2d-console that referenced this issue Jan 11, 2017
Solve the error when generating prebuilt mk files.
@Misshunter1
Copy link

only renderer is misshunter1hh1 heatheelr m houser non-animated in person in or out of mod or simulation so I can do my job and buggy and I need to help but only she can recieve then I can give money to buggy. no coding for legal purpose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants