[CB-3822] update wp7 SDK doc; rm info on VS template
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/26ec1cd6 Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/26ec1cd6 Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/26ec1cd6 Branch: refs/heads/master Commit: 26ec1cd65fb6a62a6734cfc77c4e752c0652c1ce Parents: 48328f0 Author: Mike Sierra <[email protected]> Authored: Wed Jul 3 13:15:09 2013 -0400 Committer: Michael Brooks <[email protected]> Committed: Wed Jul 3 10:47:50 2013 -0700 ---------------------------------------------------------------------- .../getting-started/windows-phone-7/index.md | 111 +++++++++---------- .../windows-phone-7/wp7emulator.png | Bin 0 -> 41379 bytes .../getting-started/windows-phone-7/wp7vs.png | Bin 0 -> 29416 bytes 3 files changed, 52 insertions(+), 59 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/26ec1cd6/docs/en/edge/guide/getting-started/windows-phone-7/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/getting-started/windows-phone-7/index.md b/docs/en/edge/guide/getting-started/windows-phone-7/index.md index e9c42c6..ca9f08f 100644 --- a/docs/en/edge/guide/getting-started/windows-phone-7/index.md +++ b/docs/en/edge/guide/getting-started/windows-phone-7/index.md @@ -20,83 +20,76 @@ license: Licensed to the Apache Software Foundation (ASF) under one Windows Phone 7 Platform Guide ================================== -This guide describes how to set up your development environment for Cordova and run a sample application. Note that Cordova used to be called PhoneGap, so some of the sites still use the old PhoneGap name. +## Requirements and Support -1. Requirements ---------------- +Requires Windows 7, Windows 8 or Windows Vista with SP2. Running +Windows as a virtual machine does not work well, so Mac users should +set up a Bootcamp partition to run Windows 7 or Vista. -- Windows 7, Windows 8 or Windows Vista with SP2 +To install the app onto a device or submit it to the market place, you +need to become an +[App Hub member](http://create.msdn.com/en-US/home/membership). -__NOTE:__ Running in VM does not work well. If you are on a Mac, you need to set up a bootcamp partition with Windows 7 or Vista. +Developers should use the the `cordova` utility in conjunction with +the Windows Phone SDK. Before installing it on Windows, open a +command line and type `git` to make sure it is installed. If not, +download it from [mysysgit.github.io](http://mysysgit.github.io). When +prompted to configure your PATH, choose the option: __Run Git and +included Unix tools from the Windows Command Prompt__. Once git is +available, follow the instructions in The Cordova Command-line +Interface for information how to install it, add projects, then build +and deploy a project. -- Become an [App Hub member](http://create.msdn.com/en-US/home/membership). You need to do so to install onto a device and submit the application to the market place. +## Install the SDK -2. Install SDK + Cordova ----------------------------- +Download and install the +[Windows Phone SDK](http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27570/) -- Download and install [Windows Phone SDK](http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27570/) -- Download and extract the latest copy of [Cordova](http://phonegap.com/download). You will be working in the `lib\windows-phone` subfolder. -- Copy the `CordovaWP7_x.x.x.zip` to the `\My Documents\Visual Studio 2012\Templates\ProjectTemplates\` folder. -(If the template file does not exist, you need to build it as described in 2.1 below.) -if you have just installed VisualStudio, you should launch it once to create this folder -if you prefer, you may add the project instead to the `Silverlight for Windows Phone` subfolder of `Visual C#`. This is up to you, and only affects where the project template is shown when creating a new project. Also, You may need to create this folder. +## Open a Project in the SDK -2.1. Building the template ------------------------------ +After installing the `cordova` utility, use the following to create a +new project, then add and build the Windows Phone 7 project. -__NOTE:__ Skip this step if the `lib\windows-phone` directory already contains a `CordovaWP7_x.x.x.zip` file. + $ cordova create hello com.example.hello "Hello World" + $ cd hello + $ cordova platform add wp7 + $ cordova build -- Open the `lib\windows-phone\templates\standalone\CordovaSolution.sln` in Visual Studio Express for Windows Phone -- Select __Export Template...__ from the __File__ menu. -- Choose template type __Project template__ -- Supply a name of the exported template, such as `CordovaStarter-2.1.0` to produce a `CordovaStarter-2.1.0.zip` file. +Open Visual Studio and choose __Open Project__. Navigate to the +`hello/platforms/wp7` directory and choose the `Hello_World.sln` file. +The SDK displays the directory's contents: -- Optionally, add a description, icon image, or Preview image. These are displayed in Visual Studio's __New Project__ dialog. -- __NOTE:__ If you select __Automatically import the template...__, then you don't need to copy the `.zip` file over as outlined in step 2. -- Press __Finish__. + -3. Set up New Project --------------------- +At this point you can modify the app within the SDK, but running the +`build` or `prepare` commands again wipes out local changes. If Visual +Studio is open, it alerts you about modified files and offers you the +option to reload them. See The Cordova Command-line Interface for +more information. -- Open Visual Studio Express for Windows Phone and choose **New Project**. -- Select **CordovaStarter**. (The version number displays in the template description.) -- - __NOTE:__ If you do not see it, you may have to select the top-level 'Visual C#'. -- Give your project a name, and select __OK__. +## Deploy to Emulator -  +Within the SDK, select the __Windows Phone Emulator__ target from the +popup menu in the main menu bar, and press the green button to run the +emulator: -4. Review the project structure -------------------------------- + -- The 'www' folder contains your Cordova html/js/css and any other resources included in your app. -- Any content that you add needs to be a part of the Visual Studio project, and it must be set as content. +The app displays on the emulator's home screen as it would on a real +device: -  + -5. Build and Deploy to Emulator -------------------------------- +## Deploy to Device -- Make sure **Windows Phone Emulator** is selected in the main drop-down menu. -- Press the green **play** button next to the drop-down menu to start debugging, or else type __F5__. +To test your application on a device, the device must be registered. +MSDN provides +[documentation][http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565(v=vs.105).aspx] +to help deploy and test your Windows Phone. -  +Once registered, you need to make sure the phone is connected via USB +with its screen unlocked. In Visual Studio, choose the __Windows Phone +Device__ target and press the green button to run it: -  + -6. Build your project for the device ------------------------------------- - -To test your application on a device, the device must be registered. MSDN provides [documentation][register-url] to help deploy and test 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. -- Press the green **play** button next to the main drop-down menu to start debugging, or type __F5__. - -  - -Done! ------ - -You can also checkout more detailed version of this guide [here](http://wiki.phonegap.com/w/page/48672055/Getting%20Started%20with%20PhoneGap%20Windows%20Phone%207). - -[register-url]: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565(v=vs.105).aspx http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/26ec1cd6/template/docs/default/img/guide/getting-started/windows-phone-7/wp7emulator.png ---------------------------------------------------------------------- diff --git a/template/docs/default/img/guide/getting-started/windows-phone-7/wp7emulator.png b/template/docs/default/img/guide/getting-started/windows-phone-7/wp7emulator.png new file mode 100644 index 0000000..e3de172 Binary files /dev/null and b/template/docs/default/img/guide/getting-started/windows-phone-7/wp7emulator.png differ http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/26ec1cd6/template/docs/default/img/guide/getting-started/windows-phone-7/wp7vs.png ---------------------------------------------------------------------- diff --git a/template/docs/default/img/guide/getting-started/windows-phone-7/wp7vs.png b/template/docs/default/img/guide/getting-started/windows-phone-7/wp7vs.png new file mode 100644 index 0000000..4e14c2f Binary files /dev/null and b/template/docs/default/img/guide/getting-started/windows-phone-7/wp7vs.png differ
