Compare commits

..
52 Commits
Author SHA1 Message Date
Kornel Lesiński 03abfe2739 Fix #1020 2017-01-28 12:10:03 +00:00
Kornel Lesiński c0d45952a9 Removed unimportant changelog entry 2017-01-23 01:21:31 +00:00
Kornel 34179edd6d Merge pull request #1001 from zorgiepoo/appkit-prevention
Add AppKit prevention guards to modules that shouldn't import it
2017-01-17 13:09:38 +00:00
Zorg 530f3a4a63 Explain why I'm not relying on the compiler to throw linkage errors 2017-01-17 07:17:14 -05:00
Zorg 135d05b8b8 Add AppKitPrevention header to reduce redundancy.
Note this header should be included last in implementation files, which is why I added extra padding.
2017-01-17 07:08:29 -05:00
Zorg c56694382e Add AppKit prevention guards to modules that shouldn't import it 2017-01-16 21:17:25 -05:00
Kornel a39023e95b Merge pull request #1000 from zorgiepoo/generics
Add Obj-C generics where applicable
2017-01-17 00:58:20 +00:00
Zorg 282f0ae58e Add Obj-C generics where applicable
In headers that are exported, we test to see if generic support is available.
2017-01-16 18:09:04 -05:00
Thomas Tempelmann c1488b0515 Adds test cases for "sparkle:criticalUpdate" tag. (#999)
* Adds a test case for the "criticalUpdate" appcast tag (not as a XCTest but simply as an assert inside the test app, because I was lazy and am working on an older Xcode version that does not support the currently needed swift version for the XCTest in SUAppcastTest.swift).

* Tests the "criticalUpdate" appcast tag, using the proper XCTest swift class. I haven't tested this, though, due to the lack of the needed Xcode version.

* Test case for Appcast now checks all 4 items for the correct "criticalUpdate" state.

* Adds a test case for the "criticalUpdate" appcast tag (not as a XCTest but simply as an assert inside the test app, because I was lazy and am working on an older Xcode version that does not support the currently needed swift version for the XCTest in SUAppcastTest.swift). (reverted from commit 3ce1c9790b)
2017-01-16 00:02:32 +00:00
Kornel Lesiński 27c560b7d5 Proper fix for #995 2017-01-13 01:02:55 +00:00
Kornel Lesiński fbb040926e Fix URL/path confusion
Fixes #995
2017-01-13 00:44:41 +00:00
Kornel 548908628f Merge pull request #991 from zorgiepoo/upgrade-ci
Add 10.12 as SDK to run in Makefile and use Xcode 8.2 for Travis
2017-01-10 13:07:39 +00:00
Zorg d40bdb615a Add 10.12 as SDK to run in Makefile and use Xcode 8.2 for Travis 2017-01-10 06:40:35 -05:00
Kornel f43b9f7f02 Merge pull request #982 from sparkle-project/genapp
Workaround for bugs in NSXMLDocument prefix handling
2017-01-07 22:07:56 +00:00
Kornel Lesiński eafbb2cfad Copy debug symbols for generate_appcast 2017-01-07 21:57:39 +00:00
Kornel 5c408f5019 Merge pull request #984 from zorgiepoo/appcast-nonnil
The SUAppcast * is not going to be nil here; fixes analyzer warning
2017-01-07 17:43:46 +00:00
Zorg 9d35c819fd The SUAppcast * is not going to be nil here; fixes analyzer warning 2017-01-07 11:26:53 -05:00
Kornel Lesiński ee80a66896 Don't try to preserve namespace prefixes, because Apple's serializer is buggy
filed as rdar 29901669
2017-01-06 16:29:29 +00:00
Kornel Lesiński 187ae4fe57 Verify that the XML is serialized properly 2017-01-06 16:29:29 +00:00
Kornel Lesiński ca4d51561e Silence too-verbose delta 2017-01-06 16:29:29 +00:00
Kornel Lesiński 915c2047bf Fix accuracy of error message 2017-01-06 16:29:29 +00:00
Kornel f172cd32a8 Merge pull request #980 from sparkle-project/features
Updated README
2017-01-06 10:31:49 +00:00
Kornel Lesiński 8481035fb9 No server-side logic is a plus 2017-01-05 22:50:26 +00:00
Kornel Lesiński 7238c2aeb6 Updated README 2017-01-05 22:35:20 +00:00
Kornel Lesiński ee16e5ae55 1.16.0a2 2017-01-04 13:59:17 +00:00
Kornel d50e823b3d Merge pull request #972 from sparkle-project/misc
Misc
2017-01-04 00:07:29 +00:00
Kornel 4636588e76 Merge pull request #973 from sparkle-project/nothrowaway
Resume pending automatic update when possible
2017-01-04 00:07:10 +00:00
Kornel Lesiński 2be4dc11a0 Resume pending automatic update when possible
Fixes #970
2017-01-03 17:44:40 +00:00
Kornel Lesiński 6181c9276a Close alert on abort 2017-01-03 17:42:18 +00:00
Kornel Lesiński 49845d8246 Re-init alert when called again
A lazy way to bring it to front
2017-01-03 17:42:18 +00:00
Kornel Lesiński 8fa136c0a3 Invalidate timer when auto-update window is shown
In case it's shown manually, not by the timer
2017-01-03 17:42:18 +00:00
Kornel Lesiński dc1151a5ff Null warning 2017-01-03 16:13:15 +00:00
Kornel a920ecc197 Merge pull request #964 from zorgiepoo/guided-default
Make guided package installs the default for updating packages
2017-01-02 20:40:39 +00:00
Kornel Lesiński 271d504f6d Expose magic numbers 2017-01-01 14:14:25 +00:00
Kornel Lesiński 9c0ccd4a57 Put latest version first to make wildcard filename matching easier 2017-01-01 14:14:25 +00:00
Kornel 266be254d2 Merge pull request #967 from zorgiepoo/length-fallback
Fallback to the appcast's length value if HTTP doesn't give us one
2017-01-01 15:12:44 +01:00
Kornel efe93c492f Merge pull request #968 from Bi11/info-only
Hide automatic updates checkbox for information only updates
2016-12-31 19:45:46 +01:00
Kornel 74b09ad904 Merge pull request #966 from zorgiepoo/update-podspec-file
Update pod spec file so that `make release` works
2016-12-31 19:44:05 +01:00
Kornel b9012aa8dc Merge pull request #965 from zorgiepoo/unarchiver-test-no-ivar
Remove instance variables from SUUnarchiverTest.swift
2016-12-31 19:43:05 +01:00
Kornel ae41185267 Merge pull request #963 from zorgiepoo/remove-old-app
Remove the old app/bundle instead of moving it to the trash
2016-12-31 18:29:08 +01:00
Bi11 6634ed7d69 Hide automatic updates checkbox for information only updates 2016-12-31 23:37:53 +08:00
Zorg 799ebdcf7d Fallback to the appcast's length value if HTTP doesn't give us one 2016-12-29 14:08:14 -05:00
Zorg d911db7357 Update pod spec file so that make release works 2016-12-29 11:15:22 -05:00
Zorg d2e1987ce3 Remove instance variables from SUUnarchiverTest.swift
I have been receiving unarchiver test errors lately (after the unarchiver blocks changes) somewhat rarely (it's very hard to reproduce) when running all the tests locally. Thus, hoping this change may make a difference.
2016-12-28 23:44:31 -05:00
Zorg 2d1688c063 Make guided package installs the default for updating packages
Interactive package installs now need to be opted into (foo.sparkle_interactive.pkg or foo.sparkle_interactive.mpkg)

The website documentation may need to be updated later, and this should be noted as an important point in the change log.
2016-12-28 23:15:22 -05:00
Zorg b56910f455 Remove the old app/bundle instead of moving it to the trash
Fixes #827
2016-12-28 22:01:00 -05:00
Kornel Lesiński a3e96581b4 We're not testing with old Xcode, so we can't promise that compatibility 2016-12-27 22:44:01 +01:00
Kornel Lesiński 94423a10c9 Sorted project file 2016-12-27 21:25:52 +01:00
Kornel Lesiński b14c00136e Changelog 2016-12-27 21:23:15 +01:00
Kornel ebf8d2105b Merge pull request #953 from zorgiepoo/gen-appcast-xcconfig
Add xcconfig file for generate_appcast target
2016-12-27 20:53:53 +01:00
Zorg 14ac885ea0 Add ConfigGenerateAppcastDebug.xcconfig 2016-12-27 11:13:32 -05:00
Zorg 355e239df9 Add xcconfig file for generate_appcast target
Also remove swift configurations from Common config files, and change swift optimization from fast to whole module.
2016-12-27 11:01:25 -05:00
69 changed files with 376 additions and 308 deletions

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode8
osx_image: xcode8.2
before_install:
- brew update
script: make ci
+18
View File
@@ -1,3 +1,21 @@
# 1.16.0
* Guided package installs are now the default for updating packages (Zorg)
- `pkg` installers won't show any UI. If you require the old behavior of showing a full installer window, rename the `*.pkg` file to `*.sparkle_interactive.pkg`
* Previous version of the app is now deleted instead of staying in the trash (Zorg)
* Added `generate_appcast` helper tool (Kornel Lesiński)
* Made manual check resume pending automatic updates instead of starting a new update (Kornel Lesiński)
* Started using `length` value from RSS if HTTP doesn't give one (Zorg)
* Hidden automatic updates checkbox for information only updates (Bi11)
* Added progressbar for DMG and binary delta extraction (Kornel Lesiński)
* Fixed showing of download status if we attempt a 2nd download (Zorg)
* Refactorings to sync with upcoming 2.0
* Decoupled and simplified installation code using protocols (Zorg)
* Added nullability annotations (Zorg)
* Allowed delegate methods that return an object to return nil (Zorg)
* Decreased responsibility of SUHost and moved code into other components (Zorg)
* Removed Sparkle.pch and many file #includes (Zorg)
# 1.15.0
* A new icon! Thanks to 1024jp
@@ -3,7 +3,6 @@
// Debug only
GCC_OPTIMIZATION_LEVEL = 0
SWIFT_OPTIMIZATION_LEVEL = -Onone
DEBUG_INFORMATION_FORMAT = dwarf
ENABLE_TESTABILITY = YES
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
@@ -3,7 +3,6 @@
// Release only
GCC_OPTIMIZATION_LEVEL = s
SWIFT_OPTIMIZATION_LEVEL = -Ofast
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON)
@@ -0,0 +1,7 @@
// Generate Appcast only
#include "ConfigSwift.xcconfig"
SWIFT_OBJC_BRIDGING_HEADER = generate_appcast/Appcast-Bridging-Header.h
MACOSX_DEPLOYMENT_TARGET = 10.11
PRODUCT_NAME = generate_appcast
@@ -0,0 +1,4 @@
// Generate Appcast Debug
#include "ConfigGenerateAppcast.xcconfig"
#include "ConfigSwiftDebug.xcconfig"
@@ -0,0 +1,4 @@
// Generate Appcast Release
#include "ConfigGenerateAppcast.xcconfig"
#include "ConfigSwiftRelease.xcconfig"
+1 -1
View File
@@ -1 +1 @@
SWIFT_OPTIMIZATION_LEVEL = -Ofast
SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+1
View File
@@ -24,6 +24,7 @@ if [ "$ACTION" = "" ] ; then
# because missing dSYMs in a release build SHOULD trigger a build failure
if [ "$CONFIGURATION" = "Release" ] ; then
cp -R "$CONFIGURATION_BUILD_DIR/BinaryDelta.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/generate_appcast.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
fi
+1 -1
View File
@@ -31,7 +31,7 @@ ci:
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build ) || exit 1 ; \
fi ; \
done
for i in {10..11} ; do \
for i in {10..12} ; do \
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build test ) || exit 1 ; \
fi ; \
+14 -19
View File
@@ -1,9 +1,21 @@
# Sparkle [![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/Sparkle.svg?maxAge=2592000)]() <a href="https://www.stackpath.com/?utm_source=sparkle-github&amp;utm_medium=badge&amp;utm_campaign=readme"><img src="https://img.shields.io/badge/sponsored%20by-StackPath-orange.svg" alt="sponsored by: StackPath"></a>
An easy-to-use software update framework for Cocoa developers.
Secure and reliable software update framework for Cocoa developers.
<img src="Resources/Screenshot.png" width="732" alt="Sparkle shows familiar update window with release notes">
## Features
* Seamless. There's no mention of Sparkle; your icons and app name are used.
* Secure. Updates are verified using DSA signatures and Apple Code Signing.
* Fast. Supports delta updates which only patch files that have changed.
* Easy to install. Sparkle requires no code in your app, and only needs static files on a web server.
* Supports bundles, preference panes, plugins, and other non-.app software. Can install .pkg files for more complicated products.
* Handles permissions, quarantine and automatically asks for authentication if needed.
* Uses RSS-based appcasts for release information. Appcasts are a de-facto standard supported by 3rd party update-tracking programs and websites.
* Sparkle stays hidden until second launch for better first impressions.
* Truly self-updating — the user can choose to automatically download and install all updates in the background.
## Changes since 1.5b
* Compatibilty with macOS Sierra.
@@ -14,28 +26,11 @@ An easy-to-use software update framework for Cocoa developers.
* Upgraded and more reliable binary delta and code signing verification.
* 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.
## Features
* Seamless integration—there's no mention of Sparkle; your icons and app name are used.
* 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 RSS-based 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.
* 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.
## Requirements
* Runtime: macOS 10.7 or greater
* Build: Xcode 5 and 10.8 SDK or greater
* Build: Xcode 7 and 10.8 SDK or greater
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
## API
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "1.15.1"
s.version = "1.16.0"
s.summary = "A software update framework for macOS"
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
s.homepage = "http://sparkle-project.org"
+80 -82
View File
@@ -103,7 +103,7 @@
5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 14950074195FDF5900BC5B5B /* SUUpdaterTest.m */; };
5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */; };
5AE7E1111DC81AD3009C2C12 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */; };
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */; };
5AF6C74F1AEA46D10014A3AB /* test.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.pkg */; };
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */; };
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */; };
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; };
@@ -602,7 +602,7 @@
5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = AppIcon.icns; sourceTree = "<group>"; };
5AEF45D9189D1CC90030D7DC /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Sparkle.strings; sourceTree = "<group>"; };
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUInstallerTest.m; sourceTree = "<group>"; };
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.sparkle_guided.pkg; sourceTree = "<group>"; };
5AF6C74E1AEA46D10014A3AB /* test.pkg */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.pkg; sourceTree = "<group>"; };
5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDSAVerifierTest.m; sourceTree = "<group>"; };
5D06E8D00FD68C7C005AE3F6 /* BinaryDelta */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = BinaryDelta; sourceTree = BUILT_PRODUCTS_DIR; };
5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */ = {isa = PBXFileReference; comments = "-Wno-shorten-64-to-32"; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bsdiff.c; sourceTree = "<group>"; };
@@ -729,6 +729,10 @@
7205C42E1E11A6DA00E370AE /* SUInstallerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUInstallerProtocol.h; sourceTree = "<group>"; };
7205C42F1E1215AD00E370AE /* SUUpdatePermissionResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdatePermissionResponse.h; sourceTree = "<group>"; };
7205C4301E1215AD00E370AE /* SUUpdatePermissionResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdatePermissionResponse.m; sourceTree = "<group>"; };
7205C4331E12C23C00E370AE /* ConfigGenerateAppcast.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigGenerateAppcast.xcconfig; sourceTree = "<group>"; };
7205C4341E12C66D00E370AE /* ConfigGenerateAppcastRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigGenerateAppcastRelease.xcconfig; sourceTree = "<group>"; };
7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigGenerateAppcastDebug.xcconfig; sourceTree = "<group>"; };
720767D01E2E3DD300F9A850 /* AppKitPrevention.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitPrevention.h; sourceTree = "<group>"; };
720B16421C66433D006985FB /* UITests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UITests-Info.plist"; path = "UITests/UITests-Info.plist"; sourceTree = SOURCE_ROOT; };
720B16431C66433D006985FB /* SUTestApplicationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SUTestApplicationTest.swift; path = UITests/SUTestApplicationTest.swift; sourceTree = SOURCE_ROOT; };
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUUnarchiverTest.swift; sourceTree = "<group>"; };
@@ -872,9 +876,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
722954CB1D04EA6900ECF9CA /* Security.framework in Frameworks */,
722954CA1D04EA6000ECF9CA /* AppKit.framework in Frameworks */,
722954C91D04EA5C00ECF9CA /* Foundation.framework in Frameworks */,
722954CB1D04EA6900ECF9CA /* Security.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -908,13 +912,13 @@
isa = PBXGroup;
children = (
5D06E8D00FD68C7C005AE3F6 /* BinaryDelta */,
722954B41D04ADAF00ECF9CA /* fileop */,
5AE13FB31E0D9E07000D2C2C /* generate_appcast */,
55C14BB7136EEF1500649790 /* Autoupdate.app */,
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */,
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */,
8DC2EF5B0486A6940098B216 /* Sparkle.framework */,
726B2B5D1C645FC900388755 /* UI Tests.xctest */,
722954B41D04ADAF00ECF9CA /* fileop */,
);
name = Products;
sourceTree = "<group>";
@@ -1011,11 +1015,11 @@
14732BBA1960EF7100593899 /* CHANGELOG */,
61C268090E2DB5D000175E6C /* LICENSE */,
14732BC11960F3B200593899 /* Makefile */,
5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */,
147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */,
1420DF4F196247F900203BB0 /* Images.xcassets */,
14732BBC1960EFB500593899 /* README.markdown */,
14732BB91960EEEE00593899 /* SampleAppcast.xml */,
5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */,
615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */,
);
path = Resources;
@@ -1033,6 +1037,7 @@
1495006D195FBBBD00BC5B5B /* Sparkle */ = {
isa = PBXGroup;
children = (
720767D01E2E3DD300F9A850 /* AppKitPrevention.h */,
61299B3909CB055000B7442F /* Appcast Support */,
55C14BD5136EEFD000649790 /* Autoupdate */,
089C1665FE841158C02AAC07 /* Framework Resources */,
@@ -1057,7 +1062,7 @@
72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */,
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */,
14958C6C19AEBC610061B14F /* test-pubkey.pem */,
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */,
5AF6C74E1AEA46D10014A3AB /* test.pkg */,
5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */,
5F1510A11C96E591006E1629 /* testnamespaces.xml */,
);
@@ -1112,11 +1117,11 @@
6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */,
6102FE440E077FCE00F85D09 /* SUPipedUnarchiver.h */,
6129C0B90E0B79810062CE76 /* SUPipedUnarchiver.m */,
722589D61E0AD86B005EA0B9 /* SUUnarchiverProtocol.h */,
61299A8B09CA790200B7442F /* SUUnarchiver.h */,
61299A8C09CA790200B7442F /* SUUnarchiver.m */,
722589D81E0B19F4005EA0B9 /* SUUnarchiverNotifier.h */,
722589D91E0B19F4005EA0B9 /* SUUnarchiverNotifier.m */,
722589D61E0AD86B005EA0B9 /* SUUnarchiverProtocol.h */,
);
name = Unarchiving;
sourceTree = "<group>";
@@ -1182,9 +1187,9 @@
7275F9C01B5F1F2900B1D19E /* SUFileManager.m */,
767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */,
767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */,
7205C42E1E11A6DA00E370AE /* SUInstallerProtocol.h */,
618FA4FF0DAE88B40026945C /* SUInstaller.h */,
618FA5000DAE88B40026945C /* SUInstaller.m */,
7205C42E1E11A6DA00E370AE /* SUInstallerProtocol.h */,
618FA5200DAE8E8A0026945C /* SUPackageInstaller.h */,
618FA5210DAE8E8A0026945C /* SUPackageInstaller.m */,
618FA5030DAE8AB80026945C /* SUPlainInstaller.h */,
@@ -1197,23 +1202,23 @@
isa = PBXGroup;
children = (
61299B3509CB04E000B7442F /* Sparkle.h */,
72316BD51E0DBF730039EFD9 /* SULocalizations.h */,
72316BDC1E0E17910039EFD9 /* SUApplicationInfo.h */,
72316BDD1E0E17910039EFD9 /* SUApplicationInfo.m */,
72316BD71E0E17180039EFD9 /* SUBundleIcon.h */,
72316BD81E0E17180039EFD9 /* SUBundleIcon.m */,
61299A5B09CA6D4500B7442F /* SUConstants.h */,
61299A5F09CA6EB100B7442F /* SUConstants.m */,
55E6F33219EC9F6C00005E76 /* SUErrors.h */,
14652F8319A9759F00959E44 /* SUExport.h */,
61EF67580E25C5B400F754E0 /* SUHost.h */,
61EF67550E25B58D00F754E0 /* SUHost.m */,
72316BD51E0DBF730039EFD9 /* SULocalizations.h */,
55C14F04136EF6DB00649790 /* SULog.h */,
55C14F05136EF6DB00649790 /* SULog.m */,
72316BD71E0E17180039EFD9 /* SUBundleIcon.h */,
72316BD81E0E17180039EFD9 /* SUBundleIcon.m */,
72316BDC1E0E17910039EFD9 /* SUApplicationInfo.h */,
72316BDD1E0E17910039EFD9 /* SUApplicationInfo.m */,
72316BE11E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h */,
72316BE21E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m */,
726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */,
726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */,
72316BE11E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h */,
72316BE21E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m */,
);
includeInIndex = 1;
name = "Other Sources";
@@ -1245,12 +1250,12 @@
61CFB2C10E384958007A1735 /* Support */ = {
isa = PBXGroup;
children = (
729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */,
729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */,
61B078CC15A5FB6100600039 /* SUCodeSigningVerifier.h */,
61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */,
61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */,
61299A2E09CA2DAB00B7442F /* SUDSAVerifier.m */,
729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */,
729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */,
);
name = Support;
sourceTree = "<group>";
@@ -1320,27 +1325,30 @@
149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */,
FA1941CF0D94A70100DD942E /* ConfigCommonDebug.xcconfig */,
FA1941CC0D94A70100DD942E /* ConfigCommonRelease.xcconfig */,
722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */,
FA1941D10D94A70100DD942E /* ConfigFramework.xcconfig */,
FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */,
FA1941D50D94A70100DD942E /* ConfigFrameworkRelease.xcconfig */,
7205C4331E12C23C00E370AE /* ConfigGenerateAppcast.xcconfig */,
7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */,
7205C4341E12C66D00E370AE /* ConfigGenerateAppcastRelease.xcconfig */,
FA1941CE0D94A70100DD942E /* ConfigRelaunch.xcconfig */,
FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */,
FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */,
722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */,
722FB7471DD51331001D40CE /* ConfigSwift.xcconfig */,
722FB7481DD51350001D40CE /* ConfigSwiftDebug.xcconfig */,
722FB7491DD51350001D40CE /* ConfigSwiftRelease.xcconfig */,
FA1941CD0D94A70100DD942E /* ConfigTestApp.xcconfig */,
FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */,
FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */,
FA3AAF3B1050B273004B3130 /* ConfigUnitTest.xcconfig */,
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */,
FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */,
FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */,
729F10FD1C65A9B500DFCCC5 /* ConfigUITest.xcconfig */,
729F10FE1C65A9B500DFCCC5 /* ConfigUITestCoverage.xcconfig */,
729F10FF1C65A9B500DFCCC5 /* ConfigUITestDebug.xcconfig */,
729F11001C65A9B500DFCCC5 /* ConfigUITestRelease.xcconfig */,
722FB7471DD51331001D40CE /* ConfigSwift.xcconfig */,
722FB7481DD51350001D40CE /* ConfigSwiftDebug.xcconfig */,
722FB7491DD51350001D40CE /* ConfigSwiftRelease.xcconfig */,
FA3AAF3B1050B273004B3130 /* ConfigUnitTest.xcconfig */,
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */,
FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */,
FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */,
14732BC91960F70A00593899 /* make-release-package.sh */,
14652F7919A93E5F00959E44 /* set-git-version-info.sh */,
146EC84E19A68CF8004A50C5 /* Sparkle.podspec */,
@@ -1355,30 +1363,29 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
723B25301CEAB3A600909873 /* bscommon.h in Headers */,
611142E910FB1BE5009810AA /* bspatch.h in Headers */,
61299B3609CB04E000B7442F /* Sparkle.h in Headers */,
722589DA1E0B19F4005EA0B9 /* SUUnarchiverNotifier.h in Headers */,
61B5FC0D09C4FC8200B25A18 /* SUAppcast.h in Headers */,
61B5FC7009C51F4A00B25A18 /* SUAppcastItem.h in Headers */,
72316BDE1E0E17910039EFD9 /* SUApplicationInfo.h in Headers */,
6120721209CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.h in Headers */,
61B93B270DD0FDD300DCD2F8 /* SUAutomaticUpdateDriver.h in Headers */,
72316BE61E1087060039EFD9 /* SUUpdaterDelegate.h in Headers */,
61F83F740DBFE141006FDD30 /* SUBasicUpdateDriver.h in Headers */,
5D06E9390FD69271005AE3F6 /* SUBinaryDeltaUnarchiver.h in Headers */,
72316BD91E0E17180039EFD9 /* SUBundleIcon.h in Headers */,
61B078CE15A5FB6100600039 /* SUCodeSigningVerifier.h in Headers */,
61299A5C09CA6D4500B7442F /* SUConstants.h in Headers */,
72316BE31E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h in Headers */,
6102FE4A0E07803800F85D09 /* SUDiskImageUnarchiver.h in Headers */,
61299A2F09CA2DAB00B7442F /* SUDSAVerifier.h in Headers */,
55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */,
14652F8419A978C200959E44 /* SUExport.h in Headers */,
7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */,
722954C41D04E66F00ECF9CA /* SUFileOperationConstants.h in Headers */,
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */,
61EF67590E25C5B400F754E0 /* SUHost.h in Headers */,
729924731DF3478A00DBCDF5 /* SUUpdateValidator.h in Headers */,
723B25301CEAB3A600909873 /* bscommon.h in Headers */,
722589D71E0AD86B005EA0B9 /* SUUnarchiverProtocol.h in Headers */,
618FA5010DAE88B40026945C /* SUInstaller.h in Headers */,
72316BD61E0DBF730039EFD9 /* SULocalizations.h in Headers */,
55C14F06136EF6DB00649790 /* SULog.h in Headers */,
726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */,
618FA5220DAE8E8A0026945C /* SUPackageInstaller.h in Headers */,
@@ -1387,23 +1394,24 @@
6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */,
61B93C090DD112FF00DCD2F8 /* SUScheduledUpdateDriver.h in Headers */,
61A225A40D1C4AC000430CCD /* SUStandardVersionComparator.h in Headers */,
72316BD61E0DBF730039EFD9 /* SULocalizations.h in Headers */,
6196CFF909C72148000DC222 /* SUStatusController.h in Headers */,
61A2279C0D1CEE7600430CCD /* SUSystemProfiler.h in Headers */,
72316BE31E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h in Headers */,
61B93A3C0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.h in Headers */,
61299A8D09CA790200B7442F /* SUUnarchiver.h in Headers */,
722589DA1E0B19F4005EA0B9 /* SUUnarchiverNotifier.h in Headers */,
722589D71E0AD86B005EA0B9 /* SUUnarchiverProtocol.h in Headers */,
61B5FCDF09C52A9F00B25A18 /* SUUpdateAlert.h in Headers */,
610134730DD250470049ACDF /* SUUpdateDriver.h in Headers */,
72316BD91E0E17180039EFD9 /* SUBundleIcon.h in Headers */,
612DCBAF0D488BC60015DBEA /* SUUpdatePermissionPrompt.h in Headers */,
7205C4311E1215AD00E370AE /* SUUpdatePermissionResponse.h in Headers */,
61B5F8ED09C4CE3C00B25A18 /* SUUpdater.h in Headers */,
72316BE61E1087060039EFD9 /* SUUpdaterDelegate.h in Headers */,
6158A1C5137904B300487EC1 /* SUUpdaterPrivate.h in Headers */,
72316BDE1E0E17910039EFD9 /* SUApplicationInfo.h in Headers */,
729924731DF3478A00DBCDF5 /* SUUpdateValidator.h in Headers */,
61A354550DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.h in Headers */,
61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */,
3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */,
7205C4311E1215AD00E370AE /* SUUpdatePermissionResponse.h in Headers */,
722954C41D04E66F00ECF9CA /* SUFileOperationConstants.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1705,7 +1713,6 @@
files = (
72E641801D08D754000404CA /* fileop in Resources */,
14958C6E19AEBC950061B14F /* signed-test-file.txt in Resources */,
5F1510A21C96E591006E1629 /* testnamespaces.xml in Resources */,
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */,
C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */,
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */,
@@ -1714,8 +1721,9 @@
72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */,
F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */,
14958C6F19AEBC980061B14F /* test-pubkey.pem in Resources */,
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */,
5AF6C74F1AEA46D10014A3AB /* test.pkg in Resources */,
5AD0FA7F1C73F2E2004BCEFF /* testappcast.xml in Resources */,
5F1510A21C96E591006E1629 /* testnamespaces.xml in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1839,19 +1847,19 @@
buildActionMask = 2147483647;
files = (
55C14BD4136EEFCE00649790 /* Autoupdate.m in Sources */,
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */,
72316BE01E0E17910039EFD9 /* SUApplicationInfo.m in Sources */,
72316BDB1E0E17180039EFD9 /* SUBundleIcon.m in Sources */,
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */,
55C14F00136EF6B700649790 /* SUConstants.m in Sources */,
7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */,
722954C61D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
767B61AE1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */,
72316BDB1E0E17180039EFD9 /* SUBundleIcon.m in Sources */,
55C14F0C136EF6EA00649790 /* SUHost.m in Sources */,
55C14F0D136EF6F200649790 /* SUInstaller.m in Sources */,
55C14F08136EF6DB00649790 /* SULog.m in Sources */,
726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */,
55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */,
55C14F21136EF84D00649790 /* SUPlainInstaller.m in Sources */,
722954C61D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */,
55C14F20136EF84300649790 /* SUStatusController.m in Sources */,
55C14F23136EF86700649790 /* SUSystemProfiler.m in Sources */,
@@ -1892,17 +1900,17 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72544FFC1D0991A4000CFB2C /* SUFileOperationConstants.m in Sources */,
723B252F1CEAB3A600909873 /* bscommon.c in Sources */,
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */,
14652F7E19A9728A00959E44 /* bspatch.c in Sources */,
7223E7631AD1AEFF008E3161 /* sais.c in Sources */,
723B252F1CEAB3A600909873 /* bscommon.c in Sources */,
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */,
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */,
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */,
5D06E8EA0FD68CDB005AE3F6 /* SUBinaryDeltaTool.m in Sources */,
726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */,
726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */,
72544FFC1D0991A4000CFB2C /* SUFileOperationConstants.m in Sources */,
726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1911,19 +1919,19 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
723A920E1D722438004A9DED /* SUSpotlightImporterTest.swift in Sources */,
723B252E1CEAB3A600909873 /* bscommon.c in Sources */,
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */,
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */,
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */,
5A4094481C74EA5200983BE0 /* SUAppcastTest.swift in Sources */,
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */,
723B252E1CEAB3A600909873 /* bscommon.c in Sources */,
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */,
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */,
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */,
72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */,
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */,
14652F8219A9746000959E44 /* SULog.m in Sources */,
723A920E1D722438004A9DED /* SUSpotlightImporterTest.swift in Sources */,
7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */,
5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */,
5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */,
@@ -1949,11 +1957,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
722954CC1D04EA7000ECF9CA /* SUOperatingSystem.m in Sources */,
722954B71D04ADAF00ECF9CA /* fileop.m in Sources */,
722954BD1D04AE3800ECF9CA /* SUConstants.m in Sources */,
722954BC1D04AE1100ECF9CA /* SUFileManager.m in Sources */,
722954B71D04ADAF00ECF9CA /* fileop.m in Sources */,
722954C71D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
722954CC1D04EA7000ECF9CA /* SUOperatingSystem.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1969,29 +1977,28 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
723B252D1CEAB3A600909873 /* bscommon.c in Sources */,
5D06E8EB0FD68CE4005AE3F6 /* bspatch.c in Sources */,
722954C51D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
61B5FBB709C4FAFF00B25A18 /* SUAppcast.m in Sources */,
61B5FC6F09C51F4900B25A18 /* SUAppcastItem.m in Sources */,
72316BDF1E0E17910039EFD9 /* SUApplicationInfo.m in Sources */,
6120721309CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m in Sources */,
61B93B280DD0FDD300DCD2F8 /* SUAutomaticUpdateDriver.m in Sources */,
61F83F720DBFE140006FDD30 /* SUBasicUpdateDriver.m in Sources */,
5D06E8EC0FD68CE4005AE3F6 /* SUBinaryDeltaApply.m in Sources */,
5D06E8ED0FD68CE4005AE3F6 /* SUBinaryDeltaCommon.m in Sources */,
5D06E93A0FD69271005AE3F6 /* SUBinaryDeltaUnarchiver.m in Sources */,
722589DB1E0B19F4005EA0B9 /* SUUnarchiverNotifier.m in Sources */,
72316BDA1E0E17180039EFD9 /* SUBundleIcon.m in Sources */,
61B078CF15A5FB6100600039 /* SUCodeSigningVerifier.m in Sources */,
61299A6009CA6EB100B7442F /* SUConstants.m in Sources */,
6102FE4B0E07803800F85D09 /* SUDiskImageUnarchiver.m in Sources */,
61299A3009CA2DAB00B7442F /* SUDSAVerifier.m in Sources */,
7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */,
722954C51D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */,
61EF67560E25B58D00F754E0 /* SUHost.m in Sources */,
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */,
55C14F07136EF6DB00649790 /* SULog.m in Sources */,
72316BDA1E0E17180039EFD9 /* SUBundleIcon.m in Sources */,
729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */,
723B252D1CEAB3A600909873 /* bscommon.c in Sources */,
726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */,
618FA5230DAE8E8A0026945C /* SUPackageInstaller.m in Sources */,
61D85D6D0E10B2ED00F9B4A9 /* SUPipedUnarchiver.m in Sources */,
@@ -2001,15 +2008,16 @@
61A225A50D1C4AC000430CCD /* SUStandardVersionComparator.m in Sources */,
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */,
61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */,
72316BE41E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m in Sources */,
61B93A3D0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.m in Sources */,
61299A8E09CA790200B7442F /* SUUnarchiver.m in Sources */,
72316BDF1E0E17910039EFD9 /* SUApplicationInfo.m in Sources */,
722589DB1E0B19F4005EA0B9 /* SUUnarchiverNotifier.m in Sources */,
61B5FCDE09C52A9F00B25A18 /* SUUpdateAlert.m in Sources */,
610134740DD250470049ACDF /* SUUpdateDriver.m in Sources */,
612DCBB00D488BC60015DBEA /* SUUpdatePermissionPrompt.m in Sources */,
72316BE41E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m in Sources */,
7205C4321E1215AD00E370AE /* SUUpdatePermissionResponse.m in Sources */,
61B5F8EE09C4CE3C00B25A18 /* SUUpdater.m in Sources */,
729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */,
61A354560DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -2247,41 +2255,41 @@
61B5F92A09C4CFD800B25A18 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
61B5F92B09C4CFD800B25A18 /* English */,
1A985A321C5C329C0001163A /* ja */,
1A985A331C5C329D0001163A /* fr */,
1A985A341C5C329E0001163A /* de */,
1A985A351C5C329E0001163A /* zh-Hant */,
1A985A361C5C32A20001163A /* it */,
1A985A521C5C32BC0001163A /* ar */,
1A985A371C5C32A30001163A /* ca */,
1A985A381C5C32A40001163A /* cs */,
1A985A391C5C32A40001163A /* cy */,
1A985A3A1C5C32A50001163A /* da */,
1A985A341C5C329E0001163A /* de */,
1A985A531C5C32BD0001163A /* el */,
61B5F92B09C4CFD800B25A18 /* English */,
1A985A3B1C5C32A60001163A /* es */,
1A985A3C1C5C32A70001163A /* fi */,
1A985A331C5C329D0001163A /* fr */,
1A985A4B1C5C32B60001163A /* fr-CA */,
1A985A3D1C5C32A80001163A /* he */,
1A985A3E1C5C32A90001163A /* hu */,
1A985A3F1C5C32AA0001163A /* id */,
1A985A401C5C32AA0001163A /* is */,
1A985A361C5C32A20001163A /* it */,
1A985A321C5C329C0001163A /* ja */,
1A985A411C5C32AB0001163A /* ko */,
1A985A421C5C32AC0001163A /* nb */,
1A985A431C5C32AD0001163A /* nl */,
1A985A441C5C32AE0001163A /* pl */,
1A985A4E1C5C32B80001163A /* pt */,
1A985A4D1C5C32B70001163A /* pt-BR */,
1A985A4C1C5C32B70001163A /* pt-PT */,
1A985A501C5C32BA0001163A /* ro */,
1A985A451C5C32AF0001163A /* ru */,
1A985A461C5C32B00001163A /* sk */,
1A985A4F1C5C32B90001163A /* sl */,
1A985A471C5C32B10001163A /* sv */,
1A985A481C5C32B10001163A /* th */,
1A985A491C5C32B20001163A /* tr */,
1A985A4A1C5C32B50001163A /* zh-Hans */,
1A985A4B1C5C32B60001163A /* fr-CA */,
1A985A4C1C5C32B70001163A /* pt-PT */,
1A985A4D1C5C32B70001163A /* pt-BR */,
1A985A4E1C5C32B80001163A /* pt */,
1A985A4F1C5C32B90001163A /* sl */,
1A985A501C5C32BA0001163A /* ro */,
1A985A511C5C32BB0001163A /* uk */,
1A985A521C5C32BC0001163A /* ar */,
1A985A531C5C32BD0001163A /* el */,
1A985A4A1C5C32B50001163A /* zh-Hans */,
1A985A351C5C329E0001163A /* zh-Hant */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
@@ -2437,32 +2445,22 @@
};
5AA96C591E0AE0DC00CA4346 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "generate_appcast/Appcast-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
5AA96C5A1E0AE0DC00CA4346 /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "generate_appcast/Appcast-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Coverage;
};
5AA96C5B1E0AE0DC00CA4346 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7205C4341E12C66D00E370AE /* ConfigGenerateAppcastRelease.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "generate_appcast/Appcast-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
+20
View File
@@ -0,0 +1,20 @@
//
// AppKitPrevention.h
// Sparkle
//
// Created by Mayur Pawashe on 1/17/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
// #include (not #import) this header to prevent AppKit from being imported
// Note this should be your LAST #include in your implementation file
// If this error is triggered, you can have Xcode indicate to you which source file including this header caused the issue
// One may wonder for certain targets where AppKit is banned completely, why just not link AppKit instead.
// Well, Xcode has thing called auto-linking that I don't trust very much.
// Even after trying to disable the setting, I've had targets able to link to AppKit without AppKit being specified in the list of linked libraries.
#ifdef _APPKITDEFINES_H
#error This is a core or daemon-safe module and should NOT import AppKit
#endif
+5
View File
@@ -22,7 +22,12 @@ NS_ASSUME_NONNULL_BEGIN
SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>
@property (copy, nullable) NSString *userAgentString;
#if __has_feature(objc_generics)
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;
#else
@property (copy, nullable) NSDictionary *httpHeaders;
#endif
- (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *_Nullable))err;
- (SUAppcast *)copyWithoutDeltaUpdates;
+4 -1
View File
@@ -12,6 +12,9 @@
#import "SULocalizations.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@interface NSXMLElement (SUAppcastExtensions)
@property (readonly, copy) NSDictionary *attributesAsDictionary;
@end
@@ -65,7 +68,7 @@
if (self.httpHeaders) {
for (NSString *key in self.httpHeaders) {
id value = [self.httpHeaders objectForKey:key];
NSString *value = [self.httpHeaders objectForKey:key];
[request setValue:value forHTTPHeaderField:key];
}
}
+1
View File
@@ -25,6 +25,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject
@property (copy, readonly) NSString *minimumSystemVersion;
@property (copy, readonly) NSString *maximumSystemVersion;
@property (strong, readonly) NSURL *fileURL;
@property (nonatomic, readonly) uint64_t contentLength;
@property (copy, readonly) NSString *versionString;
@property (copy, readonly) NSString *displayVersionString;
@property (copy, readonly) NSDictionary *deltaUpdates;
+13
View File
@@ -10,6 +10,9 @@
#import "SULog.h"
#import "SUConstants.h"
#include "AppKitPrevention.h"
@interface SUAppcastItem ()
@property (copy, readwrite) NSString *title;
@property (copy, readwrite) NSString *dateString;
@@ -32,6 +35,7 @@
@synthesize displayVersionString;
@synthesize DSASignature;
@synthesize fileURL;
@synthesize contentLength = _contentLength;
@synthesize infoURL;
@synthesize itemDescription;
@synthesize maximumSystemVersion;
@@ -129,6 +133,15 @@
}
return nil;
}
if (enclosureURLString) {
NSString *enclosureLengthString = [enclosure objectForKey:SURSSAttributeLength];
long long contentLength = 0;
if (enclosureLengthString != nil) {
contentLength = [enclosureLengthString longLongValue];
}
_contentLength = (contentLength > 0) ? (uint64_t)contentLength : 0;
}
if (enclosureURLString) {
// Sparkle used to always URL-encode, so for backwards compatibility spaces in URLs must be forgiven.
+17
View File
@@ -49,6 +49,12 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
- (void)showUpdateAlert
{
self.interruptible = NO;
[self invalidateShowUpdateAlertTimer];
if (self.alert) {
[self.alert close];
}
self.alert = [[SUAutomaticUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUAutomaticInstallationChoice choice) {
[self automaticUpdateAlertFinishedWithChoice:choice];
}];
@@ -107,6 +113,14 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
}
}
-(BOOL)resumeUpdateInteractively {
if ([self isInterruptible]) {
[self showUpdateAlert];
return YES;
}
return NO;
}
- (void)stopUpdatingOnTermination
{
if (self.willUpdateOnTermination)
@@ -140,6 +154,8 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
- (void)abortUpdate
{
[self.alert close];
self.isTerminating = NO;
[self stopUpdatingOnTermination];
[self invalidateShowUpdateAlertTimer];
@@ -154,6 +170,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
- (void)automaticUpdateAlertFinishedWithChoice:(SUAutomaticInstallationChoice)choice
{
self.alert = nil;
switch (choice)
{
case SUInstallNowChoice:
+1 -1
View File
@@ -158,7 +158,7 @@
[[updater delegate] updater:self.updater didFinishLoadingAppcast:ac];
}
NSDictionary *userInfo = (ac != nil) ? @{ SUUpdaterAppcastNotificationKey: ac } : nil;
NSDictionary *userInfo = @{ SUUpdaterAppcastNotificationKey: ac };
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFinishLoadingAppCastNotification object:self.updater userInfo:userInfo];
SUAppcastItem *item = nil;
+3
View File
@@ -15,6 +15,9 @@
#include <stdlib.h>
#include <xar/xar.h>
#include "AppKitPrevention.h"
static BOOL applyBinaryDeltaToFile(xar_t x, xar_file_t file, NSString *sourceFilePath, NSString *destinationFilePath)
{
NSString *patchFile = temporaryFilename(@"apply-binary-delta");
+3
View File
@@ -18,6 +18,9 @@
#include <sys/stat.h>
#include <xar/xar.h>
#include "AppKitPrevention.h"
int compareFiles(const FTSENT **a, const FTSENT **b)
{
return strcoll((*a)->fts_name, (*b)->fts_name);
+3
View File
@@ -21,6 +21,9 @@
#include <sys/xattr.h>
#include <xar/xar.h>
#include "AppKitPrevention.h"
extern int bsdiff(int argc, const char **argv);
@interface CreateBinaryDeltaOperation : NSOperation
+2
View File
@@ -20,6 +20,8 @@
#define VERSION_COMMAND @"version"
#define VERSION_ALTERNATE_COMMAND @"--version"
#include "AppKitPrevention.h"
static void printUsage(NSString *programName)
{
fprintf(stderr, "Usage:\n");
+3
View File
@@ -13,6 +13,9 @@
#import "SULog.h"
#import "SUFileManager.h"
#include "AppKitPrevention.h"
@interface SUBinaryDeltaUnarchiver ()
@property (nonatomic, copy, readonly) NSString *archivePath;
+3
View File
@@ -8,6 +8,9 @@
#import "SUBundleIcon.h"
#include "AppKitPrevention.h"
@implementation SUBundleIcon
+ (NSURL *)iconURLForBundle:(NSBundle *)bundle
+3
View File
@@ -11,6 +11,9 @@
#import "SUCodeSigningVerifier.h"
#import "SULog.h"
#include "AppKitPrevention.h"
@implementation SUCodeSigningVerifier
+ (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundleURL matchesSignatureAtBundleURL:(NSURL *)newBundleURL error:(NSError *__autoreleasing *)error
+1
View File
@@ -73,6 +73,7 @@ extern NSString *const SUAppcastElementReleaseNotesLink;
extern NSString *const SUAppcastElementTags;
extern NSString *const SURSSAttributeURL;
extern NSString *const SURSSAttributeLength;
extern NSString *const SURSSElementDescription;
extern NSString *const SURSSElementEnclosure;
+3
View File
@@ -13,6 +13,8 @@
#define DEBUG 0
#endif
#include "AppKitPrevention.h"
// Define some minimum intervals to avoid DoS-like checking attacks
const NSTimeInterval SUMinimumUpdateCheckInterval = DEBUG ? 60 : (60 * 60);
const NSTimeInterval SUDefaultUpdateCheckInterval = DEBUG ? 60 : (60 * 60 * 24);
@@ -61,6 +63,7 @@ NSString *const SUAppcastElementReleaseNotesLink = @"sparkle:releaseNotesLink";
NSString *const SUAppcastElementTags = @"sparkle:tags";
NSString *const SURSSAttributeURL = @"url";
NSString *const SURSSAttributeLength = @"length";
NSString *const SURSSElementDescription = @"description";
NSString *const SURSSElementEnclosure = @"enclosure";
+3
View File
@@ -16,6 +16,9 @@
#import "SULog.h"
#include <CommonCrypto/CommonDigest.h>
#include "AppKitPrevention.h"
@implementation SUDSAVerifier {
SecKeyRef _secKey;
}
+3
View File
@@ -10,6 +10,9 @@
#import "SUUnarchiverNotifier.h"
#import "SULog.h"
#include "AppKitPrevention.h"
@interface SUDiskImageUnarchiver ()
@property (nonatomic, copy, readonly) NSString *archivePath;
-15
View File
@@ -87,21 +87,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (BOOL)copyItemAtURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL error:(NSError *_Nullable*_Nullable)error;
/**
* Moves an item at a specified URL to the running user's trash directory
* @param url A URL pointing to the item to move to the trash. The item at this URL must exist.
* @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
* @return YES if the item was moved to the trash successfully, otherwise NO along with a populated error object
*
*
* This method has to locate the trash directory and uses an intermediate temporary directory before trashing the item.
* A copy may have to be done if the url is not on the same volume as the running user's trash directory.
* If a failure occurs in the middle of this operation, the item to remove may be lost forever or stuck in a temporary location.
*
* This is not an atomic operation, nor intended to be a recoverable operation if the worst comes to worst.
*/
- (BOOL)moveItemAtURLToTrash:(NSURL *)url error:(NSError *_Nullable*_Nullable)error;
/**
* Removes an item at a URL
* @param url A URL pointing to the item to remove. The item at this URL must exist.
+3 -89
View File
@@ -11,14 +11,13 @@
#import "SUOperatingSystem.h"
#import "SUFileOperationConstants.h"
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1080
#import <AppKit/AppKit.h> // for NSWorkspace
#endif
#include <sys/xattr.h>
#include <sys/errno.h>
#include <sys/time.h>
#include "AppKitPrevention.h"
static char SUAppleQuarantineIdentifier[] = "com.apple.quarantine";
static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
@@ -923,91 +922,6 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return success;
}
- (BOOL)moveItemAtURLToTrash:(NSURL *)url error:(NSError *__autoreleasing *)error
{
if (![self _itemExistsAtURL:url]) {
if (error != NULL) {
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to move %@ to the trash because the file does not exist.", url.path.lastPathComponent] }];
}
return NO;
}
NSURL *trashURL = nil;
BOOL canUseNewTrashAPI = YES;
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1080
canUseNewTrashAPI = [SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 8, 0}];
if (!canUseNewTrashAPI) {
FSRef trashRef;
if (FSFindFolder(kUserDomain, kTrashFolderType, kDontCreateFolder, &trashRef) == noErr) {
trashURL = CFBridgingRelease(CFURLCreateFromFSRef(kCFAllocatorDefault, &trashRef));
}
}
#endif
if (canUseNewTrashAPI) {
trashURL = [_fileManager URLForDirectory:NSTrashDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];
}
if (trashURL == nil) {
if (error != NULL) {
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: @"Failed to locate the user's trash folder." }];
}
return NO;
}
// In the rare worst case scenario, our temporary directory will be labeled incomplete and be in the user's trash directory,
// indicating that whatever inside of there is not yet completely moved.
// Regardless, we want the item to be in our Volume before we try moving it to the trash
NSString *preferredName = [url.lastPathComponent.stringByDeletingPathExtension stringByAppendingString:@" (Incomplete Files)"];
NSURL *tempDirectory = [self makeTemporaryDirectoryWithPreferredName:preferredName appropriateForDirectoryURL:trashURL error:error];
if (tempDirectory == nil) {
return NO;
}
NSString *urlLastPathComponent = url.lastPathComponent;
NSURL *tempItemURL = [tempDirectory URLByAppendingPathComponent:urlLastPathComponent];
if (![self moveItemAtURL:url toURL:tempItemURL error:error]) {
// If we can't move the item at url, just remove it completely; chances are it's not going to be missed
[self removeItemAtURL:url error:NULL];
[self removeItemAtURL:tempDirectory error:NULL];
return NO;
}
if (![self changeOwnerAndGroupOfItemAtRootURL:tempItemURL toMatchURL:trashURL error:error]) {
// Removing the item inside of the temp directory is better than trying to move the item to the trash with incorrect ownership
[self removeItemAtURL:tempDirectory error:NULL];
return NO;
}
// If we get here, we should be able to trash the item normally without authentication
BOOL success = NO;
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1080
if (!canUseNewTrashAPI) {
NSString *tempParentPath = tempItemURL.URLByDeletingLastPathComponent.path;
success = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:tempParentPath destination:@"" files:@[tempItemURL.lastPathComponent] tag:NULL];
if (!success && error != NULL) {
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to move file %@ into the trash.", tempItemURL.lastPathComponent] }];
}
}
#endif
if (canUseNewTrashAPI) {
NSError *trashError = nil;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
success = [_fileManager trashItemAtURL:tempItemURL resultingItemURL:NULL error:&trashError];
#pragma clang diagnostic pop
if (!success && error != NULL) {
*error = trashError;
}
}
[self removeItemAtURL:tempDirectory error:NULL];
return success;
}
// Unlike other methods, authorization is required to execute this method successfully
- (BOOL)executePackageAtURL:(NSURL *)packageURL error:(NSError * __autoreleasing *)error
{
+3
View File
@@ -9,6 +9,9 @@
#import "SUGuidedPackageInstaller.h"
#import "SUFileManager.h"
#include "AppKitPrevention.h"
@interface SUGuidedPackageInstaller ()
@property (nonatomic, readonly, copy) NSString *packagePath;
+3
View File
@@ -11,6 +11,9 @@
#include <sys/mount.h> // For statfs for isRunningOnReadOnlyVolume
#import "SULog.h"
#include "AppKitPrevention.h"
// This class should not rely on AppKit and should also be process independent
// For example, it should not have code that tests writabilty to somewhere on disk,
// as that may depend on the privileges of the process owner. Or code that depends on
+10 -4
View File
@@ -15,6 +15,9 @@
#import "SULog.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@implementation SUInstaller
+ (BOOL)isAliasFolderAtPath:(NSString *)path
@@ -37,7 +40,7 @@
*bundleFileName = [[host bundlePath] lastPathComponent],
*alternateBundleFileName = [[host name] stringByAppendingPathExtension:[[host bundlePath] pathExtension]];
BOOL isPackage = NO;
BOOL isGuided = NO;
BOOL isGuided = YES;
NSString *fallbackPackagePath = nil;
NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:inUpdateFolder];
NSString *bundleFileNameNoExtension = [bundleFileName stringByDeletingPathExtension];
@@ -87,9 +90,12 @@
}
if (isPackage) {
// foo.app -> foo.sparkle_guided.pkg or foo.sparkle_guided.mpkg
if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_guided"]) {
isGuided = YES;
// Guided (or now "normal") installs used to be opt-in (i.e, Sparkle would detect foo.sparkle_guided.pkg or foo.sparkle_guided.mpkg),
// but to get an interactive (or "unguided") install, the developer now must opt-out of guided installations.
// foo.app -> foo.sparkle_interactive.pkg or foo.sparkle_interactive.mpkg
if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_interactive"]) {
isGuided = NO;
}
}
+2
View File
@@ -14,6 +14,8 @@
#include "SULog.h"
#include "AppKitPrevention.h"
// -----------------------------------------------------------------------------
// Constants:
// -----------------------------------------------------------------------------
+3
View File
@@ -7,6 +7,9 @@
#import "SUOperatingSystem.h"
#include "AppKitPrevention.h"
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000
@interface NSProcessInfo ()
- (NSOperatingSystemVersion)operatingSystemVersion;
+3
View File
@@ -11,6 +11,9 @@
#import "SUErrors.h"
#import "SULog.h"
#include "AppKitPrevention.h"
@interface SUPackageInstaller ()
@property (nonatomic, readonly, copy) NSString *packagePath;
+3
View File
@@ -11,6 +11,9 @@
#import "SULog.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@interface SUPipedUnarchiver ()
@property (nonatomic, copy, readonly) NSString *archivePath;
+4 -7
View File
@@ -14,6 +14,9 @@
#import "SULog.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@interface SUPlainInstaller ()
@property (nonatomic, readonly) SUHost *host;
@@ -172,14 +175,8 @@
// From here on out, we don't really need to bring up authorization if we haven't done so prior
SUFileManager *constrainedFileManager = [fileManager fileManagerByPreservingAuthorizationRights];
// Cleanup: move the old app to the trash
NSError *trashError = nil;
if (![constrainedFileManager moveItemAtURLToTrash:oldTempURL error:&trashError]) {
SULog(@"Failed to move %@ to trash with error %@", oldTempURL, trashError);
}
// Cleanup
[constrainedFileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
[constrainedFileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
return YES;
+3
View File
@@ -9,6 +9,9 @@
#import "SUVersionComparisonProtocol.h"
#import "SUStandardVersionComparator.h"
#include "AppKitPrevention.h"
@implementation SUStandardVersionComparator
- (instancetype)init
+1 -1
View File
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@class SUHost;
@interface SUSystemProfiler : NSObject
+ (NSArray *)systemProfileArrayForHost:(SUHost *)host;
+ (NSArray<NSDictionary<NSString *, NSString *> *> *)systemProfileArrayForHost:(SUHost *)host;
@end
+7 -5
View File
@@ -9,11 +9,13 @@
#import <Foundation/Foundation.h>
#import "SUSystemProfiler.h"
#import "SUHost.h"
#import "SUOperatingSystem.h"
#include <sys/sysctl.h>
#include "AppKitPrevention.h"
static NSString *const SUSystemProfilerApplicationNameKey = @"appName";
static NSString *const SUSystemProfilerApplicationVersionKey = @"appVersion";
static NSString *const SUSystemProfilerCPU64bitKey = @"cpu64bit";
@@ -28,19 +30,19 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
@implementation SUSystemProfiler
+ (NSDictionary *)modelTranslationTable
+ (NSDictionary<NSString *, NSString *> *)modelTranslationTable
{
// Use explicit class to use the correct bundle even when subclassed
NSString *path = [[NSBundle bundleForClass:[SUSystemProfiler class]] pathForResource:@"SUModelTranslation" ofType:@"plist"];
return [[NSDictionary alloc] initWithContentsOfFile:path];
}
+ (NSArray *)systemProfileArrayForHost:(SUHost *)host
+ (NSArray<NSDictionary<NSString *, NSString *> *> *)systemProfileArrayForHost:(SUHost *)host
{
NSDictionary *modelTranslation = [self modelTranslationTable];
NSDictionary<NSString *, NSString *> *modelTranslation = [self modelTranslationTable];
// Gather profile information and append it to the URL.
NSMutableArray *profileArray = [NSMutableArray array];
NSMutableArray<NSDictionary<NSString *, NSString *> *> *profileArray = [NSMutableArray array];
NSArray *profileDictKeys = @[@"key", @"displayKey", @"value", @"displayValue"];
int error = 0;
int value = 0;
+3
View File
@@ -11,6 +11,9 @@
#import "SUConstants.h"
#import "SUFileManager.h"
#include "AppKitPrevention.h"
@implementation SUSystemUpdateInfo
+ (BOOL)systemAllowsAutomaticUpdatesForHost:(SUHost *)host
+10 -2
View File
@@ -161,7 +161,8 @@
- (void)download:(NSURLDownload *)__unused download didReceiveResponse:(NSURLResponse *)response
{
[self.statusController setMaxProgressValue:[response expectedContentLength]];
long long expectedContentLength = [response expectedContentLength];
[self.statusController setMaxProgressValue:expectedContentLength > 0 ? expectedContentLength : self.updateItem.contentLength];
}
- (NSString *)localizedStringFromByteCount:(long long)value
@@ -196,7 +197,14 @@
- (void)download:(NSURLDownload *)__unused download didReceiveDataOfLength:(NSUInteger)length
{
[self.statusController setProgressValue:[self.statusController progressValue] + (double)length];
double newProgressValue = [self.statusController progressValue] + (double)length;
// In case our expected content length was incorrect
if (newProgressValue > [self.statusController maxProgressValue]) {
[self.statusController setMaxProgressValue:newProgressValue];
}
[self.statusController setProgressValue:newProgressValue];
if ([self.statusController maxProgressValue] > 0.0)
[self.statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ of %@", nil), [self localizedStringFromByteCount:(long long)self.statusController.progressValue], [self localizedStringFromByteCount:(long long)self.statusController.maxProgressValue]]];
else
+3
View File
@@ -12,6 +12,9 @@
#import "SUDiskImageUnarchiver.h"
#import "SUBinaryDeltaUnarchiver.h"
#include "AppKitPrevention.h"
@implementation SUUnarchiver
+ (nullable id <SUUnarchiverProtocol>)unarchiverForPath:(NSString *)path updatingHostBundlePath:(nullable NSString *)hostPath decryptionPassword:(nullable NSString *)decryptionPassword
+3
View File
@@ -10,6 +10,9 @@
#import "SULocalizations.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@interface SUUnarchiverNotifier ()
@property (nonatomic, readonly, copy) void (^completionBlock)(NSError * _Nullable);
+2 -1
View File
@@ -171,7 +171,8 @@
- (BOOL)allowsAutomaticUpdates
{
return [SUSystemUpdateInfo systemAllowsAutomaticUpdatesForHost:self.host];
return [SUSystemUpdateInfo systemAllowsAutomaticUpdatesForHost:self.host]
&& !self.updateItem.isInformationOnlyUpdate;
}
- (void)windowDidLoad
+2 -1
View File
@@ -26,7 +26,8 @@ extern NSString *const SUUpdateDriverFinishedNotification;
- (instancetype)initWithUpdater:(id<SUUpdaterPrivate>)updater;
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host;
- (void)abortUpdate;
/** If there is an update waiting to be installed, show UI indicating so. Return NO otherwise (e.g. if it's not supported). */
- (BOOL)resumeUpdateInteractively;
- (void)showAlert:(NSAlert *)alert;
@property (getter=isInterruptible, readonly) BOOL interruptible;
+3
View File
@@ -52,6 +52,9 @@ NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdateDriverFinishedNotification object:self];
}
-(BOOL)resumeUpdateInteractively {
return NO;
}
- (void)showAlert:(NSAlert *)alert {
// Only UI-based subclass shows the actual alert
+3
View File
@@ -8,6 +8,9 @@
#import "SUUpdatePermissionResponse.h"
#include "AppKitPrevention.h"
@implementation SUUpdatePermissionResponse
@synthesize automaticUpdateChecks = _automaticUpdateChecks;
+3
View File
@@ -13,6 +13,9 @@
#import "SUHost.h"
#import "SULog.h"
#include "AppKitPrevention.h"
@interface SUUpdateValidator ()
@property (nonatomic, readonly) SUHost *host;
+4
View File
@@ -160,7 +160,11 @@ SU_EXPORT @interface SUUpdater : NSObject
The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString)
*/
#if __has_feature(objc_generics)
@property (copy) NSDictionary<NSString *, NSString *> *httpHeaders;
#else
@property (copy) NSDictionary *httpHeaders;
#endif
/*!
A property indicating whether or not the user's system profile information is sent when checking for updates.
+7 -1
View File
@@ -210,7 +210,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
}
if (shouldPrompt) {
NSArray *profileInfo = [SUSystemProfiler systemProfileArrayForHost:self.host];
NSArray<NSDictionary<NSString *, NSString *> *> *profileInfo = [SUSystemProfiler systemProfileArrayForHost:self.host];
// Always say we're sending the system profile here so that the delegate displays the parameters it would send.
if ([self.delegate respondsToSelector:@selector(feedParametersForUpdater:sendingSystemProfile:)]) {
profileInfo = [profileInfo arrayByAddingObjectsFromArray:[self.delegate feedParametersForUpdater:self sendingSystemProfile:YES]];
@@ -291,6 +291,9 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
- (IBAction)checkForUpdates:(id)__unused sender
{
if (self.driver && [self.driver isInterruptible]) {
if ([self.driver resumeUpdateInteractively]) {
return;
}
[self.driver abortUpdate];
}
@@ -305,6 +308,9 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
- (void)installUpdatesIfAvailable
{
if (self.driver && [self.driver isInterruptible]) {
if ([self.driver resumeUpdateInteractively]) {
return;
}
[self.driver abortUpdate];
}
+4
View File
@@ -64,7 +64,11 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
\return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
*/
#if __has_feature(objc_generics)
- (NSArray<NSDictionary<NSString *, NSString *> *> *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
#else
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
#endif
/*!
Returns a custom appcast URL.
+3 -1
View File
@@ -155,8 +155,10 @@ static NSString * const UPDATED_VERSION = @"2.0";
// Copy our appcast over to the server directory
NSURL *appcastDestinationURL = [[serverDirectoryURL URLByAppendingPathComponent:appcastName] URLByAppendingPathExtension:appcastExtension];
NSURL *appcastPath = [mainBundle URLForResource:appcastName withExtension:appcastExtension];
assert(appcastPath);
NSError *copyAppcastError = nil;
if (![fileManager copyItemAtURL:[mainBundle URLForResource:appcastName withExtension:appcastExtension] toURL:appcastDestinationURL error:&copyAppcastError]) {
if (![fileManager copyItemAtURL:appcastPath toURL:appcastDestinationURL error:&copyAppcastError]) {
NSLog(@"Failed to copy appcast into cache directory with error %@", copyAppcastError);
assert(NO);
}
File renamed without changes.
+1
View File
@@ -7,6 +7,7 @@
<description>desc</description>
<pubDate>Sat, 26 Jul 2014 15:20:11 +0000</pubDate>
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="2.0" />
<sparkle:tags> <sparkle:criticalUpdate /> </sparkle:tags>
</item>
<!-- The best chosen release -->
<item>
+4
View File
@@ -25,19 +25,23 @@ class SUAppcastTest: XCTestCase {
XCTAssertEqual("Version 2.0", items[0].title);
XCTAssertEqual("desc", items[0].itemDescription);
XCTAssertEqual("Sat, 26 Jul 2014 15:20:11 +0000", items[0].dateString)
XCTAssertTrue(items[0].isCriticalUpdate);
// This is the best release matching our system version
XCTAssertEqual("Version 3.0", items[1].title);
XCTAssertNil(items[1].itemDescription);
XCTAssertNil(items[1].dateString)
XCTAssertFalse(items[1].isCriticalUpdate);
XCTAssertEqual("Version 4.0", items[2].title);
XCTAssertNil(items[2].itemDescription);
XCTAssertEqual("Sat, 26 Jul 2014 15:20:13 +0000", items[2].dateString)
XCTAssertFalse(items[2].isCriticalUpdate);
XCTAssertEqual("Version 5.0", items[3].title);
XCTAssertNil(items[3].itemDescription);
XCTAssertNil(items[3].dateString)
XCTAssertFalse(items[3].isCriticalUpdate);
// Test best appcast item & a delta update item
var deltaItem: SUAppcastItem? = nil
-32
View File
@@ -70,38 +70,6 @@ class SUFileManagerTest: XCTestCase
}
}
func testMoveFilesToTrash()
{
makeTempFiles() { fileManager, rootURL, ordinaryFileURL, directoryURL, fileInDirectoryURL, validSymlinkURL, invalidSymlinkURL in
XCTAssertNil(try? fileManager.moveItemAtURL(toTrash: rootURL.appendingPathComponent("does not exist")))
let trashURL = try! FileManager.default.url(for: .trashDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
try! fileManager.moveItemAtURL(toTrash: ordinaryFileURL)
XCTAssertFalse(fileManager._itemExists(at: ordinaryFileURL))
let ordinaryFileTrashURL = trashURL.appendingPathComponent(ordinaryFileURL.lastPathComponent)
XCTAssertTrue(fileManager._itemExists(at: ordinaryFileTrashURL))
try! fileManager.removeItem(at: ordinaryFileTrashURL)
let validSymlinkTrashURL = trashURL.appendingPathComponent(validSymlinkURL.lastPathComponent)
try! fileManager.moveItemAtURL(toTrash: validSymlinkURL)
XCTAssertTrue(fileManager._itemExists(at: validSymlinkTrashURL))
XCTAssertTrue(fileManager._itemExists(at: directoryURL))
try! fileManager.removeItem(at: validSymlinkTrashURL)
try! fileManager.moveItemAtURL(toTrash: directoryURL)
XCTAssertFalse(fileManager._itemExists(at: directoryURL))
XCTAssertFalse(fileManager._itemExists(at: fileInDirectoryURL))
let directoryTrashURL = trashURL.appendingPathComponent(directoryURL.lastPathComponent)
XCTAssertTrue(fileManager._itemExists(at: directoryTrashURL))
XCTAssertTrue(fileManager._itemExists(at: directoryTrashURL.appendingPathComponent(fileInDirectoryURL.lastPathComponent)))
try! fileManager.removeItem(at: directoryTrashURL)
}
}
func testCopyFiles()
{
makeTempFiles() { fileManager, rootURL, ordinaryFileURL, directoryURL, fileInDirectoryURL, validSymlinkURL, invalidSymlinkURL in
+1 -1
View File
@@ -49,7 +49,7 @@
XCTestExpectation *done = [self expectationWithDescription:@"install finished"];
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *path = [bundle pathForResource:@"test.sparkle_guided" ofType:@"pkg"];
NSString *path = [bundle pathForResource:@"test" ofType:@"pkg"];
XCTAssertNotNil(path);
SUHost *host = [[SUHost alloc] initWithBundle:bundle];
+21 -26
View File
@@ -10,11 +10,7 @@ import XCTest
class SUUnarchiverTest: XCTestCase
{
var password: String? = nil
var unarchivedSuccessExpectation: XCTestExpectation? = nil
var unarchivedFailureExpectation: XCTestExpectation? = nil
func unarchiveTestAppWithExtension(_ archiveExtension: String) {
func unarchiveTestAppWithExtension(_ archiveExtension: String, password: String? = nil) {
let appName = "SparkleTestCodeSignApp"
let archiveResourceURL = Bundle(for: type(of: self)).url(forResource: appName, withExtension: archiveExtension)!
@@ -25,46 +21,46 @@ class SUUnarchiverTest: XCTestCase
try! fileManager.removeItem(at: tempDirectoryURL)
}
self.unarchivedSuccessExpectation = super.expectation(description: "Unarchived Success (format: \(archiveExtension))")
self.unarchivedFailureExpectation = super.expectation(description: "Unarchived Failure (format: \(archiveExtension))")
let unarchivedSuccessExpectation = super.expectation(description: "Unarchived Success (format: \(archiveExtension))")
let unarchivedFailureExpectation = super.expectation(description: "Unarchived Failure (format: \(archiveExtension))")
let tempArchiveURL = tempDirectoryURL.appendingPathComponent(archiveResourceURL.lastPathComponent)
let extractedAppURL = tempDirectoryURL.appendingPathComponent(appName).appendingPathExtension("app")
self.unarchiveTestSuccessAppWithExtension(archiveExtension, appName: appName, tempDirectoryURL: tempDirectoryURL, tempArchiveURL: tempArchiveURL, archiveResourceURL: archiveResourceURL);
self.unarchiveTestFailureAppWithExtension(archiveExtension, tempDirectoryURL: tempDirectoryURL);
self.unarchiveTestSuccessAppWithExtension(archiveExtension, appName: appName, tempDirectoryURL: tempDirectoryURL, tempArchiveURL: tempArchiveURL, archiveResourceURL: archiveResourceURL, password: password, testExpectation: unarchivedSuccessExpectation);
self.unarchiveTestFailureAppWithExtension(archiveExtension, tempDirectoryURL: tempDirectoryURL, password: password, testExpectation: unarchivedFailureExpectation);
super.waitForExpectations(timeout: 7.0, handler: nil)
XCTAssertTrue(fileManager.fileExists(atPath: extractedAppURL.path))
XCTAssertEqual("6a60ab31430cfca8fb499a884f4a29f73e59b472", hashOfTree(extractedAppURL.path))
}
func unarchiveTestFailureAppWithExtension(_ archiveExtension: String, tempDirectoryURL: URL) {
func unarchiveTestFailureAppWithExtension(_ archiveExtension: String, tempDirectoryURL: URL, password: String?, testExpectation: XCTestExpectation) {
let tempArchiveURL = tempDirectoryURL.appendingPathComponent("error-invalid").appendingPathExtension(archiveExtension);
let unarchiver = SUUnarchiver.unarchiver(forPath: tempArchiveURL.path, updatingHostBundlePath: nil, decryptionPassword: self.password)!
let unarchiver = SUUnarchiver.unarchiver(forPath: tempArchiveURL.path, updatingHostBundlePath: nil, decryptionPassword: password)!
unarchiver.unarchive(completionBlock: {(error: Error?) -> Void in
XCTAssertNotNil(error);
self.unarchivedFailureExpectation!.fulfill()
testExpectation.fulfill()
}, progressBlock: nil);
}
func unarchiveTestSuccessAppWithExtension(_ archiveExtension: String, appName: String, tempDirectoryURL: URL, tempArchiveURL: URL, archiveResourceURL: URL) {
func unarchiveTestSuccessAppWithExtension(_ archiveExtension: String, appName: String, tempDirectoryURL: URL, tempArchiveURL: URL, archiveResourceURL: URL, password: String?, testExpectation: XCTestExpectation) {
let fileManager = FileManager.default
try! fileManager.copyItem(at: archiveResourceURL, to: tempArchiveURL)
let unarchiver = SUUnarchiver.unarchiver(forPath: tempArchiveURL.path, updatingHostBundlePath: nil, decryptionPassword: self.password)!
let unarchiver = SUUnarchiver.unarchiver(forPath: tempArchiveURL.path, updatingHostBundlePath: nil, decryptionPassword: password)!
unarchiver.unarchive(completionBlock: {(error: Error?) -> Void in
XCTAssertNil(error);
self.unarchivedSuccessExpectation!.fulfill()
testExpectation.fulfill()
}, progressBlock: nil);
}
func testUnarchivingZip()
{
self.unarchiveTestAppWithExtension("zip")
@@ -94,10 +90,9 @@ class SUUnarchiverTest: XCTestCase
{
self.unarchiveTestAppWithExtension("dmg")
}
func testUnarchivingEncryptedDmg()
{
self.password = "testpass";
self.unarchiveTestAppWithExtension("enc.dmg")
self.unarchiveTestAppWithExtension("enc.dmg", password: "testpass")
}
}
+3
View File
@@ -8,6 +8,9 @@
#import "SUFileOperationConstants.h"
#include "AppKitPrevention.h"
char * const SUFileOpRemoveQuarantineCommand = "xattr-d-apple-quarantine";
char * const SUFileOpCopyCommand = "cp";
char * const SUFileOpMoveCommand = "mv";
+3
View File
@@ -10,6 +10,9 @@
#import "SUFileManager.h"
#import "SUFileOperationConstants.h"
#include "AppKitPrevention.h"
// If we fail, we exit with a unique status code
// We don't try to NSLog because the logs can't be seen anywhere,
// and we don't want to log to a file irresponsibly (especially as root),
+5 -2
View File
@@ -5,6 +5,9 @@
import Foundation
// Maximum number of delta updates (per OS).
let maxDeltas = 5;
func makeError(code: SUError, _ description: String) -> NSError {
return NSError(domain: SUSparkleErrorDomain, code: Int(OSStatus(code.rawValue)), userInfo: [
NSLocalizedDescriptionKey: description,
@@ -65,7 +68,7 @@ func makeAppcast(archivesSourceDir: URL, privateKey: SecKey) throws -> [String:[
continue;
}
let deltaBaseName = appBaseName + item.version + "-" + latestItem.version;
let deltaBaseName = appBaseName + latestItem.version + "-" + item.version;
let deltaPath = archivesSourceDir.appendingPathComponent(deltaBaseName).appendingPathExtension("delta");
var delta:DeltaUpdate;
@@ -84,7 +87,7 @@ func makeAppcast(archivesSourceDir: URL, privateKey: SecKey) throws -> [String:[
if delta.fileSize / 7 < latestItem.fileSize / 8 {
// Max 3 deltas per version (arbitrary limit to reduce amount of work)
numDeltas += 1;
if numDeltas > 3 {
if numDeltas > maxDeltas {
break;
}
+9 -6
View File
@@ -23,7 +23,7 @@ class DeltaUpdate {
class func create(from: ArchiveItem, to: ArchiveItem, archivePath: URL) throws -> DeltaUpdate {
var applyDiffError: NSError? = nil;
if (!createBinaryDelta(from.appPath.path, to.appPath.path, archivePath.path, .beigeMajorVersion, true, &applyDiffError)) {
if (!createBinaryDelta(from.appPath.path, to.appPath.path, archivePath.path, .beigeMajorVersion, false, &applyDiffError)) {
throw applyDiffError!;
}
@@ -65,7 +65,7 @@ class ArchiveItem: CustomStringConvertible {
throw makeError(code: .unarchivingError, "Too many apps in \(unarchivedDir.path) \(apps)");
}
let appPath = items[0];
let appPath = apps[0];
guard let infoPlist = NSDictionary(contentsOf: appPath.appendingPathComponent("Contents/Info.plist")) else {
throw makeError(code: .unarchivingError, "No plist \(appPath.path)");
}
@@ -98,11 +98,14 @@ class ArchiveItem: CustomStringConvertible {
return "\(self.archivePath) \(self.version)"
}
var archiveURL: URL {
if let relative = self.feedURL {
return URL(string: self.archivePath.lastPathComponent, relativeTo: relative)!
var archiveURL: URL? {
guard let escapedFilename = self.archivePath.lastPathComponent.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) else {
return nil;
}
return URL(string: self.archivePath.lastPathComponent)!
if let relative = self.feedURL {
return URL(string: escapedFilename, relativeTo: relative)
}
return URL(string: escapedFilename)
}
var pubDate : String {
+10 -4
View File
@@ -5,6 +5,8 @@
import Foundation
let maxVersionsInFeed = 5;
func findElement(name: String, parent: XMLElement) -> XMLElement? {
if let found = try? parent.nodes(forXPath: name) {
if found.count > 0 {
@@ -45,7 +47,6 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
XMLNode.Options.nodeLoadExternalEntitiesNever,
XMLNode.Options.nodePreserveCDATA,
XMLNode.Options.nodePreserveWhitespace,
XMLNode.Options.nodePreservePrefixes,
];
doc = try XMLDocument(contentsOf: appcastDestPath, options: Int(options.rawValue));
} catch {
@@ -79,7 +80,7 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
let createNewItem = existingItems.count == 0;
// Update all old items, but aim for less than 5 in new feeds
if createNewItem && numItems >= 5 {
if createNewItem && numItems >= maxVersionsInFeed {
continue;
}
numItems += 1;
@@ -116,8 +117,11 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
item.addChild(enclosure!);
}
guard let archiveURL = update.archiveURL?.absoluteString else {
throw makeError(code: .appcastError, "Bad archive name or feed URL");
};
var attributes = [
XMLNode.attribute(withName: "url", stringValue: update.archiveURL.absoluteString) as! XMLNode,
XMLNode.attribute(withName: "url", stringValue: archiveURL) as! XMLNode,
XMLNode.attribute(withName: "sparkle:version", uri: sparkleNS, stringValue: update.version) as! XMLNode,
XMLNode.attribute(withName: "length", stringValue: String(update.fileSize)) as! XMLNode,
XMLNode.attribute(withName: "type", stringValue: update.mimeType) as! XMLNode,
@@ -158,5 +162,7 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
}
let options = XMLNode.Options.nodeCompactEmptyElement;
try doc.xmlData(withOptions:Int(options.rawValue)).write(to: appcastDestPath);
let docData = doc.xmlData(withOptions:Int(options.rawValue));
let _ = try XMLDocument(data: docData, options:0); // Verify that it was generated correctly, which does not always happen!
try docData.write(to: appcastDestPath);
}
+1 -1
View File
@@ -31,7 +31,7 @@ func unarchive(itemPath:URL, archiveDestDir: URL, callback: @escaping (Error?) -
}, progressBlock: nil)
} else {
_ = try? fileManager.removeItem(at: itemCopy);
callback(makeError(code: .unarchivingError, "Can't create a hardlink to \(itemCopy)"));
callback(makeError(code: .unarchivingError, "Not a supported archive format: \(itemCopy)"));
}
} catch {
_ = try? fileManager.removeItem(at: tempDir);