Developing on Windows Phone 8 Devices
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
- Build your mkb project with the Windows Phone 8 SDK as described in the build step.
- Generate the deployment with the Marmalade Deployment Tool.
- During the Select Build Stage, select either WP8-ARM Debug or WP8-ARM Release
- During the Configuration Stage, select Windows Phone 8 as one of the deployment platforms.
- At the Deploying Stage, select "Package, Install and Run" to. This will create a .xap file and launch the application on the device.
- Alternatively you can just select "Package" and then click "Explore" to locate the generated application XAP.
- 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:
- Work out the position of the Marmalade Deploy Tool in the list of external tools.
- Go to Tools/Customize/Commands.
- Select the toolbar you wish to add the tool to (For instance Standard).
- Select Add Command.
- 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)
- Move the command Up or Down into the right position.
- 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:
- 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 - Use the Windows Phone Power Tools which can be downloaded from Windows Phone Power Tools
Developing on Windows Phone 8 Devices的更多相关文章
- WCID Devices -- Windows Compatible ID Devices
WCID Devices What is WCID? A WCID device, where WCID stands for "Windows Compatible ID", i ...
- Developing Universal Windows Apps 开发UWA应用 问答
开始是一些欢迎,就不翻译 Question: Is the code already there? Answer: There is some code on that codeplex site, ...
- 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 ...
- 设置 Quick-Cocos2d-x 在 Windows 下的编译环境
http://cn.cocos2d-x.org/tutorial/show?id=1304 设置 Quick-Cocos2d-x 在 Windows 下的编译环境 Liao Yulei2014-08- ...
- 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 ...
- [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 ...
- 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 ...
- 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 ...
- PatentTips - DMA address translation between peer-to-peer IO devices
BACKGROUND As processing resources have increased, demands to run multiple software programs and ope ...
随机推荐
- DP专题·二
1.hdu 1260 Tickets 题意:有k个人,售票员可以选择一个人卖,或者同时卖给相邻的两个人.问最少的售票时间. 思路:dp[i] = min(dp[i - 1] + singlep[i], ...
- hibernate validator 验证
@AssertTrue 用于boolean字段,该字段只能为true @AssertFalse 该字段的值只能为false @CreditCardNumber 对信用卡号进行一个大致的验证 @De ...
- POJ - 2942 Knights of the Round Table (点双联通分量+二分图判定)
题意:有N个人要参加会议,围圈而坐,需要举手表决,所以每次会议都必须是奇数个人参加.有M对人互相讨厌,他们的座位不能相邻.问有多少人任意一场会议都不能出席. 分析:给出的M条关系是讨厌,将每个人视作点 ...
- Struct2小组开发简单命名规范
基本原则或者说理念:简单就是美 1.数据库名:项目名 2.表名:_model名 3.字段:和model中的属性名一致(不要和数据库名冲突) 4.用层来划分包:com.liying.bbs.action ...
- java 工厂模式的作用,为什么要用工厂模式以及示例演示
1 工厂模式的作用,为什么要用工厂模式? 工厂模式是为了解耦:把对象的创建和使用的过程分开.就是Class A 想调用Class B,那么只是调用B的方法,而至于B的实例化,就交给工厂类. 工厂模式可 ...
- velocity 使用笔记
1. velocity获取字符串长度方法: 用length()就可以了,截取子字符串用substring(0,10) .$str.substring(0,3) 集合获取集合长度用:size() 2. ...
- 左连接、右连接、内连接和where
首先可以看下w3school写的关于join的介绍: http://www.w3school.com.cn/sql/sql_join.asp on是关联条件,where是筛选条件 数据库在通过连接两张 ...
- c#中的控件01
1.常用控件: 只读文本:TextBlock.文本框:TextBox.按钮:Button 事件:鼠标移到按钮上的时候显示“大爷您来了”,离开 显示“大爷常来”,Click(点击).Loaded(控件加 ...
- linux驱动调试--修改系统时钟终端来定位僵死问题【转】
本文转载自:http://blog.chinaunix.net/uid-20671208-id-4940381.html 原文地址:linux驱动调试--修改系统时钟终端来定位僵死问题 作者:枫露清愁 ...
- javascript页面打印
打印本身比较简单,但要考虑到具体的需求.比如 1. 多浏览器: if (isIE()) { //打印预览 WebBrowser1.execWB(7, 1); } else { window.print ...