diff --git a/CHANGELOG b/CHANGELOG
index d84ebd49..401acdf3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,25 +1,61 @@
+
+# 1.13.0
+
+* Changed framework's bundle ID from `org.andymatuschak.Sparkle` to `org.sparkle-project.Sparkle`.
+
+# 1.12.0
+
+* Rewritten file operations for updating an app (Zorg)
+ - Ensuring atomic move operations, robust error handling.
+ - Faster.
+ - Using modern APIs where possible (no FSPathMakeRef, FSGetCatalogInfo, FSFindFolder, etc.)
+ - Strong documentation, easier to read code.
+* Automatic updates won't be installed if the system is about to shut off (Zorg)
+* Deprecated serving over HTTP without DSA (Zorg)
+ - Note that Apple has deprecated insecure HTTP in OS X 10.11
+* Improved Autoupdate application (Zorg)
+ * Do all the installation work after the runloop is set up
+ * TerminationListener only does termination listening now
+ * Handle cases where host path is not installation path and host path is not desired executable path
+ * Don't show Autoupdate dock icon if we shouldn't show UI
+ * Update modification & access time for new update
+* Added installUpdatesIfAvailable (Ian Langworth)
+* Removed extensions from shell scripts (Jake Petroules)
+* Rewritten test app so it works again, and from a local web server (Zorg)
+* Replaced use of Python with built-in web server (Kevin Wojniak)
+* Set LD_RUNPATH_SEARCH_PATHS in Podspec (Jake Petroules)
+* Don't install automatic updates if the system might shut off (Zorg)
+* Don't show Autoupdate dock icon if we shouldn't show UI (Zorg)
+* Updated layout constraints when removing release notes (Zorg)
+* Improved BinaryDelta error handling & logging (Zorg)
+* Refactored quarantine removal (Zorg)
+* Fixed German localization (1024jp)
+* Updated zh_CN translation (LIU Dongyuan / 柳东原)
+* Updated Mac models list until July 2015 (Gabriel Ulici)
+* Updated Polish translation (Kornel Lesiński)
+* Updated Xcode project languages for which we have translations (Jake Petroules)
+* Updated XIB files (Kornel Lesiński)
+* Use NSByteCountFormatter if available (Jake Petroules)
+* Declared protocols on SUUpdateAlert for the 10.11 SDK (Daniel Jalkut)
+* Silenced warning about casting away const-ness and -Wassign-enum (Daniel Jalkut)
+* Added script to generate a report comparing the Sparkle.strings files (Kevin Wojniak)
+* Check for empty strings (as well as nil) in SUHost's -name method (Karl Moskowski)
+* Don't follow symlinks for checking file existence (Zorg)
+* Unit tests in Swift (Zorg, Jake Petroules)
+* Fixed framework imports (Felix Schulze)
+* Fixed issues with copying files from different mounted drives (Zorg)
+* Disallowed automatic updates when user can't write to the bundle (Zorg)
+* Set the task working directories instead of changing the process working directory (Kevin Wojniak)
+
+# 1.11.1
+
+* Don't install automatic updates when system is about to shut down
+
# 1.11.0
* Big improvements to code signing and DSA verification
- Sparkle now checks not only whether an update is correctly signed, but also whether the updated version will be able to verify future updates. Updates now must either use DSA keys correctly, or not try to use them at all. Same goes for Apple Code Signing.
- Rely on code signing and the DSA key in the new app instead of appcast. If the new app has a public DSA key, then the appcast item must have a DSA signature for the app, even if the app is code signed. (Zorg)
-* Deprecated serving over http without DSA (Zorg)
-* Removed extensions from shell scripts (Jake Petroules)
-* Improved Autoupdate application (Zorg)
- * Do all the installation work after the runloop is set up
- * TerminationListener only does termination listening now
- * Handle cases where host path is not installation path and host path is not desired executable path
-* Set LD_RUNPATH_SEARCH_PATHS in Podspec. (Jake Petroules)
-* Updated layout constraints when removing release notes (Zorg)
-* Fix German localization (1024jp)
-* Updated zh_CN translation (LIU Dongyuan / 柳东原)
-* Updated Mac models list until July 2015 (Gabriel Ulici)
-* Updated Xcode project languages for which we have translations (Jake Petroules)
-* Use NSByteCountFormatter if available (Jake Petroules)
-* Declared protocols on SUUpdateAlert for the 10.11 SDK (Daniel Jalkut)
-* Silenced warning about casting away const-ness and -Wassign-enum (Daniel Jalkut)
-* Rewritten test app so it works again, and from a local web server (Zorg)
-* Added script to generate a report comparing the Sparkle.strings files (Kevin Wojniak)
* More verbose error message when DSA keys don't match (Kornel Lesiński)
* Added delegate methods for pre-download and immediately post-failed-download (Isaac Greenspan)
* Fix Lucida Grande is always used for release notes (LIU Dongyuan / 柳东原)
diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig
index 1f17de6b..3f751fdc 100644
--- a/Configurations/ConfigCommon.xcconfig
+++ b/Configurations/ConfigCommon.xcconfig
@@ -1,6 +1,6 @@
// Common
-SPARKLE_BUNDLE_IDENTIFIER = org.andymatuschak.Sparkle
+SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
SPARKLE_APPEND_VERSION_NUMBER = 1
@@ -15,7 +15,7 @@ SPARKLE_AUTOMATED_DOWNGRADES = 0
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
SPARKLE_VERSION_MAJOR = 1
-SPARKLE_VERSION_MINOR = 12
+SPARKLE_VERSION_MINOR = 13
SPARKLE_VERSION_PATCH = 0
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
diff --git a/README.markdown b/README.markdown
index 824729f7..0195ed05 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,4 +1,4 @@
-# Sparkle [](https://travis-ci.org/sparkle-project/Sparkle)
[](https://coveralls.io/github/sparkle-project/Sparkle?branch=master)
+# Sparkle [](https://travis-ci.org/sparkle-project/Sparkle) [](https://coveralls.io/github/sparkle-project/Sparkle?branch=master)
An easy-to-use software update framework for Cocoa developers.
@@ -31,17 +31,24 @@ An easy-to-use software update framework for Cocoa developers.
* 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
+## Requirements
-Building Sparkle requires Xcode 5 or above.
+* Runtime: OS X 10.7 or greater
+* Build: Xcode 5 and 10.8 SDK or greater
+* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
-### API
+## 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
+## 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.
+
+## Project Sponsor
+
+[Bandwidth Hog](https://www.bandwidthhog.com/?utm_source=sparkle-github&utm_medium=link&utm_campaign=readme-footer) is a service from MaxCDN
+that allows you to push software updates to your customers for only 1¢ a gigabyte. Best part is there are no contracts, it is all Pay-as-you-Go.
diff --git a/Resources/SUModelTranslation.plist b/Resources/SUModelTranslation.plist
index 35eb74c0..1f75b248 100644
--- a/Resources/SUModelTranslation.plist
+++ b/Resources/SUModelTranslation.plist
@@ -47,7 +47,13 @@
iMac14,4
iMac (Core i5, 21.5 inch Mid 2014)
iMac15,1
- iMac (Retina 5K Core i5 or i7, 27 inch 2014 or 2015)
+ iMac (Retina 5K Core i5 or i7, 27 inch Late 2014 or Mid 2015)
+ iMac16,1
+ iMac (Core i5, 21,5 inch Late 2015)
+ iMac16,2
+ iMac (Retina 4K Core i5 or i7, 21.5 inch Late 2015)
+ iMac17,1
+ iMac (Retina 5K Core i5 or i7, 27 inch Late 2015)
MacBook1,1
MacBook (Core Duo)
MacBook2,1
diff --git a/Sparkle.podspec b/Sparkle.podspec
index 5e256552..df5d5032 100644
--- a/Sparkle.podspec
+++ b/Sparkle.podspec
@@ -1,9 +1,11 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
- s.version = "1.11.0"
+ s.version = "1.11.1"
s.summary = "A software update framework for OS X"
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
s.homepage = "http://sparkle-project.org"
+ s.documentation_url = "http://sparkle-project.org/documentation/"
+ s.screenshot = "http://sparkle-project.org/images/screenshot-noshadow@2x.png"
s.license = {
:type => 'MIT',
:file => 'LICENSE'
@@ -13,14 +15,14 @@ Pod::Spec.new do |s|
'Kornel Lesiński' => 'pornel@pornel.net',
'C.W. Betts' => 'computers57@hotmail.com',
'Jake Petroules' => 'jake.petroules@petroules.com',
+ 'Mayur Pawashe' => 'zorgiepoo@gmail.com',
}
s.platform = :osx, '10.7'
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.bz2" }
s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h'
- s.vendored_framework = 'Sparkle.framework'
- s.resources = 'Sparkle.framework'
+ s.vendored_frameworks = 'Sparkle.framework'
s.xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/Sparkle"',
'LD_RUNPATH_SEARCH_PATHS' => '@loader_path/../Frameworks'
diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj
index 3d6f0b4f..2cf6ca8a 100644
--- a/Sparkle.xcodeproj/project.pbxproj
+++ b/Sparkle.xcodeproj/project.pbxproj
@@ -91,7 +91,7 @@
331726CC1B4D625A008B2D77 /* SUPipedUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6129C0B90E0B79810062CE76 /* SUPipedUnarchiver.m */; };
331726CD1B4D625A008B2D77 /* SUXPCInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 33545B7C1B46774D0059250D /* SUXPCInstaller.m */; };
331726CE1B4D625A008B2D77 /* SUPlainInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5040DAE8AB80026945C /* SUPlainInstaller.m */; };
- 331726CF1B4D625A008B2D77 /* SUPlainInstallerInternals.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B5F8E509C4CE3C00B25A18 /* SUPlainInstallerInternals.m */; };
+ 331726CF1B4D625A008B2D77 /* (null) in Sources */ = {isa = PBXBuildFile; };
331726D01B4D625A008B2D77 /* SUProbingUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6101347A0DD2541A0049ACDF /* SUProbingUpdateDriver.m */; };
331726D11B4D625A008B2D77 /* SUScheduledUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B93C080DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m */; };
331726D21B4D625A008B2D77 /* SUStandardVersionComparator.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A225A30D1C4AC000430CCD /* SUStandardVersionComparator.m */; };
@@ -112,13 +112,17 @@
33545B921B4679810059250D /* install_service.m in Sources */ = {isa = PBXBuildFile; fileRef = 33545B771B46774D0059250D /* install_service.m */; };
33545B931B4687CD0059250D /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
33545B941B468A160059250D /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
- 33545B951B468A280059250D /* SUPlainInstallerInternals.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B5F8E509C4CE3C00B25A18 /* SUPlainInstallerInternals.m */; };
+ 33545B951B468A280059250D /* (null) in Sources */ = {isa = PBXBuildFile; };
33545B961B468A730059250D /* SUPlainInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5040DAE8AB80026945C /* SUPlainInstaller.m */; };
33545B971B468ABB0059250D /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; };
33545B981B468AC80059250D /* SUInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5000DAE88B40026945C /* SUInstaller.m */; };
33545B991B468AD60059250D /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
33545B9A1B468AE30059250D /* SUPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5210DAE8E8A0026945C /* SUPackageInstaller.m */; };
33545B9C1B46A5430059250D /* SUXPCInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 33545B7C1B46774D0059250D /* SUXPCInstaller.m */; };
+ 336475CE1C5B980500813E67 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 336475CF1C5B980C00813E67 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 336475D01C5B982900813E67 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
+ 336475D11C5B984200813E67 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
55C14BD4136EEFCE00649790 /* Autoupdate.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14BD3136EEFCE00649790 /* Autoupdate.m */; };
55C14BD9136EF00C00649790 /* SUStatus.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55C14BD8136EF00C00649790 /* SUStatus.xib */; };
@@ -139,10 +143,11 @@
55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5210DAE8E8A0026945C /* SUPackageInstaller.m */; };
55C14F2A136EF9A900649790 /* SUWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61180BC90D64138900B4E0D1 /* SUWindowController.m */; };
55C14F32136EFC2400649790 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55C14F31136EFC2400649790 /* SystemConfiguration.framework */; };
- 55C14F7E136F005000649790 /* SUPlainInstallerInternals.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B5F8E509C4CE3C00B25A18 /* SUPlainInstallerInternals.m */; };
55C14F9A136F045400649790 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
55C14FC7136F05E100649790 /* Sparkle.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61AAE8220A321A7F00D8810D /* Sparkle.strings */; };
55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 55E6F33219EC9F6C00005E76 /* SUErrors.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */; };
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */; };
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */; };
@@ -178,7 +183,6 @@
6120721309CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 6120721109CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m */; };
61299A2F09CA2DAB00B7442F /* SUDSAVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */; settings = {ATTRIBUTES = (); }; };
61299A3009CA2DAB00B7442F /* SUDSAVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A2E09CA2DAB00B7442F /* SUDSAVerifier.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
- 61299A4A09CA2DD000B7442F /* SUPlainInstallerInternals.h in Headers */ = {isa = PBXBuildFile; fileRef = 6129984309C9E2DA00B7442F /* SUPlainInstallerInternals.h */; settings = {ATTRIBUTES = (); }; };
61299A5C09CA6D4500B7442F /* SUConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A5B09CA6D4500B7442F /* SUConstants.h */; settings = {ATTRIBUTES = (); }; };
61299A6009CA6EB100B7442F /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
61299A8D09CA790200B7442F /* SUUnarchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299A8B09CA790200B7442F /* SUUnarchiver.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -209,7 +213,6 @@
61B078CF15A5FB6100600039 /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; };
61B5F8ED09C4CE3C00B25A18 /* SUUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 61B5F8E309C4CE3C00B25A18 /* SUUpdater.h */; settings = {ATTRIBUTES = (Public, ); }; };
61B5F8EE09C4CE3C00B25A18 /* SUUpdater.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B5F8E409C4CE3C00B25A18 /* SUUpdater.m */; };
- 61B5F8EF09C4CE3C00B25A18 /* SUPlainInstallerInternals.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B5F8E509C4CE3C00B25A18 /* SUPlainInstallerInternals.m */; };
61B5F8F709C4CEB300B25A18 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
61B5F90F09C4CF3A00B25A18 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; };
61B5F92E09C4CFD800B25A18 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61B5F92A09C4CFD800B25A18 /* InfoPlist.strings */; };
@@ -235,7 +238,7 @@
61F83F720DBFE140006FDD30 /* SUBasicUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F83F700DBFE137006FDD30 /* SUBasicUpdateDriver.m */; };
61F83F740DBFE141006FDD30 /* SUBasicUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 61F83F6F0DBFE137006FDD30 /* SUBasicUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
61FA52880E2D9EA400EF58AD /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (Required, ); }; };
- 7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */; settings = {ASSET_TAGS = (); }; };
+ 7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */; };
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; settings = {COMPILER_FLAGS = "-w"; }; };
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; settings = {COMPILER_FLAGS = "-w"; }; };
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; settings = {COMPILER_FLAGS = "-w"; }; };
@@ -243,11 +246,23 @@
721CF1AB1AD764EB00D9AC09 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D06E8FB0FD68D61005AE3F6 /* libbz2.dylib */; };
7223E7631AD1AEFF008E3161 /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; };
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
- 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */; settings = {ASSET_TAGS = (); }; };
- 72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */; settings = {ASSET_TAGS = (); }; };
- 72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; settings = {ASSET_TAGS = (); }; };
- 72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */; settings = {ASSET_TAGS = (); }; };
- 72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */; settings = {ASSET_TAGS = (); }; };
+ 726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */; };
+ 726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
+ 726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
+ 726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
+ 726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
+ 726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
+ 7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */; };
+ 7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */; };
+ 72A4A2411BB656FA00E7820D /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
+ 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */; };
+ 72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */; };
+ 72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; };
+ 72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */; };
+ 72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */; };
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */; };
72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */; };
@@ -258,6 +273,7 @@
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */; };
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
767B61AE1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
+ A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */; };
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */; };
F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */ = {isa = PBXBuildFile; fileRef = F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */; };
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; };
@@ -601,7 +617,6 @@
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Sparkle Unit Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
612279DA0DB5470200AB99EA /* SparkleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SparkleTests-Info.plist"; sourceTree = ""; };
61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUVersionComparisonTest.m; sourceTree = ""; };
- 6129984309C9E2DA00B7442F /* SUPlainInstallerInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUPlainInstallerInternals.h; sourceTree = ""; };
61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUDSAVerifier.h; sourceTree = ""; };
61299A2E09CA2DAB00B7442F /* SUDSAVerifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDSAVerifier.m; sourceTree = ""; };
61299A5B09CA6D4500B7442F /* SUConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUConstants.h; sourceTree = ""; };
@@ -653,7 +668,6 @@
61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUCodeSigningVerifier.m; sourceTree = ""; };
61B5F8E309C4CE3C00B25A18 /* SUUpdater.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SUUpdater.h; sourceTree = ""; };
61B5F8E409C4CE3C00B25A18 /* SUUpdater.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SUUpdater.m; sourceTree = ""; };
- 61B5F8E509C4CE3C00B25A18 /* SUPlainInstallerInternals.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SUPlainInstallerInternals.m; sourceTree = ""; };
61B5F8F609C4CEB300B25A18 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sparkle Test App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
61B5F90409C4CEE200B25A18 /* TestApplication-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestApplication-Info.plist"; sourceTree = ""; };
@@ -694,6 +708,11 @@
7223E7621AD1AEFF008E3161 /* sais.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sais.h; sourceTree = ""; };
7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUBinaryDeltaCreate.m; sourceTree = ""; };
7268AC641AD634E400C3E0C1 /* SUBinaryDeltaCreate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBinaryDeltaCreate.h; sourceTree = ""; };
+ 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUOperatingSystem.h; sourceTree = ""; };
+ 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUOperatingSystem.m; sourceTree = ""; };
+ 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFileManager.h; sourceTree = ""; };
+ 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUFileManager.m; sourceTree = ""; };
+ 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUFileManagerTest.swift; sourceTree = ""; };
72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = SparkleTestCodeSignApp.tar.gz; sourceTree = ""; };
72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */ = {isa = PBXFileReference; lastKnownFileType = archive.tar; path = SparkleTestCodeSignApp.tar; sourceTree = ""; };
72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = SparkleTestCodeSignApp.tar.bz2; sourceTree = ""; };
@@ -712,6 +731,8 @@
767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUGuidedPackageInstaller.m; sourceTree = ""; };
8DC2EF5A0486A6940098B216 /* Sparkle-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Sparkle-Info.plist"; sourceTree = ""; };
8DC2EF5B0486A6940098B216 /* Sparkle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTestWebServer.h; sourceTree = ""; };
+ A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTestWebServer.m; sourceTree = ""; };
F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUCodeSigningVerifierTest.m; sourceTree = ""; };
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SparkleTestCodeSignApp.zip; sourceTree = ""; };
FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkDebug.xcconfig; sourceTree = ""; };
@@ -931,10 +952,10 @@
isa = PBXGroup;
children = (
14732BC21960F3FF00593899 /* bin */,
- 147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */,
14732BBA1960EF7100593899 /* CHANGELOG */,
61C268090E2DB5D000175E6C /* LICENSE */,
14732BC11960F3B200593899 /* Makefile */,
+ 147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */,
1420DF4F196247F900203BB0 /* Images.xcassets */,
14732BBC1960EFB500593899 /* README.markdown */,
14732BB91960EEEE00593899 /* SampleAppcast.xml */,
@@ -973,12 +994,12 @@
isa = PBXGroup;
children = (
14958C6B19AEBC530061B14F /* signed-test-file.txt */,
- F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */,
- 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */,
- 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */,
- 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */,
- 72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */,
72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */,
+ 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */,
+ 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */,
+ 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */,
+ 72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */,
+ F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */,
14958C6C19AEBC610061B14F /* test-pubkey.pem */,
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */,
);
@@ -1052,15 +1073,16 @@
isa = PBXGroup;
children = (
14958C7019AEBE350061B14F /* Resources */,
+ 72AFC6121B9A944200F6B565 /* Sparkle Unit Tests-Bridging-Header.h */,
612279DA0DB5470200AB99EA /* SparkleTests-Info.plist */,
142E0E0819A83AAC00E4312B /* SUBinaryDeltaTest.m */,
F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */,
5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */,
+ 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */,
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */,
+ 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */,
14950074195FDF5900BC5B5B /* SUUpdaterTest.m */,
61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */,
- 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */,
- 72AFC6121B9A944200F6B565 /* Sparkle Unit Tests-Bridging-Header.h */,
);
path = Tests;
sourceTree = "";
@@ -1102,6 +1124,8 @@
618FA6DB0DB485440026945C /* Installation */ = {
isa = PBXGroup;
children = (
+ 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */,
+ 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */,
767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */,
767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */,
618FA4FF0DAE88B40026945C /* SUInstaller.h */,
@@ -1110,8 +1134,6 @@
618FA5210DAE8E8A0026945C /* SUPackageInstaller.m */,
618FA5030DAE8AB80026945C /* SUPlainInstaller.h */,
618FA5040DAE8AB80026945C /* SUPlainInstaller.m */,
- 6129984309C9E2DA00B7442F /* SUPlainInstallerInternals.h */,
- 61B5F8E509C4CE3C00B25A18 /* SUPlainInstallerInternals.m */,
);
name = Installation;
sourceTree = "";
@@ -1127,6 +1149,8 @@
14652F8319A9759F00959E44 /* SUExport.h */,
61EF67580E25C5B400F754E0 /* SUHost.h */,
61EF67550E25B58D00F754E0 /* SUHost.m */,
+ 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */,
+ 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */,
55C14F04136EF6DB00649790 /* SULog.h */,
55C14F05136EF6DB00649790 /* SULog.m */,
);
@@ -1140,13 +1164,15 @@
72E45DDC1B65C3BD005C701A /* sign_update */,
61B5F92A09C4CFD800B25A18 /* InfoPlist.strings */,
61B5F92409C4CFC900B25A18 /* main.m */,
+ 61B5F92C09C4CFD800B25A18 /* MainMenu.xib */,
+ 72E45CFB1B641961005C701A /* sparkletestcast.xml */,
72E45CF11B640CDD005C701A /* SUTestApplicationDelegate.h */,
72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */,
72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */,
72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */,
+ A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */,
+ A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */,
72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */,
- 61B5F92C09C4CFD800B25A18 /* MainMenu.xib */,
- 72E45CFB1B641961005C701A /* sparkletestcast.xml */,
72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */,
14732BBF1960F0AC00593899 /* test_app_only_dsa_pub.pem */,
61B5F90409C4CEE200B25A18 /* TestApplication-Info.plist */,
@@ -1280,14 +1306,15 @@
61299A2F09CA2DAB00B7442F /* SUDSAVerifier.h in Headers */,
55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */,
14652F8419A978C200959E44 /* SUExport.h in Headers */,
+ 7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */,
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */,
61EF67590E25C5B400F754E0 /* SUHost.h in Headers */,
618FA5010DAE88B40026945C /* SUInstaller.h in Headers */,
55C14F06136EF6DB00649790 /* SULog.h in Headers */,
+ 726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */,
618FA5220DAE8E8A0026945C /* SUPackageInstaller.h in Headers */,
6102FE460E077FCE00F85D09 /* SUPipedUnarchiver.h in Headers */,
618FA5050DAE8AB80026945C /* SUPlainInstaller.h in Headers */,
- 61299A4A09CA2DD000B7442F /* SUPlainInstallerInternals.h in Headers */,
6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */,
61B93C090DD112FF00DCD2F8 /* SUScheduledUpdateDriver.h in Headers */,
61A225A40D1C4AC000430CCD /* SUStandardVersionComparator.h in Headers */,
@@ -1509,7 +1536,7 @@
attributes = {
CLASSPREFIX = SU;
LastSwiftUpdateCheck = 0700;
- LastUpgradeCheck = 0700;
+ LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Sparkle Project";
TargetAttributes = {
331726741B4D36F2008B2D77 = {
@@ -1606,13 +1633,13 @@
buildActionMask = 2147483647;
files = (
14958C6E19AEBC950061B14F /* signed-test-file.txt in Resources */,
- F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */,
- 72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */,
- 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */,
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */,
- 14958C6F19AEBC980061B14F /* test-pubkey.pem in Resources */,
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */,
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */,
+ 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */,
+ 72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */,
+ F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */,
+ 14958C6F19AEBC980061B14F /* test-pubkey.pem in Resources */,
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1656,11 +1683,11 @@
1420DF50196247F900203BB0 /* Images.xcassets in Resources */,
61B5F92E09C4CFD800B25A18 /* InfoPlist.strings in Resources */,
61B5F92F09C4CFD800B25A18 /* MainMenu.xib in Resources */,
- 72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */,
- 14732BC01960F2C200593899 /* test_app_only_dsa_pub.pem in Resources */,
- 72E45CF81B640DAE005C701A /* SUUpdateSettingsWindowController.xib in Resources */,
72E45DDD1B65C3BD005C701A /* sign_update in Resources */,
+ 72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */,
+ 72E45CF81B640DAE005C701A /* SUUpdateSettingsWindowController.xib in Resources */,
72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */,
+ 14732BC01960F2C200593899 /* test_app_only_dsa_pub.pem in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1784,10 +1811,11 @@
331726CE1B4D625A008B2D77 /* SUPlainInstaller.m in Sources */,
331726C71B4D624D008B2D77 /* SUGuidedPackageInstaller.m in Sources */,
331726D11B4D625A008B2D77 /* SUScheduledUpdateDriver.m in Sources */,
+ 336475D01C5B982900813E67 /* SUOperatingSystem.m in Sources */,
331726BF1B4D624D008B2D77 /* SUBasicUpdateDriver.m in Sources */,
331726CC1B4D625A008B2D77 /* SUPipedUnarchiver.m in Sources */,
331726DB1B4D625A008B2D77 /* SUUpdater.m in Sources */,
- 331726CF1B4D625A008B2D77 /* SUPlainInstallerInternals.m in Sources */,
+ 331726CF1B4D625A008B2D77 /* (null) in Sources */,
331726CD1B4D625A008B2D77 /* SUXPCInstaller.m in Sources */,
331726C61B4D624D008B2D77 /* SUDSAVerifier.m in Sources */,
331726BC1B4D6225008B2D77 /* SUAppcastItem.m in Sources */,
@@ -1797,6 +1825,7 @@
331726DD1B4D625A008B2D77 /* SUWindowController.m in Sources */,
331726D21B4D625A008B2D77 /* SUStandardVersionComparator.m in Sources */,
331726C91B4D625A008B2D77 /* SUInstaller.m in Sources */,
+ 336475CE1C5B980500813E67 /* SUFileManager.m in Sources */,
331726C81B4D625A008B2D77 /* SUHost.m in Sources */,
331726BA1B4D6214008B2D77 /* NTSynchronousTask.m in Sources */,
331726BE1B4D6225008B2D77 /* SUAutomaticUpdateDriver.m in Sources */,
@@ -1818,14 +1847,16 @@
buildActionMask = 2147483647;
files = (
33545B981B468AC80059250D /* SUInstaller.m in Sources */,
+ 336475D11C5B984200813E67 /* SUOperatingSystem.m in Sources */,
33545B991B468AD60059250D /* SUGuidedPackageInstaller.m in Sources */,
33545B9A1B468AE30059250D /* SUPackageInstaller.m in Sources */,
- 33545B951B468A280059250D /* SUPlainInstallerInternals.m in Sources */,
+ 33545B951B468A280059250D /* (null) in Sources */,
33545B961B468A730059250D /* SUPlainInstaller.m in Sources */,
33545B941B468A160059250D /* SULog.m in Sources */,
33545B921B4679810059250D /* install_service.m in Sources */,
33545B971B468ABB0059250D /* SUCodeSigningVerifier.m in Sources */,
33545B931B4687CD0059250D /* SUConstants.m in Sources */,
+ 336475CF1C5B980C00813E67 /* SUFileManager.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1833,16 +1864,17 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */,
55C14BD4136EEFCE00649790 /* Autoupdate.m in Sources */,
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */,
55C14F00136EF6B700649790 /* SUConstants.m in Sources */,
+ 7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */,
767B61AE1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */,
55C14F0C136EF6EA00649790 /* SUHost.m in Sources */,
55C14F0D136EF6F200649790 /* SUInstaller.m in Sources */,
55C14F08136EF6DB00649790 /* SULog.m in Sources */,
55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */,
55C14F21136EF84D00649790 /* SUPlainInstaller.m in Sources */,
- 55C14F7E136F005000649790 /* SUPlainInstallerInternals.m in Sources */,
55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */,
55C14F20136EF84300649790 /* SUStatusController.m in Sources */,
55C14F23136EF86700649790 /* SUSystemProfiler.m in Sources */,
@@ -1854,6 +1886,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */,
+ 726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */,
+ 726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */,
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */,
14652F7E19A9728A00959E44 /* bspatch.c in Sources */,
7223E7631AD1AEFF008E3161 /* sais.c in Sources */,
@@ -1874,10 +1909,12 @@
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */,
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */,
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */,
- 7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */,
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */,
+ 72A4A2411BB656FA00E7820D /* SUFileManager.m in Sources */,
+ 72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */,
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */,
14652F8219A9746000959E44 /* SULog.m in Sources */,
+ 7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1885,7 +1922,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */,
+ 5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */,
+ 5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */,
61B5F93009C4CFDC00B25A18 /* main.m in Sources */,
+ A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */,
72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */,
72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */,
);
@@ -1909,6 +1950,7 @@
61299A6009CA6EB100B7442F /* SUConstants.m in Sources */,
6102FE4B0E07803800F85D09 /* SUDiskImageUnarchiver.m in Sources */,
61299A3009CA2DAB00B7442F /* SUDSAVerifier.m in Sources */,
+ 7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */,
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */,
61EF67560E25B58D00F754E0 /* SUHost.m in Sources */,
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */,
@@ -1917,9 +1959,9 @@
61D85D6D0E10B2ED00F9B4A9 /* SUPipedUnarchiver.m in Sources */,
33545B9C1B46A5430059250D /* SUXPCInstaller.m in Sources */,
618FA5060DAE8AB80026945C /* SUPlainInstaller.m in Sources */,
- 61B5F8EF09C4CE3C00B25A18 /* SUPlainInstallerInternals.m in Sources */,
6101347C0DD2541A0049ACDF /* SUProbingUpdateDriver.m in Sources */,
61B93C0A0DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m in Sources */,
+ 726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */,
61A225A50D1C4AC000430CCD /* SUStandardVersionComparator.m in Sources */,
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */,
61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */,
@@ -2132,13 +2174,16 @@
isa = PBXVariantGroup;
children = (
6149E6EA1601ABAC008A351E /* ar */,
+ 147D6DA71B66EC1C006607AB /* ca */,
615409C4103BBC4000125AF1 /* cs */,
61131A050F846CE600E97AF6 /* da */,
619B17200E1E9D0800E72754 /* de */,
555CF29A196C52330000B31E /* el */,
61AAE8230A321A7F00D8810D /* en */,
61AAE84F0A321AF700D8810D /* es */,
+ 147D6DA91B66EC22006607AB /* fi */,
61AAE8590A321B0400D8810D /* fr */,
+ 147D6DAA1B66EC25006607AB /* he */,
613151B20FB4946A000DCD59 /* is */,
61F614540E24A12D009F47E7 /* it */,
611A904610240DF700CC659E /* ja */,
@@ -2158,9 +2203,6 @@
0263187214FEBB31005EBF43 /* uk */,
61131A090F846D0A00E97AF6 /* zh_CN */,
61131A0A0F846D1100E97AF6 /* zh_TW */,
- 147D6DA71B66EC1C006607AB /* ca */,
- 147D6DA91B66EC22006607AB /* fi */,
- 147D6DAA1B66EC25006607AB /* he */,
);
name = Sparkle.strings;
sourceTree = "";
diff --git a/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme b/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme
index 7a051ea2..0ac6a3dc 100644
--- a/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme
+++ b/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme
@@ -1,6 +1,6 @@
@@ -46,7 +45,6 @@ static const NSTimeInterval SUParentQuitCheckInterval = .25;
{
[self.watchdogTimer invalidate];
completionBlock();
- completionBlock = nil;
}
- (void)startListeningWithCompletion:(void (^)(void))completionBlock
@@ -72,6 +70,13 @@ static const NSTimeInterval SUParentQuitCheckInterval = .25;
*/
static const NSTimeInterval SUInstallationTimeLimit = 5;
+/*!
+ * Terminate the application after a delay from launching the new update to avoid OS activation issues
+ * This delay should be be high enough to increase the likelihood that our updated app will be launched up front,
+ * but should be low enough so that the user doesn't ponder why the updater hasn't finished terminating yet
+ */
+static const NSTimeInterval SUTerminationTimeDelay = 0.5;
+
@interface AppInstaller : NSObject
/*
@@ -97,6 +102,8 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
@property (nonatomic, assign) BOOL shouldRelaunch;
@property (nonatomic, assign) BOOL shouldShowUI;
+@property (nonatomic, assign) BOOL isTerminating;
+
@end
@implementation AppInstaller
@@ -108,6 +115,7 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
@synthesize relaunchPath = _relaunchPath;
@synthesize shouldRelaunch = _shouldRelaunch;
@synthesize shouldShowUI = _shouldShowUI;
+@synthesize isTerminating = _isTerminating;
- (instancetype)initWithHostPath:(NSString *)hostPath relaunchPath:(NSString *)relaunchPath parentProcessId:(pid_t)parentProcessId updateFolderPath:(NSString *)updateFolderPath shouldRelaunch:(BOOL)shouldRelaunch shouldShowUI:(BOOL)shouldShowUI
{
@@ -129,12 +137,16 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
{
[self.terminationListener startListeningWithCompletion:^{
self.terminationListener = nil;
-
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUInstallationTimeLimit * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- // Show app icon in the dock
- ProcessSerialNumber psn = { 0, kCurrentProcess };
- TransformProcessType(&psn, kProcessTransformToForegroundApplication);
- });
+
+ if (self.shouldShowUI) {
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUInstallationTimeLimit * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ if (!self.isTerminating) {
+ // Show app icon in the dock
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+ }
+ });
+ }
[self install];
}];
@@ -150,7 +162,7 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
self.statusController = [[SUStatusController alloc] initWithHost:host];
[self.statusController setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO];
[self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"")
- maxProgressValue: 0 statusText: @""];
+ maxProgressValue: 0 statusText: @""];
[self.statusController showWindow:self];
}
@@ -160,6 +172,7 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
versionComparator:[SUStandardVersionComparator defaultComparator]
completionHandler:^(NSError *error) {
if (error) {
+ SULog(@"Installation Error: %@", error);
if (self.shouldShowUI) {
NSAlert *alert = [[NSAlert alloc] init];
alert.messageText = @"";
@@ -181,27 +194,44 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
}];
}
-- (void)cleanupAndTerminateWithPathToRelaunch:(NSString *)relaunchPath __attribute__((noreturn))
+- (void)cleanupAndTerminateWithPathToRelaunch:(NSString *)relaunchPath
{
- if (self.shouldRelaunch) {
- NSError *error = nil;
- [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:relaunchPath]
- options:NSWorkspaceLaunchNewInstance
- configuration:@{}
- error:&error];
- if (error.code != noErr)
- {
- SULog(@"%ld - %@", error.code, error.localizedDescription);
+ self.isTerminating = YES;
+
+ dispatch_block_t cleanupAndExit = ^{
+ NSError *theError = nil;
+ if (![[NSFileManager defaultManager] removeItemAtPath:self.updateFolderPath error:&theError]) {
+ SULog(@"Couldn't remove update folder: %@.", theError);
}
+
+ [[NSFileManager defaultManager] removeItemAtPath:[[NSBundle mainBundle] bundlePath] error:NULL];
+
+ exit(EXIT_SUCCESS);
+ };
+
+ if (self.shouldRelaunch) {
+ // The auto updater can terminate before the newly updated app is finished launching
+ // If that happens, the OS may not make the updated app active and frontmost
+ // (Or it does become frontmost, but the OS backgrounds it afterwards.. It's some kind of timing/activation issue that doesn't occur all the time)
+ // The only remedy I've been able to find is waiting an arbitrary delay before exiting our application
+
+ // Don't use -launchApplication: because we may not be launching an application. Eg: it could be a system prefpane
+ if (![[NSWorkspace sharedWorkspace] openFile:relaunchPath]) {
+ SULog(@"Failed to launch %@", relaunchPath);
+ }
+
+ [self.statusController close];
+
+ // Don't even think about hiding the app icon from the dock if we've already shown it
+ // Transforming the app back to a background one has a backfiring effect, decreasing the likelihood
+ // that the updated app will be brought up front
+
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUTerminationTimeDelay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ cleanupAndExit();
+ });
+ } else {
+ cleanupAndExit();
}
-
- NSError *theError = nil;
- if (![SUPlainInstaller _removeFileAtPath:self.updateFolderPath error:&theError])
- SULog(@"Couldn't remove update folder: %@.", theError);
-
- [[NSFileManager defaultManager] removeItemAtPath:[[NSBundle mainBundle] bundlePath] error:NULL];
-
- exit(EXIT_SUCCESS);
}
@end
@@ -225,7 +255,7 @@ int main(int __unused argc, const char __unused *argv[])
AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:args[1]
relaunchPath:args[2]
parentProcessId:[args[3] intValue]
- updateFolderPath:args[4]
+ updateFolderPath:args[4]
shouldRelaunch:(args.count > 5) ? [args[5] boolValue] : YES
shouldShowUI:shouldShowUI];
NSConnection *connection = [[NSConnection alloc] init];
diff --git a/Sparkle/Installation XPC Service/SUXPCInstaller.h b/Sparkle/Installation XPC Service/SUXPCInstaller.h
index c1d6c061..adf5f8e7 100644
--- a/Sparkle/Installation XPC Service/SUXPCInstaller.h
+++ b/Sparkle/Installation XPC Service/SUXPCInstaller.h
@@ -11,7 +11,7 @@
@interface SUXPCInstaller : NSObject
-+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)outError;
+//+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)outError;
+ (BOOL)copyPathContent:(NSString *)src toDirectory:(NSString *)dstDir error:(NSError *__autoreleasing *)outError; // dstDir will be created if absent
diff --git a/Sparkle/Installation XPC Service/SUXPCInstaller.m b/Sparkle/Installation XPC Service/SUXPCInstaller.m
index d2532105..d0e050a3 100644
--- a/Sparkle/Installation XPC Service/SUXPCInstaller.m
+++ b/Sparkle/Installation XPC Service/SUXPCInstaller.m
@@ -54,60 +54,60 @@ BOOL SUShouldUseXPCInstaller(void)
return (serviceConnection);
}
-+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)outError
-{
- xpc_connection_t connection = [self getSandboxXPCService];
-
- xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
- xpc_dictionary_set_int64(message, SUInstallServiceTaskTypeKey, (int64_t)SUInstallServiceTaskAuthCopyPath);
-
- if (src)
- xpc_dictionary_set_string(message, SUInstallServiceSourcePathKey, [src fileSystemRepresentation]);
- if (dst)
- xpc_dictionary_set_string(message, SUInstallServiceDestinationPathKey, [dst fileSystemRepresentation]);
- xpc_dictionary_set_bool(message, SUInstallServiceAppendVersionKey, appendVersion ? true : false);
-
- __block BOOL xpcDidReply = NO;
- __block NSError *error = nil;
-
- dispatch_queue_t queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
- xpc_connection_send_message_with_reply(connection, message, queue, ^(xpc_object_t response) {
- if (XPC_TYPE_ERROR == xpc_get_type(response))
- {
- NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Internal XPC error."
- forKey:NSLocalizedDescriptionKey];
- error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
- }
- else if (XPC_TYPE_DICTIONARY == xpc_get_type(response))
- {
- const char *errorString = xpc_dictionary_get_string(response, SUInstallServiceErrorLocalizedDescriptionKey);
- if (errorString != NULL)
- {
- NSString *errorStr = [NSString stringWithCString:errorString encoding:NSUTF8StringEncoding];
- NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:errorStr ? errorStr : @""
- forKey:NSLocalizedDescriptionKey];
- error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
- }
- }
-
- xpcDidReply = YES;
- });
-
- while (NO == xpcDidReply)
- {
- [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
- }
-
- xpc_release(message);
- dispatch_release(queue);
-
- if (nil != error && NULL != outError)
- {
- *outError = error;
- }
-
- return (nil == error);
-}
+//+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)outError
+//{
+// xpc_connection_t connection = [self getSandboxXPCService];
+//
+// xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
+// xpc_dictionary_set_int64(message, SUInstallServiceTaskTypeKey, (int64_t)SUInstallServiceTaskAuthCopyPath);
+//
+// if (src)
+// xpc_dictionary_set_string(message, SUInstallServiceSourcePathKey, [src fileSystemRepresentation]);
+// if (dst)
+// xpc_dictionary_set_string(message, SUInstallServiceDestinationPathKey, [dst fileSystemRepresentation]);
+// xpc_dictionary_set_bool(message, SUInstallServiceAppendVersionKey, appendVersion ? true : false);
+//
+// __block BOOL xpcDidReply = NO;
+// __block NSError *error = nil;
+//
+// dispatch_queue_t queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
+// xpc_connection_send_message_with_reply(connection, message, queue, ^(xpc_object_t response) {
+// if (XPC_TYPE_ERROR == xpc_get_type(response))
+// {
+// NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Internal XPC error."
+// forKey:NSLocalizedDescriptionKey];
+// error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
+// }
+// else if (XPC_TYPE_DICTIONARY == xpc_get_type(response))
+// {
+// const char *errorString = xpc_dictionary_get_string(response, SUInstallServiceErrorLocalizedDescriptionKey);
+// if (errorString != NULL)
+// {
+// NSString *errorStr = [NSString stringWithCString:errorString encoding:NSUTF8StringEncoding];
+// NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:errorStr ? errorStr : @""
+// forKey:NSLocalizedDescriptionKey];
+// error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
+// }
+// }
+//
+// xpcDidReply = YES;
+// });
+//
+// while (NO == xpcDidReply)
+// {
+// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
+// }
+//
+// xpc_release(message);
+// dispatch_release(queue);
+//
+// if (nil != error && NULL != outError)
+// {
+// *outError = error;
+// }
+//
+// return (nil == error);
+//}
+ (BOOL)copyPathContent:(NSString *)src toDirectory:(NSString *)dstDir error:(NSError * __autoreleasing*)outError
{
diff --git a/Sparkle/Installation XPC Service/install_service.m b/Sparkle/Installation XPC Service/install_service.m
index 8b177fbc..222dae31 100644
--- a/Sparkle/Installation XPC Service/install_service.m
+++ b/Sparkle/Installation XPC Service/install_service.m
@@ -10,7 +10,7 @@
#include
#import
-#import "SUPlainInstallerInternals.h"
+//#import "SUPlainInstaller.h"
#import "SUInstallServiceConstants.h"
static xpc_object_t SUSICopyPathContent(xpc_object_t message)
@@ -119,32 +119,32 @@ static xpc_object_t SUSICopyPathContent(xpc_object_t message)
return reply;
}
-static xpc_object_t SUISCopyPathWithAuthentication(xpc_object_t message)
-{
- if (NULL == message)
- return NULL;
-
- const char *src = xpc_dictionary_get_string(message, SUInstallServiceSourcePathKey);
- const char *dst = xpc_dictionary_get_string(message, SUInstallServiceDestinationPathKey);
- bool appendVersion = xpc_dictionary_get_bool(message, SUInstallServiceAppendVersionKey);
-
- NSFileManager *manager = [NSFileManager defaultManager];
- NSString *relaunchPathToCopy = src ? [manager stringWithFileSystemRepresentation:src length:strlen(src)] : nil;
- NSString *targetPath = dst ? [manager stringWithFileSystemRepresentation:dst length:strlen(dst)] : nil;
- NSError *error = nil;
- BOOL result = [SUPlainInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath appendVersion:appendVersion error:&error];
-
- // send response to indicate ok
- xpc_object_t reply = xpc_dictionary_create_reply(message);
- if (!result && error != nil)
- {
- xpc_dictionary_set_int64(reply, SUInstallServiceErrorCodeKey, (int64_t)[error code]);
- const char *errorMsg = [[error localizedDescription] length] ? [[error localizedDescription] UTF8String] : "";
- xpc_dictionary_set_string(reply, SUInstallServiceErrorLocalizedDescriptionKey, errorMsg);
- }
-
- return reply;
-}
+//static xpc_object_t SUISCopyPathWithAuthentication(xpc_object_t message)
+//{
+// if (NULL == message)
+// return NULL;
+//
+// const char *src = xpc_dictionary_get_string(message, SUInstallServiceSourcePathKey);
+// const char *dst = xpc_dictionary_get_string(message, SUInstallServiceDestinationPathKey);
+// bool appendVersion = xpc_dictionary_get_bool(message, SUInstallServiceAppendVersionKey);
+//
+// NSFileManager *manager = [NSFileManager defaultManager];
+// NSString *relaunchPathToCopy = src ? [manager stringWithFileSystemRepresentation:src length:strlen(src)] : nil;
+// NSString *targetPath = dst ? [manager stringWithFileSystemRepresentation:dst length:strlen(dst)] : nil;
+// NSError *error = nil;
+// BOOL result = [SUPlainInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath appendVersion:appendVersion error:&error];
+//
+// // send response to indicate ok
+// xpc_object_t reply = xpc_dictionary_create_reply(message);
+// if (!result && error != nil)
+// {
+// xpc_dictionary_set_int64(reply, SUInstallServiceErrorCodeKey, (int64_t)[error code]);
+// const char *errorMsg = [[error localizedDescription] length] ? [[error localizedDescription] UTF8String] : "";
+// xpc_dictionary_set_string(reply, SUInstallServiceErrorLocalizedDescriptionKey, errorMsg);
+// }
+//
+// return reply;
+//}
static xpc_object_t SUISLaunchTask(xpc_object_t message)
{
@@ -319,11 +319,11 @@ static void peer_event_handler(xpc_connection_t peer, xpc_object_t event)
break;
}
- case SUInstallServiceTaskAuthCopyPath:
- {
- reply = SUISCopyPathWithAuthentication(event);
- break;
- }
+// case SUInstallServiceTaskAuthCopyPath:
+// {
+// reply = SUISCopyPathWithAuthentication(event);
+// break;
+// }
case SUInstallServiceTaskLaunchTask:
{
diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m
index c6f8f849..96869f9a 100644
--- a/Sparkle/SUAutomaticUpdateDriver.m
+++ b/Sparkle/SUAutomaticUpdateDriver.m
@@ -93,6 +93,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
- (void)unarchiverDidFinish:(SUUnarchiver *)__unused ua
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
+ [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(systemWillPowerOff:) name:NSWorkspaceWillPowerOffNotification object:nil];
// Sudden termination is available on 10.6+
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
@@ -133,6 +134,8 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
if (self.willUpdateOnTermination)
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationWillTerminateNotification object:nil];
+ [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self name:NSWorkspaceWillPowerOffNotification object:nil];
+
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
[processInfo enableSuddenTermination];
@@ -181,6 +184,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
case SUInstallLaterChoice:
self.postponingInstallation = YES;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
+ [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(systemWillPowerOff:) name:NSWorkspaceWillPowerOffNotification object:nil];
// We're already waiting on quit, just indicate that we're idle.
self.interruptible = YES;
break;
@@ -202,6 +206,13 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
[super installWithToolAndRelaunch:relaunch displayingUserInterface:showUI];
}
+- (void)systemWillPowerOff:(NSNotification *)__unused note
+{
+ [self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUSystemPowerOffError userInfo:@{
+ NSLocalizedDescriptionKey: SULocalizedString(@"The update will not be installed because the user requested for the system to power off", nil)
+ }]];
+}
+
- (void)applicationWillTerminate:(NSNotification *)__unused note
{
[self installWithToolAndRelaunch:NO];
diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m
index 0a54fcf3..8a05647e 100644
--- a/Sparkle/SUBasicUpdateDriver.m
+++ b/Sparkle/SUBasicUpdateDriver.m
@@ -9,17 +9,17 @@
#import "SUBasicUpdateDriver.h"
#import "SUHost.h"
+#import "SUOperatingSystem.h"
#import "SUDSAVerifier.h"
#import "SUInstaller.h"
#import "SUStandardVersionComparator.h"
#import "SUUnarchiver.h"
#import "SUConstants.h"
#import "SULog.h"
-#import "SUPlainInstaller.h"
-#import "SUPlainInstallerInternals.h"
#import "SUBinaryDeltaCommon.h"
#import "SUCodeSigningVerifier.h"
#import "SUUpdater_Private.h"
+#import "SUFileManager.h"
#import "SUXPCInstaller.h"
CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFDataRef httpBodyData);
@@ -104,10 +104,10 @@ CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFData
// Check minimum and maximum System Version
if ([ui minimumSystemVersion] != nil && ![[ui minimumSystemVersion] isEqualToString:@""]) {
- minimumVersionOK = [[SUStandardVersionComparator defaultComparator] compareVersion:[ui minimumSystemVersion] toVersion:[SUHost systemVersionString]] != NSOrderedDescending;
+ minimumVersionOK = [[SUStandardVersionComparator defaultComparator] compareVersion:[ui minimumSystemVersion] toVersion:[SUOperatingSystem systemVersionString]] != NSOrderedDescending;
}
if ([ui maximumSystemVersion] != nil && ![[ui maximumSystemVersion] isEqualToString:@""]) {
- maximumVersionOK = [[SUStandardVersionComparator defaultComparator] compareVersion:[ui maximumSystemVersion] toVersion:[SUHost systemVersionString]] != NSOrderedAscending;
+ maximumVersionOK = [[SUStandardVersionComparator defaultComparator] compareVersion:[ui maximumSystemVersion] toVersion:[SUOperatingSystem systemVersionString]] != NSOrderedAscending;
}
return minimumVersionOK && maximumVersionOK;
@@ -275,10 +275,15 @@ CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFData
// Modern packages are not distributed as bundles and are code signed differently than regular applications
if (isPackage)
{
+ if (nil == publicDSAKey)
+ {
+ SULog(@"The existing app bundle does not have a DSA key, so it can't verify installer packages.");
+ }
+
isUpdateValid = [SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey];
if (!isUpdateValid)
{
- SULog(@"DSA signature validation of the package failed. The update will be rejected.");
+ SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead.");
}
break;
@@ -410,6 +415,31 @@ CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFData
[self installWithToolAndRelaunch:relaunch displayingUserInterface:relaunch];
}
+// Creates intermediate directories up until targetPath if they don't already exist,
+// and removes the directory at targetPath if one already exists there
+- (BOOL)preparePathForRelaunchTool:(NSString *)targetPath error:(NSError * __autoreleasing *)error
+{
+ NSFileManager *fileManager = [[NSFileManager alloc] init];
+ if ([fileManager fileExistsAtPath:targetPath]) {
+ NSError *removeError = nil;
+ if (![fileManager removeItemAtPath:targetPath error:&removeError]) {
+ if (error != NULL) {
+ *error = removeError;
+ }
+ return NO;
+ }
+ } else {
+ NSError *createDirectoryError = nil;
+ if (![fileManager createDirectoryAtPath:[targetPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:@{} error:&createDirectoryError]) {
+ if (error != NULL) {
+ *error = createDirectoryError;
+ }
+ return NO;
+ }
+ }
+ return YES;
+}
+
- (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI
{
assert(self.updateItem);
@@ -458,20 +488,22 @@ CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFData
NSString *const relaunchPathToCopy = [sparkleBundle pathForResource:relaunchToolName ofType:@"app"];
if (relaunchPathToCopy != nil) {
NSString *targetPath = [self.host.appCachePath stringByAppendingPathComponent:[relaunchPathToCopy lastPathComponent]];
- // Only the paranoid survive: if there's already a stray copy of relaunch there, we would have problems.
+
+ SUFileManager *fileManager = [SUFileManager fileManagerAllowingAuthorization:NO];
NSError *error = nil;
- [[NSFileManager defaultManager] createDirectoryAtPath:[targetPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:@{} error:&error];
+
+ NSURL *relaunchURLToCopy = [NSURL fileURLWithPath:relaunchPathToCopy];
+ NSURL *targetURL = [NSURL fileURLWithPath:targetPath];
- BOOL copySuccess = NO;
- if (SUShouldUseXPCInstaller())
- {
- copySuccess = [SUXPCInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error];
- }
- else
- {
- copySuccess = [SUPlainInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error];
- }
- if (copySuccess) {
+ // We only need to run our copy of the app by spawning a task
+ // Since we are copying the app to a directory that is write-accessible, we don't need to muck with owner/group IDs
+ if ([self preparePathForRelaunchTool:targetPath error:&error] && [fileManager copyItemAtURL:relaunchURLToCopy toURL:targetURL error:&error]) {
+ // We probably don't need to release the quarantine, but we'll do it just in case it's necessary.
+ // Perhaps in a sandboxed environment this matters more. Note that this may not be a fatal error.
+ NSError *quarantineError = nil;
+ if (![fileManager releaseItemFromQuarantineAtRootURL:targetURL error:&quarantineError]) {
+ SULog(@"Failed to release quarantine on %@ with error %@", targetPath, quarantineError);
+ }
self.relaunchPath = targetPath;
} else {
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{
diff --git a/Sparkle/SUBinaryDeltaCommon.m b/Sparkle/SUBinaryDeltaCommon.m
index 7395c0e6..be3966ce 100644
--- a/Sparkle/SUBinaryDeltaCommon.m
+++ b/Sparkle/SUBinaryDeltaCommon.m
@@ -7,6 +7,7 @@
//
#include "SUBinaryDeltaCommon.h"
+#import "SUFileManager.h"
#include
#include
#include
@@ -220,7 +221,7 @@ BOOL removeTree(NSString *path)
BOOL copyTree(NSString *source, NSString *dest)
{
- return [[NSFileManager defaultManager] copyItemAtPath:source toPath:dest error:nil];
+ return [[SUFileManager fileManagerAllowingAuthorization:NO] copyItemAtURL:[NSURL fileURLWithPath:source] toURL:[NSURL fileURLWithPath:dest] error:NULL];
}
BOOL modifyPermissions(NSString *path, mode_t desiredPermissions)
diff --git a/Sparkle/SUBinaryDeltaCreate.m b/Sparkle/SUBinaryDeltaCreate.m
index db790642..98a6f08b 100644
--- a/Sparkle/SUBinaryDeltaCreate.m
+++ b/Sparkle/SUBinaryDeltaCreate.m
@@ -439,6 +439,16 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF
NSString *temporaryFile = temporaryPatchFile(patchFile);
xar_t x = xar_open([temporaryFile fileSystemRepresentation], WRITE);
+ if (!x) {
+ if (verbose) {
+ fprintf(stderr, "\n");
+ }
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to write to %@", temporaryFile] }];
+ }
+ return NO;
+ }
+
xar_opt_set(x, XAR_OPT_COMPRESSION, "bzip2");
xar_subdoc_t attributes = xar_subdoc_new(x, BINARY_DELTA_ATTRIBUTES_KEY);
diff --git a/Sparkle/SUErrors.h b/Sparkle/SUErrors.h
index 5662ff2e..a47f1dca 100644
--- a/Sparkle/SUErrors.h
+++ b/Sparkle/SUErrors.h
@@ -40,7 +40,10 @@ typedef NS_ENUM(OSStatus, SUError) {
SUInstallationError = 4005,
SUDowngradeError = 4006,
- SUXPCServiceError = 4007
+ SUXPCServiceError = 4007,
+
+ // System phase errors
+ SUSystemPowerOffError = 5000
};
#endif
diff --git a/Sparkle/SUFileManager.h b/Sparkle/SUFileManager.h
new file mode 100644
index 00000000..f6897ced
--- /dev/null
+++ b/Sparkle/SUFileManager.h
@@ -0,0 +1,134 @@
+//
+// SUFileManager.h
+// Sparkle
+//
+// Created by Mayur Pawashe on 7/18/15.
+// Copyright (c) 2015 zgcoder. All rights reserved.
+//
+
+#import
+
+/**
+ * A class used for performing file operations that may also perform authentication if allowed and if permission is denied when trying to
+ * perform them normally as the running user. All operations on this class may be used on thread other than the main thread.
+ * This class provides basic file operations and stays away from including much application-level logic.
+ */
+@interface SUFileManager : NSObject
+
+/**
+ * Creates a file manager that allows or disallows authorizing for file operations
+ * @param allowsAuthorization Specifies whether operations invoked on this instance are allowed to acquire authorization in order
+ * to perform file operations when read or write access is denied
+ * @return A new file manager instance
+ *
+ * This method just creates the file manager. It doesn't acquire authorization immediately if allowsAuthorization is YES
+ */
++ (instancetype)fileManagerAllowingAuthorization:(BOOL)allowsAuthorization;
+
+/**
+ * Creates a temporary directory on the same volume as a provided URL
+ * @param preferredName A name that may be used when creating the temporary directory. Note that in the uncommon case this name is used, the temporary directory will be created inside the directory pointed by appropriateURL
+ * @param appropriateURL A URL to a directory that resides on the volume that the temporary directory will be created on. In the uncommon case, the temporary directory may be created inside this directory.
+ * @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 A URL pointing to the newly created temporary directory, or nil with a populated error object if an error occurs.
+ *
+ * When moving an item from a source to a destination, it is desirable to create a temporary intermediate destination on the same volume as the destination to ensure
+ * that the item will be moved, and not copied, from the intermediate point to the final destination. This ensures file atomicity.
+ */
+- (NSURL *)makeTemporaryDirectoryWithPreferredName:(NSString *)preferredName appropriateForDirectoryURL:(NSURL *)appropriateURL error:(NSError **)error;
+
+/**
+ * Moves an item from a source to a destination
+ * @param sourceURL A URL pointing to the item to move. The item at this URL must exist.
+ * @param destinationURL A URL pointing to the destination the item will be moved at. An item must not already exist at this URL.
+ * @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 successfully, otherwise NO along with a populated error object
+ *
+ * If sourceURL and destinationURL reside on the same volume, this operation will be an atomic move operation.
+ * Otherwise this will be equivalent to a copy & remove which will be a nonatomic operation.
+ */
+- (BOOL)moveItemAtURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL error:(NSError **)error;
+
+/**
+ * Copies an item from a source to a destination
+ * @param sourceURL A URL pointing to the item to move. The item at this URL must exist.
+ * @param destinationURL A URL pointing to the destination the item will be moved at. An item must not already exist at this URL.
+ * @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 copied successfully, otherwise NO along with a populated error object
+ *
+ * This is not an atomic operation.
+ */
+- (BOOL)copyItemAtURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL error:(NSError **)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 **)error;
+
+/**
+ * Removes an item at a URL
+ * @param url A URL pointing to the item to remove. 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 removed successfully, otherwise NO along with a populated error object
+ *
+ * This is not an atomic operation.
+ */
+- (BOOL)removeItemAtURL:(NSURL *)url error:(NSError **)error;
+
+/**
+ * Changes the owner and group IDs of an item at a specified target URL to match another URL
+ * @param targetURL A URL pointing to the target item whose owner and group IDs to alter. This will be applied recursively if the item is a directory. The item at this URL must exist.
+ * @param matchURL A URL pointing to the item whose owner and group IDs will be used for changing on the targetURL. 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 target item's owner and group IDs have changed to match the origin's ones, otherwise NO along with a populated error object
+ *
+ * If the owner and group IDs match on the root items of targetURL and matchURL, this method stops and assumes that nothing needs to be done.
+ * Otherwise this method recursively changes the IDs if the target is a directory. If an item in the directory is encountered that is unable to be changed,
+ * then this method stops and returns NO.
+ *
+ * This is not an atomic operation.
+ */
+- (BOOL)changeOwnerAndGroupOfItemAtRootURL:(NSURL *)targetURL toMatchURL:(NSURL *)matchURL error:(NSError **)error;
+
+/**
+ * Updates the modification and access time of an item at a specified target URL to the current time
+ * @param targetURL A URL pointing to the target item whose modification and access time to update. 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 target item's modification and access times have been updated, otherwise NO along with a populated error object
+ *
+ * This method updates the modification and access time of an item to the current time, ideal for letting the system know we installed a new file or
+ * application.
+ *
+ * This is not an atomic operation.
+ */
+- (BOOL)updateModificationAndAccessTimeOfItemAtURL:(NSURL *)targetURL error:(NSError **)error;
+
+/**
+ * Releases Apple's quarantine extended attribute from the item at the specified root URL
+ * @param rootURL A URL pointing to the item to release from Apple's quarantine. This will be applied recursively if the item is a directory. 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 all the items at the target could be released from quarantine, otherwise NO if any items couldn't along with a populated error object
+ *
+ * This method removes quarantine attributes from an item, ideally an application, so that when the user launches a new application themselves, they
+ * don't have to witness the OS X dialog alerting them that they downloaded an application from the internet and asking if they want to continue.
+ * Note that this may not exactly mimic OS X's behavior when a user opens an application for the first time (i.e, the xattr isn't deleted),
+ * but this should be sufficient enough for our purposes.
+ *
+ * This method may return NO even if some items do get released from quarantine if the target URL is pointing to a directory.
+ * Thus if an item cannot be released from quarantine, this method still continues on to the next enumerated item.
+ *
+ * This is not an atomic operation.
+ */
+- (BOOL)releaseItemFromQuarantineAtRootURL:(NSURL *)rootURL error:(NSError **)error;
+
+@end
diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m
new file mode 100644
index 00000000..be5ef09b
--- /dev/null
+++ b/Sparkle/SUFileManager.m
@@ -0,0 +1,919 @@
+//
+// SUFileManager.m
+// Sparkle
+//
+// Created by Mayur Pawashe on 7/18/15.
+// Copyright (c) 2015 zgcoder. All rights reserved.
+//
+
+#import "SUFileManager.h"
+#import "SUOperatingSystem.h"
+
+#include
+#include
+#include
+
+static char SUAppleQuarantineIdentifier[] = "com.apple.quarantine";
+
+// Authorization code based on generous contribution from Allan Odgaard. Thanks, Allan!
+static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authorization, const char *executablePath, AuthorizationFlags options, char *const *arguments)
+{
+ sig_t oldSigChildHandler = signal(SIGCHLD, SIG_DFL);
+ BOOL returnValue = YES;
+
+#pragma clang diagnostic push
+ // In the future, we may have to look at SMJobBless API to avoid deprecation. See issue #558
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ if (AuthorizationExecuteWithPrivileges(authorization, executablePath, options, arguments, NULL) == errAuthorizationSuccess)
+#pragma clang diagnostic pop
+ {
+ int status;
+ pid_t pid = wait(&status);
+ if (pid == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0)
+ returnValue = NO;
+ }
+ else
+ returnValue = NO;
+
+ signal(SIGCHLD, oldSigChildHandler);
+ return returnValue;
+}
+
+static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
+
+ char path[PATH_MAX] = {0};
+ if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"URL of the file (%@) cannot be represented as a file path", url.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ OSStatus makeResult = FSPathMakeRefWithOptions((const UInt8 *)path, kFSPathMakeRefDoNotFollowLeafSymlink, ref, NULL);
+#pragma clang diagnostic pop
+ if (makeResult != noErr) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:makeResult userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create file system reference for %@", url.lastPathComponent] }];
+ }
+ return NO;
+ }
+ return YES;
+}
+
+// Used to indicate if the type of NSError requires us to attempt to peform the same operation again except with authentication
+// To be safe, both read and write permission denied's are included because Cocoa's error methods are not very well documented
+// and at least one case is caused from lack of read permissions (-[NSURL setResourceValue:forKey:error:])
+#define NS_HAS_PERMISSION_ERROR(error) (error.code == NSFileReadNoPermissionError || error.code == NSFileWriteNoPermissionError)
+
+#pragma clang diagnostic push
+// Use direct access because it's easier, clearer, and faster
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+@implementation SUFileManager
+{
+ AuthorizationRef _auth;
+ NSFileManager *_fileManager;
+ BOOL _allowsAuthorization;
+}
+
+- (instancetype)initAllowingAuthorization:(BOOL)allowsAuthorization
+{
+ self = [super init];
+ if (self != nil) {
+ _fileManager = [[NSFileManager alloc] init];
+ _allowsAuthorization = allowsAuthorization;
+ }
+ return self;
+}
+
+
++ (instancetype)fileManagerAllowingAuthorization:(BOOL)allowsAuthorization
+{
+ return [[self alloc] initAllowingAuthorization:allowsAuthorization];
+}
+
+// Acquires an authorization reference which is intended to be used for future authorized file operations
+- (BOOL)_acquireAuthorizationWithError:(NSError *__autoreleasing *)error
+{
+ // No need to continue if we already acquired an authorization reference
+ if (_auth != NULL) {
+ return YES;
+ }
+
+ if (!_allowsAuthorization) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: @"Unable to grant authorization to perform action because it is explicitly turned off" }];
+ }
+ return NO;
+ }
+
+ OSStatus status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &_auth);
+ if (status != errAuthorizationSuccess) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed creating authorization reference with status code %d.", status] }];
+ }
+ _auth = NULL;
+ return NO;
+ }
+ return YES;
+}
+
+- (void)dealloc
+{
+ if (_auth != NULL) {
+ AuthorizationFree(_auth, kAuthorizationFlagDefaults);
+ }
+}
+
+// -[NSFileManager attributesOfItemAtPath:error:] won't follow symbolic links
+
+- (BOOL)_itemExistsAtURL:(NSURL *)fileURL
+{
+ NSString *path = fileURL.path;
+ if (path == nil) {
+ return NO;
+ }
+ return [_fileManager attributesOfItemAtPath:path error:NULL] != nil;
+}
+
+- (BOOL)_itemExistsAtURL:(NSURL *)fileURL isDirectory:(BOOL *)isDirectory
+{
+ NSString *path = fileURL.path;
+ if (path == nil) {
+ return NO;
+ }
+
+ NSDictionary *attributes = [_fileManager attributesOfItemAtPath:path error:NULL];
+ if (attributes == nil) {
+ return NO;
+ }
+
+ if (isDirectory != NULL) {
+ *isDirectory = [attributes[NSFileType] isEqualToString:NSFileTypeDirectory];
+ }
+
+ return YES;
+}
+
+// Wrapper around getxattr()
+- (ssize_t)_getXAttr:(const char *)name fromFile:(NSString *)file options:(int)options
+{
+ char path[PATH_MAX] = {0};
+ if (![file getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ errno = 0;
+ return -1;
+ }
+
+ return getxattr(path, name, NULL, 0, 0, options);
+}
+
+// Wrapper around removexattr()
+- (int)_removeXAttr:(const char *)attr fromFile:(NSString *)file options:(int)options
+{
+ char path[PATH_MAX] = {0};
+ if (![file getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ errno = 0;
+ return -1;
+ }
+
+ return removexattr(path, attr, options);
+}
+
+#define XATTR_UTILITY_PATH "/usr/bin/xattr"
+// Recursively remove an xattr at a specified root URL with authentication
+- (BOOL)_removeXAttrWithAuthentication:(char *__nonnull)xattrName fromRootURL:(NSURL *)rootURL error:(NSError *__autoreleasing *)error
+{
+ // Because this is a system utility, it's fine to follow the symbolic link if one exists
+ if (![_fileManager fileExistsAtPath:@(XATTR_UTILITY_PATH)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: @"xattr utility does not exist on this system." }];
+ }
+ return NO;
+ }
+
+ char path[PATH_MAX] = {0};
+ if (![rootURL.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"File to remove (%@) cannot be represented as a valid file name.", rootURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+ BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, XATTR_UTILITY_PATH, kAuthorizationFlagDefaults, (char *[]){ "-s", "-r", "-d", xattrName, path, NULL });
+
+ if (!success && error != NULL) {
+ NSString *errorMessage = [NSString stringWithFormat:@"Authenticated extended attribute deletion for %@ failed on %@.", [NSString stringWithUTF8String:xattrName], rootURL.path.lastPathComponent];
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage }];
+ }
+
+ return success;
+}
+
+- (BOOL)_releaseItemFromQuarantineAtRootURL:(NSURL *)rootURL withQuarantineRetrieval:(BOOL (^)(NSURL *))quarantineRetrieval quarantineRemoval:(BOOL (^)(NSURL *, NSError * __autoreleasing *))quarantineRemoval isAccessError:(BOOL (^)(NSError *))isAccessError error:(NSError * __autoreleasing *)error
+{
+ if (![self _itemExistsAtURL:rootURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to remove quarantine because %@ does not exist.", rootURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ BOOL (^releasingQuarantineRequiredAuthentication)(NSURL *, BOOL *, BOOL *) = ^(NSURL *fileURL, BOOL *didReleaseQuarantine, BOOL *success) {
+ BOOL removedQuarantine = NO;
+ BOOL attemptedAuthentication = NO;
+
+ if (quarantineRetrieval(fileURL)) {
+ NSError *removalError = nil;
+ if (quarantineRemoval(fileURL, &removalError)) {
+ removedQuarantine = YES;
+ } else {
+ if (isAccessError(removalError)) {
+ removedQuarantine = [self _removeXAttrWithAuthentication:SUAppleQuarantineIdentifier fromRootURL:rootURL error:error];
+ attemptedAuthentication = YES;
+ } else {
+ if (success != NULL) {
+ // Make sure we haven't already run into an error
+ if (*success && error != NULL) {
+ *error = removalError;
+ }
+ // Fail, but still try to release other items from quarantine
+ *success = NO;
+ }
+ }
+ }
+ }
+
+ if (didReleaseQuarantine != NULL) {
+ *didReleaseQuarantine = removedQuarantine;
+ }
+
+ return attemptedAuthentication;
+ };
+
+ BOOL success = YES;
+
+ BOOL releasedRootQuarantine = NO;
+ if (releasingQuarantineRequiredAuthentication(rootURL, &releasedRootQuarantine, &success)) {
+ return releasedRootQuarantine;
+ }
+
+ // Only recurse if it's actually a directory. Don't recurse into a
+ // root-level symbolic link.
+ NSString *rootURLPath = rootURL.path;
+ NSDictionary *rootAttributes = [_fileManager attributesOfItemAtPath:rootURLPath error:nil];
+ NSString *rootType = rootAttributes[NSFileType];
+
+ if ([rootType isEqualToString:NSFileTypeDirectory]) {
+ // The NSDirectoryEnumerator will avoid recursing into any contained
+ // symbolic links, so no further type checks are needed.
+ NSDirectoryEnumerator *directoryEnumerator = [_fileManager enumeratorAtURL:rootURL includingPropertiesForKeys:nil options:(NSDirectoryEnumerationOptions)0 errorHandler:nil];
+
+ for (NSURL *file in directoryEnumerator) {
+ BOOL releasedQuarantine = NO;
+ if (releasingQuarantineRequiredAuthentication(file, &releasedQuarantine, &success)) {
+ return releasedQuarantine;
+ }
+ }
+ }
+
+ return success;
+}
+
+// Removes the directory tree rooted at |root| from the file quarantine.
+// The quarantine was introduced on OS X 10.5 and is described at:
+//
+// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html#apple_ref/doc/uid/TP40001369-DontLinkElementID_2
+//
+// If |root| is not a directory, then it alone is removed from the quarantine.
+// Symbolic links, including |root| if it is a symbolic link, will not be
+// traversed.
+
+// Ordinarily, the quarantine is managed by calling LSSetItemAttribute
+// to set the kLSItemQuarantineProperties attribute to a dictionary specifying
+// the quarantine properties to be applied. However, it does not appear to be
+// possible to remove an item from the quarantine directly through any public
+// Launch Services calls. Instead, this method takes advantage of the fact
+// that the quarantine is implemented in part by setting an extended attribute,
+// "com.apple.quarantine", on affected files. Removing this attribute is
+// sufficient to remove files from the quarantine.
+
+// This works by removing the quarantine extended attribute for every file we come across.
+// We used to have code similar to the method below that used -[NSURL getResourceValue:forKey:error:] and -[NSURL setResourceValue:forKey:error:]
+// However, those methods *really suck* - you can't rely on the return value from getting the resource value and if you set the resource value
+// when the key isn't present, errors are spewed out to the console
+- (BOOL)releaseItemFromQuarantineAtRootURL:(NSURL *)rootURL error:(NSError *__autoreleasing *)error
+{
+ static const int removeXAttrOptions = XATTR_NOFOLLOW;
+
+ return
+ [self
+ _releaseItemFromQuarantineAtRootURL:rootURL
+ withQuarantineRetrieval:^BOOL(NSURL *fileURL) {
+ return ([self _getXAttr:SUAppleQuarantineIdentifier fromFile:fileURL.path options:removeXAttrOptions] >= 0);
+ }
+ quarantineRemoval:^BOOL(NSURL *fileURL, NSError * __autoreleasing *removalError) {
+ BOOL removedQuarantine = ([self _removeXAttr:SUAppleQuarantineIdentifier fromFile:fileURL.path options:removeXAttrOptions] == 0);
+ if (!removedQuarantine && removalError != NULL) {
+ *removalError = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to remove file quarantine on %@.", fileURL.lastPathComponent] }];
+ }
+ return removedQuarantine;
+ }
+ isAccessError:^BOOL(NSError *removalError) {
+ return (removalError.code == EACCES);
+ }
+ error:error];
+}
+
+/*
+ * Copies an item from one location to another
+ * This intentionally does *not* use copyfile() or any API that uses it such as NSFileManager's copy item method
+ * This is because copyfile() can fail to copy symbolic links from one network mount to another, which will affect copying apps
+ * This failure occurs because the system may think symbolic links on a SMB mount are zero bytes in size
+ * For more info, see bug reports at http://openradar.appspot.com/radar?id=4925873463492608
+ * and http://openradar.appspot.com/radar?id=5024037222744064
+ */
+- (BOOL)copyItemAtURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL error:(NSError * __autoreleasing *)error
+{
+ if (![self _itemExistsAtURL:sourceURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Source file to copy (%@) does not exist.", sourceURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (![self _itemExistsAtURL:destinationURL.URLByDeletingLastPathComponent]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination parent directory to copy into (%@) does not exist.", destinationURL.URLByDeletingLastPathComponent.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if ([self _itemExistsAtURL:destinationURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteFileExistsError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination file to copy to (%@) already exists.", destinationURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ FSRef sourceRef;
+ if (!SUMakeRefFromURL(sourceURL, &sourceRef, error)) {
+ return NO;
+ }
+
+ FSRef destinationParentRef;
+ if (!SUMakeRefFromURL(destinationURL.URLByDeletingLastPathComponent, &destinationParentRef, error)) {
+ return NO;
+ }
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ OSStatus copyResult = FSCopyObjectSync(&sourceRef, &destinationParentRef, (__bridge CFStringRef)(destinationURL.lastPathComponent), NULL, kFSFileOperationDefaultOptions);
+#pragma clang diagnostic pop
+ if (copyResult == noErr) {
+ return YES;
+ }
+
+ // Note: I have received afpAccessDenied error in testing even when not copying from/to an AFP mount,
+ // when the error should have been a normal permission denied one
+ if (copyResult != permErr && copyResult != afpAccessDenied) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:copyResult userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to copy file (%@)", sourceURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+
+ char sourcePath[PATH_MAX] = {0};
+ if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination to copy file to (%@) cannot be represented as a valid file name.", sourceURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ char destinationPath[PATH_MAX] = {0};
+ if (![destinationURL.path getFileSystemRepresentation:destinationPath maxLength:sizeof(destinationPath)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination to copy file to (%@) cannot be represented as a valid file name.", destinationURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (!AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/cp", kAuthorizationFlagDefaults, (char *[]){ "-Rf", "--", sourcePath, destinationPath, NULL })) {
+ if (error != NULL) {
+ NSString *errorMessage = [NSString stringWithFormat:@"Failed to perform authenticated file copy for %@.", sourceURL.lastPathComponent];
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage }];
+ }
+ return NO;
+ }
+
+ return YES;
+}
+
+/*
+ * Retrieves the volume ID that a particular url resides on
+ * The url must point to a file that exists
+ * There is no cocoa equivalent for obtaining the volume ID
+ * Although NSURLVolumeURLForRemountingKey exists as a resource key for NSURL,
+ * that will not return a URL if the mount is not re-mountable and I otherwise don't trust the API
+ */
+- (BOOL)_getVolumeID:(FSVolumeRefNum *)volumeID ofItemAtURL:(NSURL *)url
+{
+ FSRef pathRef;
+ if (!SUMakeRefFromURL(url, &pathRef, NULL)) {
+ return NO;
+ }
+
+ FSCatalogInfo catalogInfo;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ OSErr catalogError = FSGetCatalogInfo(&pathRef, kFSCatInfoVolume, &catalogInfo, NULL, NULL, NULL);
+#pragma clang diagnostic pop
+ if (catalogError != noErr) {
+ return NO;
+ }
+
+ if (volumeID != NULL) {
+ *volumeID = catalogInfo.volume;
+ }
+
+ return YES;
+}
+
+- (BOOL)moveItemAtURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL error:(NSError *__autoreleasing *)error
+{
+ if (![self _itemExistsAtURL:sourceURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Source file to move (%@) does not exist.", sourceURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSURL *destinationURLParent = destinationURL.URLByDeletingLastPathComponent;
+ if (![self _itemExistsAtURL:destinationURLParent]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination parent directory to move into (%@) does not exist.", destinationURLParent.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if ([self _itemExistsAtURL:destinationURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteFileExistsError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination file to move (%@) already exists.", destinationURL.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ // If the source and destination are on different volumes, we should not do a move;
+ // from my experience a move may fail when moving particular files from
+ // one network mount to another one. This is possibly related to the fact that
+ // moving a file will try to preserve ownership but copying won't
+
+ FSVolumeRefNum sourceVolume = 0;
+ BOOL foundSourceVolume = [self _getVolumeID:&sourceVolume ofItemAtURL:sourceURL];
+
+ FSVolumeRefNum destinationVolume = 0;
+ BOOL foundDestinationVolume = [self _getVolumeID:&destinationVolume ofItemAtURL:destinationURLParent];
+
+ if (foundSourceVolume && foundDestinationVolume && sourceVolume != destinationVolume) {
+ return ([self copyItemAtURL:sourceURL toURL:destinationURL error:error] && [self removeItemAtURL:sourceURL error:error]);
+ }
+
+ NSError *moveError = nil;
+ if ([_fileManager moveItemAtURL:sourceURL toURL:destinationURL error:&moveError]) {
+ return YES;
+ }
+
+ if (!NS_HAS_PERMISSION_ERROR(moveError)) {
+ if (error != NULL) {
+ *error = moveError;
+ }
+ return NO;
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+ char sourcePath[PATH_MAX] = {0};
+ if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"File to move (%@) cannot be represented as a valid file name.", sourceURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ char destinationPath[PATH_MAX] = {0};
+ if (![destinationURL.path getFileSystemRepresentation:destinationPath maxLength:sizeof(destinationPath)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Destination (%@) cannot be represented as a valid file name.", destinationURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (!AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/mv", kAuthorizationFlagDefaults, (char *[]){ "-f", "--", sourcePath, destinationPath, NULL })) {
+ if (error != NULL) {
+ NSString *errorMessage = [NSString stringWithFormat:@"Failed to perform authenticated file move for %@.", sourceURL.lastPathComponent];
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage }];
+ }
+ return NO;
+ }
+
+ return YES;
+}
+
+- (BOOL)_changeOwnerAndGroupOfItemAtURL:(NSURL *)targetURL ownerID:(NSNumber *)ownerID groupID:(NSNumber *)groupID needsAuth:(BOOL *)needsAuth error:(NSError * __autoreleasing *)error
+{
+ char path[PATH_MAX] = {0};
+ if (![targetURL.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"File to change owner & group (%@) cannot be represented as a valid file name.", targetURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (chown(path, ownerID.unsignedIntValue, groupID.unsignedIntValue) != 0) {
+ if (errno == EPERM) {
+ if (needsAuth != NULL) {
+ *needsAuth = YES;
+ }
+ } else {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to change owner & group for %@ with owner ID %u and group ID %u.", targetURL.path.lastPathComponent, ownerID.unsignedIntValue, groupID.unsignedIntValue] }];
+ }
+ return NO;
+ }
+ }
+
+ return YES;
+}
+
+- (BOOL)changeOwnerAndGroupOfItemAtRootURL:(NSURL *)targetURL toMatchURL:(NSURL *)matchURL error:(NSError * __autoreleasing *)error
+{
+ BOOL isTargetADirectory = NO;
+ if (![self _itemExistsAtURL:targetURL isDirectory:&isTargetADirectory]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to change owner & group IDs because %@ does not exist.", targetURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (![self _itemExistsAtURL:matchURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to match owner & group IDs because %@ does not exist.", matchURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSError *matchFileAttributesError = nil;
+ NSString *matchURLPath = matchURL.path;
+ NSDictionary *matchFileAttributes = [_fileManager attributesOfItemAtPath:matchURLPath error:&matchFileAttributesError];
+ if (matchFileAttributes == nil) {
+ if (error != NULL) {
+ *error = matchFileAttributesError;
+ }
+ return NO;
+ }
+
+ NSError *targetFileAttributesError = nil;
+ NSString *targetURLPath = targetURL.path;
+ NSDictionary *targetFileAttributes = [_fileManager attributesOfItemAtPath:targetURLPath error:&targetFileAttributesError];
+ if (targetFileAttributes == nil) {
+ if (error != NULL) {
+ *error = targetFileAttributesError;
+ }
+ return NO;
+ }
+
+ NSNumber *ownerID = matchFileAttributes[NSFileOwnerAccountID];
+ if (ownerID == nil) {
+ // shouldn't be possible to error here, but just in case
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadNoPermissionError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Owner ID could not be read from %@.", matchURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSNumber *groupID = matchFileAttributes[NSFileGroupOwnerAccountID];
+ if (groupID == nil) {
+ // shouldn't be possible to error here, but just in case
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadNoPermissionError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Group ID could not be read from %@.", matchURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSNumber *targetOwnerID = targetFileAttributes[NSFileOwnerAccountID];
+ NSNumber *targetGroupID = targetFileAttributes[NSFileGroupOwnerAccountID];
+
+ if ((targetOwnerID != nil && [ownerID isEqualToNumber:targetOwnerID]) && (targetGroupID != nil && [groupID isEqualToNumber:targetGroupID])) {
+ // Assume they're the same even if we don't check every file recursively
+ // Speeds up the common case
+ return YES;
+ }
+
+ BOOL needsAuth = NO;
+
+ if (![self _changeOwnerAndGroupOfItemAtURL:targetURL ownerID:ownerID groupID:groupID needsAuth:&needsAuth error:error]) {
+ return NO;
+ }
+
+ if (isTargetADirectory) {
+ NSDirectoryEnumerator *directoryEnumerator = [_fileManager enumeratorAtURL:targetURL includingPropertiesForKeys:nil options:(NSDirectoryEnumerationOptions)0 errorHandler:nil];
+ for (NSURL *url in directoryEnumerator) {
+ if (![self _changeOwnerAndGroupOfItemAtURL:url ownerID:ownerID groupID:groupID needsAuth:&needsAuth error:error]) {
+ return NO;
+ }
+
+ if (needsAuth) {
+ break;
+ }
+ }
+ }
+
+ if (!needsAuth) {
+ return YES;
+ }
+
+ char targetPath[PATH_MAX] = {0};
+ if (![targetURL.path getFileSystemRepresentation:targetPath maxLength:sizeof(targetPath)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Target file (%@) cannot be represented as a valid file name.", targetURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ char userAndGroup[100];
+ int written = snprintf(userAndGroup, sizeof(userAndGroup), "%u:%u", ownerID.unsignedIntValue, groupID.unsignedIntValue);
+ if (written < 0 || written >= 100) {
+ return NO; // No custom error, because it's too unlikely to ever happen
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+ BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/usr/sbin/chown", kAuthorizationFlagDefaults, (char *[]){ "-R", userAndGroup, targetPath, NULL });
+ if (!success && error != NULL) {
+ NSString *errorMessage = [NSString stringWithFormat:@"Failed to change owner:group %@ on %@ with authentication.", [NSString stringWithUTF8String:userAndGroup], targetURL.path.lastPathComponent];
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
+ }
+
+ return success;
+}
+
+// /usr/bin/touch can be used to update an application, as described in:
+// https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/LSCConcepts.html
+// The document says LSRegisterURL() can be used as well but this hasn't worked out well for me in practice
+// Anyway, updating the modification time of the application is important because the system will be aware a new version of your app is available,
+// Finder will report the correct file size and other metadata for it, URL schemes your app may register will be updated, etc.
+// Behind the scenes, touch calls to utimes() which is what we use here - unless we need to authenticate
+- (BOOL)updateModificationAndAccessTimeOfItemAtURL:(NSURL *)targetURL error:(NSError * __autoreleasing *)error
+{
+ if (![self _itemExistsAtURL:targetURL]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to update modification & access time because %@ does not exist.", targetURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ char path[PATH_MAX] = {0};
+ if (![targetURL.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"File to update modification & access time (%@) cannot be represented as a valid file name.", targetURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (utimes(path, NULL) == 0) {
+ return YES;
+ }
+
+ if (errno != EACCES) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to update modification & access time for %@", targetURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+ BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/usr/bin/touch", kAuthorizationFlagDefaults, (char *[]){ "--", path, NULL });
+ if (!success && error != NULL) {
+ NSString *errorMessage = [NSString stringWithFormat:@"Failed to update modification & access time on %@ with authentication.", targetURL.path.lastPathComponent];
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
+ }
+
+ return success;
+}
+
+// Creates a directory at the item pointed by url
+// An item cannot already exist at the url, but the parent must be a directory that exists
+- (BOOL)_makeDirectoryAtURL:(NSURL *)url error:(NSError * __autoreleasing *)error
+{
+ if ([self _itemExistsAtURL:url]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteFileExistsError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create directory because file %@ already exists.", url.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSURL *parentURL = [url URLByDeletingLastPathComponent];
+ BOOL isParentADirectory = NO;
+ if (![self _itemExistsAtURL:parentURL isDirectory:&isParentADirectory] || !isParentADirectory) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create directory because parent directory %@ does not exist.", parentURL.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSError *createDirectoryError = nil;
+ if ([_fileManager createDirectoryAtURL:url withIntermediateDirectories:NO attributes:nil error:&createDirectoryError]) {
+ return YES;
+ }
+
+ if (!NS_HAS_PERMISSION_ERROR(createDirectoryError)) {
+ if (error != NULL) {
+ *error = createDirectoryError;
+ }
+ return NO;
+ }
+
+ char path[PATH_MAX] = {0};
+ if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Directory to create (%@) cannot be represented as a valid file name.", url.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+ BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/mkdir", kAuthorizationFlagDefaults, (char *[]){ "--", path, NULL });
+ if (!success && error != NULL) {
+ NSString *errorMessage = [NSString stringWithFormat:@"Failed to make directory %@ with authentication.", url.path.lastPathComponent];
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
+ }
+ return success;
+}
+
+- (NSURL *)makeTemporaryDirectoryWithPreferredName:(NSString *)preferredName appropriateForDirectoryURL:(NSURL *)directoryURL error:(NSError * __autoreleasing *)error
+{
+ NSError *tempError = nil;
+ NSURL *tempURL = [_fileManager URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask appropriateForURL:directoryURL create:YES error:&tempError];
+
+ if (tempURL != nil) {
+ return tempURL;
+ }
+
+ // It is pretty unlikely in my testing we will get here, but just in case we do, we should create a directory inside
+ // the directory pointed by directoryURL, using the preferredName
+
+ NSURL *desiredURL = [directoryURL URLByAppendingPathComponent:preferredName];
+ NSUInteger tagIndex = 1;
+ while ([self _itemExistsAtURL:desiredURL] && tagIndex <= 9999) {
+ desiredURL = [directoryURL URLByAppendingPathComponent:[preferredName stringByAppendingFormat:@" (%lu)", (unsigned long)++tagIndex]];
+ }
+
+ return [self _makeDirectoryAtURL:desiredURL error:error] ? desiredURL : nil;
+}
+
+- (BOOL)removeItemAtURL:(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 remove file %@ because it does not exist.", url.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ NSError *removeError = nil;
+ if ([_fileManager removeItemAtURL:url error:&removeError]) {
+ return YES;
+ }
+
+ if (!NS_HAS_PERMISSION_ERROR(removeError)) {
+ if (error != NULL) {
+ *error = removeError;
+ }
+ return NO;
+ }
+
+ if (![self _acquireAuthorizationWithError:error]) {
+ return NO;
+ }
+
+ char path[PATH_MAX] = {0};
+ if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"File to remove (%@) cannot be represented as a valid file name.", url.path.lastPathComponent] }];
+ }
+ return NO;
+ }
+
+ BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/rm", kAuthorizationFlagDefaults, (char *[]){ "-rf", "--", path, NULL });
+ if (!success && error != NULL) {
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to remove %@ with authentication.", url.path.lastPathComponent] }];
+ }
+ 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;
+ success = [_fileManager trashItemAtURL:tempItemURL resultingItemURL:NULL error:&trashError];
+ if (!success && error != NULL) {
+ *error = trashError;
+ }
+ }
+
+ [self removeItemAtURL:tempDirectory error:NULL];
+
+ return success;
+}
+
+@end
+
+#pragma clang diagnostic pop
diff --git a/Sparkle/SUHost.h b/Sparkle/SUHost.h
index 3bf0a8e5..5f73f955 100644
--- a/Sparkle/SUHost.h
+++ b/Sparkle/SUHost.h
@@ -23,11 +23,9 @@ typedef struct {
@property (strong, readonly) NSBundle *bundle;
-+ (NSOperatingSystemVersion)operatingSystemVersion;
-+ (NSString *)systemVersionString;
-
- (instancetype)initWithBundle:(NSBundle *)aBundle;
@property (readonly, copy) NSString *bundlePath;
+@property (readonly) BOOL allowsAutomaticUpdates;
@property (readonly, copy) NSString *appCachePath;
@property (readonly, copy) NSString *installationPath;
@property (readonly, copy) NSString *name;
diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m
index 6f9e7da1..c49ba368 100644
--- a/Sparkle/SUHost.m
+++ b/Sparkle/SUHost.m
@@ -62,6 +62,18 @@
return [self.bundle bundlePath];
}
+- (BOOL)allowsAutomaticUpdates
+{
+ // Does the developer want us to disable automatic updates?
+ NSNumber *developerAllowsAutomaticUpdates = [self objectForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey];
+ if (developerAllowsAutomaticUpdates != nil && !developerAllowsAutomaticUpdates.boolValue) {
+ return NO;
+ }
+
+ // Can we automatically update in the background without bugging the user (e.g, with a administrator password prompt)?
+ return [[NSFileManager defaultManager] isWritableFileAtPath:self.bundlePath];
+}
+
- (NSString *)appCachePath
{
NSArray *cachePaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
@@ -272,31 +284,4 @@
return [self objectForUserDefaultsKey:key] ? [self boolForUserDefaultsKey:key] : [self boolForInfoDictionaryKey:key];
}
-+ (NSOperatingSystemVersion)operatingSystemVersion
-{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1090 // Present in 10.9 despite NS_AVAILABLE's claims
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wselector"
- // Xcode 5.1.1: operatingSystemVersion is clearly declared, must warn due to a compiler bug?
- if (![NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)])
-#pragma clang diagnostic pop
- {
- NSOperatingSystemVersion version = { 0, 0, 0 };
- NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil];
- NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."];
- version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0;
- version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0;
- version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0;
- return version;
- }
-#endif
- return [[NSProcessInfo processInfo] operatingSystemVersion];
-}
-
-+ (NSString *)systemVersionString
-{
- NSOperatingSystemVersion version = self.operatingSystemVersion;
- return [NSString stringWithFormat:@"%ld.%ld.%ld", (long)version.majorVersion, (long)version.minorVersion, (long)version.patchVersion];
-}
-
@end
diff --git a/Sparkle/SUOperatingSystem.h b/Sparkle/SUOperatingSystem.h
new file mode 100644
index 00000000..bd65275f
--- /dev/null
+++ b/Sparkle/SUOperatingSystem.h
@@ -0,0 +1,16 @@
+//
+// SUOperatingSystem.h
+// Sparkle
+//
+// Copyright © 2015 Sparkle Project. All rights reserved.
+//
+
+#import
+
+@interface SUOperatingSystem : NSObject
+
++ (NSOperatingSystemVersion)operatingSystemVersion;
++ (BOOL)isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version;
++ (NSString *)systemVersionString;
+
+@end
diff --git a/Sparkle/SUOperatingSystem.m b/Sparkle/SUOperatingSystem.m
new file mode 100644
index 00000000..85c18ebc
--- /dev/null
+++ b/Sparkle/SUOperatingSystem.m
@@ -0,0 +1,51 @@
+//
+// SUOperatingSystem.m
+// Sparkle
+//
+// Copyright © 2015 Sparkle Project. All rights reserved.
+//
+
+#import "SUOperatingSystem.h"
+
+@implementation SUOperatingSystem
+
++ (NSOperatingSystemVersion)operatingSystemVersion
+{
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wselector"
+ // Xcode 5.1.1: operatingSystemVersion is clearly declared, must warn due to a compiler bug?
+ if (![NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)])
+#pragma clang diagnostic pop
+ {
+ NSOperatingSystemVersion version = { 0, 0, 0 };
+ NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil];
+ NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."];
+ version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0;
+ version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0;
+ version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0;
+ return version;
+ }
+#endif
+ return [[NSProcessInfo processInfo] operatingSystemVersion];
+}
+
++ (BOOL)isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version
+{
+ const NSOperatingSystemVersion systemVersion = self.operatingSystemVersion;
+ if (systemVersion.majorVersion == version.majorVersion) {
+ if (systemVersion.minorVersion == version.minorVersion) {
+ return systemVersion.patchVersion >= version.patchVersion;
+ }
+ return systemVersion.minorVersion >= version.minorVersion;
+ }
+ return systemVersion.majorVersion >= version.majorVersion;
+}
+
++ (NSString *)systemVersionString
+{
+ NSOperatingSystemVersion version = self.operatingSystemVersion;
+ return [NSString stringWithFormat:@"%ld.%ld.%ld", (long)version.majorVersion, (long)version.minorVersion, (long)version.patchVersion];
+}
+
+@end
diff --git a/Sparkle/SUPlainInstaller.m b/Sparkle/SUPlainInstaller.m
index 975e1184..70a7ded9 100644
--- a/Sparkle/SUPlainInstaller.m
+++ b/Sparkle/SUPlainInstaller.m
@@ -7,13 +7,151 @@
//
#import "SUPlainInstaller.h"
-#import "SUPlainInstallerInternals.h"
+#import "SUFileManager.h"
#import "SUCodeSigningVerifier.h"
#import "SUConstants.h"
#import "SUHost.h"
+#import "SULog.h"
@implementation SUPlainInstaller
+// Returns the bundle version from the specified host that is appropriate to use as a filename, or nil if we're unable to retrieve one
++ (NSString *)bundleVersionAppropriateForFilenameFromHost:(SUHost *)host
+{
+ NSString *bundleVersion = [host objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey];
+ NSString *trimmedVersion = @"";
+
+ if (bundleVersion != nil) {
+ NSMutableCharacterSet *validCharacters = [NSMutableCharacterSet alphanumericCharacterSet];
+ [validCharacters formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@".-()"]];
+
+ trimmedVersion = [bundleVersion stringByTrimmingCharactersInSet:[validCharacters invertedSet]];
+ }
+
+ return trimmedVersion.length > 0 ? trimmedVersion : nil;
+}
+
++ (BOOL)performInstallationToURL:(NSURL *)installationURL fromUpdateAtURL:(NSURL *)newURL withHost:(SUHost *)host error:(NSError * __autoreleasing *)error
+{
+ if (installationURL == nil || newURL == nil) {
+ // this really shouldn't happen but just in case
+ SULog(@"Failed to perform installation because either installation URL (%@) or new URL (%@) is nil", installationURL, newURL);
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: @"Failed to perform installation because the paths to install at and from are not valid" }];
+ }
+ return NO;
+ }
+
+ SUFileManager *fileManager = [SUFileManager fileManagerAllowingAuthorization:YES];
+
+ // Create a temporary directory for our new app that resides on our destination's volume
+ NSURL *tempNewDirectoryURL = [fileManager makeTemporaryDirectoryWithPreferredName:[installationURL.lastPathComponent.stringByDeletingPathExtension stringByAppendingString:@" (Incomplete Update)"] appropriateForDirectoryURL:installationURL.URLByDeletingLastPathComponent error:error];
+ if (tempNewDirectoryURL == nil) {
+ SULog(@"Failed to make new temp directory");
+ return NO;
+ }
+
+ // Move the new app to our temporary directory
+ NSString *newURLLastPathComponent = newURL.lastPathComponent;
+ NSURL *newTempURL = [tempNewDirectoryURL URLByAppendingPathComponent:newURLLastPathComponent];
+ if (![fileManager moveItemAtURL:newURL toURL:newTempURL error:error]) {
+ SULog(@"Failed to move the new app from %@ to its temp directory at %@", newURL.path, newTempURL.path);
+ [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
+ return NO;
+ }
+
+ // Release our new app from quarantine, fix its owner and group IDs, and update its modification time while it's at our temporary destination
+ // We must leave moving the app to its destination as the final step in installing it, so that
+ // it's not possible our new app can be left in an incomplete state at the final destination
+
+ NSError *quarantineError = nil;
+ if (![fileManager releaseItemFromQuarantineAtRootURL:newTempURL error:&quarantineError]) {
+ // Not big enough of a deal to fail the entire installation
+ SULog(@"Failed to release quarantine at %@ with error %@", newTempURL.path, quarantineError);
+ }
+
+ NSURL *oldURL = [NSURL fileURLWithPath:host.bundlePath];
+ if (oldURL == nil) {
+ // this really shouldn't happen but just in case
+ SULog(@"Failed to construct URL from bundle path: %@", host.bundlePath);
+ if (error != NULL) {
+ *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: @"Failed to perform installation because a path could not be constructed for the old installation" }];
+ }
+ return NO;
+ }
+
+ if (![fileManager changeOwnerAndGroupOfItemAtRootURL:newTempURL toMatchURL:oldURL error:error]) {
+ // But this is big enough of a deal to fail
+ SULog(@"Failed to change owner and group of new app at %@ to match old app at %@", newTempURL.path, oldURL.path);
+ [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
+ return NO;
+ }
+
+ if (![fileManager updateModificationAndAccessTimeOfItemAtURL:newTempURL error:error]) {
+ // Not a fatal error, but a pretty unfortunate one
+ SULog(@"Failed to update modification and access time of new app at %@", newTempURL.path);
+ }
+
+ // Decide on a destination name we should use for the older app when we move it around the file system
+ NSString *oldDestinationName = nil;
+ if (SPARKLE_APPEND_VERSION_NUMBER) {
+ NSString *oldBundleVersion = [self bundleVersionAppropriateForFilenameFromHost:host];
+
+ oldDestinationName = [oldURL.lastPathComponent.stringByDeletingPathExtension stringByAppendingFormat:@" (%@)", oldBundleVersion != nil ? oldBundleVersion : @"old"];
+ } else {
+ oldDestinationName = oldURL.lastPathComponent.stringByDeletingPathExtension;
+ }
+
+ NSString *oldURLExtension = oldURL.pathExtension;
+ NSString *oldDestinationNameWithPathExtension = [oldDestinationName stringByAppendingPathExtension:oldURLExtension];
+
+ // Create a temporary directory for our old app that resides on its volume
+ NSURL *tempOldDirectoryURL = [fileManager makeTemporaryDirectoryWithPreferredName:oldDestinationName appropriateForDirectoryURL:oldURL.URLByDeletingLastPathComponent error:error];
+ if (tempOldDirectoryURL == nil) {
+ SULog(@"Failed to create temporary directory for old app at %@", oldURL.path);
+ [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
+ return NO;
+ }
+
+ // Move the old app to the temporary directory
+ NSURL *oldTempURL = [tempOldDirectoryURL URLByAppendingPathComponent:oldDestinationNameWithPathExtension];
+ if (![fileManager moveItemAtURL:oldURL toURL:oldTempURL error:error]) {
+ SULog(@"Failed to move the old app at %@ to a temporary location at %@", oldURL.path, oldTempURL.path);
+
+ // Just forget about our updated app on failure
+ [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
+ [fileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
+
+ return NO;
+ }
+
+ // Move the new app to its final destination
+ if (![fileManager moveItemAtURL:newTempURL toURL:installationURL error:error]) {
+ SULog(@"Failed to move new app at %@ to final destination %@", newTempURL.path, installationURL.path);
+
+ // Forget about our updated app on failure
+ [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
+
+ // Attempt to restore our old app back the way it was on failure
+ [fileManager moveItemAtURL:oldTempURL toURL:oldURL error:NULL];
+ [fileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
+
+ return NO;
+ }
+
+ // Cleanup: move the old app to the trash
+ NSError *trashError = nil;
+ if (![fileManager moveItemAtURLToTrash:oldTempURL error:&trashError]) {
+ SULog(@"Failed to move %@ to trash with error %@", oldTempURL, trashError);
+ }
+
+ [fileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
+
+ [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
+
+ return YES;
+}
+
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host versionComparator:(id)comparator completionHandler:(void (^)(NSError *))completionHandler
{
SUParameterAssert(host);
@@ -32,23 +170,7 @@
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSError *error = nil;
- NSString *oldPath = [host bundlePath];
-
- BOOL result = [self copyPathWithAuthentication:path overPath:installationPath appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error];
-
- if (result) {
- if ([SUCodeSigningVerifier applicationAtPathIsCodeSigned:installationPath]) {
- result = [SUCodeSigningVerifier codeSignatureIsValidAtPath:installationPath error:&error];
- }
- }
-
- if (result) {
- BOOL haveOld = [[NSFileManager defaultManager] fileExistsAtPath:oldPath];
- BOOL differentFromNew = ![oldPath isEqualToString:installationPath];
- if (haveOld && differentFromNew) {
- [self _movePathToTrash:oldPath appendVersion:SPARKLE_APPEND_VERSION_NUMBER]; // On success, trash old copy if there's still one due to renaming.
- }
- }
+ BOOL result = [self performInstallationToURL:[NSURL fileURLWithPath:installationPath] fromUpdateAtURL:[NSURL fileURLWithPath:path] withHost:host error:&error];
dispatch_async(dispatch_get_main_queue(), ^{
[self finishInstallationToPath:installationPath withResult:result error:error completionHandler:completionHandler];
diff --git a/Sparkle/SUPlainInstallerInternals.h b/Sparkle/SUPlainInstallerInternals.h
deleted file mode 100644
index 25b2b6f7..00000000
--- a/Sparkle/SUPlainInstallerInternals.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// SUPlainInstallerInternals.m
-// Sparkle
-//
-// Created by Andy Matuschak on 3/9/06.
-// Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#ifndef SUPLAININSTALLERINTERNALS_H
-#define SUPLAININSTALLERINTERNALS_H
-
-#import
-
-#import "SUPlainInstaller.h"
-
-@interface SUPlainInstaller (Internals)
-+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)a error:(NSError **)error;
-+ (void)_movePathToTrash:(NSString *)path appendVersion:(BOOL)a;
-+ (BOOL)_removeFileAtPath:(NSString *)path error:(NSError **)error;
-+ (BOOL)_removeFileAtPathWithForcedAuthentication:(NSString *)src error:(NSError **)error;
-@end
-
-#endif
diff --git a/Sparkle/SUPlainInstallerInternals.m b/Sparkle/SUPlainInstallerInternals.m
deleted file mode 100644
index 7fd97e27..00000000
--- a/Sparkle/SUPlainInstallerInternals.m
+++ /dev/null
@@ -1,617 +0,0 @@
-//
-// SUPlainInstallerInternals.m
-// Sparkle
-//
-// Created by Andy Matuschak on 3/9/06.
-// Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import "SUUpdater.h"
-
-#import "SUAppcast.h"
-#import "SUAppcastItem.h"
-#import "SUVersionComparisonProtocol.h"
-#import "SUPlainInstallerInternals.h"
-#import "SUConstants.h"
-#import "SULog.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000
-extern NSString *const NSURLQuarantinePropertiesKey WEAK_IMPORT_ATTRIBUTE;
-#endif
-
-static inline void PerformOnMainThreadSync(dispatch_block_t theBlock)
-{
- if ([NSThread isMainThread]) {
- theBlock();
- } else {
- dispatch_sync(dispatch_get_main_queue(), theBlock);
- }
-}
-
-@interface SUPlainInstaller (MMExtendedAttributes)
-// Removes the directory tree rooted at |root| from the file quarantine.
-// The quarantine was introduced on OS X 10.5 and is described at:
-//
-// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html
-//#apple_ref/doc/uid/TP40001369-DontLinkElementID_2
-//
-// If |root| is not a directory, then it alone is removed from the quarantine.
-// Symbolic links, including |root| if it is a symbolic link, will not be
-// traversed.
-//
-// Ordinarily, the quarantine is managed by calling LSSetItemAttribute
-// to set the kLSItemQuarantineProperties attribute to a dictionary specifying
-// the quarantine properties to be applied. However, it does not appear to be
-// possible to remove an item from the quarantine directly through any public
-// Launch Services calls. Instead, this method takes advantage of the fact
-// that the quarantine is implemented in part by setting an extended attribute,
-// "com.apple.quarantine", on affected files. Removing this attribute is
-// sufficient to remove files from the quarantine.
-+ (void)releaseFromQuarantine:(NSString *)root;
-@end
-
-// Authorization code based on generous contribution from Allan Odgaard. Thanks, Allan!
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations" // this is terrible; will fix later probably
-static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authorization, const char *executablePath, AuthorizationFlags options, char *const *arguments)
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
-
- sig_t oldSigChildHandler = signal(SIGCHLD, SIG_DFL);
- BOOL returnValue = YES;
-
- if (AuthorizationExecuteWithPrivileges(authorization, executablePath, options, arguments, NULL) == errAuthorizationSuccess)
- {
- int status;
- pid_t pid = wait(&status);
- if (pid == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0)
- returnValue = NO;
- }
- else
- returnValue = NO;
-
- signal(SIGCHLD, oldSigChildHandler);
- return returnValue;
-}
-#pragma clang diagnostic pop
-
-@implementation SUPlainInstaller (Internals)
-
-+ (NSString *)_temporaryCopyNameForPath:(NSString *)path appendVersion:(BOOL)appendVersion didFindTrash:(BOOL *)outDidFindTrash
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
- NSString *tempDir = nil;
-
- UInt8 trashPath[MAXPATHLEN + 1] = { 0 };
- FSRef trashRef, pathRef;
- FSVolumeRefNum vSrcRefNum = kFSInvalidVolumeRefNum;
- FSCatalogInfo catInfo;
- memset(&catInfo, 0, sizeof(catInfo));
- OSStatus err = FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &pathRef, NULL);
- if( err == noErr )
- {
- err = FSGetCatalogInfo(&pathRef, kFSCatInfoVolume, &catInfo, NULL, NULL, NULL);
- vSrcRefNum = catInfo.volume;
- }
- if (err == noErr)
- err = FSFindFolder(vSrcRefNum, kTrashFolderType, kCreateFolder, &trashRef);
- if (err == noErr)
- err = FSGetCatalogInfo(&trashRef, kFSCatInfoVolume, &catInfo, NULL, NULL, NULL);
- if (err == noErr && vSrcRefNum != catInfo.volume)
- err = nsvErr; // Couldn't find a trash folder on same volume as given path. Docs say this may happen in the future.
- if (err == noErr)
- err = FSRefMakePath(&trashRef, trashPath, MAXPATHLEN);
- if (err == noErr)
- tempDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:(char *)trashPath length:strlen((char *)trashPath)];
- if (outDidFindTrash)
- *outDidFindTrash = (tempDir != nil);
- if (!tempDir)
- tempDir = [path stringByDeletingLastPathComponent];
-
- // Let's try to read the version number so the filename will be more meaningful
- NSString *prefix;
- if (appendVersion) {
- NSString *postFix = nil;
- NSString *version = nil;
- if ((version = [[NSBundle bundleWithPath: path] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]) && ![version isEqualToString:@""])
- {
- NSMutableCharacterSet *validCharacters = [NSMutableCharacterSet alphanumericCharacterSet];
- [validCharacters formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@".-()"]];
- postFix = [version stringByTrimmingCharactersInSet:[validCharacters invertedSet]];
- }
- else {
- postFix = @"old";
- }
- prefix = [NSString stringWithFormat:@"%@ (%@)", [[path lastPathComponent] stringByDeletingPathExtension], postFix];
- } else {
- prefix = [[path lastPathComponent] stringByDeletingPathExtension];
- }
- NSString *tempName = [prefix stringByAppendingPathExtension:[path pathExtension]];
- tempDir = [tempDir stringByAppendingPathComponent:tempName];
-
- // Now let's make sure we get a unique path.
- int cnt = 2;
- while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 9999) {
- tempDir = [[tempDir stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %d.%@", prefix, cnt++, [path pathExtension]]];
- }
-
- return tempDir;
-}
-
-+ (BOOL)_copyPathWithForcedAuthentication:(NSString *)src toPath:(NSString *)dst temporaryPath:(NSString *)tmp error:(NSError *__autoreleasing *)error
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
-
- char srcPath[PATH_MAX] = {0};
- [src getFileSystemRepresentation:srcPath maxLength:sizeof(srcPath)];
-
- char tmpPath[PATH_MAX] = {0};
- [tmp getFileSystemRepresentation:tmpPath maxLength:sizeof(tmpPath)];
-
- char dstPath[PATH_MAX] = {0};
- [dst getFileSystemRepresentation:dstPath maxLength:sizeof(dstPath)];
-
- struct stat dstSB;
- if (stat(dstPath, &dstSB) != 0) // Doesn't exist yet, try containing folder.
- {
- const char *dstDirPath = [[dst stringByDeletingLastPathComponent] fileSystemRepresentation];
- if( stat(dstDirPath, &dstSB) != 0 )
- {
- NSString *errorMessage = [NSString stringWithFormat:@"Stat on %@ during authenticated file copy failed.", dst];
- if (error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
- return NO;
- }
- }
-
- AuthorizationRef auth = NULL;
- OSStatus authStat = errAuthorizationDenied;
- while (authStat == errAuthorizationDenied) {
- authStat = AuthorizationCreate(NULL,
- kAuthorizationEmptyEnvironment,
- kAuthorizationFlagDefaults,
- &auth);
- }
-
- BOOL res = NO;
- if (authStat == errAuthorizationSuccess) {
- res = YES;
-
- char uidgid[42];
- snprintf(uidgid, sizeof(uidgid), "%u:%u",
- dstSB.st_uid, dstSB.st_gid);
-
- // If the currently-running application is trusted, the new
- // version should be trusted as well. Remove it from the
- // quarantine to avoid a delay at launch, and to avoid
- // presenting the user with a confusing trust dialog.
- //
- // This needs to be done after the application is moved to its
- // new home with "mv" in case it's moved across filesystems: if
- // that happens, "mv" actually performs a copy and may result
- // in the application being quarantined. It also needs to be
- // done before "chown" changes ownership, because the ownership
- // change will almost certainly make it impossible to change
- // attributes to release the files from the quarantine.
- if (res)
- {
- SULog(@"releaseFromQuarantine");
- PerformOnMainThreadSync(^{
- [self releaseFromQuarantine:src];
- });
- }
-
- if (res) // Set permissions while it's still in source, so we have it with working and correct perms when it arrives at destination.
- {
- char *coParams[] = { "-R", uidgid, srcPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/usr/sbin/chown", kAuthorizationFlagDefaults, coParams);
- if (!res)
- SULog(@"chown -R %@ %@ failed.", @(uidgid), @(srcPath));
- }
-
- BOOL haveDst = [[NSFileManager defaultManager] fileExistsAtPath:dst];
- if (res && haveDst) // If there's something at our tmp path (previous failed update or whatever) delete that first.
- {
- char *rmParams[] = { "-rf", tmpPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/bin/rm", kAuthorizationFlagDefaults, rmParams);
- if (!res)
- SULog(@"rm failed");
- }
-
- if (res && haveDst) // Move old exe to tmp path.
- {
- char *mvParams[] = { "-f", dstPath, tmpPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/bin/mv", kAuthorizationFlagDefaults, mvParams);
- if (!res)
- SULog(@"mv 1 failed");
- }
-
- if (res) // Move new exe to old exe's path.
- {
- char *mvParams2[] = { "-f", srcPath, dstPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/bin/mv", kAuthorizationFlagDefaults, mvParams2);
- if (!res)
- SULog(@"mv 2 failed");
- }
-
- // if( res && haveDst /*&& !foundTrash*/ ) // If we managed to put the old exe in the trash, leave it there for the user to delete or recover.
- // { // ... Otherwise we better delete it, wouldn't want dozens of old versions lying around next to the new one.
- // const char* rmParams2[] = { "-rf", tmpPath, NULL };
- // res = AuthorizationExecuteWithPrivilegesAndWait( auth, "/bin/rm", kAuthorizationFlagDefaults, rmParams2 );
- // }
-
- AuthorizationFree(auth, 0);
-
- // If the currently-running application is trusted, the new
- // version should be trusted as well. Remove it from the
- // quarantine to avoid a delay at launch, and to avoid
- // presenting the user with a confusing trust dialog.
- //
- // This needs to be done after the application is moved to its
- // new home with "mv" in case it's moved across filesystems: if
- // that happens, "mv" actually performs a copy and may result
- // in the application being quarantined.
- if (res)
- {
- SULog(@"releaseFromQuarantine after installing");
- PerformOnMainThreadSync(^{
- [self releaseFromQuarantine:dst];
- });
- }
-
- if (!res)
- {
- // Something went wrong somewhere along the way, but we're not sure exactly where.
- NSString *errorMessage = [NSString stringWithFormat:@"Authenticated file copy from %@ to %@ failed.", src, dst];
- if (error != nil)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
- }
- }
- else
- {
- if (error != nil)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: @"Couldn't get permission to authenticate." }];
- }
- return res;
-}
-
-+ (BOOL)_movePathWithForcedAuthentication:(NSString *)src toPath:(NSString *)dst error:(NSError *__autoreleasing *)error
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
-
- char srcPath[PATH_MAX] = {0};
- [src getFileSystemRepresentation:srcPath maxLength:sizeof(srcPath)];
-
- char dstPath[PATH_MAX] = {0};
- [dst getFileSystemRepresentation:dstPath maxLength:sizeof(dstPath)];
-
- char dstContainerPath[PATH_MAX] = {0};
- [dst.stringByDeletingLastPathComponent getFileSystemRepresentation:dstContainerPath maxLength:sizeof(dstContainerPath)];
-
- struct stat dstSB;
- stat(dstContainerPath, &dstSB);
-
- AuthorizationRef auth = NULL;
- OSStatus authStat = errAuthorizationDenied;
- while( authStat == errAuthorizationDenied )
- {
- authStat = AuthorizationCreate(NULL,
- kAuthorizationEmptyEnvironment,
- kAuthorizationFlagDefaults,
- &auth);
- }
-
- BOOL res = NO;
- if (authStat == errAuthorizationSuccess)
- {
- res = YES;
-
- char uidgid[42];
- snprintf(uidgid, sizeof(uidgid), "%d:%d",
- dstSB.st_uid, dstSB.st_gid);
-
- if (res) // Set permissions while it's still in source, so we have it with working and correct perms when it arrives at destination.
- {
- char *coParams[] = { "-R", uidgid, srcPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/usr/sbin/chown", kAuthorizationFlagDefaults, coParams);
- if (!res)
- SULog(@"Can't set permissions");
- }
-
- BOOL haveDst = [[NSFileManager defaultManager] fileExistsAtPath:dst];
- if (res && haveDst) // If there's something at our tmp path (previous failed update or whatever) delete that first.
- {
- char *rmParams[] = { "-rf", dstPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/bin/rm", kAuthorizationFlagDefaults, rmParams);
- if (!res)
- SULog(@"Can't remove destination file");
- }
-
- if (res) // Move!.
- {
- char *mvParams[] = { "-f", srcPath, dstPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/bin/mv", kAuthorizationFlagDefaults, mvParams);
- if (!res)
- SULog(@"Can't move source file");
- }
-
- AuthorizationFree(auth, 0);
-
- if (!res)
- {
- // Something went wrong somewhere along the way, but we're not sure exactly where.
- NSString *errorMessage = [NSString stringWithFormat:@"Authenticated file move from %@ to %@ failed.", src, dst];
- if (error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
- }
- }
- else
- {
- if (error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: @"Couldn't get permission to authenticate." }];
- }
- return res;
-}
-
-
-+ (BOOL)_removeFileAtPathWithForcedAuthentication:(NSString *)src error:(NSError *__autoreleasing *)error
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
-
- char srcPath[PATH_MAX] = {0};
- [src getFileSystemRepresentation:srcPath maxLength:sizeof(srcPath)];
-
- AuthorizationRef auth = NULL;
- OSStatus authStat = errAuthorizationDenied;
- while( authStat == errAuthorizationDenied )
- {
- authStat = AuthorizationCreate(NULL,
- kAuthorizationEmptyEnvironment,
- kAuthorizationFlagDefaults,
- &auth);
- }
-
- BOOL res = NO;
- if (authStat == errAuthorizationSuccess)
- {
- res = YES;
-
- if (res) // If there's something at our tmp path (previous failed update or whatever) delete that first.
- {
- char *rmParams[] = { "-rf", srcPath, NULL };
- res = AuthorizationExecuteWithPrivilegesAndWait(auth, "/bin/rm", kAuthorizationFlagDefaults, rmParams);
- if (!res)
- SULog(@"Can't remove destination file");
- }
-
- AuthorizationFree(auth, 0);
-
- if (!res)
- {
- // Something went wrong somewhere along the way, but we're not sure exactly where.
- NSString *errorMessage = [NSString stringWithFormat:@"Authenticated file remove from %@ failed.", src];
- if (error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
- }
- }
- else
- {
- if (error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: @"Couldn't get permission to authenticate." }];
- }
- return res;
-}
-
-+ (BOOL)_removeFileAtPath:(NSString *)path error:(NSError *__autoreleasing *)error
-{
- BOOL success = YES;
- if( ![[NSFileManager defaultManager] removeItemAtPath: path error: NULL] )
- {
- success = [self _removeFileAtPathWithForcedAuthentication:path error:error];
- }
-
- return success;
-}
-
-+ (void)_movePathToTrash:(NSString *)path appendVersion:(BOOL)appendVersion
-{
- //SULog(@"Moving %@ to the trash.", path);
- NSInteger tag = 0;
- if (![[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[path stringByDeletingLastPathComponent] destination:@"" files:@[[path lastPathComponent]] tag:&tag])
- {
- BOOL didFindTrash = NO;
- NSString *trashPath = [self _temporaryCopyNameForPath:path appendVersion:appendVersion didFindTrash:&didFindTrash];
- if( didFindTrash )
- {
- NSError *err = nil;
- if (![self _movePathWithForcedAuthentication:path toPath:trashPath error:&err]) {
- SULog(@"Error: couldn't move %@ to the trash (%@). %@", path, trashPath, err);
- }
- }
- else {
- SULog(@"Error: couldn't move %@ to the trash. This is often a sign of a permissions error.", path);
- }
- }
-}
-
-+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)error
-{
- FSRef srcRef, dstRef, dstDirRef, tmpDirRef;
- OSStatus err;
- BOOL hadFileAtDest = NO, didFindTrash = NO;
- NSString *tmpPath = [self _temporaryCopyNameForPath:dst appendVersion:appendVersion didFindTrash:&didFindTrash];
-
- // Make FSRef for destination:
- err = FSPathMakeRefWithOptions((const UInt8 *)[dst fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &dstRef, NULL);
- hadFileAtDest = (err == noErr); // There is a file at the destination, move it aside. If we normalized the name, we might not get here, so don't error.
- if( hadFileAtDest )
- {
- if (0 != access([dst fileSystemRepresentation], W_OK) || 0 != access([[dst stringByDeletingLastPathComponent] fileSystemRepresentation], W_OK))
- {
- return [self _copyPathWithForcedAuthentication:src toPath:dst temporaryPath:tmpPath error:error];
- }
- }
- else
- {
- if (0 != access([[dst stringByDeletingLastPathComponent] fileSystemRepresentation], W_OK)
- || 0 != access([[[dst stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] fileSystemRepresentation], W_OK))
- {
- return [self _copyPathWithForcedAuthentication:src toPath:dst temporaryPath:tmpPath error:error];
- }
- }
-
- if( hadFileAtDest )
- {
- err = FSPathMakeRef((const UInt8 *)[[tmpPath stringByDeletingLastPathComponent] fileSystemRepresentation], &tmpDirRef, NULL);
- if (err != noErr)
- FSPathMakeRef((const UInt8 *)[[dst stringByDeletingLastPathComponent] fileSystemRepresentation], &tmpDirRef, NULL);
- }
-
- err = FSPathMakeRef((const UInt8 *)[[dst stringByDeletingLastPathComponent] fileSystemRepresentation], &dstDirRef, NULL);
-
- if (err == noErr && hadFileAtDest)
- {
- NSFileManager *manager = [[NSFileManager alloc] init];
- BOOL success = [manager moveItemAtPath:dst toPath:tmpPath error:error];
- if (!success && hadFileAtDest)
- {
- if (error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Couldn't move %@ to %@.", dst, tmpPath] }];
- return NO;
- }
- }
-
- err = FSPathMakeRef((const UInt8 *)[src fileSystemRepresentation], &srcRef, NULL);
- if (err == noErr)
- {
- NSFileManager *manager = [[NSFileManager alloc] init];
- BOOL success = [manager copyItemAtPath:src toPath:dst error:error];
- if (!success)
- {
- // We better move the old version back to its old location
- if (hadFileAtDest) {
- success = [manager moveItemAtPath:tmpPath toPath:dst error:error];
- }
- if (!success && error != NULL)
- *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Couldn't move %@ to %@.", dst, tmpPath] }];
- return NO;
-
- }
- }
-
- // If the currently-running application is trusted, the new
- // version should be trusted as well. Remove it from the
- // quarantine to avoid a delay at launch, and to avoid
- // presenting the user with a confusing trust dialog.
- //
- // This needs to be done after the application is moved to its
- // new home in case it's moved across filesystems: if that
- // happens, the move is actually a copy, and it may result
- // in the application being quarantined.
- PerformOnMainThreadSync(^{
- [self releaseFromQuarantine:dst];
- });
-
- return YES;
-}
-
-@end
-
-#include
-#include
-#include
-
-@implementation SUPlainInstaller (MMExtendedAttributes)
-
-+ (int)removeXAttr:(NSString *)name
- fromFile:(NSString *)file
- options:(int)options
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
-
- const char *path = NULL;
- const char *attr = [name cStringUsingEncoding:NSASCIIStringEncoding];
- @try {
- path = [file fileSystemRepresentation];
- }
- @catch (id) {
- // -[NSString fileSystemRepresentation] throws an exception if it's
- // unable to convert the string to something suitable. Map that to
- // EDOM, "argument out of domain", which sort of conveys that there
- // was a conversion failure.
- errno = EDOM;
- return -1;
- }
-
- return removexattr(path, attr, options);
-}
-
-+ (void)releaseFromQuarantine:(NSString *)root
-{
- // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD!
-
- NSFileManager *manager = [NSFileManager defaultManager];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
- if (!&NSURLQuarantinePropertiesKey) {
- NSString *const quarantineAttribute = (__bridge NSString *)kLSItemQuarantineProperties;
- const int removeXAttrOptions = XATTR_NOFOLLOW;
-
- [self removeXAttr:quarantineAttribute
- fromFile:root
- options:removeXAttrOptions];
-
- // Only recurse if it's actually a directory. Don't recurse into a
- // root-level symbolic link.
- NSDictionary *rootAttributes = [manager attributesOfItemAtPath:root error:nil];
- NSString *rootType = rootAttributes[NSFileType];
-
- if (rootType == NSFileTypeDirectory) {
- // The NSDirectoryEnumerator will avoid recursing into any contained
- // symbolic links, so no further type checks are needed.
- NSDirectoryEnumerator *directoryEnumerator = [manager enumeratorAtPath:root];
- NSString *file = nil;
- while ((file = [directoryEnumerator nextObject])) {
- [self removeXAttr:quarantineAttribute
- fromFile:[root stringByAppendingPathComponent:file]
- options:removeXAttrOptions];
- }
- }
- return;
- }
-#endif
- NSURL *rootURL = [NSURL fileURLWithPath:root];
- id rootResourceValue = nil;
- [rootURL getResourceValue:&rootResourceValue forKey:NSURLQuarantinePropertiesKey error:NULL];
- if (rootResourceValue) {
- [rootURL setResourceValue:[NSNull null] forKey:NSURLQuarantinePropertiesKey error:NULL];
- }
-
- // Only recurse if it's actually a directory. Don't recurse into a
- // root-level symbolic link.
- NSDictionary *rootAttributes = [manager attributesOfItemAtPath:root error:nil];
- NSString *rootType = rootAttributes[NSFileType];
-
- if (rootType == NSFileTypeDirectory) {
- // The NSDirectoryEnumerator will avoid recursing into any contained
- // symbolic links, so no further type checks are needed.
- NSDirectoryEnumerator *directoryEnumerator = [manager enumeratorAtURL:rootURL includingPropertiesForKeys:nil options:(NSDirectoryEnumerationOptions)0 errorHandler:nil];
-
- for (NSURL *file in directoryEnumerator) {
- id fileResourceValue = nil;
- [file getResourceValue:&fileResourceValue forKey:NSURLQuarantinePropertiesKey error:NULL];
- if (fileResourceValue) {
- [file setResourceValue:[NSNull null] forKey:NSURLQuarantinePropertiesKey error:NULL];
- }
- }
- }
-}
-
-@end
diff --git a/Sparkle/SUSystemProfiler.m b/Sparkle/SUSystemProfiler.m
index 26bbfe9a..230c808f 100644
--- a/Sparkle/SUSystemProfiler.m
+++ b/Sparkle/SUSystemProfiler.m
@@ -11,6 +11,7 @@
#import "SUSystemProfiler.h"
#import "SUHost.h"
+#import "SUOperatingSystem.h"
#include
static NSString *const SUSystemProfilerApplicationNameKey = @"appName";
@@ -37,7 +38,8 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
- (NSDictionary *)modelTranslationTable
{
- NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"SUModelTranslation" ofType:@"plist"];
+ // 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];
}
@@ -53,7 +55,7 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
size_t length = sizeof(value);
// OS version
- NSString *currentSystemVersion = [SUHost systemVersionString];
+ NSString *currentSystemVersion = [SUOperatingSystem systemVersionString];
if (currentSystemVersion != nil) {
[profileArray addObject:[NSDictionary dictionaryWithObjects:@[SUSystemProfilerOperatingSystemVersionKey, @"OS Version", currentSystemVersion, currentSystemVersion] forKeys:profileDictKeys]];
}
diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m
index 60df8193..629ef0e4 100644
--- a/Sparkle/SUUIBasedUpdateDriver.m
+++ b/Sparkle/SUUIBasedUpdateDriver.m
@@ -11,6 +11,7 @@
#import "SUUpdateAlert.h"
#import "SUUpdater_Private.h"
#import "SUHost.h"
+#import "SUOperatingSystem.h"
#import "SUStatusController.h"
#import "SUConstants.h"
@@ -41,6 +42,14 @@
@synthesize statusController;
@synthesize updateAlert;
+- (instancetype)initWithUpdater:(SUUpdater *)anUpdater
+{
+ if ((self = [super initWithUpdater:anUpdater])) {
+ self.automaticallyInstallUpdates = NO;
+ }
+ return self;
+}
+
- (BOOL)shouldShowUI
{
return YES;
@@ -48,6 +57,15 @@
- (void)didFindValidUpdate
{
+ if ([[self.updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)]) {
+ [[self.updater delegate] updater:self.updater didFindValidUpdate:self.updateItem];
+ }
+
+ if (self.automaticallyInstallUpdates) {
+ [self updateAlertFinishedWithChoice:SUInstallUpdateChoice];
+ return;
+ }
+
self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) {
[self updateAlertFinishedWithChoice:choice];
}];
@@ -63,10 +81,6 @@
}
[self.updateAlert setVersionDisplayer:versDisp];
- if ([[self.updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)]) {
- [[self.updater delegate] updater:self.updater didFindValidUpdate:self.updateItem];
- }
-
// If the app is a menubar app or the like, we need to focus it first and alter the
// update prompt to behave like a normal window. Otherwise if the window were hidden
// there may be no way for the application to be activated to make it visible again.
@@ -88,12 +102,14 @@
[[self.updater delegate] updaterDidNotFindUpdate:self.updater];
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidNotFindUpdateNotification object:self.updater];
- NSAlert *alert = [[NSAlert alloc] init];
- alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates.");
- alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]];
- [alert addButtonWithTitle:SULocalizedString(@"OK", nil)];
- [self showModalAlert:alert];
- [self abortUpdate:SUUpdateAbortDidNotFind];
+ if (!self.automaticallyInstallUpdates) {
+ NSAlert *alert = [[NSAlert alloc] init];
+ alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates.");
+ alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]];
+ [alert addButtonWithTitle:SULocalizedString(@"OK", nil)];
+ [self showModalAlert:alert];
+ [self abortUpdate:SUUpdateAbortDidNotFind];
+ }
}
- (void)applicationDidBecomeActive:(NSNotification *)__unused aNotification
@@ -138,7 +154,7 @@
- (NSString *)localizedStringFromByteCount:(long long)value
{
- if (SUHost.operatingSystemVersion.minorVersion < 8) {
+ if (![SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 8, 0}]) {
if (value < 1000) {
return [NSString stringWithFormat:@"%.0lf %@", value / 1.0,
SULocalizedString(@"B", @"the unit for bytes")];
@@ -173,8 +189,12 @@
- (IBAction)cancelDownload:(id)__unused sender
{
- if (self.download)
+ if (self.download) {
[self.download cancel];
+ if ([[self.updater delegate] respondsToSelector:@selector(userDidCancelDownload:)]) {
+ [[self.updater delegate] userDidCancelDownload:self.updater];
+ }
+ }
[self abortUpdate:SUUpdateAbortCanceledByUser];
}
@@ -197,6 +217,11 @@
- (void)unarchiverDidFinish:(SUUnarchiver *)__unused ua
{
+ if (self.automaticallyInstallUpdates) {
+ [self installWithToolAndRelaunch:YES];
+ return;
+ }
+
[self.statusController beginActionWithTitle:SULocalizedString(@"Ready to Install", nil) maxProgressValue:1.0 statusText:nil];
[self.statusController setProgressValue:1.0]; // Fill the bar.
[self.statusController setButtonEnabled:YES];
diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m
index 96cb2ae7..6b5230bc 100644
--- a/Sparkle/SUUpdateAlert.m
+++ b/Sparkle/SUUpdateAlert.m
@@ -180,11 +180,7 @@
- (BOOL)allowsAutomaticUpdates
{
- BOOL allowAutoUpdates = YES; // Defaults to YES.
- if ([self.host objectForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey])
- allowAutoUpdates = [self.host boolForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey];
-
- return allowAutoUpdates;
+ return self.host.allowsAutomaticUpdates;
}
- (void)windowDidLoad
@@ -211,6 +207,16 @@
[self.releaseNotesContainerView removeFromSuperview];
}
+
+ // When we show release notes, it looks ugly if the install buttons are not closer to the release notes view
+ // However when we don't show release notes, it looks ugly if the install buttons are too close to the description field. Shrugs.
+ if (showReleaseNotes && ![self allowsAutomaticUpdates]) {
+ NSLayoutConstraint *skipButtonToReleaseNotesContainerConstraint = [NSLayoutConstraint constraintWithItem:self.skipButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.releaseNotesContainerView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:12.0];
+
+ [self.window.contentView addConstraint:skipButtonToReleaseNotesContainerConstraint];
+
+ [self.automaticallyInstallUpdatesButton removeFromSuperview];
+ }
[self.window center];
}
diff --git a/Sparkle/SUUpdateDriver.h b/Sparkle/SUUpdateDriver.h
index 79a52fb9..acfb62d6 100644
--- a/Sparkle/SUUpdateDriver.h
+++ b/Sparkle/SUUpdateDriver.h
@@ -24,11 +24,11 @@ extern NSString *const SUUpdateDriverFinishedNotification;
- (void)abortUpdate:(SUUpdateAbortReason)reason;
@property (getter=isInterruptible, readonly) BOOL interruptible;
@property (readonly) BOOL finished;
+@property BOOL automaticallyInstallUpdates;
@property (readonly) SUUpdateAbortReason abortReason;
@property (nonatomic, readonly) BOOL shouldShowUI; // can change it's value during lifetime
-
@end
#endif
diff --git a/Sparkle/SUUpdateDriver.m b/Sparkle/SUUpdateDriver.m
index 39c654c4..55c7d607 100644
--- a/Sparkle/SUUpdateDriver.m
+++ b/Sparkle/SUUpdateDriver.m
@@ -27,6 +27,7 @@ NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
@synthesize interruptible;
@synthesize finished;
@synthesize appcastURL;
+@synthesize automaticallyInstallUpdates;
@synthesize abortReason;
- (instancetype)initWithUpdater:(SUUpdater *)anUpdater
diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h
index f2b62a47..fb4da04f 100644
--- a/Sparkle/SUUpdater.h
+++ b/Sparkle/SUUpdater.h
@@ -77,6 +77,16 @@ SU_EXPORT @interface SUUpdater : NSObject
*/
- (void)checkForUpdatesInBackground;
+/*!
+ Checks for updates and, if available, immediately downloads and installs them.
+ A progress dialog is shown but the user will never be prompted to read the
+ release notes.
+
+ You may want to respond to the userDidCancelDownload delegate method in case
+ the user clicks the "Cancel" button while the update is downloading.
+ */
+- (void)installUpdatesIfAvailable;
+
/*!
Returns the date of last update check.
@@ -230,6 +240,13 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
*/
- (void)updater:(SUUpdater *)updater failedToDownloadUpdate:(SUAppcastItem *)item error:(NSError *)error;
+/*!
+ Called when the user clicks the cancel button while and update is being downloaded.
+
+ \param updater The SUUpdater instance.
+ */
+- (void)userDidCancelDownload:(SUUpdater *)updater;
+
/*!
Called immediately before installing the specified update.
diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m
index 0812f02a..39dd1ae1 100644
--- a/Sparkle/SUUpdater.m
+++ b/Sparkle/SUUpdater.m
@@ -84,7 +84,8 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
self = [super init];
if (bundle == nil) bundle = [NSBundle mainBundle];
- self.sparkleBundle = [NSBundle bundleForClass:[self class]];
+ // Use explicit class to use the correct bundle even when subclassed
+ self.sparkleBundle = [NSBundle bundleForClass:[SUUpdater class]];
if (!self.sparkleBundle) {
SULog(@"Error: SUUpdater can't find Sparkle.framework it belongs to");
return nil;
@@ -346,6 +347,17 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
[self checkForUpdatesWithDriver:[[SUProbingUpdateDriver alloc] initWithUpdater:self]];
}
+- (void)installUpdatesIfAvailable
+{
+ if (self.driver && [self.driver isInterruptible]) {
+ [self.driver abortUpdate:SUUpdateAbortInterrupred];
+ }
+
+ SUUIBasedUpdateDriver *theUpdateDriver = [[SUUserInitiatedUpdateDriver alloc] initWithUpdater:self];
+ theUpdateDriver.automaticallyInstallUpdates = YES;
+ [self checkForUpdatesWithDriver:theUpdateDriver];
+}
+
- (void)checkForUpdatesWithDriver:(SUUpdateDriver *)d
{
if ([self updateInProgress]) { return; }
@@ -453,8 +465,8 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
- (BOOL)automaticallyDownloadsUpdates
{
- // If the SUAllowsAutomaticUpdatesKey exists and is set to NO, return NO.
- if ([self.host objectForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey] && [self.host boolForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey] == NO) {
+ // If the host doesn't allow automatic updates, don't ever let them happen
+ if (!self.host.allowsAutomaticUpdates) {
return NO;
}
diff --git a/Sparkle/Sparkle.h b/Sparkle/Sparkle.h
index b0086fd1..d6c8fba4 100644
--- a/Sparkle/Sparkle.h
+++ b/Sparkle/Sparkle.h
@@ -14,13 +14,13 @@
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
// there are name-space collisions) so we can list all of them to start with:
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
+#import "SUAppcast.h"
+#import "SUAppcastItem.h"
+#import "SUStandardVersionComparator.h"
+#import "SUUpdater.h"
+#import "SUVersionComparisonProtocol.h"
+#import "SUVersionDisplayProtocol.h"
+#import "SUErrors.h"
+#import "SUUpdaterQueue.h"
#endif
diff --git a/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib
index ffd6fc0a..8b770b6f 100755
--- a/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib
@@ -1,9 +1,7 @@
-
+
-
-
-
+
@@ -12,20 +10,21 @@
-
-
+
+
-
+
-
+
+
@@ -34,6 +33,7 @@
+
@@ -44,8 +44,9 @@
-
+
+
@@ -56,8 +57,9 @@
+
diff --git a/Sparkle/ar.lproj/SUUpdateAlert.xib b/Sparkle/ar.lproj/SUUpdateAlert.xib
index 71173bce..e74564ce 100644
--- a/Sparkle/ar.lproj/SUUpdateAlert.xib
+++ b/Sparkle/ar.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
diff --git a/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib
index d3e44c86..bfc811f3 100755
--- a/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,24 +10,26 @@
+
-
+
-
+
-
+
+
@@ -64,8 +67,9 @@ Gw
-
+
+
@@ -76,8 +80,9 @@ Gw
-
+
+
+
-
+
visibleKey
visibleValue
@@ -141,6 +149,7 @@ Gw
+
Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.
@@ -153,15 +162,16 @@ This is the information that would be sent:
-
+
-
+
+
-
+
@@ -199,18 +209,23 @@ This is the information that would be sent:
+
+
+
+
+
diff --git a/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib
index f383c339..1b2be43d 100644
--- a/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
+
diff --git a/Sparkle/cs.lproj/SUUpdateAlert.xib b/Sparkle/cs.lproj/SUUpdateAlert.xib
index e1ed9f80..afa0cf85 100644
--- a/Sparkle/cs.lproj/SUUpdateAlert.xib
+++ b/Sparkle/cs.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib
index 38286999..b75697a3 100644
--- a/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,12 +10,12 @@
-
+
-
+
@@ -28,8 +27,9 @@
+
@@ -142,6 +149,7 @@ Gw
+
Informace z anonymního systémového profilu pomáhají vývojářům lépe plánovat budoucí vývoj aplikace
@@ -155,15 +163,16 @@ Tyto informace by měli být odeslány:
-
+
-
+
+
-
+
@@ -201,18 +210,23 @@ Tyto informace by měli být odeslány:
+
+
+
+
+
diff --git a/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib
old mode 100755
new mode 100644
index e306261a..382eba72
--- a/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,8 +10,8 @@
-
-
+
+
@@ -25,6 +24,7 @@
+
@@ -33,6 +33,7 @@
+
@@ -45,6 +46,7 @@
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/da.lproj/SUUpdateAlert.xib b/Sparkle/da.lproj/SUUpdateAlert.xib
index 78ab21b5..901353fa 100644
--- a/Sparkle/da.lproj/SUUpdateAlert.xib
+++ b/Sparkle/da.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -106,6 +185,7 @@ Gw
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib
old mode 100755
new mode 100644
index 1be6db56..2f5404e8
--- a/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib
@@ -1,8 +1,8 @@
-
+
-
-
+
+
@@ -15,20 +15,21 @@
-
+
-
+
-
+
+
@@ -41,8 +42,9 @@ DQ
-
+
+
@@ -57,6 +59,7 @@ Gw
+
@@ -66,6 +69,7 @@ Gw
+
@@ -78,6 +82,7 @@ Gw
+
@@ -99,6 +104,7 @@ Gw
+
@@ -107,6 +113,7 @@ Gw
+
@@ -121,6 +128,7 @@ Gw
+
@@ -141,6 +149,7 @@ Gw
+
Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.
@@ -153,15 +162,16 @@ This is the information that would be sent:
-
+
-
+
+
-
+
@@ -199,18 +209,23 @@ This is the information that would be sent:
+
+
+
+
+
diff --git a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib
index 0bc4fc97..665268ff 100644
--- a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/de.lproj/SUUpdateAlert.xib b/Sparkle/de.lproj/SUUpdateAlert.xib
index 0b661de8..fc93ca11 100644
--- a/Sparkle/de.lproj/SUUpdateAlert.xib
+++ b/Sparkle/de.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -106,6 +185,7 @@ Gw
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib
index 5c108c35..01450e3a 100644
--- a/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,12 +10,12 @@
-
+
-
+
@@ -28,8 +27,9 @@
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -56,8 +57,9 @@ Gw
-
+
+
@@ -67,6 +69,7 @@ Gw
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
Das anonymisierte Systemprofil unterstützt uns bei der zukünftigen Entwicklung. Bitte kontaktieren Sie uns, wenn Sie Fragen hierzu haben.
@@ -154,22 +162,23 @@ Diese Informationen würden an uns gesendet:
-
+
-
+
+
-
+
-
+
@@ -185,7 +194,7 @@ Diese Informationen würden an uns gesendet:
-
+
@@ -200,18 +209,23 @@ Diese Informationen würden an uns gesendet:
+
+
+
+
+
diff --git a/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib
index 634566a2..93cbb6cd 100644
--- a/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib
@@ -1,9 +1,7 @@
-
+
-
-
-
+
@@ -12,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
-
+
+
+
@@ -44,8 +44,9 @@
-
+
+
@@ -56,8 +57,9 @@
-
+
+
@@ -70,8 +72,9 @@ DQ
-
+
+
@@ -84,8 +87,9 @@ Gw
-
+
+
@@ -95,8 +99,9 @@ Gw
-
+
+
@@ -106,6 +111,7 @@ Gw
+
diff --git a/Sparkle/el.lproj/SUUpdateAlert.xib b/Sparkle/el.lproj/SUUpdateAlert.xib
index 83fe668c..2795750a 100644
--- a/Sparkle/el.lproj/SUUpdateAlert.xib
+++ b/Sparkle/el.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib
index 832b7112..4049a836 100644
--- a/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,24 +10,26 @@
+
-
+
-
+
-
+
+
@@ -41,8 +42,9 @@ DQ
-
+
+
@@ -57,6 +59,7 @@ Gw
+
@@ -66,6 +69,7 @@ Gw
+
@@ -78,6 +82,7 @@ Gw
+
@@ -99,6 +104,7 @@ Gw
+
@@ -107,6 +113,7 @@ Gw
+
@@ -121,9 +128,10 @@ Gw
+
-
+
visibleKey
visibleValue
@@ -141,6 +149,7 @@ Gw
+
Το ανώνυμο προφίλ συστήματος χρησιμοποιείται για να μας βοηθήσει σε μελλοντική ανάπτυξη του προγράμματος. Παρακαλώ επικοινωνήστε μαζί μας άν έχετε ερωτήσεις.
@@ -153,22 +162,23 @@ Gw
-
+
-
+
+
-
+
-
+
@@ -184,7 +194,7 @@ Gw
-
+
@@ -199,18 +209,23 @@ Gw
+
+
+
+
+
diff --git a/Sparkle/en.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/en.lproj/SUAutomaticUpdateAlert.xib
index c707f6c3..072a1346 100644
--- a/Sparkle/en.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/en.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,7 +10,7 @@
-
+
@@ -25,6 +24,7 @@
+
@@ -33,6 +33,7 @@
+
@@ -45,6 +46,7 @@
+
@@ -57,6 +59,7 @@
+
@@ -71,6 +74,7 @@ DQ
+
@@ -85,6 +89,7 @@ Gw
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/en.lproj/SUUpdateAlert.xib b/Sparkle/en.lproj/SUUpdateAlert.xib
index 1451769a..bbab3974 100644
--- a/Sparkle/en.lproj/SUUpdateAlert.xib
+++ b/Sparkle/en.lproj/SUUpdateAlert.xib
@@ -1,12 +1,11 @@
-
+
-
-
-
-
+
+
+
@@ -26,8 +25,8 @@
-
-
+
+
@@ -41,6 +40,7 @@
+
@@ -51,6 +51,7 @@
+
@@ -66,6 +67,7 @@
+
@@ -80,12 +82,13 @@
-
+
+
@@ -98,14 +101,16 @@
+
-
-
-
+
+
+
+
-
+
@@ -118,10 +123,11 @@
-
+
+
@@ -138,18 +144,20 @@
-
+
+
+
@@ -163,6 +171,7 @@ Gw
+
@@ -176,6 +185,7 @@ Gw
+
@@ -193,6 +203,7 @@ DQ
+
@@ -235,11 +246,12 @@ DQ
+
-
+
diff --git a/Sparkle/en.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/en.lproj/SUUpdatePermissionPrompt.xib
index c110598f..4ad9171f 100644
--- a/Sparkle/en.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/en.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -16,7 +15,7 @@
-
+
@@ -28,8 +27,9 @@
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -67,6 +69,7 @@ Gw
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -108,6 +113,7 @@ Gw
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.
@@ -159,10 +167,11 @@ This is the information that would be sent:
-
+
+
-
+
@@ -200,18 +209,23 @@ This is the information that would be sent:
+
+
+
+
+
diff --git a/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib
index 98a58ab8..e1b843f3 100644
--- a/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/es.lproj/SUUpdateAlert.xib b/Sparkle/es.lproj/SUUpdateAlert.xib
index 551ac126..7479b1e7 100644
--- a/Sparkle/es.lproj/SUUpdateAlert.xib
+++ b/Sparkle/es.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib
index 9c0f5ae8..214daf58 100644
--- a/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -56,8 +57,9 @@ Gw
-
+
+
@@ -65,8 +67,9 @@ Gw
-
+
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,7 +128,9 @@ Gw
+
+
@@ -142,6 +150,7 @@ Gw
+
La información de perfil de sistema anónimo se usa para ayudarnos a planear el trabajo de desarrollo futuro. Por favor, póngase en cantacto con nosotros si tiene preguntas sobre esto.
@@ -154,22 +163,23 @@ Esta es la información que se nos enviaría:
-
+
-
+
+
-
+
-
+
@@ -185,7 +195,7 @@ Esta es la información que se nos enviaría:
-
+
@@ -200,18 +210,23 @@ Esta es la información que se nos enviaría:
+
+
+
+
+
diff --git a/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib
index eb32a008..972e7aab 100644
--- a/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/fr.lproj/SUUpdateAlert.xib b/Sparkle/fr.lproj/SUUpdateAlert.xib
index 60a7add4..c3bf2078 100644
--- a/Sparkle/fr.lproj/SUUpdateAlert.xib
+++ b/Sparkle/fr.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -106,6 +185,7 @@ Gw
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib
index 347ec9a8..0a5efa67 100644
--- a/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -55,18 +56,10 @@ Gw
-
-
-
-
-
-
-
-
-
-
+
+
@@ -77,8 +70,9 @@ Gw
-
+
+
@@ -100,6 +94,7 @@ Gw
+
@@ -107,7 +102,8 @@ Gw
-
+
+
@@ -121,7 +117,18 @@ Gw
+
+
+
+
+
+
+
+
+
+
+
@@ -142,6 +149,7 @@ Gw
+
Les informations anonymes de profil système nous aident à planifier les futurs développements. Contactez-nous pour toute question à ce sujet.
@@ -154,22 +162,23 @@ Ci-dessous figurent les informations qui seront transmises :
-
+
-
+
+
-
+
-
+
@@ -185,7 +194,7 @@ Ci-dessous figurent les informations qui seront transmises :
-
+
@@ -200,18 +209,23 @@ Ci-dessous figurent les informations qui seront transmises :
+
+
+
+
+
diff --git a/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib
index 1e8542ec..d2a2b418 100644
--- a/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -94,8 +99,9 @@ Gw
-
+
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/is.lproj/SUUpdateAlert.xib b/Sparkle/is.lproj/SUUpdateAlert.xib
index 6dba3438..6052b26e 100644
--- a/Sparkle/is.lproj/SUUpdateAlert.xib
+++ b/Sparkle/is.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -106,6 +185,7 @@ Gw
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib
index af4e9524..926a28cc 100644
--- a/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,12 +10,12 @@
-
+
-
+
@@ -30,6 +29,7 @@
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -67,6 +69,7 @@ Gw
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
Upplýsingar úr nafnlausum kerfisskýrslum eru notaðar til að hjálpa okkur við framtíðarþróun hugbúnaðarins. Ekki hika við að hafa samband ef spurningar vakna um þetta.
@@ -154,15 +162,16 @@ Gw
-
+
-
+
+
-
+
@@ -200,18 +209,23 @@ Gw
+
+
+
+
+
diff --git a/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib
index 30f0c866..b19c65cf 100644
--- a/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/it.lproj/SUUpdateAlert.xib b/Sparkle/it.lproj/SUUpdateAlert.xib
index 79b06d5b..612252b7 100644
--- a/Sparkle/it.lproj/SUUpdateAlert.xib
+++ b/Sparkle/it.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,41 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
-
+
diff --git a/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib
index 582aa13c..2501334c 100644
--- a/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -56,8 +57,9 @@ Gw
-
+
+
@@ -65,8 +67,9 @@ Gw
-
+
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
Le informazioni del profilo di sistema anomino sono utilizzate per aiutarci in futuri lavori di sviluppo. Contattaci se hai dei quesiti sull’argomento.
@@ -154,22 +162,23 @@ Queste sono le informazioni che verrebbero inviate:
-
+
-
+
+
-
+
-
+
@@ -185,7 +194,7 @@ Queste sono le informazioni che verrebbero inviate:
-
+
@@ -200,18 +209,23 @@ Queste sono le informazioni che verrebbero inviate:
+
+
+
+
+
diff --git a/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib
index b9afe24a..362296cf 100644
--- a/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,11 +72,12 @@ DQ
-
+
+
-
+
Gw
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,15 +101,17 @@ Gw
+
-
+
+
diff --git a/Sparkle/ja.lproj/SUUpdateAlert.xib b/Sparkle/ja.lproj/SUUpdateAlert.xib
index 675fd050..15d13fc4 100644
--- a/Sparkle/ja.lproj/SUUpdateAlert.xib
+++ b/Sparkle/ja.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib
index 0648c96b..afd45ef0 100644
--- a/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,12 +10,12 @@
-
+
-
+
@@ -28,11 +27,12 @@
-
+
+
-
+
DQ
@@ -42,11 +42,12 @@ DQ
-
+
+
-
+
Gw
@@ -58,8 +59,9 @@ Gw
+
-
+
@@ -67,6 +69,7 @@ Gw
+
@@ -79,9 +82,10 @@ Gw
+
-
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
匿名のシステムプロファイル情報は、今後我が社の企画開発を計画する上で参考にさせていただきます。この件に関してご質問があれば、ご連絡下さい。
@@ -154,22 +162,23 @@ Gw
-
+
-
+
+
-
+
-
+
@@ -185,7 +194,7 @@ Gw
-
+
@@ -200,18 +209,23 @@ Gw
+
+
+
+
+
diff --git a/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib
index 8797c38a..9532db6b 100644
--- a/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -94,8 +99,9 @@ Gw
-
+
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/ko.lproj/SUUpdateAlert.xib b/Sparkle/ko.lproj/SUUpdateAlert.xib
index 4cddbc2a..3e50f3ed 100644
--- a/Sparkle/ko.lproj/SUUpdateAlert.xib
+++ b/Sparkle/ko.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -106,6 +185,7 @@ Gw
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib
index 9c8d5110..43399cb2 100644
--- a/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,12 +10,12 @@
-
+
-
+
@@ -28,8 +27,9 @@
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -67,6 +69,7 @@ Gw
+
@@ -77,8 +80,9 @@ Gw
-
+
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -140,8 +147,9 @@ Gw
-
+
+
익명으로 보내지는 시스템 정보로 차후 프로그램 개발에 도움이 될 수 있습니다. 질문이 있으시면 연락 주십시오.
@@ -152,17 +160,18 @@ Gw
-
+
-
-
+
+
-
+
+
-
+
@@ -200,18 +209,23 @@ Gw
+
+
+
+
+
diff --git a/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib
index aa23477e..a13e0796 100644
--- a/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib
@@ -1,9 +1,7 @@
-
+
-
-
-
+
@@ -12,8 +10,8 @@
-
-
+
+
@@ -26,6 +24,7 @@
+
@@ -34,6 +33,7 @@
+
@@ -46,6 +46,7 @@
+
@@ -56,8 +57,9 @@
-
+
+
@@ -70,8 +72,9 @@ DQ
-
+
+
@@ -84,8 +87,9 @@ Gw
-
+
+
@@ -97,6 +101,7 @@ Gw
+
@@ -106,6 +111,7 @@ Gw
+
diff --git a/Sparkle/nb.lproj/SUUpdateAlert.xib b/Sparkle/nb.lproj/SUUpdateAlert.xib
index 46dc0feb..4998d82f 100644
--- a/Sparkle/nb.lproj/SUUpdateAlert.xib
+++ b/Sparkle/nb.lproj/SUUpdateAlert.xib
@@ -1,54 +1,57 @@
-
+
-
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -58,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -93,7 +170,8 @@ Gw
-
+
+
@@ -107,6 +185,7 @@ Gw
+
@@ -118,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -189,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib
index 54c7c1ac..40ca4e59 100644
--- a/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -16,7 +15,7 @@
-
+
@@ -28,8 +27,9 @@
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -67,6 +69,7 @@ Gw
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -108,6 +113,7 @@ Gw
+
@@ -122,7 +128,9 @@ Gw
+
+
@@ -142,6 +150,7 @@ Gw
+
Den anonyme systemprofilen hjelper oss med å planlegge fremtidig utviklingsarbeid. Ta gjerne kontakt med oss hvis du har spørsmål om dette.
@@ -153,15 +162,16 @@ Følgende innhold vil bli sendt:
-
+
-
+
-
+
+
-
+
@@ -199,18 +209,23 @@ Følgende innhold vil bli sendt:
+
+
+
+
+
diff --git a/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib
index cc4b4589..b49c3b88 100644
--- a/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/nl.lproj/SUUpdateAlert.xib b/Sparkle/nl.lproj/SUUpdateAlert.xib
index b730298f..e7a16211 100644
--- a/Sparkle/nl.lproj/SUUpdateAlert.xib
+++ b/Sparkle/nl.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,41 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
-
+
diff --git a/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib
index a8585c6a..1c796ca9 100644
--- a/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -65,8 +67,9 @@ Gw
-
+
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
Aan de hand van anonieme informatie over het systeemprofiel kunnen wij toekomstige ontwikkelingswerkzaamheden beter plannen. Neem contact met ons op als u hierover vragen hebt.
@@ -154,15 +162,16 @@ Dit is de informatie die wordt verzonden:
-
+
-
+
+
-
+
@@ -200,18 +209,23 @@ Dit is de informatie die wordt verzonden:
+
+
+
+
+
diff --git a/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib
index aa9cdc29..58876692 100644
--- a/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -94,8 +99,9 @@ Gw
-
+
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/pl.lproj/SUUpdateAlert.xib b/Sparkle/pl.lproj/SUUpdateAlert.xib
index 5836777d..b3b17766 100644
--- a/Sparkle/pl.lproj/SUUpdateAlert.xib
+++ b/Sparkle/pl.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,41 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
-
+
diff --git a/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib
index 667e888c..f0c8f3d5 100644
--- a/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -65,8 +67,9 @@ Gw
-
+
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.
@@ -154,15 +162,16 @@ This is the information that would be sent:
-
+
-
+
+
-
+
@@ -200,18 +209,23 @@ This is the information that would be sent:
+
+
+
+
+
diff --git a/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib
old mode 100755
new mode 100644
index b4f1bad6..a977ae12
--- a/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib
@@ -1,9 +1,7 @@
-
+
-
-
-
+
@@ -12,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -44,8 +44,9 @@
-
+
+
@@ -56,8 +57,9 @@
-
+
+
@@ -70,8 +72,9 @@ DQ
-
+
+
@@ -86,6 +89,7 @@ Gw
+
@@ -95,8 +99,9 @@ Gw
-
+
+
@@ -106,6 +111,7 @@ Gw
+
diff --git a/Sparkle/pt_BR.lproj/SUUpdateAlert.xib b/Sparkle/pt_BR.lproj/SUUpdateAlert.xib
index 0f71933f..7dbdb40a 100644
--- a/Sparkle/pt_BR.lproj/SUUpdateAlert.xib
+++ b/Sparkle/pt_BR.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -101,11 +180,12 @@ Gw
-
-
+
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,41 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
-
+
diff --git a/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib
index 4fd82b20..d216ce21 100644
--- a/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -65,8 +67,9 @@ Gw
-
+
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -140,8 +147,9 @@ Gw
-
+
+
As informações anônimas do sistema são usadas para nos ajudar a planejar o desenvolvimento futuro do aplicativo. Contate-nos caso tenha dúvidas sobre este procedimento.
@@ -154,15 +162,16 @@ As seguintes informações seriam enviadas:
-
+
-
+
-
+
+
-
+
@@ -171,7 +180,7 @@ As seguintes informações seriam enviadas:
-
+
@@ -187,7 +196,7 @@ As seguintes informações seriam enviadas:
-
+
@@ -200,18 +209,23 @@ As seguintes informações seriam enviadas:
+
+
+
+
+
diff --git a/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib
index 3aa21b7d..8e7ac5ce 100644
--- a/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -85,6 +89,7 @@ Gw
+
@@ -94,8 +99,9 @@ Gw
-
+
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/pt_PT.lproj/SUUpdateAlert.xib b/Sparkle/pt_PT.lproj/SUUpdateAlert.xib
index 865cdbf1..20127569 100644
--- a/Sparkle/pt_PT.lproj/SUUpdateAlert.xib
+++ b/Sparkle/pt_PT.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
+
-
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,40 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
+
diff --git a/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib
index 258fed2f..930a515d 100644
--- a/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib
@@ -1,9 +1,8 @@
-
+
-
-
-
+
+
@@ -11,25 +10,26 @@
-
+
-
+
-
+
-
+
-
+
+
@@ -42,8 +42,9 @@ DQ
-
+
+
@@ -58,6 +59,7 @@ Gw
+
@@ -67,6 +69,7 @@ Gw
+
@@ -79,6 +82,7 @@ Gw
+
@@ -100,6 +104,7 @@ Gw
+
@@ -107,7 +112,8 @@ Gw
-
+
+
@@ -122,6 +128,7 @@ Gw
+
@@ -142,6 +149,7 @@ Gw
+
A informação anónima do perfil de sistema é usada para no futuro nos ajudar a planear o trabalho de desenvolvimento. Por favor contacte-nos se tiver alguma questão acerca deste assunto.
@@ -154,22 +162,23 @@ Esta é a informação que seria enviada:
-
+
-
+
+
-
+
-
+
@@ -185,7 +194,7 @@ Esta é a informação que seria enviada:
-
+
@@ -200,18 +209,23 @@ Esta é a informação que seria enviada:
+
+
+
+
+
diff --git a/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib
index 82772f84..d1d545e6 100644
--- a/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,12 +10,12 @@
-
-
+
+
-
+
@@ -25,6 +24,7 @@
+
@@ -33,6 +33,7 @@
+
@@ -45,6 +46,7 @@
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/ro.lproj/SUUpdateAlert.xib b/Sparkle/ro.lproj/SUUpdateAlert.xib
index 3f652c77..c01f1e25 100644
--- a/Sparkle/ro.lproj/SUUpdateAlert.xib
+++ b/Sparkle/ro.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+
-
-
- NSNegateBoolean
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NSNegateBoolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -92,7 +170,8 @@ Gw
-
+
+
@@ -102,10 +181,11 @@ Gw
-
+
+
@@ -117,62 +197,13 @@ DQ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NSNegateBoolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -188,41 +219,39 @@ DQ
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
+
+
-
+
diff --git a/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib
index 21712d37..5318d3d4 100644
--- a/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib
+++ b/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib
@@ -1,8 +1,8 @@
-
+
-
-
+
+
@@ -15,20 +15,21 @@
-
-
+
+
-
+
-
+
+
@@ -41,8 +42,9 @@ DQ
-
+
+
@@ -55,8 +57,9 @@ Gw
-
+
+
@@ -66,6 +69,7 @@ Gw
+
@@ -78,6 +82,7 @@ Gw
+
@@ -99,6 +104,7 @@ Gw
+
@@ -107,6 +113,7 @@ Gw
+
@@ -121,6 +128,7 @@ Gw
+
@@ -141,6 +149,7 @@ Gw
+
Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.
@@ -153,15 +162,16 @@ This is the information that would be sent:
-
+
-
+
+
-
+
@@ -199,18 +209,23 @@ This is the information that would be sent:
+
+
+
+
+
diff --git a/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib
index 250e3344..2b364d86 100644
--- a/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib
+++ b/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib
@@ -1,8 +1,7 @@
-
+
-
-
+
@@ -11,28 +10,30 @@
-
-
+
+
-
-
+
+
-
+
+
-
+
+
@@ -43,8 +44,9 @@
-
+
+
@@ -55,8 +57,9 @@
-
+
+
@@ -69,8 +72,9 @@ DQ
-
+
+
@@ -83,8 +87,9 @@ Gw
-
+
+
@@ -96,6 +101,7 @@ Gw
+
@@ -105,6 +111,7 @@ Gw
+
diff --git a/Sparkle/ru.lproj/SUUpdateAlert.xib b/Sparkle/ru.lproj/SUUpdateAlert.xib
index 6f36ee82..1443e41d 100644
--- a/Sparkle/ru.lproj/SUUpdateAlert.xib
+++ b/Sparkle/ru.lproj/SUUpdateAlert.xib
@@ -1,53 +1,57 @@
-
+
-
-
-
+
+
+
-
+
+
+
-
+
-
-
+
+
-
+
-
+
+
-
-
+
+
+
@@ -57,29 +61,103 @@
-
-
+
+
-
+
+
-
-
+
+
+