mirror of
https://github.com/sparkle-project/sparkle-project.github.io.git
synced 2025-11-01 15:35:08 +00:00
Add documentation for 2.x
This commit is contained in:
@@ -4,7 +4,38 @@ id: documentation
|
||||
title: Upgrading from previous versions of Sparkle
|
||||
---
|
||||
|
||||
We strongly recommend upgrading Sparkle to the [latest version](//github.com/{{ site.github_username }}/Sparkle/releases), as there have been important fixes in reliability and [security](/documentation/security) of updates. Very old versions of Sparkle also suffer some incompatibilities with the latest macOS versions.
|
||||
We strongly recommend upgrading Sparkle to the [latest stable version](//github.com/{{ site.github_username }}/Sparkle/releases), as there have been important fixes in reliability and [security](/documentation/security) of updates. Very old versions of Sparkle also suffer some incompatibilities with the latest macOS versions.
|
||||
|
||||
## Upgrading from Sparkle 1.x to 2.x (Beta)
|
||||
|
||||
**Note**: Sparkle 2.x is in a pre-release / beta state and not production ready.
|
||||
|
||||
The `SUUpdater` class has been deprecated and split up in Sparkle 2.x, but it is still functional for transitional purposes.
|
||||
|
||||
Sparkle 2.x includes three new classes / protocols:
|
||||
* **SPUUpdater** - The main API in Sparkle for controlling the update mechanism.
|
||||
* **SPUUserDriver** - The API in Sparkle for controlling the user interface & interaction (`SPUStandardUserDriver` is the standard one).
|
||||
* **SPUStandardUpdaterController** - A controller class that instantiates a `SPUUpdater` using `SPUStandardUserDriver` in a nib and allows binding UI to it.
|
||||
|
||||
If you were previously instantiating a `SUUpdater` in a nib, you will want to adopt `SPUStandardUpdaterController` as shown in the [basic setup](/documentation/).
|
||||
|
||||
If you were previously instantiating a `SUUpdater` in code, you will want to adopt instantiating a `SPUUpdater`.
|
||||
|
||||
The deprecated `SUUpdater` in 2.x is now a stub that uses both a `SPUUpdater` and `SPUStandardUserDriver`.
|
||||
|
||||
If you create a `SPUUpdater` instance programatically, you can now create an updater that can update other Sparkle-based bundles and/or an updater that can use your own `SPUUserDriver` / user interface. [sparkle-cli](/documentation/sparkle-cli) makes use of both features as an example.
|
||||
|
||||
`SPUUpdater` and its delegate `SPUUpdaterDelegate` (unlike `SUUpdater`) does not contain any user-interface or AppKit logic. The UI bits were separated into classes implementing `SPUUserDriver` and its delegates. A developer writing their own updater user interface may choose to use the new `SparkleCore` framework which strips out the UI bits that Sparkle provides out of the box.
|
||||
|
||||
`SPUUpdater` does not maintain singleton or global instances (unlike `SUUpdater`). Plug-ins that share the same process as their host should prefer to use an external tool like [sparkle-cli](/documentation/sparkle-cli) instead, rather than sharing or injecting a Sparkle.framework in its host. A bit more details about updating bundles [here](/documentation/bundles#sparkle-2x-beta).
|
||||
|
||||
If you have scripts that reference Sparkle.framework's helper tools, here are the new paths (note Autoupdate is now a command line tool):
|
||||
```
|
||||
Sparkle.framework/Versions/A/Resources/Autoupdate
|
||||
Sparkle.framework/Versions/A/Resources/Updater.app/
|
||||
```
|
||||
|
||||
See [Sparkle 2.x's APIs](/documentation/customization#sparkle-2x-apis-beta) for more information.
|
||||
|
||||
## Upgrading from Sparkle 1.20 and older
|
||||
|
||||
|
||||
Reference in New Issue
Block a user