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

Running the project on multiple platforms

The same project can be run on different platforms. Let's see a few examples of the same project, running on Windows (desktop mode), Windows RT (tile mode), iOS, and Android with ease and with no need to rewrite the code for different languages.

Running the project on Windows (desktop mode)

To run the project on Windows desktop, go to the project's folder and open the proj.win32 folder and double-click on wp8Game.sln in desktop mode.

Once Visual Studio opens, click on Local Machine to build and run the project. Once built, you should see it running:

Running the project on Windows RT (tile mode)

To run the project in Windows RT mode, you will need the Visual Studio 2012 Professional or Ultimate edition. The following steps will help you run the project on Windows RT:

  1. In the project's folder, instead of proj.win32, open proj.winrt.
  2. Double-click on wp8Game.sln to open it in Visual Studio 2012.
  3. Select Local Windows Debugger in the drop-down list next to the green triangle button on the toolbar and click on it.
  4. Once it has been built, it will open in fullscreen mode, as shown in the following screenshot:

Running the project on the iPhone simulator using Xcode

You can even take a copy of the Cocos2d-x 2.2.3 folder to a Mac and run it on the simulator. Just install the Xcode IDE; go to the proj.ios folder and double-click on the Xcode project and that's all! You should now see the project running on an iOS simulator:

Running the project on an Android simulator using Eclipse

Running the project on Eclipse on an Android simulator is a long process, so I am just showing you the output on the Android Virtual Device (AVD):

Later in the book, we will also see how to configure the IDEs to run the project on an iOS simulator on Mac using the Xcode IDE and on Android simulator using the Eclipse IDE.

主站蜘蛛池模板: 龙川县| 鞍山市| 靖江市| 民和| 托克托县| 清原| 柯坪县| 乌兰察布市| 榆中县| 武陟县| 当阳市| 青冈县| 依安县| 南溪县| 玛沁县| 新乡县| 大洼县| 邵武市| 于田县| 济南市| 桂东县| 页游| 德令哈市| 灌云县| 来凤县| 鹿泉市| 惠来县| 额济纳旗| 灵寿县| 嵩明县| 海城市| 马尔康县| 含山县| 获嘉县| 凤城市| 灵寿县| 六安市| 拜城县| 老河口市| 乐东| 田东县|