You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/07/16 01:30:07 UTC

docs commit: [CB-4224] updated wp docs for 3.0.0

Updated Branches:
  refs/heads/master e433a983a -> a6cb620da


[CB-4224] updated wp docs for 3.0.0


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/a6cb620d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/a6cb620d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/a6cb620d

Branch: refs/heads/master
Commit: a6cb620da7dfb389493f6b9a90e31a59676bd743
Parents: e433a98
Author: Benn Mapes <be...@gmail.com>
Authored: Mon Jul 15 13:38:38 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Mon Jul 15 16:01:22 2013 -0700

----------------------------------------------------------------------
 docs/en/edge/guide/platforms/wp7/index.md     | 100 ++++++++++-----------
 docs/en/edge/guide/platforms/wp8/index.md     |  38 +++-----
 docs/en/edge/guide/platforms/wp8/tools.md     |  36 ++++++--
 docs/en/edge/guide/platforms/wp8/upgrading.md |  18 ++++
 4 files changed, 111 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a6cb620d/docs/en/edge/guide/platforms/wp7/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/wp7/index.md b/docs/en/edge/guide/platforms/wp7/index.md
index 4a74f0e..dbc775f 100644
--- a/docs/en/edge/guide/platforms/wp7/index.md
+++ b/docs/en/edge/guide/platforms/wp7/index.md
@@ -20,76 +20,74 @@ license: Licensed to the Apache Software Foundation (ASF) under one
 Windows Phone 7 Platform Guide
 ==================================
 
-## Requirements and Support
+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.
 
-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.
+1. System Requirements
+---------------
 
-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).
+- Operating System:
+    - Windows 7 or Windows 8 (Pro) or Windows Vista with SP2
+        - The 64-bit version (x64) of Windows is required for the SDK.
+        - The Pro version is recommended for running a device emulator.
 
-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.
+- Register and pay for a [Windows Phone Dev Center](http://dev.windowsphone.com/en-us/publish) account if you want to install your app on a real device and/or submit it to Market Place.
 
-## Install the SDK
+__NOTE:__ Running the SDK in Virtual Machine might present some challenges. You can read this blog post that gives insight on the solutions to develop for [Windows Phone on a Mac](http://aka.ms/BuildaWP8apponaMac).
 
-Download and install the
-[Windows Phone SDK](http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=27570/)
 
-## Open a Project in the SDK
+2. Install SDK + Cordova
+----------------------------
 
-After installing the `cordova` utility, use the following to create a
-new project, then add and build the Windows Phone 7 project.
+- Download and install the [Windows Phone SDK](http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=27570/)
+- Download and extract the latest copy of [Cordova](http://phonegap.com/download). You will be working in the `lib\windows-phone-8\wp7` subfolder, `lib\windows-phone-8\wp8` contains the Windwos Phone 8 version of Cordova.
+- Copy the file CordovaWP7_x_x_x.zip to the folder : \My Documents\Visual Studio 2012\Templates\ProjectTemplates\
 
-        $ cordova create hello com.example.hello "Hello World"
-        $ cd hello
-        $ cordova platform add wp7
-        $ cordova build
+2.1. Building the template
+-----------------------------
 
-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:
+__NOTE:__ this step may not be required.  If the lib\windows-phone directory already contains a file CordovaWP7_x_x_x.zip then you may skip this step.
 
-![](img/guide/platforms/wp7/wp7vs.png)
+In order to simplify the development process, Cordova comes with a script to build Visual Studio templates. This allows for rapid creation of Cordova applications inside Visual Studio. This template can be modified if needed and the below steps indicate how to proceed if you want to generate the template.
 
-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 Command-line Interface for
-more information.
+### Run the batch file to create and install the templates.
 
-## Deploy to Emulator
+- The root of the repo contains a file createTemplates.bat.  Double clicking this file will generate 2 .zip files. (CordovaWP7_x_x_x.zip + CordovaWP8_x_x_x.zip where x.x.x is the current version number)  To easily use these files in Visual Studio, copy them to 
+"My Documents\Visual Studio 2012\Templates\ProjectTemplates\" You will then be able to create new Apache Cordova Windows Phone apps from the Visual Studio File->New Project menu.
+- If you run the batch file from the command line, you can also call with a parameter to install automatically
 
-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:
+Run the script :
 
-![](img/guide/platforms/wp7/wprun.png)
+    >createTemplates.bat -install
 
-The app displays on the emulator's home screen as it would on a real
-device:
+3. Set up New Project
+--------------------
 
-![](img/guide/platforms/wp7/wp7emulator.png)
+- Open Visual Studio Express for Windows Phone and choose **New Project**.
+- Select **CordovaWP7**. (The version number is displayed in the template description.)
+- Give the project a name, and select __OK__.
 
-## Deploy to Device
+4. Review the project structure
+-------------------------------
 
-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.
+- The 'www' folder contains your Cordova 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.
+- Note: This screen capture was from the wp8 cordova-2.3.0 download, your listing will vary based on the actual version installed.
 
-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:
+![](img/guide/platforms/wp8/projectStructure.png)
+
+6. Build your project for the device
+------------------------------------
+
+In order to test your application on a device, the device must be registered. Click [here][register-url] to read documentation on deploying and testing on your Windows Phone 7.
+
+- Make sure your phone is connected, and the screen is unlocked.
+- In Visual Studio, select '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__.
 
 ![](img/guide/platforms/wp7/wpd.png)
 
+Done!
+-----
+
+[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/a6cb620d/docs/en/edge/guide/platforms/wp8/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/wp8/index.md b/docs/en/edge/guide/platforms/wp8/index.md
index fac477b..4fc2a2e 100644
--- a/docs/en/edge/guide/platforms/wp8/index.md
+++ b/docs/en/edge/guide/platforms/wp8/index.md
@@ -22,7 +22,7 @@ Windows Phone 8 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.
 
-__NOTE:__ Applications built with Apache Cordova for Windows Phone 8 run only on Windows Phone 8 devices. If you want to target both 7.5 'and' 8 devices, then use Apache Cordova for Windows Phone 7, which does not have all the advanced features included in IE10, but implements the same APIs.
+__NOTE:__ Applications built with Apache Cordova for Windows Phone 8 (wp8) run only on Windows Phone 8 devices. If you want to target both 7.5 'and' 8 devices, then use Apache Cordova for Windows Phone 7 (wp7), which does not have all the advanced features included in IE10, but implements the same APIs.
 
 1. System Requirements
 ---------------
@@ -55,7 +55,7 @@ __NOTE:__ Running the SDK in Virtual Machine might present some challenges. You
 ----------------------------
 
 - Download and install [Windows Phone SDK](http://www.microsoft.com/en-us/download/details.aspx?id=35471)
-- Download and extract the latest copy of [Cordova](http://phonegap.com/download). You will be working in the `lib\windows-phone-8` subfolder.
+- Download and extract the latest copy of [Cordova](http://phonegap.com/download). You will be working in the `lib\windows-phone-8\wp8` subfolder, `lib\windows-phone-8\wp7` contains the Windwos Phone 7 version of Cordova.
 - Copy the file CordovaWP8_x_x_x.zip to the folder : \My Documents\Visual Studio 2012\Templates\ProjectTemplates\
 
 2.1. Building the template
@@ -63,29 +63,17 @@ __NOTE:__ Running the SDK in Virtual Machine might present some challenges. You
 
 __NOTE:__ this step may not be required.  If the lib\windows-phone directory already contains a file CordovaWP8_x_x_x.zip then you may skip this step.
 
-In order to simplify the development process, Cordova comes with a Visual Studio template that allows creating a Cordova application rapidly. This template can be modified if needed and the below steps indicate how to proceed if you want to modify and re-generate the template.
-
-- Open the `lib\windows-phone\templates\standalone\CordovaSolution.sln` file in Visual Studio Express for Windows Phone.
-- Select __Export Template...__ from the __File__ menu.
-- Choose template type __Project template__
-- Give the exported template a name, such as `CordovaStarter-2.1.0`, which produces a `CordovaStarter-2.1.0.zip` archive.
-- Optionally, you may add a description, icon image, and preview image.  These  display 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__
-
-2.2 About the different templates
----------------------------------
-
-Apache Cordova for Windows Phone 8 only supports the standalone template.
-
-The 'Stand-Alone' template includes _all_ the source code for Apache
-Cordova.  This project is easier to fine-tune to use just the features
-you need, thereby working around the permissions issues of the 'Full'
-template, however this type of project is more difficult to update, as
-you update individual files within your project and manage any
-dependancies yourself.  In order to exclude an unused API, simply
-right-click-select the __Command__ class file in Visual Studio and
-choose __do not include in project__.
+In order to simplify the development process, Cordova comes with a script to build Visual Studio templates. This allows for rapid creation of Cordova applications inside Visual Studio. This template can be modified if needed and the below steps indicate how to proceed if you want to generate the template.
+
+### Run the batch file to create and install the templates.
+
+- The root of the repo contains a file createTemplates.bat.  Double clicking this file will generate 2 .zip files. (CordovaWP7_x_x_x.zip + CordovaWP8_x_x_x.zip where x.x.x is the current version number)  To easily use these files in Visual Studio, copy them to 
+"My Documents\Visual Studio 2012\Templates\ProjectTemplates\" You will then be able to create new Apache Cordova Windows Phone apps from the Visual Studio File->New Project menu.
+- If you run the batch file from the command line, you can also call with a parameter to install automatically
+
+Run the script :
+
+    >createTemplates.bat -install
 
 3. Set up New Project
 --------------------

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a6cb620d/docs/en/edge/guide/platforms/wp8/tools.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/wp8/tools.md b/docs/en/edge/guide/platforms/wp8/tools.md
index df821e2..adfbba4 100644
--- a/docs/en/edge/guide/platforms/wp8/tools.md
+++ b/docs/en/edge/guide/platforms/wp8/tools.md
@@ -41,12 +41,40 @@ repo has subfolders for each: wp7/ and wp8/
 
 ## Create a project
 
+There are 2 ways to go about creating a new Apache Cordova WP7 or WP8 application.
+
+### Run the batch file to create and install the templates.
+
+
+- The root of the repo contains a file createTemplates.bat.  Double clicking this file will generate 2 .zip files. (CordovaWP7_x_x_x.zip + CordovaWP8_x_x_x.zip where x.x.x is the current version number)  To easily use these files in Visual Studio, copy them to 
+"My Documents\Visual Studio 2012\Templates\ProjectTemplates\" You will then be able to create new Apache Cordova Windows Phone apps from the Visual Studio File->New Project menu.
+- If you run the batch file from the command line, you can also call with a parameter to install automatically
+
+Run the script :
+
+    >createTemplates.bat -install
+
+### Use the create scripts on the command line
+
 Run the `create` command, specifying the existing path to the project,
 the reverse-domain-style package identifier, and the app's display
 name.  Here is the syntax for both Windows Phone 7 and 8:
 
-    $ C:\path\to\cordova-wp8\wp7\bin\create C:\path\to\my_new_project com.example.project_name ProjectName
-    $ C:\path\to\cordova-wp8\wp8\bin\create C:\path\to\my_new_project com.example.project_name ProjectName    
+    >.\wp7\bin\create PathToNewProject [ PackageName ] [ AppName ]
+    >.\wp8\bin\create PathToNewProject [ PackageName ] [ AppName ]
+
+    >PathToNewProject : The path to where you wish to create the project
+    >PackageName      : The namespace for the project (default is Cordova.Example)
+    >AppName          : The name of the application (default is CordovaWP8AppProj or CordovaWP7AppProj)
+
+    >examples:
+    >.\wp7\bin\create C:\path\to\my_new_project
+    >.\wp8\bin\create C:\path\to\my_new_project io.cordova.example CordovaWP8App
+
+    Launch Visual Studio and open Solution file (.sln) in (C:\path\to\my_new_project)
+
+    Built and Run it
+
 
 ## Building your project (cleans then builds)
 
@@ -67,9 +95,7 @@ Run the 'run' command with the following *optional* parameters
 
     $ C:\path\to\my_new_project\cordova\run [Target] [Build]
 
-By default the `run` command will look for a connected device, if no
-device is found it will look for any started emulators. If you have
-multiple emulators, you can specify a target ID.
+By default the `run` command will be called with `--emulator --debug` if flags are not provided.
 
 ## Cleaning
 

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a6cb620d/docs/en/edge/guide/platforms/wp8/upgrading.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/wp8/upgrading.md b/docs/en/edge/guide/platforms/wp8/upgrading.md
index 7d65b24..4365d64 100644
--- a/docs/en/edge/guide/platforms/wp8/upgrading.md
+++ b/docs/en/edge/guide/platforms/wp8/upgrading.md
@@ -22,6 +22,24 @@ Upgrading Windows Phone
 
 This document is for people who need to upgrade their Cordova versions from an older version to a current version of Cordova. This applies to both WP7 and WP8.
 
+## Upgrade to 2.9.0 from 3.0.0 ##
+
+### In Visual Studio's Solution Explorer window:
+1. Create a new Apache Cordova WP7 or WP8 3.0.0 Project
+2. Copy the contents of your 'www' folder to the new project, and be sure these items are added to the VS project.
+3. Copy and overwrite any splash screen, or icon images.
+4. Copy over any plugins from the plugins folder to the new project and ensure that they are also added to the VS project. 
+5. Build and test.
+- **NOTE : all core APIs have been removed and must be installed as plugins**
+
+### Alternate upgrade method using the cordova CLI tool
+1. Create a new Apache Cordova 3.0.0 project using the cordova CLI.
+2. Add your platforms the the cordova cli project (i.e `cordova platform add wp7 wp8`)
+3. Copy the contents of your projects 'www' folder to the www folder at the root of the cordova project you just created.
+4. Copy or overwrite any native assets from your original project (SplashScreen, ApplicationIcon, etc), make sure to add any new files to the .csproj file. Your windows phone project wil be in `<project-root>\platforms\[wp7 | wp8]`.
+5. Use the cordova CLI tool to install any plugins you need, **all core APIs are now plugins and may need to be added**. Only 3.0.0 plugins will be compatible with the CLI.
+6. Build and test.
+
 ## Upgrade to 2.8.0 from 2.9.0 ##
 
 ### In Visual Studio's Solution Explorer window: