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

Developing on Windows Phone 8 Devices的更多相关文章

  1. WCID Devices -- Windows Compatible ID Devices

    WCID Devices What is WCID? A WCID device, where WCID stands for "Windows Compatible ID", i ...

  2. Developing Universal Windows Apps 开发UWA应用 问答

    开始是一些欢迎,就不翻译 Question: Is the code already there? Answer: There is some code on that codeplex site, ...

  3. Windows Phone Silverlight 8.1 apps

    The Windows Phone Silverlight 8.1 app model gives Windows Phone 8 developers access to some of the n ...

  4. 设置 Quick-Cocos2d-x 在 Windows 下的编译环境

    http://cn.cocos2d-x.org/tutorial/show?id=1304 设置 Quick-Cocos2d-x 在 Windows 下的编译环境 Liao Yulei2014-08- ...

  5. Windows Phone 8 Programming Considerations

    OpenGL ES 2.0 Support Marmalade supports the Open GL ES 2.0 Graphics API on Windows Phone 8 using a ...

  6. [Windows Azure] Configuring and Deploying the Windows Azure Email Service application - 2 of 5

    Configuring and Deploying the Windows Azure Email Service application - 2 of 5 This is the second tu ...

  7. Windows Phone Update3 (新分辨率 1080 x 1920 不会影响到现有WP8应用)

    更新内容: Update 3 OS version: 8.0.10501.127 or 8.0.10512.142* Accessibility. We've made several improve ...

  8. Unity for Windows: III–Publishing your unity game to Windows Phone Store

    原地址:http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-iiipublishing-to-windows-phone-st ...

  9. PatentTips - DMA address translation between peer-to-peer IO devices

    BACKGROUND As processing resources have increased, demands to run multiple software programs and ope ...

随机推荐

  1. S5第一次月考

    # Python五期月考一 # 1 介绍 # 满分100分,90分及格 # # 考试范围: # 1.Python语法 # 2.数据类型 # 3.流程控制 # 4.函数 # 5.模块 # # 考试时间: ...

  2. clipboard

    我们在网页上放置一个复制按钮,主要用来方便用户复制链接之类的复杂文本,以往的做法是,通过JS依靠Flash,甚至借助jQuery庞大的js库来实现文本复制到剪贴板的.今天我要给大家介绍的是一款极现代的 ...

  3. ubuntu下关于profile和bashrc中环境变量的理解

    (0) 写在前面 有些名词可能需要解释一下.(也可以先不看这一节,在后面看到有疑惑再上来看相关解释) $PS1和交互式运行(running interactively): 简单地来说,交互式运行就是在 ...

  4. Oracle---------coalesce的用法介绍

    COALESCE (expression_1, expression_2, ...,expression_n)依次参考各参数表达式,遇到非null值即停止并返回该值.如果所有的表达式都是空值,最终将返 ...

  5. Python3:input()输入函数的用法

    Python3:input()输入函数的用法 一.简介 input这个函数,第一个参数是提示语,它默认是空的.在我们使用input的时候,会从标准输入中读取一个string,即字符串(请注意,这里很重 ...

  6. Xshell 或者 Xftp 突然连不上阿里云

    今天突然发现使用xshell 远程连接不上阿里云,废了好大的劲,才明白的差不多.只要不出意外有以下几种情况:1.安全组中有没有你需要连接的端口,2.防火墙是否关闭,3.端口是否开放权限,4.是否安装了 ...

  7. 限制goroutine数量写法

    虽然golang的goroutine可以开启无数个goroutine,但是没有限制也是不行的.我就写一下我对goroutine数量限制的写法 1.初始化goroutine协程池.把goroutine数 ...

  8. canal入门使用

    1.下载canal安装包: 地址:https://github.com/alibaba/canal/releases 图例: 2.将下载好的安装包复制到Linux,解压 3.修改配置文件 vi con ...

  9. EF Code-First 学习之旅 配置一对一的关系

    1对1.1对0 的关系 例如:Entity1与零个或一个Entity2的实例有关系 public class Student { public Student() { } public int Stu ...

  10. WCF简单学习

    前两天学习了WCF的一些基础东西,好像不怎么用,但是学习一下还是有助自己增长知识滴.既然是学习就先偷一下别人的概念基础.wcf中有一个ABC的概念,就是第一: "A" 是地址,就是 ...