Cocos Console Run Command

  • Sonar Systems admin
    Likes 0

    Problem Description

    With the newer versions of Cocos2d-x and Cocos2d-JS the Cocos Console will be more mandatory than ever.

     

    Let’s learn how to run using the Cocos Console.

    Solution Description

    -p is the platform [mac, ios, web, android, win32]
    -m is the mode [debug, release] (this is optional and if ommitted then mode is set to debug)
    -s is the project directory (can be ommitted if you cd to the project directory first)

     

    cocos run -s /Users/sonarsystems/Desktop/Game1 -p mac -m release
    cocos run -p mac -m release

     

    Quiet - reduces output to the console
    ---------------------------------------------
    cocos run -q -s /Users/sonarsystems/Desktop/Game1 -p mac -m release
    cocos run -q -p mac -m release

     

    Web Browser Commands only
    ---------------------------------------------
    cocos run -s /Users/sonarsystems/Desktop/Game1 -p web -b /Applications/Google\ Chrome.app
    cocos run -p web -b /Applications/Google\ Chrome.app

Login to reply