官术网_书友最值得收藏!

Time for action – installing Cocos2d-x

Open Terminal or command prompt and navigate to the Cocos2d-x extracted folder:

  1. You can do this by typing cd (that is, cd and a space) and then dragging the folder to the Terminal window and hitting Enter. In my machine this looks like:
    cd /Applications/Dev/cocos2d-x-3.4
  2. Next, type python setup.py.
  3. Hit Enter. You will be prompted for the paths to the NDK, SDK and Apache ANT root. You must drag each one of the folders to the Terminal window, making sure to delete any extra spaces at the end of the path and hit Enter. So for the NDK I get:
    /Applications/Dev/android-ndk-r10c
  4. Next, it's the path for the SDK. Once again, I drag the folder that I have stored inside Eclipse's folder:
    /Applications/eclipse/sdk
  5. Next, it's the path to ANT. If you have it properly installed on your machine, the path will be something like usr/local/bin and the setup script will find it for you. Otherwise, you can use the one you downloaded and extracted. Just point to the bin folder inside it:
    /Applications/Dev/apache-ant-1.9.4/bin
  6. The last step is to add these paths to your system. Follow the last instruction in the window where it says: Please execute command: "source /Users/YOUR_USER_NAME/.bash_profile" to make added system variables take effect. You can copy the command inside the quotes, paste it, and hit Enter.

What just happened?

You now have Cocos2d-x installed on your machine and you're ready to go. Time to create our first project!

主站蜘蛛池模板: 德令哈市| 扎兰屯市| 手游| 台湾省| 遂平县| 固镇县| 平泉县| 休宁县| 白银市| 桂东县| 道孚县| 巩义市| 平陆县| 马边| 曲松县| 无棣县| 满洲里市| 大兴区| 蓬溪县| 木兰县| 托克逊县| 临高县| 乌海市| 竹山县| 黄大仙区| 宁国市| 那曲县| 宁陵县| 康马县| 裕民县| 永吉县| 伊宁县| 大丰市| 湛江市| 海晏县| 泗阳县| 河池市| 小金县| 旬邑县| 绥芬河市| 新田县|