First, create a new project under Windows
Open cmd to set the path to project-creator under tools under Cocos Software, execute the command:
Create_project.py-project helloworld-package Com.zsc.helloworld-language CPP
Second, the Linux environment construction (QT configuration)
1. Install the Linux system, Ubuntu 14.04 64-bit
2. Installing the Support software
1th step: sudo apt-get update (run this command)
2nd step: sudo apt-get install git ssh vim ctags qt-sdk build-essential libx11-dev libxmu-dev libglu1-mesa-dev libgl2ps-dev libx I-dev libglfw-dev libzip-dev libcurl4-gnutls-dev libfontconfig1-dev libsqlite3-dev libglew*-dev openjdk-7-jdk lib32z1 LIB32NCURSES5 lib32bz2-1.0 lib32stdc++6
Follow the steps below Windows to find the Project-creator in the Cocos directory.
Make clean; Make clean debug=1; Run this command to clear the files generated by make. Make debug=1 compile the debug version.
3. Unzip the COCOS2DX development package----------The above steps to complete the configuration of the Linux environment---------
4. Create HelloWorld project and run 1) CD to your COCOS2DX directory/tools/project-creator 2) execute./create_project-project helloworld-language cpp-p Ackage Com.xuegl.HelloWorld 3) in your COCOS2DX directory, perform make and make debug=1, compile Cocos release version and DEBUG version of dynamic Library 4) in the project catalog projects/ Helloworld/proj.linux, execute make build executable 5) Run, Projects/helloworld/proj.linux/bin/release/helloworld
5.QT Integration Engineering 1) Create an import project with QT 2) set the root directory to cocos2d-x-2.2.3 directory 3) Set the project name for your project names HelloWorld 4) Select the code required for the project (COCOS2DX, Cocosdension,exten Sions, external, classes,resources under Project Catalogue) 5) Set the Build&run of the project
6. Porting to Android 1) decompression Adt-bundle 2) Unzip NDK 3) Set NDK path (direct eclispse setting) 4) Import COCOS2DX project into Eclipse (two projects, one is your COCOS2DX project project, one is Li BCOCOS2DX) 5) Run
7 Set your Android phone 1) Edit a file sudo vim/etc/udev/rules.d/nubia.rules (the name of the Nubia.rules file can be easily taken) 2) Edit the content subsystem== "USB", Attrs {idvendor}== "18d1", attrs{idproduct}== "9025", mode= "0666" where idvendor== "18d1" and idproduct== "9025", The following string is changed to your own phone's seller and product number This information can be obtained via LSUSB 3) sudo chmod a+rx/etc/udev/rules.d/nubia.rules 4) Sudo/etc/init.d/udev Res Tart 5) Restart the ADB server CD ANDROID-SDK directory/platform-tools sudo./adb kill-server (Note the path where ADB is located, ANDROID-SDK directory/platform-tools/adb) 6) reseat the phone 7) perform ADB devices view the list of Android devices, normally you can see your phone
---------------------------------Configuring QT
1, click Projects.
2. Set the build directory path: Set the Proj.linux path to the project.
3. Set build steps: Click Add Build Step, set it to make, and delete the original.
4. Set the edit build configuration. Set default to Release (method: Click on the Rename)---release mode debug mode: Then click Add, adding Debug, then build directory path does not change, will build The commend in the steps is set to make, arguments is set to Debug=1, the clean steps is set, the original command is deleted, and the commend is added as: make;arguments Yes: debug=1 clean
5. Set run:executable path to proj.linux/bin/debug/project name
Third, the construction of the Android environment
1. Install JDK, configure Java_home
2. Unzip the Adt-bundle
--------Environment has been built-----
Test environment
1. Open Eclipse under Adt-bundle
2. Set Workspace
3. Create a Helloanroid project
4. Turn your Android phone into developer mode
5. Pick up your phone
6. In eclipse, compile and run your helloandroid
---------Build Android COCOS2DX development environment------
1. Copy the NDK to a directory you like, mine is F:\android-ndk-r9d
2. Installing Cygwin
3. Set the NDK path (added in eclipse-windows->preference->c++->build->enviroment) name:ndk_root value: The path where the android-ndk-r9d is located.
4. Modify the build_native.sh script (because of permissions issues)
About 69 lines, after copying the script, add this sentence
# Modify Auth chmod 777 "$APP _android_root"/assets-r
"Cocos2d-x Learning Notes" under Windows Create a project &linux environment Construction & Android Environment building