用phone gap开发windows phone应用 - Get Started Guide

  根据phonegap版本不一样,phonegap和visual studio集成开发不同,文中红色部分是我加上的

  • 1. Requirements

    • Windows 7 or Windows Vista with SP2

    Note: Running in VM has issues, if you are on a Mac, you will need to setup a bootcamp partition with Windows 7 or Vista

    Necessary for Installing on Device and Submitting to Market Place:

    • Become an App Hub member.
  • 2. Install SDK + PhoneGap

    Download and install the Windows Phone SDK.


    Download the latest copy of PhoneGap and extract its contents. Navigate to the Windows Phone directory and copy the filePhoneGapStarter.zip to your templates folder located at C:\Users\[USERNAME]\Documents\Visual Studio 2010\Templates\ProjectTemplates\Silverlight for Windows Phone

   现在下载的是更高版本的phonegap,下载下来后有不同平台的开发工具,如下:

        用phone gap开发windows phone应用 - Get Started Guide_第1张图片

将CordovaStarter-1.7.0.zip拷贝到C:\Users\[USERNAME]\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#下

  • 3. Setup New Project

    • Open Visual Studio Express for Windows Phone and choose New Project.
    • Select PhoneGapStarter.
    • Give your project a name, and select OK.

实际我们看到的界面如下:

用phone gap开发windows phone应用 - Get Started Guide_第2张图片

以上图看到有两个CordovaStarter,是因为我将两个版本的都放到了templates里

  • 4. Review the project structure

    • The 'www' folder contains your PhoneGap html/js/css and any other resources included in your app.
    • Any content that you add here needs to be a part of the Visual Studio project, and it must be set as content.
  • 5. Build and Deploy to Emulator

    • Make sure to have Windows Phone Emulator selected in the top drop-down menu.
    • Hit the green play button beside the Windows Phone Emulator drop-down menu to start debugging or press F5.

  • 6. Build your project for the device

    In order to test your application on a device, the device must be registered. Clickhere to read documentation on deploying and testing on your Windows Phone.

    • Make sure your phone is connected, and the screen is unlocked
    • In Visual Studio, select 'Windows Phone Device' from the top drop-down menu.
    • Hit the green play button beside the drop-down menu to start debugging or press F5.
  • Done!

    You can also checkout the wiki version of this guide here.

原文: http://phonegap.com/start#wp


你可能感兴趣的:(windows,documentation,silverlight,PhoneGap,templates,phone,debugging)