zoukankan      html  css  js  c++  java
  • cocos2dx 3.0rc怎样创建项目

    转自官网的文档。

    How to Run cpp-tests on win32

    In this article, I will show you how to run cpp-tests on your windows PC.

    Environmental Requirements

    Compile and Run the TestCpp Project

    • Download cocos2d-x from our download page and unzip it on your working directory. The structure of the directory should look like as following:

    • Open file "cocos2d-win32.vc2012.sln" in "build" folder as fllowing:

    • Right click the "TestCpp" project, and select "Set as StartUp Project", then you can compile and run the TestCpp project, here is the screenshot:

    How to Create a Empty Project

    Prerequisite

    At first, you need to download and install python 2.7 to finish the following steps.

    Then, you should add the path "[cocos2d-x root] oolscocos2d-consolein" into your system environment path, don't forget to add a ';' as delimiter. For example, my bin path is "F:sourcecocos2d-x oolscocos2d-consolein", and I will add it to the end of PATH as following:

    (Note: The [cocos2d-x root] is the path where you unzip your downloaded cocos2d-x package)

    Open cmd and change current path to the bin path, and input the cmd "cocos -h", if it outputs the help message, congratuation, you have added the right path in the environment variables. We can create a project by usingcocos2d-console commands now.

    Type "cocos new -h", and you will get the following result :

    Now it's time to use the command to create a new empty project.

    For example, I want to create a cpp project, then I can type "cocos new MyGame -p com.MyCompany.AwesomeGame -l cpp -d F:/MyProject". This command will create a cpp project under F:/MyProject directory. Here is the screenshot:

    How to Compile and Run the Empty Project

    Open MyGames.sln in the proj.win32 folder, press "Ctrl-F5" to compiling and running the project. If you compiles and run without any errors, you will get the following results:

    执行的时候也能够在命令行直接输入命令cocos run -p win32

    另一个创建项目的方法是在CocosStudio的场景编辑器中能够创建新项目

  • 相关阅读:
    单一职责原则
    算法的设计与分析 -----图 (1)
    交换机
    子网掩码
    IP地址分类+网络号
    网络参考模型与5G协议
    什么是5G
    RxJAVA
    EventBus3.0的学习
    ButterKnife+Zelezny插件
  • 原文地址:https://www.cnblogs.com/liguangsunls/p/7274742.html
Copyright © 2011-2022 走看看