photoSuru Application Deployment
Deployment can be a tricky subject; here, we’ll talk about how to deploy photoSuru with the best install experience using the tools we ship with the application.
Setup Overview
The photoSuru setup consists of three components:
- Microsoft Subscription Center, a redistributable msi we provide
- photoSuru Desktop Addons, a small setup that integrates photoSuru with Subscription Center
- photoSuru itself, a ClickOnce application that you can update independently
These customizable deployment resources address the following requirements:
- Application upgrades - it should be easy to rapidly and robustly deliver fixes and new features
- Bootstrapping .NET 3.5 SP1 - automatically deliver the .NET runtime to users who do not have it installed
- Workflow integration - creating deployment packages should be an integrated part of your build process
Because no single technology address all of these needs, photoSuru uses a hybrid ClickOnce/MSI approach for application deployment along with the traditional MSI installer for Microsoft Subscription Center.
Using a new technology in .NET 3.5 SP1, the Client Profile .NET Framework subset, we can chain all of these features together into a single, branded installer. We’ll talk about each of the components in the installer separately, and then discuss how to put them together into a branded installer.
Microsoft Subscription Center
Microsoft Subscription Center is a multi-lingual tray application that keeps all SCE application synchronized – whether created by you, by Microsoft, or by another publisher. By running in the background, it can keep all of your subscriptions up-to-date even when your application isn’t running, and provide offline access to your application content – without you having to do anything! To take advantage of Subscription Center for these functions, just install it – photoSuru includes a subset of its functionality for usage when it is not installed, but will automatically use its cache when it is installed.
Subscription Center is currently offered in the following languages:
- English (en-US)
- French (fr-FR)
- Spanish (es-ES)
- Italian (it-IT)
- Danish (da-DK)
We will be offering more languages in the future.
You cannot customize this setup package (we provide the compiled setup to you to install with your application), but you can execute the install silently.
photoSuru Desktop Addons
The photoSuru Desktop Addons package allows us to provide desktop integration for photoSuru while still maintaining the updateable ClickOnce installer for the application itself.
The installer copies the subscriptions that ship with photoSuru – including the default photoSuru subscription and this ‘How To photoSuru’ subscription – into Subscription Center’s manifests directory, which causes Subscription Center to install the subscription for the user.
It also works around ClickOnce limitations for shell integration; ClickOnce applications cannot receive command line arguments and therefore cannot register as handlers for file types. A workaround is to register a helper executable that:
- Is invoked with a command line
- Writes the command line to a shared location
- Invokes the ClickOnce application which will read and delete its command line from the shared location.
The photoSuru Desktop Addons package is an MSI that registers such a helper executable (SceDfShim.exe) on behalf of photoSuru. Currently, photoSuru does not create any file associations; this portion of the package is included so that you can create file extensions for applications you build with photoSuru easily.
To customize this installer, use the WiX (Windows Installer XML Toolset) project that resides in the Setup\HybridInstall directory. You will need to have WiX, available from http://wix.sourceforge.net/, installed on your computer to open this project in Visual Studio.
photoSuru ClickOnce package
ClickOnce allows users to install your application directly from a network location – including the internet – and can update the application automatically when updates are published.
To deploy your application using ClickOnce, simply open the Properties page for ScePhotoViewer and use the settings on the ‘Publish’ page to configure where it will be published; click ‘Publish Now’ to build the application and publish it to the provided location. photoSuru checks for updates after the application is started to ensure that startup time isn’t impacted; therefore, when an updated version of the application is published, you’ll have to run photoSuru, close it, and then run it again to see the update dialog prompt.
You can also use ClickOnce URL arguments to launch your application to a specific screen; photoSuru doesn’t currently implement this functionality, but by using the navigation system for photoSuru it is fairly easy to navigate to a specific screen once the URL arguments are decoded.
Using a Branded Installer
For the best install experience, use the .NET 3.5 SP1 branded installer to install everything you need for photoSuru – the .NET 3.5 SP1 client framework subset, Microsoft Subscription Center, the photoSuru Desktop Addons, and photoSuru itself – all in one fell swoop, branded to look like your application.
The source for photoSuru’s branded installer is located in Setup\Bootstrapper; the easiest way to edit these files to provide your own graphics, install additional packages, change the language, etc. is to use the Client Profile Configuration Designer, available from http://windowsclient.net/wpf/wpf35/wpf-35sp1-client-profile-config-overview.aspx. This designer provides a wizard experience for building one of these branded installers, making it easy to chain together as many installers as is necessary to install your application while presenting the user with a single screen install experience.
Note
This document is also available from within photoSuru; simply open the ‘Application Deployment’ album in the ‘How To photoSuru’ subscription that installs with photoSuru.