The RAMP Windows Phone 7 template project for Visual Studio can be downloaded here.
All the resources required to build a WP7 plugin are provided in library WindowsPhoneRampVMLib.dll which is available here.
A RAMP app can unfortunately not be deployed to a Windows Phone 7 device through the usual RAMP channels. This is because Microsoft imposes a restriction that an app can only be distributed to a device via the Windows Phone Store.
The current path to submitting a RAMP app to the Windows Phone Store is as follows:
- Create RAMP app as per normal.
- Download the Windows Phone 7 RAMP-app template project.
- Set a few properties in two configuration files.
- Run a script to build app.
- Distribute the built app via the Windows Phone Store.
This document guides you through the process.
The RAMP app you created in Eclipse runs on a RAMP virtual machine. For this app to run on a specific device it requires the RAMP virtual machine built for that device. This virtual machine is packaged with your app when it is downloaded from the RAMP deployment platform. Therefore, to build the Windows Phone 7 version of your RAMP app, you must package it with the Windows Phone 7 RAMP virtual machine.
Since the Windows Phone 7 RAMP virtual machine is written in native Windows Phone 7 code the requirements to building the Windows Phone 7 RAMP app are similar to building a native Windows Phone 7 app. These requirements are:
- A device running a supported operating system: Windows 7, Windows Vista
- Windows Phone 7 SDK installed on said device
There may be further requirements based on where the app is to be deployed. These requirements are listed below.
Requirements to deploy to Windows Phone 7 simulator
No further requirements.
Requirements to deploy to Windows Phone 7 device
- Windows Phone Dev Center account.
- Windows Phone 7 Device
- Register device for development, more info is available here.
- Zune client software, available here.
A more in-depth guide is available here.
Requirements for Windows Phone Store distribution
The Windows Phone Store is accessible through Wi-Fi and cellular networks and makes it easy to reach millions of Windows Phone 7 customers.
- Windows Phone Dev Center account.
The RAMP Windows Phone 7 template project for Visual Studio can be downloaded here. The template can be extracted to any location with write-access. To configure this template to your specific RAMP app, properties must be set in two configuration files:
In the root directory of the project edit
ramp_config.cfg to reflect your app's RAMP-settings.
Most of the configuration file properties correspond to values you entered when creating a new application on the RAMP Deployment Platform. The Advanced Guide provides more information on the properties in this configuration file. Note the following:
- The property
feature.namecontains your RAMP Deployment Platform's Company ID and your application's Application ID in the format
'root'.(company ID).(application ID).'main'.
- The property
feature.hostrefers to the app's feature server, and the key
rsakey.testkey1.modis its feature key.
n-th defined service server must be added as a property named
secure.host.(n-1). The property
secure.host.0refers to the first service server.
- All user defined keys must be added to this file in the format
rsakey.(key name).modand must also include a version property defined in the format
If you are building a basic app that uses the default RAMP settings, i.e.:
- does not use a secure server
- and does not access a custom feature server.
Then the only property you have to set is feature.name.
It is possible to specify how the built Windows Phone 7 app retrieves its RAMP feature. The default, production-recommended setting is
feature.persist=1. This specifies the app downloads the feature only the first time it runs and when feature changes are detected.
When testing an app in development, time is saved by setting properties
feature.persist=0. A new feature is then retrieved from the feature server each time the app is started, and consequently a Windows Phone 7 app need not be rebuilt to test RAMP project changes.
build_config.cfgto reflect your app's desired device and Windows Phone Store settings.
The property ProductName is the name of the app's package file. Note that this name does not have to be the same as the app's RAMP Application ID.
The property Version is the version of your app.
The property Title is what your built app will be called in the Windows Phone Store and on a device.
The property TileTitle is the text that will appear on the app's tile when it is pinned to the device's start screen. Note, set this property to a single space (" ") to specify no tile text.
If property release is set to 1 the app will be built for release, otherwise it will be built for debugging.
If property generate_splash_image is set to 1, the device's splash screen for this app will be generated from the project's logo images. More info in section "Personalize app".
This process builds the Windows Phone 7 version of the RAMP app into a single xap file that can be deployed to either the Windows Phone Store, a device, or the emulator. The built xap file is located, relative to the project root, at:
WindowsPhoneRampVM\Bin\Release\PRODUCT_NAME.xap" if ProductName is set to "PRODUCT_NAME" and release is set to "1" in
WindowsPhoneRampVM\Bin\Debug\PRODUCT_NAME.xap" if ProductName is set to "PRODUCT_NAME" and release is not set to "1" in
To execute the build process, run the build script file "
buildApp.exe" located in the root of the project folder. The script can be executed by either double-clicking on it or launching it from the command-line. When the build script completes a window will appear with a message that includes:
- Indication if build was successful or a failure
- If the build was successful, the message will include absolute path to the location of the built and packaged app file.
- The message for a failed build will include the failure reason.
The built app can be tested by installing and running it on either the emulator that is included in the Windows Phone 7 SDK or on a Windows Phone 7 device that has been registered for development. The app is deployed to the emulator or device using the application "Application Deployment" that comes with the Windows Phone 7 SDK.
It is possible to replace some images in the template project to personalize an app's representation on an WIndows Phone 7 device. These changes should be made before the build script is launched.
The list of images, relative to the project root, that can be replaced:
WindowsPhoneRamp\ApplicationIcon.png, the icon representing the app. A 62x62 png image.
WindowsPhoneRamp\Background.png, the tile representing the app. A 173x173 png image.
WindowsPhoneRampVM\Resources\images\ramp_logo.png, the logo displayed on the loading screen. A 349x200 png image.
WindowsPhoneRampVM\SplashScreenImage.jpg, the app's splash screen. A 480x800 jpeg image. The generate_splash_image property in
build_config.cfg must be set to "0" to change this image.