Skip to content
iKenndac edited this page Feb 5, 2011 · 1 revision

What Is SparkleDotNET? | The End User Experience | Using SparkleDotNET | Signing Your Updates | Info.plist Keys | Generating an Appcast | Anonymous User Profiles | Letting Your Users Customise SparkleDotNET | Localizing SparkleDotNET

Using SparkleDotNET

To use SparkleDotNET in your application, you must follow these steps:

  1. Include SparkleDotNET.dll and KNFoundation.dll in your project.
  2. Create an Info.plist file.
  3. Include your Info.plist and public key files with your application.
  4. Initialize SparkleDotNET in your application's code.

Including SparkleDotNET In Your Project

To do this, choose "Add Reference..." from the "Project" menu in Visual Studio, and choose both the SparkleDotNET and KNFoundation dll files.

Creating an Info.plist File

SparkleDotNET gets most of its information from a property list file called Info.plist that you ship with your application. This property list includes information about your application and your appcast that SparkleDotNET uses.

Here is an example Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>KNBundleVersion</key>
    <string>1.0</string>
    <key>KNShortVersionString</key>
    <string>1.0</string>
    <key>KNBundleExecutable</key>
    <string>SparkleDotNET Test Application.exe</string>
    <key>KNBundleIdentifier</key>
    <string>com.kennettnet.SparkleDotNETTest</string>
    <key>KNBundleName</key>
    <string>SparkleDotNET Test Application</string>
    <key>KNBundleDisplayName</key>
    <string>SparkleDotNET Test Application</string>
    <key>SUPublicDSAKeyFile</key>
    <string>Update Signing Public Key.sparklePublicKey</string>
    <key>SUFeedURL</key>
    <string>http://dbprocessor.kennettnet.co.uk/MusicRescueWinUpdates.xml</string>
  </dict>
</plist>
  • KNBundleVersion: The version of your application.
  • KNShortVersionString: The human-readable version of your application, if it's different to KNBundleVersion.
  • KNBundleExecutable: The name of your application's .exe file.
  • KNBundleIdentifier: A unique identifier for your application, typically in the format com.companyname.applicationname.
  • KNBundleName: The name of your application.
  • KNBundleDisplayName: The human-readable name of your application, if it's different to KNBundleName.
  • SUPublicDSAKeyFile: The name of your public key file that's included with the application.
  • SUFeedURL: The URL of your appcast.

For a full list of possible Info.plist keys and their uses, see the Info.plist Keys page.

Including Your Info.plist and Public Keys With Your Application

These files must be included with your application, in a folder called Resources at the same level as your application's .exe file.

  • Application.exe
  • Resources
    • Info.plist
    • PropertyList-1.0.dtd
    • Update Signing Public Key.sparklePublicKey

The simplest way to do this is to add the files to your Visual Studio project and set them as Content files that should always be copied to the output folder:

Visual Studio settings

Initialize SparkleDotNET in your application's code

In your project, find the earliest point in your application at which you'd like SparkleDotNET's windows to show up. At that point, add the following line of code:

SUUpdater.SharedUpdater();

You're done!