mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-27 05:04:27 +00:00
984c3dc0e17a897d78e4c9bf2160521353520f22
The improvements we want to achieve: * Stability - No more corrupt / incomplete updates by ensuring atomic move operations * Efficiency - Faster updates because of reduction of file copies that need to be done * Separation from Host and Helper - No usage of SUFileManager in the host application * Cleanness - Minimized deprecated APIs (no FSPathMakeRef, FSGetCatalogInfo, FSFindFolder, etc), use modern Cocoa APIs when possible, robust error handling, strong documentation, easier to read code. Many other small notes: * SUFileManager does not have class methods. Methods across an instance share an AuthorizationRef, instead of having to authorize every time a privileged operation needs to be done * The odd logic of `while (authStat == errAuthorizationDenied)` was removed * Instead of checking if we have write access, we try to invoke a normal operation first. If that doesn't work, with the right error returned back, we try authorizing, which is what Apple recommends doing * The trash is not used as a temporary location anymore. Rather we now request for a temporary directory to be created. This is more likely to succeed too (eg: on a drive that has no trash folder) * The old method for releasing the quarantine did not work until I used the "com.apple.quarantine" key instead of the LS constant that was being used. * For the old method for releasing the quarantine, we now check if a file has the quarantine xattr bit set before removing it. Just like how the new method works. * Quarantines can now be removed with authorization * The result of calling temporaryNameForPath: was never actually used in the old code * -[NSString fileSystemRepresentation] which can throw an exception is not used. Only getFileSystemRepresentation:maxLength: is used and the error on it is always checked * The desperate/hopeless check for if the code signature for the update is valid after the installation is complete is removed Potential issues that still needs to be looked in to: * Currently the method to move a file to the trash only works on 10.8+ * Appending of version number / picking destination name of app moved to trash
Sparkle

An easy-to-use software update framework for Cocoa developers.
Changes since 1.5b
- Up-to-date with 10.11 SDK and Xcode 7. Supports OS X 10.7+.
- Cleaned up and modernized code, using ARC and Autolayout.
- Merged bugfixes, security fixes and some features from multiple Sparkle forks.
- Truly automatic background updates (no UI at all) when user agreed to "Automatically download and install updates in the future."
- Ability to mark updates as critical.
- Progress and status notifications for the host app.
- Name of finish_installation.app can be configured to match your app's name.
- Upgraded and more reliable binary delta and code signing verification.
Features
- True self-updating—the user can choose to automatically download and install all updates.
- Displays a detailed progress window to the user.
- Supports authentication for installing in secure locations.
- Supports Apple Code Signing and DSA signatures for ultra-secure updates.
- Easy to install. Sparkle requires no code in your app, so it's trivial to upgrade or remove the framework.
- Uses appcasts for release information. Appcasts are supported by 3rd party update-tracking programs and websites.
- Displays release notes to the user via WebKit.
- Sparkle doesn't bug the user until second launch for better first impressions.
- Seamless integration—there's no mention of Sparkle; your icons and app name are used.
- Deep delegate support to make Sparkle work exactly as you need.
- Optionally sends system information to the server when checking for updates.
- Supports bundles, preference panes, plugins, and other non-.app software. Can install .pkg files for more complicated products.
- Supports branches due to minimum OS version requirements.
Developers
Building Sparkle requires Xcode 5 or above.
API
Sparkle is built with -fvisibility=hidden -fvisibility-inlines-hidden which means no symbols are exported by default.
If you are adding a symbol to the public API you must decorate the declaration with the SU_EXPORT macro (grep the source code for examples).
Building the distribution package
cd to the root of the Sparkle source tree and run make release. Sparkle-VERSION.tar.bz2 will be created in a temporary directory and revealed in Finder after the build has completed.
Alternatively, build the Distribution scheme in the Xcode UI.
Description
Mirror of github.com/sparkle-project/Sparkle
51 MiB
0 Stars
1 Watchers
0 Forks
Languages
Objective-C
68.7%
Swift
28.9%
Shell
1.6%
Python
0.6%
Makefile
0.1%