2.1 KiB
| Squirrel.Windows / 2. Advanced Usage |
|---|
2.1 More Integrating
This section goes into greater detail for items related to section 1.1 Integrating.
Update Manager Methods
Section 1.1.2, Basic Updating, introduced the UpdateApp method for simple updating.
UpdateApp- downloads and updates the app to the latest version. This method is the "Easy Mode" method that does everything all in one go.
The following methods are provided to allow you to have more control of the update process (i.e., to interact with app updates and apply them if desired).
-
CheckForUpdate- checks on the server if there are updates available. Returns anUpdateInfoobject that contains information about any pending updates. -
DownloadReleases- downloads release files (thenupkgfile deltas) from the server to the local machine -
ApplyReleases- installs the downloaded packages, and returns the newapp-[version]directory path.
UpdateInfo
The UpdateInfo class contains information about available and installed releases.
public class UpdateInfo
{
public ReleaseEntry CurrentlyInstalledVersion;
public ReleaseEntry FutureReleaseEntry;
public List<ReleaseEntry> ReleasesToApply;
}
ReleaseEntry
The ReleaseEntry class contains the specifics of each release.
public interface ReleaseEntry
{
public string SHA1;
public string Filename;
public long Filesize;
public bool IsDelta;
}
Advanced Integrating Topics
- Debugging - tips for debugging Squirrel.Windows integration in MyApp.
- Custom Squirrel Events - preforming custom actions for Squirrel events.
- Custom Squirrel Events (non-c# apps) - steps on making a non-c# application Squirrel Aware and handling custom events.
See Also
- 2.3 Distributing: Using GitHub - process of using
GitHubUpdateManager.
| Next: 2.2 More Packaging |
|---|