How to install cocos2d/cocos2d-x. Official installation instructions. Project installation guide. Framework or library installation. Build installation instructions. How to setup and install from GitHub. Installation steps and setup instructions. Official docs and installation instructions GitHub.
cocos2d/cocos2d-x Installation Guide
How to install cocos2d/cocos2d-x. Official project installation instructions and setup guide.
⚡
Automated Install (Recommended)
Quick installation instructions for cocos2d/cocos2d-x. This is the fastest way to complete project installation and setup.
Install via curl
curl -fsSL https://hexmos.com/ipm-install | bash &&
ipm i cocos2d/cocos2d-xor
Install via npx
npx @hexmos/ipm i cocos2d/cocos2d-xPrerequisites
Python
languageVersion: >=2.7.5
CMake
build_toolVersion: >=3.1
Xcode
system_toolVersion: Xcode 8.0+
Android Studio
system_toolVersion: 3.0.0+
Manual Installation Methods
Manual installation instructions. How to install from GitHub source.
Clone Repository and Dependencies
git clone https://github.com/cocos2d/cocos2d-x.git
cd cocos2d-x
python download-deps.py
git submodule update --initSet Up Environment
cd cocos2d-x
source FILE_TO_SAVE_SYSTEM_VARIABLERun Tests and Build
mkdir build
cd build
cocos run --proj-dir .. -p [mac|win32|android|linux|ios]Post Installation Steps
- Open the project folder in your preferred IDE (e.g., Visual Studio Code, Xcode).
- Create a new project using the provided template.
- Run the application by typing `./run` in the terminal.
