-
Notifications
You must be signed in to change notification settings - Fork 14
Using
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
To use SparkleDotNET in your application, you must follow these steps:
- Include SparkleDotNET.dll and KNFoundation.dll in your project.
- Create an Info.plist file.
- Include your Info.plist and public key files with your application.
- Initialize SparkleDotNET in your application's code.
To do this, choose "Add Reference..." from the "Project" menu in Visual Studio, and choose both the SparkleDotNET and KNFoundation dll files.
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.
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:
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!