Reputation: 5110
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 ?
Upvotes: 2
Views: 2340
Reputation: 22042
Steps for First time Cocos2d-x 4.0 setup in Mac OS
Download Cocos2d-X 4.0+ SDK Here : https://www.cocos2d-x.org/download
In Terminal, go inside downloaded cocos2d sdk and execute below command
./setup.py
To create new project from terminal, execute below command.
cocos new -l cpp -p com.bfg.newProj -d /Volumes/Development/Project/NewProject
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:
In Build Settings, Skip install is NO for the main project target
Installation Directory under Deployment must be /Applications
Upvotes: 0
Reputation: 162
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.
Upvotes: 2