GithubHelp home page GithubHelp logo

cocos2d / cocos2d-console Goto Github PK

View Code? Open in Web Editor NEW
151.0 34.0 190.0 9.13 MB

cocos2d command line tool

Shell 0.08% Python 58.20% C++ 0.56% Makefile 0.05% Lua 40.09% Batchfile 0.02% JavaScript 0.18% Csound Document 0.83%

cocos2d-console's Introduction

cocos2d-console

Download

$ NOT DONE YET

Install

$ NOT DONE YET

Vision of cocos2d-console

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.

Examples:

# starts a new project called "My Game" for multi-platform

$ cocos new MyGame -l cpp -p org.cocos2d.mygame

$ cd MyGame

# Will deploy the project to device and run it
$ cocos run -p android


Devel Info

Internals

cocos.py is an script whose only responsability is to call its plugins. cocos.bat will invoke cocos.py on windows cocos will invoke cocos.py on Mac OS X and linux

To get a list of all the registered plugins:

$ cocos

To run the "new" plugin:

$ cocos new

Adding a new plugin to the console

You have to edit bin/cocos2d.ini, and add the class name of your new plugin there. Let's say that you want to add a plugin that deploys the project:

# should be a subclass of CCPlugin
project_deploy.CCPluginDeploy

And now you have to create a file called project_deploy.py in the plugins folder. A new, empty plugin, would look like the code shown below:

import cocos

# Plugins should be a sublass of CCPlugin
class CCPluginDeploy(cocos.CCPlugin):

		# in default category
        @staticmethod
        def plugin_category():
          return ""

        @staticmethod
        def plugin_name():
          return "deploy"

        @staticmethod
        def brief_description():
            return "Deploy the project to target."                

        def run(self, argv, dependencies):
            print "plugin called!"
            print argv

Plugins are divided by category, depending on it's function: project, engine, ...

The plugins of project is in default category, it's an empty stirng "".

Generate Executable

Now you can use the toexec/build_console.py for generating a executable file of cocos command.

Environment Requirement

  • Python 2.7 (2.7.5 is well tested)
  • PyInstaller (PyInstaller 2.1 is well tested)
  • Necessary PATH environment for python & pyinstaller.

Attention:To keep compatible with both Windows-32bit & Windows-64bit, please install 32bit python on Windows.

Steps

Run python build_console.py in command line. Then the executable file & necessary files will be generated in toexec/output/PLATFORM.

The usage of build_console.py:

usage: build_console.py [-h] [-s SRC_PATH] [-d DST_PATH]

Generate executable file for cocos2d-console by PyInstaller.

optional arguments:
  -h, --help            show this help message and exit
  -s SRC_PATH, --src-path SRC_PATH
                        Specify the path of cocos2d-console.
  -d DST_PATH, --dst-path DST_PATH
                        Specify the path of output.

Using the Executable

The generated executable files can replace the source code of cocos2d-console.

To fit the limitation of the cocos2d-console implementation. The generated executable files should located at ENGINE_PATH/tools/cocos2d-console/bin.

Then you can use the executable file as same as the source code.

Commands Required

Please see this issue

cocos2d-console's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocos2d-console's Issues

Login shell execution of the cocos script on Linux

On Linux the cocos bash script is executed by the "bash -l" command.
This runs the script as a login shell and therefore also executes the bashrc file of the user every time the cocos script is used. I doubt this is intentional, because it is highly annoying for every user that has commands in his bashrc that they would not like to have executed all the time, e.g. screenfetch.

commands required

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.

Compile on win32 failure due to 'devenv' not found

Hello,

I have an issue when compile cocos2d-x projects on win32 by using cocos2d-console.

My dev environment:

  • Windows 7 x64
  • Visual Studio express 9, 10, 11, 12

This is what I got:

$ cocos run -p win32
Running command: compile
Building mode: debug
building
Required VS version : 11.0
64bit
find vs in reg : 32bit
Find VS path : C:\Program Files (x86)\Microsoft Visual Studio 11.0
running: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" "D:\workspaces\mine\projects\hello-cocos2d-x\hellococos2dx_2\proj.win32\hellococos2dx_2.sln" /Build "Debug|Win32" /Project "hellococos2dx_2"'

'"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv"' is not recognized as an internal or external command,
operable program or batch file.
Error running command, return code: 1

I found out that 'devenv' is not exists in Visual Studio express.

Moreover, I found a solution to resolve this issue. That is using 'msbuild' instead of 'devenv'. 'msbuild' can be used to build cocos2d-x projects on VS pro, ultimate and express also (I did a research on ... Google ✌️).

I'm intent on doing a PR, but I open this issue first if who had a local WIP stuff to resolve the problem.

Have nice day 👯

project_compile.py(xcrun parameter issue)

In my case,

app_path = os.path.join(output_dir, "%s.app" % targetName)
ipa_path = os.path.join(output_dir, "%s.ipa" % targetName)
ipa_cmd = "xcrun -sdk %s PackageApplication -v \"%s\" -o \"%s\"" % (self.use_sdk, app_path, ipa_path)
self._run_cmd(ipa_cmd)

This code make a trouble : xcrun specified application doesn't exist or isn't a bundle directory.
So, I changed it to

app_path = os.path.join(output_dir, "%s.app" % targetName)
ipa_path = os.path.join(output_dir, "%s.ipa" % targetName)
ipa_cmd = "xcrun -sdk %s PackageApplication -v \"%s\" -o \"%s\"" % (self.use_sdk, output_dir, ipa_path)
self._run_cmd(ipa_cmd)

(I changed an xcrun parameter. app_path to output_dir)

After modifying, it works well.
Is it only my trouble?

Feature: install without cocos2d-x.

I have project that create with cocos command.

And I don't want other developers and CI engines to download the whole large cocos2d-x project.
I want to build my game only with cocos command.

How to use the JSC file to project

When I compile my js code to jsc, but how to load it to my c++ code? Can you give me some sample code or a document to introduce it ?

Can't compile static libs with #define CC_USE_PHYSICS 0

Set:

#define CC_USE_PHYSICS 0

And just run cocos gen-libs -p mac

Result:
../cocos2d/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp:11287:18: error: no type named 'PhysicsWorld' in namespace 'cocos2d'; did you mean 'PhysicsBody'?
And many more such errors for cocos2d::PhysicsBody

** BUILD FAILED **
Error running command, return code: 65.

cosos console command seems works but got me this mensage at the end

[100%] Linking CXX executable bin/MyGame
[100%] Built target MyGame
Traceback (most recent call last):
File "/home/joilnen/cocos2d-x_devel/cocos2d-x-3.9/tools/cocos2d-console/bin/cocos.py", line 1081, in
run_plugin(command, argv, plugins)
File "/home/joilnen/cocos2d-x_devel/cocos2d-x-3.9/tools/cocos2d-console/bin/cocos.py", line 970, in run_plugin
plugin.run(argv, dependencies_objects)
File "/home/joilnen/cocos2d-x_devel/cocos2d-x-3.9/tools/cocos2d-console/plugins/plugin_compile/project_compile.py", line 1535, in run
self.build_linux()
File "/home/joilnen/cocos2d-x_devel/cocos2d-x-3.9/tools/cocos2d-console/plugins/plugin_compile/project_compile.py", line 1436, in build_linux
cocos.copy_files_in_dir(result_dir, output_dir)
File "/home/joilnen/cocos2d-x_devel/cocos2d-x-3.9/tools/cocos2d-console/bin/cocos.py", line 777, in copy_files_in_dir
for item in os.listdir(src):
OSError: [Errno 20] Not a directory: '/home/joilnen/Risk/linux-build/bin/MyGame'

Feature required: Inject Facebook SDK version dynamically with engine version

ANDROID_VERSION_PATH = '/CUI/facebook-android-sdk/facebook/src/com/facebook/FacebookSdkVersion.java'
IOS_VERSION_PATH = '/CUI/facebook-ios-sdk/src/FacebookSDK.h'

For Android it looks like this:

final class FacebookSdkVersion {
    public static final String BUILD = "3.18.0/Cocos2d-x-v3.3";
    // public static final String BUILD = "3.18.0/Cocos2d-JS-v3.1";
    // public static final String BUILD = "3.18.0/Cocos2d-Lua-v3.3";
}

For iOS:

#define FB_IOS_SDK_VERSION_STRING @“3.18/Cocos2d-x-v3.3"
// #define FB_IOS_SDK_VERSION_STRING @"3.18/Cocos2d-JS-v3.1"
// #define FB_IOS_SDK_VERSION_STRING @"3.18/Cocos2d-Lua-v3.3"

Feature request. Cocos2d empty project for iOS (xCode)

1)Cocos2dx has a project which can be run from xcode
2)cocos2d-iphone has a script which does not simply creates an empty project - it has a feature to insert this empty project into xcode templates

So why not to do the same for cocos2dx?

Support splitted APKs

Now, It copied only debug or release apk but not splitted apks

For ex: *-x86-release.apk, *-armeabi-v7a-release.apk

How to install

This part is "NOT DONE YET", so when can you update? I see bunch of stuff teaching me what to do after that. They are totally useless to me unless I install this "cocos" command. Anybody can help? Many thanks.

commands required

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 <target> [-m <mode>] [-j <number>] [-a <architecture>]

Compiles the current project to binrary

<target>

Must be. Targets can be , , etc.

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

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

Prebuilt libs: able to select language(libcocos2d, libjscocos2d, libluacocos2d, libsimulator)

I'm using prebuilt libs with Xcode. Work really fast and easy to use.
But when I'm updating cocos2d-x from git, each time I need to rebuild them using command:

cocos gen-libs -p ios -p mac

And I get on output, counting all files:

  • libcocos2d Mac.a
  • libjscocos2d Mac.a
  • libluacocos2d Mac.a
  • libsimulator Mac.a
  • libcocos2d iOS.a
  • libjscocos2d iOS.a
  • libluacocos2d iOS.a
  • libsimulator iOS.a

Build time for all this libs is really slow...

Instead I need just only 2 libs which I'm using for my game:

  • libcocos2d Mac.a
  • libcocos2d iOS.a

And I want to save a lot of wasted time for building unused libs.

Can some flag be added to achieve this? I don't know.. just specify build only libcocos2d?

Cannot compile or deploy win32

C:\Work\explottens\Explottens>cocos compile -p win32
Building mode: debug
Building...
Required VS version : [2013, 2015, 2017]
running: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com" "C:\Work\explottens\Explottens\proj.win32\Explottens.sln" /Build "Debug" /Project "Explottens"'

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Error running command, return code: 1.

I'm getting this error. It seems like the spaces are causing the trouble. Is there are fix to this?

Plugin Path in cocos2d.ini

Hi @ricardoquesada

Could you make the plugin directory the same as the others by retrieving it from cocos2d.ini

Currently it is
line 690
plugins_path = os.path.join(os.path.dirname(file), '..', 'plugins')

A distro might want to put these in a share folder :)

Alias support

Should provide developers a way to name alias for commands
For example
cocos alias package pkg
cocos pkg install xxx

proj.android-studio: gradlew permission denied

When I ran cocos to run on android platform with command:

$ NDK_ROOT=~/android-ndk-r13b cocos run -p android --android-studio -j 4

Expected:

cocos can run gradlew smoothly.

Actual:

/bin/sh: /Users/wingyplus/game-engine-experiment/FlappyClone/proj.android-studio/gradlew: Permission denied
Error running command, return code: 126.

The version that I use is

cocos2d-x-3.13.1
Cocos Console 2.1

Cannot build prebuilt libraries

cocos gen-libs -p android --android-studio --app-abi armeabi-v7a

running: '/Users/piotr/Documents/pierdoly/cocos2d-x-3.14/tools/cocos2d-console/bin/cocos compile -s /Users/piotr/Documents/pierdoly/cocos2d-x-3.14/tools/simulator -p android --ndk-mode release --app-abi armeabi-v7a'

Building mode: debug
Using Eclipse project : /Users/piotr/Documents/pierdoly/cocos2d-x-3.14/tools/simulator/frameworks/runtime-src/proj.android
Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0.
Error running command, return code: 101.

I've got the latest cocos console and sdk tools. Using cocos2d-x 3.14.1 (if that matters anyway).

Feature request: possibility of using JS binding library in CPP project

Hi,

When creating a new project with "cocos new -l cpp ..." ; the cocos tool purposefully avoids adding the "cocos/scripting" and "external/spidermonkey" directories to the resulting Visual Studio project. Hence I cannot use the scripting engine.

Whereas if I create using "cocos new -l js" I get everything but the project is javascript-based...

Adding those libraries into the project after the fact is very hard (I spent the whole day on it and still am experiencing dependencies issues).

My current project is developed in C++ but I would like to include some Javascript for user-created content (level information and interaction routines, for example, that could be loaded into the game without having to rebuild).

Is it possible to add a secondary flag to cocos new with for example "-s js" to allow for inclusion of those libraries at project generation time?

Kind regards,

mathieu

Generating new project doesn't work

I tried to generate new project using coco2d-x v3 (35beef) and it doesn't work.

$ cocos new MyGame -p com.MyCompany.MyGame -l cpp
Loading .bash_profile
Loading .bashrc
Traceback (most recent call last):
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 992, in <module>
    run_plugin(command, argv, plugins)
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 916, in run_plugin
    plugin.run(argv, dependencies_objects)
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/plugins/plugin_new/project_new.py", line 258, in run
    self.parse_args(argv)
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/plugins/plugin_new/project_new.py", line 140, in parse_args
    if args.list_templates:
AttributeError: 'Namespace' object has no attribute 'list_templates'

On the other hand, it works when I checked out cocos2d-x v3.12 (26fb643).

v3 uses cocos2d-console with HEAD: 08e776c, and
v3.12 uses cocos2d-console with HEAD: 04ade20

Between them are only two commits:

$ git log --oneline 04ade20..08e776c
08e776c Merge pull request #352 from ricardoquesada/disable_gui_templates
32511e9 disable cocos gui and --list-templates

Obviously, 32511e9 causes that issue.

how can i use the cocos package manager ?

the ‘cocos package’ and ‘cocos framework’ is still under development?
how can i create a new cocos framework, and add it to my project ? are there any examples?
thanks!

"cocos run -p web" raises UnicodeEncodeError in Traditional Chinese Windows

Error

cocos run -p web
編譯模式:debug
部署模式:debug
Traceback (most recent call last):
File "C:\cocos2d-x-3.15\tools\cocos2d-console\bin/cocos.py", line 1027, in
run_plugin(command, argv, plugins)
File "C:\cocos2d-x-3.15\tools\cocos2d-console\bin/cocos.py", line 916, in run_plugin
plugin.run(argv, dependencies_objects)
File "C:\cocos2d-x-3.15\tools\cocos2d-console\plugins\plugin_run\project_run.py", line 341, in run
self.parse_args(argv)
File "C:\cocos2d-x-3.15\tools\cocos2d-console\bin\cocos.py", line 615, in parse_args
self._add_custom_options(parser)
File "C:\cocos2d-x-3.15\tools\cocos2d-console\plugins\plugin_run\project_run.py", line 56, in _add_custom_options
help=MultiLanguage.get_string('RUN_ARG_NO_CONSOLE'))
File "C:\cocos2d-x-3.15\tools\cocos2d-console\bin\MultiLanguage.py", line 52, in get_string
fmt = cls.get_instance().get_current_string(key)
File "C:\cocos2d-x-3.15\tools\cocos2d-console\bin\MultiLanguage.py", line 158, in get_current_string
ret = ret.encode(self.encoding)
UnicodeEncodeError: 'cp950' codec can't encode character u'\u7ed9' in position 56: illegal multibyte sequence

Fix

There are some Simplified Chinese characters in Traditional Chinese string in bin/strings.json file:

  • Line 746:
    Incorrect:
    "RUN_ARG_NO_CONSOLE" : "關閉 Windows,Mac 和 Linux 下的模擬器控制檯視窗(傳入命令行參數 '-console no' 给模擬器)。",
    Correct:
    "RUN_ARG_NO_CONSOLE" : "關閉 Windows,Mac 和 Linux 下的模擬器控制檯視窗(傳入命令行參數 '-console no' 給模擬器)。",

  • Line 747:
    Incorrect:
    "RUN_ARG_WORKING_DIR" : "設定 Windows,Mac 和 Linux 下模擬器運行的工作目錄(傳入命令行參數 '-workdir \"<path>\"' 给模擬器)。",
    Correct:
    "RUN_ARG_WORKING_DIR" : "設定 Windows,Mac 和 Linux 下模擬器運行的工作目錄(傳入命令行參數 '-workdir \"<path>\"' 給模擬器)。",

  • Line 871:
    Incorrect:
    "COMPILE_INFO_USE_COCOAPODS" : "檢測到 CocoaPods:使用 xcworkspace 进行编译。",
    Correct:
    "COMPILE_INFO_USE_COCOAPODS" : "檢測到 CocoaPods:使用 xcworkspace 進行編譯。",

cocos compile not working for paths with whitespaces

Hi!

As stated I am unable to compile my project when the path to cocos2d-x, cocos project, ant and everything else needed contains a whitespace.

I tried to fix it myself (https://github.com/cocos2d/cocos2d-console/blob/v3/plugins/plugin_package/plugin_package.py#L39) but I can't find this file inside my cocos2d-console. I would have added quotes to the path but yeah.. the file doesn't exist (i am using cocos2d-x 3.8). I know I simply could remove the whitespaces but than I would need to change the settings in all other programms which I use. And to be honest, that doesn't fix the problem ;)

With Xcode 8.3 PackageApplication is gone

You need change xcrun to xcodebuild.
xcrun -> xcodebuild -exportArchive


https://github.com/cocos2d/cocos2d-console/blob/v3/plugins/plugin_compile/project_compile.py

line 826

        if self._sign_id is not None:
            # generate the ipa
            app_path = os.path.join(output_dir, "%s.app" % targetName)
            ipa_path = os.path.join(output_dir, "%s.ipa" % targetName)
            ipa_cmd = "xcrun -sdk %s PackageApplication -v \"%s\" -o \"%s\"" % (self.use_sdk, app_path, ipa_path)


            self._run_cmd(ipa_cmd)

Can't use CCLOG() etc. on Mac OS via Terminal (not Xcode)

Hi! I'm currently using Cocos2d-x version 3.0 on Mac OS 10.9 Mavericks.

When using the cocos run command in the Mac OS Terminal, no output (i.e. from CCLOG calls, with COCOS2D_DEBUG enabled) is sent to the console. However, if I open up my CocosTest.app package and run the binary directly from the Terminal, or if I build and run the project using Xcode, CCLOG output appears as expected. I think the issue has something to do with .app files swallowing output from stdout when opened from the Terminal, as opposed to directly running the binary.

Also, it'd be nice if cocos compile and cocos run automatically added a preprocessor flag for COCOS2D_DEBUG in debug mode! :)

tvOS support in prebuild script

I've modified the gen_libs.py script to build tvOS libraries but those changes depend on changes to libsimulator.xcodeproj. What's the procedure to merge my changes?

`/Applications/Cocos/Cocos2d-x/` is hard coded for `gen-templates` command

Hi,
I work on MacOS, I have installed cocos2d in a custom folder, not with the installer but from the git.
When I executed cocos gen-templates the templates files have /Applications/Cocos/Cocos2d-x/ inside.
So when I generate a project with something like cocos new ProjectName -p projectname.com.name -l cpp -t binary my project doesn't work because the path for the files are not good.

I use cocos2d-x-3.13.1 and Cocos Console 2.1, I don't know very well the project but I see there is an environment variable named COCOS_X_ROOT which may be very useful for this.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.