2

I used below command to export from command line.

cocos new -l cpp -p com.bfg.mynewpro -d /Volumes/Development/Project/Development/GuruNewPro

Exported source not includes main Xcode project file.

How to get it exported ?

enter image description here

enter image description here

iPhoneProcessor
  • 4,980
  • 6
  • 27
  • 49

2 Answers2

2

You have to generate the platform specific project files with cmake.

check out the instructions here https://github.com/cocos2d/cocos2d-x/tree/v4/cmake#generate-ios-project

NOTE:

cd cocos2d-x

This is actually referring to your game directory. Which in your case i suppose is MyCppGame folder.

Darren
  • 152
  • 9
0

Steps for First time Cocos2d-x 4.0 setup in Mac OS

  1. Download Cocos2d-X 4.0+ SDK Here : https://www.cocos2d-x.org/download

  2. In Terminal, go inside downloaded cocos2d sdk and execute below command

    ./setup.py
    
  3. To create new project from terminal, execute below command.

    cocos new -l cpp -p com.bfg.newProj -d /Volumes/Development/Project/NewProject
    
  4. Now generate Xcode.proj file, execute below in terminal

    cd MyCppGame //your project root folder
    mkdir ios-build && cd ios-build
    cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos
    open Cocos2d-x.xcodeproj
    

By default cmake not installed in Mac. You can download cmake here https://cmake.org/install/

Install downloaded cmake. Then in terminal execute below command to install command line tool.

 PATH="/Applications/CMake.app/Contents/bin":"$PATH"

 sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

Other Changes:

  1. In Build Settings, Skip install is NO for the main project target

  2. Installation Directory under Deployment must be /Applications

Guru
  • 21,652
  • 10
  • 63
  • 102