Releases: NetSparkleUpdater/NetSparkle
Releases · NetSparkleUpdater/NetSparkle
NetSparkleUpdater v2.0.0
2.0.0 is a new version of NetSparkleUpdater (previously NetSparkle, NetSparkle.New) with new enhancements, more configuration ability, and lots of other great stuff!
If you used any prior version of NetSparkle, please make sure to test the 2.0 version of NetSparkleUpdater in your program, app, or other software after updating just to be safe. Lots of things have changed. Please ask questions here on GitHub or in our Gitter channel if you need help updating to 2.0!
The easiest way to install this is via NuGet (for the main library/UI) or the .NET CLI.
Package | Use Case |
---|---|
NetSparkleUpdater.SparkleUpdater | Core package; Use a 100% custom UI (nothing built-in) |
WinForms UI (.NET Framework) | NetSparkle with built-in WinForms UI |
WinForms UI (.NET Core) | NetSparkle with built-in WinForms UI |
WPF UI (.NET Framework and Core) | NetSparkle with built-in WPF UI |
Avalonia UI | NetSparkle with built-in Avalonia UI |
App Cast Generator Tool | netsparkle-generate-appcast CLI tool (incl. Ed25519 helpers) |
DSA Helper Tool | netsparkle-dsa CLI tool (DSA helpers) |
Here are some things that changed from 0.X and 1.X. Please let us know if we forgot something!
- Minimum .NET Framework requirement, if running on .NET Framework, is now .NET Framework 4.5.2 instead of 4.5.1. Otherwise, the core library is .NET Standard 2.0 compatible, which means you can use it in your .NET Core and .NET 5+ projects.
- Change of base namespace from
NetSparkle
toNetSparkleUpdater
Sparkle
renamed toSparkleUpdater
for clarity- More logs are now written via
LogWriter
to help you debug and figure out any issues that are going on - The default
NetSparkleUpdater
package (NetSparkleUpdater.SparkleUpdater
) has no built-in UI. Please use one of the NetSparkleUpdater packages with a UI if you want a built-in UI that is provided for you.- Note that if you do not use a
UIFactory
, you must use theCloseApplication
orCloseApplicationAsync
events to close your application; otherwise, your downloaded update file will never be executed/read! The only exception to this is if you want to handle all aspects of installing the update package yourself.
- Note that if you do not use a
- XML docs are now properly shipped with the code for all public and protected methods rather than being here in this README file
- Enabled build time warnings for functions that need documentation that don't have it
SparkleUpdater
constructors now require anISignatureVerifier
in order to "force" you to choose your signature verification methodSecurityMode
is a new enum that defines which signatures are required and which signatures are not required- Added
SecurityMode.OnlyVerifySoftwareDownloads
if you want to verify only software download signatures and don't care about verifying your app cast or release notes
- Added
- UIs are now in different namespaces. If you want to use a UI, you must pass in a
UIFactory
that implementsIUIFactory
and handles showing/handling all user interface elementsNetSparkleUpdater
offers basic, built-in UIs for WinForms, WPF, and Avalonia. Copy & paste these files to your project and modify them to make them work better in your project!SparkleUpdater
no longer holds its ownIcon
. This is now handled by theUIFactory
object.HideReleaseNotes
,HideRemindMeLaterButton
, andHideSkipButton
are all handled by theUIFactory
objects
- Added built-in UIs for WPF and Avalonia 0.10.X.
- Localization capabilities are now non-functional and are expected to come back in a later version. See this issue. (Contributions are welcome!)
- Most
SparkleUpdater
elements are now configurable. For example, you can implementIAppCastHandler
to implement your own app cast parsing and checking.IAppCastDataDownloader
to implement downloading of your app cast fileIUpdateDownloader
to implement downloading of your actual binary/installer as well as getting file names from the server (ifCheckServerFileName
istrue
)IAppCastHandler
to implement your own app cast parsingISignatureVerifier
to implement your own download/app cast signature checking. NetSparkleUpdater has built-in DSA and Ed25519 signature verifiers.IUIFactory
to implement your own UIIUIFactory
implementors must now haveReleaseNotesHTMLTemplate
andAdditionalReleaseNotesHeaderHTML
-- it's ok if these arestring.Empty
/""
/null
.IUIFactory
methods all now take a reference to theSparkleUpdater
instance that called the method
ILogger
to implement your own logger class (rather than being forced to subclassLogWriter
like in previous versions)Configuration
subclasses now take anIAssemblyAccessor
in their constructor(s) in order to define where assembly information is loaded from- Many
SparkleUpdater
functions are now virtual and thus more easily overridden for your specific use case - Several
ReleaseNotesGrabber
functions are now virtual as well.
- Many delegates, events, and functions have been renamed, removed, and/or tweaked for clarity and better use
DownloadEvent
now has theAppCastItem
that is being downloaded rather than being just the download pathAboutToExitForInstallerRun
/AboutToExitForInstallerRunAsync
has been renamed toPreparingToExit
/PreparingToExitAsync
, respectively- The
UserSkippedVersion
event has been removed. UseUserRespondedToUpdate
instead. - The
RemindMeLaterSelected
event has been removed. UseUserRespondedToUpdate
instead. - The
FinishedDownloading
/DownloadedFileReady
events have been removed. UseDownloadFinished
instead. - The
StartedDownloading
event has been removed and replaced withDownloadStarted
- The
DownloadError
event has been removed and replaced withDownloadHadError
Sparkle.RunUpdate
no longer exists. UseSparkleUpdater.InstallUpdate
instead.Sparkle.DownloadPathForAppCastItem
->SparkleUpdater.GetDownloadPathForAppCastItem
AppCastItem.DownloadDSASignature
->AppCastItem.DownloadSignature
SilentModeTypes
enum renamed toUserInteractionMode
Sparkle.SilentMode
renamed toSparkle.UserInteractionMode
UseSyncronizedForms
renamed toShowsUIOnMainThread
- Samples have been updated and improved
- Sample apps for Avalonia, WinForms, and WPF UIs
- Sample app to demonstrate how to handle events yourself with your own, custom UI
- By default, the app cast signature file now has a
.signature
extension. The app cast downloader will look for a file with the old.dsa
signature if data is not available or found in aappcast.xml.signature
on your server. You can change the extension using thesignature-file-extension
option in the app cast generator and via theXMLAppCast.SignatureFileExtension
property. sparkle:dsaSignature
is nowsparkle:signature
instead. If nosparkle:signature
is found,sparkle:dsaSignature
will be used (if available). Ifsparkle:dsaSignature
is not found,sparkle:edSignature
will be used (if available). This is to give us as much compatibility with old versions ofNetSparkle
as well as the macOSSparkle
library.- An entirely new app cast generator tool is now available for use.
- By default, the app cast generator tool now uses Ed25519 signatures. If you don't want to use files on disk to store your keys, set the
SPARKLE_PRIVATE_KEY
andSPARKLE_PUBLIC_KEY
environment variables before running the app cast generator tool. You can also store these signatures in a custom location with the--key-path
flag.- You can still use DSA signatures via the DSAHelper tool and the
DSAChecker
class. This is not recommended. Ed25519Checker
is the class responsible for handling Ed25519 signatures.DSAChecker
sticks around for verifying DSA signatures if they're still used.
- You can still use DSA signatures via the DSAHelper tool and the
- Removed
AssemblyAccessor
class in lieu ofIAssemblyAccessor
implementors - The server file name for each app cast download is now checked before doing any downloads or showing available updates to the client. To disable this behavior and use the name in the app cast, set
SparkleUpdater.CheckServerFileName
tofalse
. bool ignoreSkippedVersions = false
has been added toCheckForUpdatesAtUserRequest
,CheckForUpdatesQuietly
, andGetUpdateStatus
to make ignoring skipped versions easier.- The file name/path used by
RelaunchAfterUpdate
are controlled byRestartExecutableName
andRestartExecutablePath
, respectively.SparkleUpdater
makes a best effort to figure these out for you; however, you can override them if you need to. NOTE: The way these parameters are fetched has CHANGED in recent previews (as of 2021-04-18) -- YOU HAVE BEEN WARNED!! - Breaking change:
CheckForUpdatesQuietly
now shows no UI ever. It could show a UI before, which didn't make a lot of sense based on the function name. Make sure that if you use this function that you handle showing a UI yourself if necessary. (See the HandleEventsYourself sample if you want help.) You can always trigger the built-inSparkleUpdater
by calling_sparkle.ShowUpdateNeededUI(updateInfo.Updates)
. - Breaking change: DLL assembly names for .NET Framework WinForm...
NetSparkle 0.18.0
Changed
RegistryConfiguration.BuildRegistryInfo()
is nowpublic virtual
rather thanprivate
NetSparkle 0.17.0
Added
- NetSparkle now handles the
ddd, dd MMM yyyy HH:mm:ss Z
andddd, dd MMM yyyy HH:mm:ss
date formats when parsing an app cast file (@Mostlypyjamas)
Changed
- [Breaking Change] NetSparkle defaults to using the server's file name as the download file name rather than the app cast file name (@Mostlypyjamas)
- Many buttons use
AutoSize = true
to alleviate some concerns outlined in #44
NetSparkle 0.16.2
Fixed
- Fixed a bug where release notes were downloaded incorrectly
- Fixed a bug where the update form window wasn't closed properly
NetSparkle 0.16.1
0.16.1
Added
- Appcast download links can now be relative (this change may be removed in a future X.0 version of
NetSparkle
as it does not follow the RSS spec). This change was made to be consistent with how release notes are downloaded.
Changed
NetSparkleUtilities
namespace renamed to justNetSparkle
.
NetSparkle 0.16.0
0.16.0
Added
- We now offer a
generate_appcast.exe
tool in theNetSparkle.New.Tools
NuGet! This works very similarly to macOS Sparkle'sgenerate_appcast
tool and is due to the work by @ndreisg. - Started to work on adding formal unit tests for the project. Lots to do here, still.
0.15.0
0.15.0
Changed
AppCastItem
is now marked serializable- If using
SecurityMode.Unsafe
, files are always redownloaded because the library has no good way of knowing whether or not the file that is on disk is the file that is actually on the server (@rolikoff) - Fixed a bug where if you cancel the download process or if an error occurs during download, the update file stays in the same directory (@rolikoff)
- Fixed a bug where the
DownloadCanceled
event was fired twice (@rolikoff)
0.14.0
0.14.0
Added
- NetSparkle now supports the
sparkle:os
attribute (#17). If this is not present, an update is assumed to be a Windows update. Valid types for Windows are "win" or "windows". The operating system string check is a case-insensitive check.- Added
OperatingSystemString
(default "windows") andbool IsWindowsUpdate
toAppCastItem
AppCast.GetUpdates()
no longer returns non-Windows updates
- Added
- To increase compatibility with the main macOS Sparkle project, the
enclosure
tag can now be eitherenclosure
orsparkle:enclosure
- Added
AppCastItem.MIMEType
to read the<enclosure type="">
attribute if they want to (#15). Defaults toapplication/octet-stream
. - Added
UpdateDetectedEventArgs.AppCastItems
if you want to look at all available app cast items - Added
DownloadPathForAppCastItem(AppCastItem item)
to easily grab the download path for a given downloadable appcast item - Added
RunUpdate(AppCastItem item)
to allow you to run an update without waiting for the latest version to download. The DSA signature of the file is still checked!
Changed
NetSparkle.UpdateSystemProfileInformation
is now privateAppCast
no longer takes a Sparkle object and instead takes only those parameters that it needs to operateNextUpdateAction
is now in its own file in theNetSparkle.Enums
namespace
0.13.0
0.13.0
Added
- BREAKING CHANGE | Added
HideRemindMeLaterButton()
toIUpdateAvailable
- BREAKING CHANGE | Added
HideSkipButton()
toIUpdateAvailable
- Added
HideRemindMeLaterButton
to theNetSparkle
class. Defaults to false. Set to true to makeNetSparkle
callHideRemindMeLaterButton()
when showing the update window. - Added
HideSkipButton
to theNetSparkle
class. Defaults to false. Set to true to makeNetSparkle
callHideSkipButton()
when showing the update window. - Added
RemindMeLaterSelected
to theNetSparkle
class. Defaults to null. Use this event to be notified when the user has clicked theRemind Me Later
button in the update window. (@enscope)
Changed
- Release notes are now downloaded asynchronously, which should speed up the time it takes to show the download window
- Release note date is now Date.ToString("D") instead of "dd MMM yyyy" so that release notes show localized date strings
- POTENTIALLY BREAKING CHANGE | Fixed bug where
ValidationResult.Unchecked
was not returned properly fromOnDownloadFinished
if download file signature is null (@keithclanton) - BREAKING CHANGE |
IUpdateAvailable
now has aResult
of typeUpdateAvailableResult
rather thanDialogResult
in order to remove a dependency on WinForms. UseDefaultUIFactory.ConvertDialogResultToUpdateAvailableResult
to convert fromDialogResult
toUpdateAvailableResult
if needed. (@enscope)
0.12.0
NetSparkle 0.12.0
Added
- Added new
LogWriter
class for printing diagnostic messages to the console. You can now create your own child class that inherits fromLogWriter
to customize how information is logged to the console (or file, or wherever else you want diagnostic messages sent!)! - Added .gitattributes file for line ending consistency for all developers (@stephenwade)
Changed
- Moved
UpdateStatus
enum toNetSparkle.Enums
- Moved
UpdateInfo
class to its own file - Fixed bug in
Configuration.cs
where a few values were not set properly in the constructor due toInitWithDefaultValues
being called at the wrong time (@devstudiosoft) - BREAKING CHANGE Fixed bug in
AssemblyDiagnosticsAccessor
whereAssemblyProduct
returned the assembly version and not the assembly name (@devstudiosoft)
Removed
- BREAKING CHANGE Removed
public void NetSparkle.ReportDiagnosticMessage
in lieu of newLogWriter
class.