Developing on Windows Phone 8 Devices
http://docs.madewithmarmalade.com/native/platformguides/wp8guide/wp8development.html

Contents


Build and Deploy Applications to Device

Before deploying to Windows Phone 8 devices, the development machine and devices must be set up correctly as described in the Windows Phone 8 Requirements and Setup Guide.

Building a project for Windows Phone 8

Currently applications need to be compiled directly with the native Windows Phone 8 SDK toolchain before deployment. This can be done using either Visual Studio 2012 (e.g the Pro or Ultimate versions) or Visual Studio Express 2012 for Windows Phone (however the former requires the latter to be installed in order to access the Windows Phone 8 SDK).

To use the Express version simply right click on the mkb and select "Open with Visual C++ 2012 Express Windows Phone". This will launch Visual Studio Express 2012 Windows Phone. To use the non-Express versions of Visual Studio 2012 select "Open with Visual Studio 2012 Window Phone". Alternatively, the mkb can be opened via the command-line, for example:-

  • "s3eHelloWorld.mkb --buildenv=vc11xwp --buildenv-toolset=wp8" (for express)
  • "s3eHelloWorld.mkb --buildenv=vc11 --buildenv-toolset=wp8" (for non-express)
  • "s3eHelloWorld.mkb --buildenv=vc11xwp --buildenv-toolset=wp8dev" (for express with on-device debugging)
  • "s3eHelloWorld.mkb --buildenv=vc11 --buildenv-toolset=wp8dev" (for non-express with on-device debugging)

The default Marmalade project for Windows Phone 8 supports full on-device debugging (by using "--buildenv-toolset=wp8dev" via the command-line). One can also create a typical solution that only supports limited on-device debugging via tracing by instead supplying "--buildenv-toolset=wp8". Debugging issues are described in a section below.

Note that if you wish to build your project from the command line then you must use the non-Express version of Visual Studio 2012. The Express version of the IDE does not support the traditional command line build arguments. This means that the "--make" mkb option will not work for the Express version. Note that it may be possible to use MSBuild directly to build Express solutions from the command line, however at the time of writing that assertion is untested.

Deploying to device

Unlike on other platforms, you cannot launch the Marmalade Deploy Tool by building GCC (ARM) Release. The Marmalade Deploy Tool is installed into your list of external tools (on the tools menu in Visual Studio).

You can also run the Marmalade Deploy Tool directly. The developer will need to run DeplyTool shortcut from the installed Marmalade SDK and then navigate to the deploy_config.py file for the project. e.g. C:\Marmalade\6.2\examples\HelloWorld\build_iwgxhelloworld_wp8\deploy_config.py

  1. Build your mkb project with the Windows Phone 8 SDK as described in the build step.
  2. Generate the deployment with the Marmalade Deployment Tool.
  3. During the Select Build Stage, select either WP8-ARM Debug or WP8-ARM Release
  4. During the Configuration Stage, select Windows Phone 8 as one of the deployment platforms.
  5. At the Deploying Stage, select "Package, Install and Run" to. This will create a .xap file and launch the application on the device.
  6. Alternatively you can just select "Package" and then click "Explore" to locate the generated application XAP.
  7. Another option is to use the Windows Phone Power Tools which can be downloaded from Windows Phone Power Tools

You can manually add the Marmalade Deploy Tool to a Visual Studio toolbar:

  1. Work out the position of the Marmalade Deploy Tool in the list of external tools.
  2. Go to Tools/Customize/Commands.
  3. Select the toolbar you wish to add the tool to (For instance Standard).
  4. Select Add Command.
  5. Select Tools and then "External Command X", where X is the position of the Marmalade Deploy Tool in the list of external tools. (counting from 1)
  6. Move the command Up or Down into the right position.
  7. You should now have a button "Marmalade Deploy Tool" on your toolbar.

Deploying to the simulator

This uses the same procedure as above, except:

  • During the Select Build Stage, select either WP8-X86 Debug or WP8-X86 Release
  • If you are using the Windows Phone 8 deployment tool (or the Windows Phone Power Tools) select one of the emulators rather than device.

Debugging Device Builds

On-device debugging is supported for Windows Phone 8 by specifying the "--buildenv-toolset=wp8dev" command-line argument when launching the mkb. This creates a Visual Studio solution that includes a Marmalade.Shell C# sub-project that acts as a wrapper to support on-device debugging. The Marmalade.Shell is autogenerated and should not need to be modified manually. It will contain references to the files specified in the user's asset block (use the mkb option "test-config" to select a the named deployment configuration you wish to debug). To break into user code, open the native C++ project and set a breakpoint in the user's source code. Hit F5 to build and run. Note, one should make sure native debugging is selected rather than managed-debugging via the Shell properties.

In wp8dev-mode, the Visual Studio solution includes a prebuild step to run the deploy script to generate the deployment package. Should you wish to debug specific deployment options, either set them by editing the mkb or running the deploy tool via the menu. Note, any changes to the mkb will prompt you to reload the project.

If "--buildenv-toolset=wp8" is specified, on-device debugging will be limited to the use of the IwTrace API. The iwtrace.txt is saved in the Application's Data directory on device. There are 2 methods for obtaining the trace file:

    1. Use the Windows Phone Isolated Storage tool from the installed Windows Phone 8 SDK.
      Example command : C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\IsolatedStorageEx plorerTool>ISETool.exe ts deviceindex:1 {ef2011a7-063e-486e-8526-70ce6ac75b8f} C:\ise
    2. Use the Windows Phone Power Tools which can be downloaded from Windows Phone Power Tools

最新文章

  1. C# random helper class
  2. Testlink与Redmine关联
  3. iOS TableView如何刷新指定的cell或section
  4. Flex 加载shp
  5. JavaScript权威指南(第六版)--JavaScript概述 DEMO
  6. (转)Ratchet教程:meta与link标签
  7. storm启动分析
  8. Tomcat J2ee 发布步骤
  9. 提升你的Java应用性能:改善数据处理
  10. Android游戏源代码合集(主要是AndEngine和Libgdx的)
  11. 真懂JavaScript吗
  12. Windbg是windows平台上强大的调试器
  13. IOS开发创建开发证书及发布App应用(三)——创建App ID
  14. LeetCode解题中位运算的运用
  15. 基于git的代码版本管理规范及流程-简版
  16. IOS @proporty 关键字(一)retain strong
  17. 细说并发编程-TPL
  18. 手动设定统计数据 set_table_stats
  19. 百度云虚拟主机配置 Thinkphp5.1
  20. Centos6.5安装ansible2.6.3

热门文章

  1. CNN学习笔记:正则化缓解过拟合
  2. JavaScript:判断当前浏览器是否为微信浏览器
  3. 关于maven包冲突的一些思路
  4. cdoj1328卿学姐与诡异村庄
  5. Unity 碰撞检测 OnTriggerEnter 入门
  6. flex graphiclar symbol的不同比例尺切换
  7. Ubuntu16.04安装Appium
  8. Linux 进程管理 进程优先级管理
  9. xshell 常用命令
  10. centos7下安装ngnix1.8.1