diff --git a/.travis.yml b/.travis.yml index 90a7a5da..ffd8ae3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,12 @@ language: objective-c +before_install: + - brew update + - brew list pyenv || brew install pyenv + - eval "$(pyenv init -)" + - pyenv install 2.7.6 + - pyenv global 2.7.6 + - pyenv rehash + - pip install cpp-coveralls + - pyenv rehash script: make ci +after_success: coveralls --gcov-options '\-lp' diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 2d2c1fe1..b8e6a447 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -31,9 +31,10 @@ MACOSX_DEPLOYMENT_TARGET = 10.7 PRODUCT_NAME = ${TARGET_NAME} PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier} -GCC_PREPROCESSOR_DEFINITIONS = SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=$(SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) SPARKLE_AUTOMATED_DOWNGRADES=$(SPARKLE_AUTOMATED_DOWNGRADES) SPARKLE_APPEND_VERSION_NUMBER=$(SPARKLE_APPEND_VERSION_NUMBER) SPARKLE_BUNDLE_IDENTIFIER=\"$(SPARKLE_BUNDLE_IDENTIFIER)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" +GCC_PREPROCESSOR_DEFINITIONS_COMMON = SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=$(SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) SPARKLE_AUTOMATED_DOWNGRADES=$(SPARKLE_AUTOMATED_DOWNGRADES) SPARKLE_APPEND_VERSION_NUMBER=$(SPARKLE_APPEND_VERSION_NUMBER) SPARKLE_BUNDLE_IDENTIFIER=\"$(SPARKLE_BUNDLE_IDENTIFIER)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" CLANG_ENABLE_OBJC_ARC = YES +GCC_ENABLE_PASCAL_STRINGS = NO // Enable warnings CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES diff --git a/Configurations/ConfigCommonCoverage.xcconfig b/Configurations/ConfigCommonCoverage.xcconfig new file mode 100644 index 00000000..afa2360c --- /dev/null +++ b/Configurations/ConfigCommonCoverage.xcconfig @@ -0,0 +1,4 @@ +#include "ConfigCommonDebug.xcconfig" + +GCC_GENERATE_TEST_COVERAGE_FILES = YES +GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES diff --git a/Configurations/ConfigCommonDebug.xcconfig b/Configurations/ConfigCommonDebug.xcconfig index 53972350..824b79b3 100644 --- a/Configurations/ConfigCommonDebug.xcconfig +++ b/Configurations/ConfigCommonDebug.xcconfig @@ -6,7 +6,6 @@ GCC_OPTIMIZATION_LEVEL = 0 DEBUG_INFORMATION_FORMAT = dwarf ENABLE_TESTABILITY = YES GCC_GENERATE_DEBUGGING_SYMBOLS = YES -SPARKLE_EXTRA_DEBUG = -DDEBUG -OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG) +GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON) DEBUG=1 ONLY_ACTIVE_ARCH = YES COPY_PHASE_STRIP = NO diff --git a/Configurations/ConfigCommonRelease.xcconfig b/Configurations/ConfigCommonRelease.xcconfig index acffc466..0888aaff 100644 --- a/Configurations/ConfigCommonRelease.xcconfig +++ b/Configurations/ConfigCommonRelease.xcconfig @@ -5,6 +5,7 @@ GCC_OPTIMIZATION_LEVEL = s DEBUG_INFORMATION_FORMAT = dwarf-with-dsym GCC_GENERATE_DEBUGGING_SYMBOLS = YES +GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON) DEAD_CODE_STRIPPING = YES GCC_TREAT_WARNINGS_AS_ERRORS = NO GCC_WARN_UNINITIALIZED_AUTOS = YES diff --git a/Configurations/ConfigTestApp.xcconfig b/Configurations/ConfigTestApp.xcconfig index a0f18581..f34249fc 100644 --- a/Configurations/ConfigTestApp.xcconfig +++ b/Configurations/ConfigTestApp.xcconfig @@ -3,6 +3,5 @@ INFOPLIST_FILE = TestApplication/TestApplication-Info.plist WRAPPER_EXTENSION = app ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon -CLANG_ENABLE_OBJC_ARC = NO LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.SparkleTestApp diff --git a/Configurations/ConfigUnitTestCoverage.xcconfig b/Configurations/ConfigUnitTestCoverage.xcconfig new file mode 100644 index 00000000..67f13139 --- /dev/null +++ b/Configurations/ConfigUnitTestCoverage.xcconfig @@ -0,0 +1,2 @@ +GCC_GENERATE_TEST_COVERAGE_FILES = NO +GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO diff --git a/Makefile b/Makefile index f23423c2..0908eb99 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ test: ci: for i in {7..11} ; do \ if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \ - xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Debug test || exit 1 ; \ + ( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build test ) || exit 1 ; \ fi ; \ done diff --git a/README.markdown b/README.markdown index 929dd1e9..824729f7 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,4 @@ -# Sparkle [![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle) +# Sparkle [![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle) [![Coverage Status](https://coveralls.io/repos/sparkle-project/Sparkle/badge.svg?branch=master&service=github)](https://coveralls.io/github/sparkle-project/Sparkle?branch=master) An easy-to-use software update framework for Cocoa developers. diff --git a/Resources/SUModelTranslation.plist b/Resources/SUModelTranslation.plist index f00e01e5..35eb74c0 100644 --- a/Resources/SUModelTranslation.plist +++ b/Resources/SUModelTranslation.plist @@ -44,10 +44,10 @@ iMac (Core i5 or i7, 27 inch Late 2013) iMac14,3 iMac (Core i5 or i7, 21.5 inch Late 2013) - MacBookPro11,2 - MacBook Pro (Retina, 15-inch, Late 2013) - MacBookPro11,3 - MacBook Pro (Retina, 15-inch, Late 2013) + iMac14,4 + iMac (Core i5, 21.5 inch Mid 2014) + iMac15,1 + iMac (Retina 5K Core i5 or i7, 27 inch 2014 or 2015) MacBook1,1 MacBook (Core Duo) MacBook2,1 @@ -62,6 +62,8 @@ MacBook (Core 2 Duo, Late 2009, Unibody) MacBook7,1 MacBook (Core 2 Duo, Mid 2010, White) + MacBook8,1 + MacBook (Core M, 12 inch, Early 2015) MacBookAir1,1 MacBook Air (Core 2 Duo, 13 inch, Early 2008) MacBookAir2,1 @@ -82,6 +84,10 @@ MacBook Air (Core i5 or i7, 11 inch, Mid 2013 or Early 2014) MacBookAir6,2 MacBook Air (Core i5 or i7, 13 inch, Mid 2013 or Early 2014) + MacBookAir7,1 + MacBook Air (Core i5 or i7, 11 inch, Early 2015) + MacBookAir7,2 + MacBook Air (Core i5 or i7, 13 inch, Early 2015) MacBookPro1,1 MacBook Pro Core Duo (15-inch) MacBookPro1,2 @@ -128,6 +134,10 @@ MacBook Pro (Retina, 13-inch, Late 2012) MacBookPro11,1 MacBook Pro (Retina, 13-inch, Late 2013) + MacBookPro11,2 + MacBook Pro (Retina, 15-inch, Late 2013) + MacBookPro11,3 + MacBook Pro (Retina, 15-inch, Late 2013) MacbookPro11,4 MacBook Pro (Retina, 15-inch, Mid 2015) MacbookPro11,5 @@ -141,7 +151,19 @@ Macmini3,1 Mac mini Intel Core Macmini4,1 - Mac mini Intel Core (mid 2010) + Mac mini Intel Core (Mid 2010) + Macmini5,1 + Mac mini (Core i5, Mid 2011) + Macmini5,2 + Mac mini (Core i5 or Core i7, Mid 2011) + Macmini5,3 + Mac mini (Core i7, Server, Mid 2011) + Macmini6,1 + Mac mini (Core i5, Late 2012) + Macmini6,2 + Mac mini (Core i7, Normal or Server, Late 2012) + Macmini7,1 + Mac mini (Core i5 or Core i7, Late 2014) MacPro1,1,Quad Mac Pro MacPro1,1 @@ -153,7 +175,9 @@ MacPro4,1 Mac Pro (March 2009) MacPro5,1 - Mac Pro (August 2010) + Mac Pro (2010 or 2012) + MacPro6,1 + Mac Pro (Late 2013) PowerBook1,1 PowerBook G3 PowerBook2,1 @@ -216,14 +240,6 @@ Power Macintosh G3 (Blue & White) PowerMac1,2 Power Macintosh G4 (PCI Graphics) - PowerMac10,1 - Mac Mini G4 - PowerMac10,2 - Mac Mini (Late 2005) - PowerMac11,2 - Power Macintosh G5 (Late 2005) - PowerMac12,1 - iMac G5 (iSight) PowerMac2,1 iMac G3 (Slot-loading CD-ROM) PowerMac2,2 @@ -268,6 +284,14 @@ iMac G5 (Ambient Light Sensor) PowerMac9,1 Power Macintosh G5 (Late 2005) + PowerMac10,1 + Mac Mini G4 + PowerMac10,2 + Mac Mini (Late 2005) + PowerMac11,2 + Power Macintosh G5 (Late 2005) + PowerMac12,1 + iMac G5 (iSight) RackMac1,1 Xserve G4 RackMac1,2 diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index a3a2b8c4..bb597d60 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -175,6 +175,12 @@ 7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; 7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; 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 */; }; + 72E45CF81B640DAE005C701A /* SUUpdateSettingsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */; }; + 72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFB1B641961005C701A /* sparkletestcast.xml */; }; + 72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */; }; + 72E45DDD1B65C3BD005C701A /* sign_update in Resources */ = {isa = PBXBuildFile; fileRef = 72E45DDC1B65C3BD005C701A /* sign_update */; }; 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 */; }; @@ -347,6 +353,8 @@ 14950074195FDF5900BC5B5B /* SUUpdaterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdaterTest.m; sourceTree = ""; usesTabs = 0; }; 14958C6B19AEBC530061B14F /* signed-test-file.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "signed-test-file.txt"; sourceTree = ""; }; 14958C6C19AEBC610061B14F /* test-pubkey.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "test-pubkey.pem"; sourceTree = ""; }; + 149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigCommonCoverage.xcconfig; sourceTree = ""; }; + 149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUnitTestCoverage.xcconfig; sourceTree = ""; }; 3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUVersionDisplayProtocol.h; sourceTree = ""; }; 4607BEA21948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Sparkle.strings; sourceTree = ""; }; 4607BEA31948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nb; path = nb.lproj/SUAutomaticUpdateAlert.xib; sourceTree = ""; }; @@ -558,6 +566,14 @@ 7268AC641AD634E400C3E0C1 /* SUBinaryDeltaCreate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBinaryDeltaCreate.h; 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 = ""; }; + 72E45CF11B640CDD005C701A /* SUTestApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTestApplicationDelegate.h; sourceTree = ""; }; + 72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTestApplicationDelegate.m; sourceTree = ""; }; + 72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateSettingsWindowController.h; sourceTree = ""; }; + 72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateSettingsWindowController.m; sourceTree = ""; }; + 72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SUUpdateSettingsWindowController.xib; sourceTree = ""; }; + 72E45CFB1B641961005C701A /* sparkletestcast.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = sparkletestcast.xml; sourceTree = ""; }; + 72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test_app_only_dsa_priv_dont_ever_do_this_for_real.pem; sourceTree = ""; }; + 72E45DDC1B65C3BD005C701A /* sign_update */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = sign_update; path = bin/sign_update; sourceTree = SOURCE_ROOT; }; 767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUGuidedPackageInstaller.h; sourceTree = ""; }; 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 = ""; }; @@ -930,9 +946,17 @@ 61B5F91D09C4CF7F00B25A18 /* Test Application */ = { isa = PBXGroup; children = ( + 72E45DDC1B65C3BD005C701A /* sign_update */, 61B5F92A09C4CFD800B25A18 /* InfoPlist.strings */, 61B5F92409C4CFC900B25A18 /* main.m */, + 72E45CF11B640CDD005C701A /* SUTestApplicationDelegate.h */, + 72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */, + 72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */, + 72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.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 */, ); @@ -992,6 +1016,7 @@ 5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */, 5D06E8F30FD68D21005AE3F6 /* ConfigBinaryDeltaRelease.xcconfig */, FA1941D00D94A70100DD942E /* ConfigCommon.xcconfig */, + 149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */, FA1941CF0D94A70100DD942E /* ConfigCommonDebug.xcconfig */, FA1941CC0D94A70100DD942E /* ConfigCommonRelease.xcconfig */, FA1941D10D94A70100DD942E /* ConfigFramework.xcconfig */, @@ -1004,6 +1029,7 @@ FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */, FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */, FA3AAF3B1050B273004B3130 /* ConfigUnitTest.xcconfig */, + 149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */, FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */, FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */, 14732BC91960F70A00593899 /* make-release-package.sh */, @@ -1308,7 +1334,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 */, + 72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1452,6 +1482,8 @@ buildActionMask = 2147483647; files = ( 61B5F93009C4CFDC00B25A18 /* main.m in Sources */, + 72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */, + 72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1762,6 +1794,66 @@ }; name = Release; }; + 149B785A1B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */; + buildSettings = { + }; + name = Coverage; + }; + 149B785B1B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */; + buildSettings = { + }; + name = Coverage; + }; + 149B785C1B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */; + buildSettings = { + }; + name = Coverage; + }; + 149B785D1B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */; + buildSettings = { + }; + name = Coverage; + }; + 149B785E1B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */; + buildSettings = { + }; + name = Coverage; + }; + 149B785F1B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */; + buildSettings = { + }; + name = Coverage; + }; + 149B78601B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Coverage; + }; + 149B78611B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Coverage; + }; + 149B78621B7D398100D7D62C /* Coverage */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Coverage; + }; 1DEB91AE08733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */; @@ -1853,6 +1945,7 @@ isa = XCConfigurationList; buildConfigurations = ( 1420DF4B1962329200203BB0 /* Debug */, + 149B78611B7D398100D7D62C /* Coverage */, 1420DF4C1962329200203BB0 /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1862,6 +1955,7 @@ isa = XCConfigurationList; buildConfigurations = ( 14732BC71960F69300593899 /* Debug */, + 149B78601B7D398100D7D62C /* Coverage */, 14732BC81960F69300593899 /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1871,6 +1965,7 @@ isa = XCConfigurationList; buildConfigurations = ( 14950061195FB89500BC5B5B /* Debug */, + 149B78621B7D398100D7D62C /* Coverage */, 14950062195FB89500BC5B5B /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1880,6 +1975,7 @@ isa = XCConfigurationList; buildConfigurations = ( 1DEB91AE08733DA50010E9CD /* Debug */, + 149B785B1B7D398100D7D62C /* Coverage */, 1DEB91AF08733DA50010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1889,6 +1985,7 @@ isa = XCConfigurationList; buildConfigurations = ( 1DEB91B208733DA50010E9CD /* Debug */, + 149B785A1B7D398100D7D62C /* Coverage */, 1DEB91B308733DA50010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1898,6 +1995,7 @@ isa = XCConfigurationList; buildConfigurations = ( 55C14BBB136EEF1500649790 /* Debug */, + 149B785F1B7D398100D7D62C /* Coverage */, 55C14BBC136EEF1500649790 /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1907,6 +2005,7 @@ isa = XCConfigurationList; buildConfigurations = ( 5D06E8D20FD68C7D005AE3F6 /* Debug */, + 149B785E1B7D398100D7D62C /* Coverage */, 5D06E8D30FD68C7D005AE3F6 /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1916,6 +2015,7 @@ isa = XCConfigurationList; buildConfigurations = ( 612279DB0DB5470300AB99EA /* Debug */, + 149B785D1B7D398100D7D62C /* Coverage */, 612279DC0DB5470300AB99EA /* Release */, ); defaultConfigurationIsVisible = 0; @@ -1925,6 +2025,7 @@ isa = XCConfigurationList; buildConfigurations = ( 61B5F90609C4CEE300B25A18 /* Debug */, + 149B785C1B7D398100D7D62C /* Coverage */, 61B5F90709C4CEE300B25A18 /* Release */, ); defaultConfigurationIsVisible = 0; diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index f7a97388..f913a7aa 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -7,11 +7,6 @@ #include -/*! - * If the Installation takes longer than this time the Application Icon is shown in the Dock so that the user has some feedback. - */ -static const NSTimeInterval SUInstallationTimeLimit = 5; - /*! * Time this app uses to recheck if the parent has already died. */ @@ -19,149 +14,148 @@ static const NSTimeInterval SUParentQuitCheckInterval = .25; @interface TerminationListener : NSObject -@property (copy) NSString *hostpath; -@property (copy) NSString *executablepath; -@property (assign) pid_t parentprocessid; -@property (copy) NSString *folderpath; +- (instancetype)initWithProcessId:(pid_t)pid; -@property (copy) NSString *selfPath; -@property (copy) NSString *installationPath; -@property (strong) NSTimer *watchdogTimer; -@property (strong) NSTimer *longInstallationTimer; -@property (strong) SUHost *host; -@property (assign) BOOL shouldRelaunch; -@property (assign) BOOL shouldShowUI; -@property (strong) SUStatusController *statusController; +@end -- (void)parentHasQuit; +@interface TerminationListener () -- (void)relaunch; -- (void)install; - -- (void)showAppIconInDock:(NSTimer *)aTimer; -- (void)watchdog:(NSTimer *)aTimer; +@property (nonatomic, assign) pid_t processIdentifier; +@property (nonatomic, strong) NSTimer *watchdogTimer; @end @implementation TerminationListener -@synthesize hostpath; -@synthesize executablepath; -@synthesize parentprocessid; -@synthesize folderpath; +@synthesize processIdentifier = _processIdentifier; +@synthesize watchdogTimer = _watchdogTimer; -@synthesize selfPath; -@synthesize installationPath; -@synthesize watchdogTimer; -@synthesize longInstallationTimer; -@synthesize host; -@synthesize shouldRelaunch; -@synthesize shouldShowUI; -@synthesize statusController; - -- (instancetype)initWithHostPath:(NSString *)inhostpath executablePath:(NSString *)execpath parentProcessId:(pid_t)ppid folderPath:(NSString *)infolderpath shouldRelaunch:(BOOL)relaunch shouldShowUI:(BOOL)showUI selfPath:(NSString *)inSelfPath +- (instancetype)initWithProcessId:(pid_t)pid { if (!(self = [super init])) { return nil; } - self.hostpath = inhostpath; - self.executablepath = execpath; - self.parentprocessid = ppid; - self.folderpath = infolderpath; - self.selfPath = inSelfPath; - self.shouldRelaunch = relaunch; - self.shouldShowUI = showUI; - - BOOL alreadyTerminated = (getppid() == 1); // ppid is launchd (1) => parent terminated already - - if (alreadyTerminated) - [self parentHasQuit]; - else - self.watchdogTimer = [NSTimer scheduledTimerWithTimeInterval:SUParentQuitCheckInterval target:self selector:@selector(watchdog:) userInfo:nil repeats:YES]; + self.processIdentifier = pid; return self; } - -- (void)dealloc -{ - [self.longInstallationTimer invalidate]; - [self.statusController close]; -} - - -- (void)parentHasQuit +- (void)cleanupWithCompletion:(void (^)(void))completionBlock { [self.watchdogTimer invalidate]; - self.longInstallationTimer = [NSTimer scheduledTimerWithTimeInterval:SUInstallationTimeLimit - target: self selector: @selector(showAppIconInDock:) - userInfo:nil repeats:NO]; + completionBlock(); + completionBlock = nil; +} - if (self.folderpath) - [self install]; +- (void)startListeningWithCompletion:(void (^)(void))completionBlock +{ + BOOL alreadyTerminated = (getppid() == 1); // ppid is launchd (1) => parent terminated already + if (alreadyTerminated) + [self cleanupWithCompletion:completionBlock]; else - [self relaunch]; + self.watchdogTimer = [NSTimer scheduledTimerWithTimeInterval:SUParentQuitCheckInterval target:self selector:@selector(watchdog:) userInfo:completionBlock repeats:YES]; } -- (void)watchdog:(NSTimer *)__unused aTimer +- (void)watchdog:(NSTimer *)timer { - if (![NSRunningApplication runningApplicationWithProcessIdentifier:self.parentprocessid]) { - [self parentHasQuit]; + if (![NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier]) { + [self cleanupWithCompletion:timer.userInfo]; } } -- (void)showAppIconInDock:(NSTimer *)__unused aTimer +@end + +/*! + * If the Installation takes longer than this time the Application Icon is shown in the Dock so that the user has some feedback. + */ +static const NSTimeInterval SUInstallationTimeLimit = 5; + +@interface AppInstaller : NSObject + +/* + * hostPath - path to host (original) application + * relaunchPath - path to what the host wants to relaunch (default is same as hostPath) + * parentProcessId - process identifier of the host before launching us + * updateFolderPath - path to update folder (i.e, temporary directory containing the new update) + * shouldRelaunch - indicates if the new installed app should re-launched + * shouldShowUI - indicates if we should show the status window when installing the update + */ +- (instancetype)initWithHostPath:(NSString *)hostPath relaunchPath:(NSString *)relaunchPath parentProcessId:(pid_t)parentProcessId updateFolderPath:(NSString *)updateFolderPath shouldRelaunch:(BOOL)shouldRelaunch shouldShowUI:(BOOL)shouldShowUI; + +@end + +@interface AppInstaller () + +@property (nonatomic, strong) TerminationListener *terminationListener; +@property (nonatomic, strong) SUStatusController *statusController; + +@property (nonatomic, copy) NSString *updateFolderPath; +@property (nonatomic, copy) NSString *hostPath; +@property (nonatomic, copy) NSString *relaunchPath; +@property (nonatomic, assign) BOOL shouldRelaunch; +@property (nonatomic, assign) BOOL shouldShowUI; + +@end + +@implementation AppInstaller + +@synthesize terminationListener = _terminationListener; +@synthesize statusController = _statusController; +@synthesize updateFolderPath = _updateFolderPath; +@synthesize hostPath = _hostPath; +@synthesize relaunchPath = _relaunchPath; +@synthesize shouldRelaunch = _shouldRelaunch; +@synthesize shouldShowUI = _shouldShowUI; + +- (instancetype)initWithHostPath:(NSString *)hostPath relaunchPath:(NSString *)relaunchPath parentProcessId:(pid_t)parentProcessId updateFolderPath:(NSString *)updateFolderPath shouldRelaunch:(BOOL)shouldRelaunch shouldShowUI:(BOOL)shouldShowUI { - ProcessSerialNumber psn = { 0, kCurrentProcess }; - TransformProcessType(&psn, kProcessTransformToForegroundApplication); + if (!(self = [super init])) { + return nil; + } + + self.hostPath = hostPath; + self.relaunchPath = relaunchPath; + self.terminationListener = [[TerminationListener alloc] initWithProcessId:parentProcessId]; + self.updateFolderPath = updateFolderPath; + self.shouldRelaunch = shouldRelaunch; + self.shouldShowUI = shouldShowUI; + + return self; } - -- (void)relaunch __attribute__((noreturn)) +- (void)applicationDidFinishLaunching:(NSNotification __unused *)notification { - if (self.shouldRelaunch) - { - NSString *appPath = nil; - if (!self.folderpath || ![self.executablepath isEqualToString:self.hostpath]) - appPath = self.executablepath; - else - appPath = self.installationPath; - [[NSWorkspace sharedWorkspace] openFile:appPath]; - } - - if (self.folderpath) - { - NSError *theError = nil; - if (![[NSFileManager defaultManager] removeItemAtPath:[SUInstaller updateFolder] error:&theError]) - SULog(@"Couldn't remove update folder: %@.", theError); - } - [[NSFileManager defaultManager] removeItemAtPath:self.selfPath error:NULL]; - - exit(EXIT_SUCCESS); + [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); + }); + + [self install]; + }]; } - - (void)install { - NSBundle *theBundle = [NSBundle bundleWithPath:self.hostpath]; - self.host = [[SUHost alloc] initWithBundle:theBundle]; - self.installationPath = [[self.host installationPath] copy]; - + NSBundle *theBundle = [NSBundle bundleWithPath:self.hostPath]; + SUHost *host = [[SUHost alloc] initWithBundle:theBundle]; + NSString *installationPath = [[host installationPath] copy]; + if (self.shouldShowUI) { - SUStatusController *statusCtl = [[SUStatusController alloc] initWithHost:self.host]; // We quit anyway after we've installed, so leak this for now. - [statusCtl setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO]; - [statusCtl beginActionWithTitle:SULocalizedString(@"Installing update...", @"") - maxProgressValue: 0 statusText: @""]; - [statusCtl showWindow:self]; - - [self.statusController close]; // If there's an existing status controller, close it before we release our strong reference to it. - self.statusController = statusCtl; // Keep a strong reference to the status controller, or else it might get prematurely deallocated. + 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: @""]; + [self.statusController showWindow:self]; } - - [SUInstaller installFromUpdateFolder:self.folderpath - overHost:self.host - installationPath:self.installationPath + + [SUInstaller installFromUpdateFolder:self.updateFolderPath + overHost:host + installationPath:installationPath versionComparator:[SUStandardVersionComparator defaultComparator] completionHandler:^(NSError *error) { if (error) { @@ -173,11 +167,36 @@ static const NSTimeInterval SUParentQuitCheckInterval = .25; } exit(EXIT_FAILURE); } else { - [self relaunch]; + NSString *pathToRelaunch = nil; + // If the installation path differs from the host path, we give higher precedence for it than + // if the desired relaunch path differs from the host path + if (![installationPath.pathComponents isEqualToArray:self.hostPath.pathComponents] || [self.relaunchPath.pathComponents isEqualToArray:self.hostPath.pathComponents]) { + pathToRelaunch = installationPath; + } else { + pathToRelaunch = self.relaunchPath; + } + [self cleanupAndTerminateWithPathToRelaunch:pathToRelaunch]; } }]; } +- (void)cleanupAndTerminateWithPathToRelaunch:(NSString *)relaunchPath __attribute__((noreturn)) +{ + if (self.shouldRelaunch) { + if (![[NSWorkspace sharedWorkspace] openFile:relaunchPath]) { + SULog(@"Failed to launch %@", relaunchPath); + } + } + + 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); +} + @end int main(int __unused argc, const char __unused *argv[]) @@ -188,24 +207,22 @@ int main(int __unused argc, const char __unused *argv[]) if (args.count < 5 || args.count > 7) { return EXIT_FAILURE; } + + NSApplication *application = [NSApplication sharedApplication]; BOOL shouldShowUI = (args.count > 6) ? [args[6] boolValue] : YES; if (shouldShowUI) { - [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; + [application activateIgnoringOtherApps:YES]; } - - [NSApplication sharedApplication]; - TerminationListener *termListen = [[TerminationListener alloc] initWithHostPath:args[1] - executablePath:args[2] - parentProcessId:[args[3] intValue] - folderPath:args[4] - shouldRelaunch:(args.count > 5) ? [args[5] boolValue] : YES - shouldShowUI:shouldShowUI - selfPath:[[NSBundle mainBundle] bundlePath]]; - - [[NSApplication sharedApplication] run]; - // Ensure termListen is not deallocated by ARC before caling -[NSApplication run] - [termListen class]; + + AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:args[1] + relaunchPath:args[2] + parentProcessId:[args[3] intValue] + updateFolderPath:args[4] + shouldRelaunch:(args.count > 5) ? [args[5] boolValue] : YES + shouldShowUI:shouldShowUI]; + [application setDelegate:appInstaller]; + [application run]; } return EXIT_SUCCESS; diff --git a/Sparkle/SUHost.h b/Sparkle/SUHost.h index 92925e7d..3bf0a8e5 100644 --- a/Sparkle/SUHost.h +++ b/Sparkle/SUHost.h @@ -11,10 +11,19 @@ #import "SUAppcastItem.h" #import "SUVersionComparisonProtocol.h" +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000 +typedef struct { + NSInteger majorVersion; + NSInteger minorVersion; + NSInteger patchVersion; +} NSOperatingSystemVersion; +#endif + @interface SUHost : NSObject @property (strong, readonly) NSBundle *bundle; ++ (NSOperatingSystemVersion)operatingSystemVersion; + (NSString *)systemVersionString; - (instancetype)initWithBundle:(NSBundle *)aBundle; diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index ea5cf66b..5bb73ac9 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -13,11 +13,6 @@ #import "SULog.h" #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000 -typedef struct { - NSInteger majorVersion; - NSInteger minorVersion; - NSInteger patchVersion; -} NSOperatingSystemVersion; @interface NSProcessInfo () - (NSOperatingSystemVersion)operatingSystemVersion; @end @@ -94,7 +89,8 @@ typedef struct { if (SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) { // We'll install to "#{CFBundleName}.app", but only if that path doesn't already exist. If we're "Foo 4.2.app," and there's a "Foo.app" in this directory, we don't want to overwrite it! But if there's no "Foo.app," we'll take that name. NSString *normalizedAppPath = [[[self.bundle bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", [self.bundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey], [[self.bundle bundlePath] pathExtension]]]; - if (![[NSFileManager defaultManager] fileExistsAtPath:[[[self.bundle bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", [self.bundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey], [[self.bundle bundlePath] pathExtension]]]]) { + + if (![[NSFileManager defaultManager] fileExistsAtPath:normalizedAppPath]) { return normalizedAppPath; } } @@ -162,7 +158,7 @@ typedef struct { { struct statfs statfs_info; statfs([[self.bundle bundlePath] fileSystemRepresentation], &statfs_info); - return (statfs_info.f_flags & MNT_RDONLY); + return (statfs_info.f_flags & MNT_RDONLY) != 0; } - (BOOL)isBackgroundApplication @@ -276,7 +272,7 @@ typedef struct { return [self objectForUserDefaultsKey:key] ? [self boolForUserDefaultsKey:key] : [self boolForInfoDictionaryKey:key]; } -+ (NSString *)systemVersionString ++ (NSOperatingSystemVersion)operatingSystemVersion { #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1090 // Present in 10.9 despite NS_AVAILABLE's claims #pragma clang diagnostic push @@ -285,11 +281,21 @@ typedef struct { 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]; - return [NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"]; + 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 - NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; + 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]; } diff --git a/Sparkle/SUInstaller.h b/Sparkle/SUInstaller.h index 153f3d42..4afe1cbe 100644 --- a/Sparkle/SUInstaller.h +++ b/Sparkle/SUInstaller.h @@ -18,7 +18,6 @@ + (NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr; + (void)installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath versionComparator:(id)comparator completionHandler:(void (^)(NSError *))completionHandler; + (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result error:(NSError *)error completionHandler:(void (^)(NSError *))completionHandler; -+ (NSString *)updateFolder; @end diff --git a/Sparkle/SUInstaller.m b/Sparkle/SUInstaller.m index 658e4e0d..400f9597 100644 --- a/Sparkle/SUInstaller.m +++ b/Sparkle/SUInstaller.m @@ -16,30 +16,13 @@ @implementation SUInstaller -static NSString *sUpdateFolder = nil; - -+ (NSString *)updateFolder -{ - return sUpdateFolder; -} - + (BOOL)isAliasFolderAtPath:(NSString *)path { - FSRef fileRef; - OSStatus err = noErr; - Boolean aliasFileFlag = false, folderFlag = false; - NSURL *fileURL = [NSURL fileURLWithPath:path]; - - if (FALSE == CFURLGetFSRef((CFURLRef)fileURL, &fileRef)) - err = coreFoundationUnknownErr; - - if (noErr == err) - err = FSIsAliasFile(&fileRef, &aliasFileFlag, &folderFlag); - - if (noErr == err) - return !!(aliasFileFlag && folderFlag); - else - return NO; + NSNumber *aliasFlag = nil; + [[NSURL fileURLWithPath:path] getResourceValue:&aliasFlag forKey:NSURLIsAliasFileKey error:nil]; + NSNumber *directoryFlag = nil; + [[NSURL fileURLWithPath:path] getResourceValue:&directoryFlag forKey:NSURLIsDirectoryKey error:nil]; + return aliasFlag.boolValue && directoryFlag.boolValue; } + (NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr @@ -58,8 +41,6 @@ static NSString *sUpdateFolder = nil; NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:inUpdateFolder]; NSString *bundleFileNameNoExtension = [bundleFileName stringByDeletingPathExtension]; - sUpdateFolder = inUpdateFolder; - while ((currentFile = [dirEnum nextObject])) { NSString *currentPath = [inUpdateFolder stringByAppendingPathComponent:currentFile]; NSString *currentFilename = [currentFile lastPathComponent]; diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 9a3524c4..869dc0de 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -128,9 +128,7 @@ - (NSString *)localizedStringFromByteCount:(long long)value { - SInt32 minor = 0; - Gestalt(gestaltSystemVersionMinor, &minor); - if (minor < 8) { + if (SUHost.operatingSystemVersion.minorVersion < 8) { if (value < 1000) { return [NSString stringWithFormat:@"%.0lf %@", value / 1.0, SULocalizedString(@"B", @"the unit for bytes")]; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 6338956d..eddfa5ad 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -38,6 +38,7 @@ @property (weak) IBOutlet WebView *releaseNotesView; @property (weak) IBOutlet NSView *releaseNotesContainerView; @property (weak) IBOutlet NSTextField *descriptionField; +@property (weak) IBOutlet NSButton *automaticallyInstallUpdatesButton; @property (weak) IBOutlet NSButton *installButton; @property (weak) IBOutlet NSButton *skipButton; @property (weak) IBOutlet NSButton *laterButton; @@ -58,6 +59,7 @@ @synthesize releaseNotesView; @synthesize releaseNotesContainerView; @synthesize descriptionField; +@synthesize automaticallyInstallUpdatesButton; @synthesize installButton; @synthesize skipButton; @synthesize laterButton; @@ -194,11 +196,13 @@ if (showReleaseNotes) { [self displayReleaseNotes]; } else { + NSLayoutConstraint *automaticallyInstallUpdatesButtonToDescriptionFieldConstraint = [NSLayoutConstraint constraintWithItem:self.automaticallyInstallUpdatesButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.descriptionField attribute:NSLayoutAttributeBottom multiplier:1.0 constant:8.0]; + + [self.window.contentView addConstraint:automaticallyInstallUpdatesButtonToDescriptionFieldConstraint]; + [self.releaseNotesContainerView removeFromSuperview]; } - [self.window.contentView setNeedsLayout:YES]; // Prod autolayout to place everything - [self.window center]; } diff --git a/Sparkle/en.lproj/SUUpdateAlert.xib b/Sparkle/en.lproj/SUUpdateAlert.xib index c1178be9..1451769a 100644 --- a/Sparkle/en.lproj/SUUpdateAlert.xib +++ b/Sparkle/en.lproj/SUUpdateAlert.xib @@ -1,16 +1,17 @@ - + - + - - + + + @@ -21,12 +22,12 @@ - + - - + + @@ -75,16 +76,16 @@ - + - + - + - + @@ -117,7 +118,7 @@ - + @@ -161,7 +162,7 @@ Gw - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - + - + - - - - - + @@ -153,7 +57,7 @@ - + @@ -338,7 +242,7 @@ - + @@ -348,7 +252,6 @@ - - + diff --git a/TestApplication/SUTestApplicationDelegate.h b/TestApplication/SUTestApplicationDelegate.h new file mode 100644 index 00000000..cbe0710c --- /dev/null +++ b/TestApplication/SUTestApplicationDelegate.h @@ -0,0 +1,13 @@ +// +// SUTestApplicationDelegate.h +// Sparkle +// +// Created by Mayur Pawashe on 7/25/15. +// Copyright (c) 2015 Sparkle Project. All rights reserved. +// + +#import + +@interface SUTestApplicationDelegate : NSObject + +@end diff --git a/TestApplication/SUTestApplicationDelegate.m b/TestApplication/SUTestApplicationDelegate.m new file mode 100644 index 00000000..8b0f1d55 --- /dev/null +++ b/TestApplication/SUTestApplicationDelegate.m @@ -0,0 +1,190 @@ +// +// SUTestApplicationDelegate.m +// Sparkle +// +// Created by Mayur Pawashe on 7/25/15. +// Copyright (c) 2015 Sparkle Project. All rights reserved. +// + +#import "SUTestApplicationDelegate.h" +#import "SUUpdateSettingsWindowController.h" + +@interface SUTestApplicationDelegate () + +@property (nonatomic) SUUpdateSettingsWindowController *updateSettingsWindowController; +@property (nonatomic) NSTask *serverTask; + +@end + +@implementation SUTestApplicationDelegate + +@synthesize updateSettingsWindowController = _updateSettingsWindowController; +@synthesize serverTask = _serverTask; + +static NSString * const UPDATED_VERSION = @"2.0"; + +- (void)applicationDidFinishLaunching:(NSNotification * __unused)notification +{ + NSBundle *mainBundle = [NSBundle mainBundle]; + + // Check if we are already up to date + if ([[mainBundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] isEqualToString:UPDATED_VERSION]) { + NSAlert *alreadyUpdatedAlert = [[NSAlert alloc] init]; + alreadyUpdatedAlert.messageText = @"Update succeeded!"; + alreadyUpdatedAlert.informativeText = @"This is the updated version of Sparkle Test App.\n\nDelete and rebuild the app to test updates again."; + [alreadyUpdatedAlert runModal]; + + [[NSApplication sharedApplication] terminate:nil]; + } + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + // Locate user's cache directory + NSError *cacheError = nil; + NSURL *cacheDirectoryURL = [fileManager URLForDirectory:NSCachesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:&cacheError]; + + if (cacheDirectoryURL == nil) { + NSLog(@"Failed to locate cache directory with error: %@", cacheError); + assert(NO); + } + + NSString *bundleIdentifier = mainBundle.bundleIdentifier; + assert(bundleIdentifier != nil); + + // Create a directory that'll be used for our web server listing + NSURL *serverDirectoryURL = [cacheDirectoryURL URLByAppendingPathComponent:bundleIdentifier]; + if ([fileManager fileExistsAtPath:serverDirectoryURL.path]) { + NSError *removeServerDirectoryError = nil; + + if (![fileManager removeItemAtURL:serverDirectoryURL error:&removeServerDirectoryError]) { + assert(NO); + } + } + + NSError *createDirectoryError = nil; + if (![fileManager createDirectoryAtURL:serverDirectoryURL withIntermediateDirectories:YES attributes:nil error:&createDirectoryError]) { + NSLog(@"Failed creating directory at %@ with error %@", serverDirectoryURL.path, createDirectoryError); + assert(NO); + } + + NSURL *bundleURL = mainBundle.bundleURL; + assert(bundleURL != nil); + + // Copy main bundle into server directory + NSURL *destinationBundleURL = [serverDirectoryURL URLByAppendingPathComponent:bundleURL.lastPathComponent]; + NSError *copyBundleError = nil; + if (![fileManager copyItemAtURL:bundleURL toURL:destinationBundleURL error:©BundleError]) { + NSLog(@"Failed to copy main bundle into server directory with error %@", copyBundleError); + assert(NO); + } + + // Update bundle's version keys to latest version + NSURL *infoURL = [[destinationBundleURL URLByAppendingPathComponent:@"Contents"] URLByAppendingPathComponent:@"Info.plist"]; + + BOOL infoFileExists = [fileManager fileExistsAtPath:infoURL.path]; + assert(infoFileExists); + + NSMutableDictionary *infoDictionary = [[NSMutableDictionary alloc] initWithContentsOfURL:infoURL]; + infoDictionary[(NSString *)kCFBundleVersionKey] = UPDATED_VERSION; + infoDictionary[@"CFBundleShortVersionString"] = UPDATED_VERSION; + + BOOL wroteInfoFile = [infoDictionary writeToURL:infoURL atomically:NO]; + assert(wroteInfoFile); + + // Change current working directory so web server knows where to list files + BOOL changedCurrentWorkingDirectory = [fileManager changeCurrentDirectoryPath:serverDirectoryURL.path]; + assert(changedCurrentWorkingDirectory); + + // Create the archive for our update + NSString *zipName = @"Sparkle_Test_App.zip"; + NSTask *dittoTask = [[NSTask alloc] init]; + dittoTask.launchPath = @"/usr/bin/ditto"; + dittoTask.arguments = @[@"-c", @"-k", @"--sequesterRsrc", @"--keepParent", destinationBundleURL.lastPathComponent, zipName]; + [dittoTask launch]; + [dittoTask waitUntilExit]; + + assert(dittoTask.terminationStatus == 0); + + [[NSFileManager defaultManager] removeItemAtURL:destinationBundleURL error:NULL]; + + // Don't ever do this at home, kids (seriously) + // (that is, including the private key inside of your application) + NSString *privateKeyPath = [mainBundle pathForResource:@"test_app_only_dsa_priv_dont_ever_do_this_for_real" ofType:@"pem"]; + assert(privateKeyPath != nil); + + // Sign our update + NSTask *signUpdateTask = [[NSTask alloc] init]; + NSString *signUpdatePath = [mainBundle pathForResource:@"sign_update" ofType:@""]; + assert(signUpdatePath != nil); + signUpdateTask.launchPath = signUpdatePath; + + NSURL *archiveURL = [serverDirectoryURL URLByAppendingPathComponent:zipName]; + signUpdateTask.arguments = @[archiveURL, privateKeyPath]; + + NSPipe *outputPipe = [NSPipe pipe]; + signUpdateTask.standardOutput = outputPipe; + + [signUpdateTask launch]; + [signUpdateTask waitUntilExit]; + + assert(signUpdateTask.terminationStatus == 0); + + NSData *signatureData = [outputPipe.fileHandleForReading readDataToEndOfFile]; + NSString *signature = [[[NSString alloc] initWithData:signatureData encoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + + assert(signature != nil); + + // Obtain the file attributes to get the file size of our update later + NSError *fileAttributesError = nil; + NSDictionary *archiveFileAttributes = [fileManager attributesOfItemAtPath:archiveURL.path error:&fileAttributesError]; + if (archiveFileAttributes == nil) { + NSLog(@"Failed to retrieve file attributes from archive with error %@", fileAttributesError); + assert(NO); + } + + NSString * const appcastName = @"sparkletestcast"; + NSString * const appcastExtension = @"xml"; + + // Copy our appcast over to the server directory + NSURL *appcastDestinationURL = [[serverDirectoryURL URLByAppendingPathComponent:appcastName] URLByAppendingPathExtension:appcastExtension]; + NSError *copyAppcastError = nil; + if (![fileManager copyItemAtURL:[mainBundle URLForResource:appcastName withExtension:appcastExtension] toURL:appcastDestinationURL error:©AppcastError]) { + NSLog(@"Failed to copy appcast into cache directory with error %@", copyAppcastError); + assert(NO); + } + + // Update the appcast with the file size and signature of the update archive + // We could be using some sort of XML parser instead of doing string substitutions, but for now, this is easier + NSError *appcastError = nil; + NSMutableString *appcastContents = [[NSMutableString alloc] initWithContentsOfURL:appcastDestinationURL encoding:NSUTF8StringEncoding error:&appcastError]; + if (appcastContents == nil) { + NSLog(@"Failed to load appcast contents with error %@", appcastError); + assert(NO); + } + + NSUInteger numberOfLengthReplacements = [appcastContents replaceOccurrencesOfString:@"$INSERT_ARCHIVE_LENGTH" withString:[NSString stringWithFormat:@"%llu", archiveFileAttributes.fileSize] options:NSLiteralSearch range:NSMakeRange(0, appcastContents.length)]; + assert(numberOfLengthReplacements == 1); + + NSUInteger numberOfSignatureReplacements = [appcastContents replaceOccurrencesOfString:@"$INSERT_DSA_SIGNATURE" withString:signature options:NSLiteralSearch range:NSMakeRange(0, appcastContents.length)]; + assert(numberOfSignatureReplacements == 1); + + NSError *writeAppcastError = nil; + if (![appcastContents writeToURL:appcastDestinationURL atomically:NO encoding:NSUTF8StringEncoding error:&writeAppcastError]) { + NSLog(@"Failed to write updated appcast with error %@", writeAppcastError); + assert(NO); + } + + // Finally start the server + self.serverTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/python" arguments:@[@"-m", @"SimpleHTTPServer", @"1337"]]; + + // Show the Settings window + self.updateSettingsWindowController = [[SUUpdateSettingsWindowController alloc] init]; + [self.updateSettingsWindowController showWindow:nil]; +} + +- (void)applicationWillTerminate:(NSNotification * __unused)notification +{ + [self.serverTask terminate]; +} + +@end diff --git a/TestApplication/SUUpdateSettingsWindowController.h b/TestApplication/SUUpdateSettingsWindowController.h new file mode 100644 index 00000000..f209eadc --- /dev/null +++ b/TestApplication/SUUpdateSettingsWindowController.h @@ -0,0 +1,13 @@ +// +// SUUpdateSettingsWindowController.h +// Sparkle +// +// Created by Mayur Pawashe on 7/25/15. +// Copyright (c) 2015 Sparkle Project. All rights reserved. +// + +#import + +@interface SUUpdateSettingsWindowController : NSWindowController + +@end diff --git a/TestApplication/SUUpdateSettingsWindowController.m b/TestApplication/SUUpdateSettingsWindowController.m new file mode 100644 index 00000000..3d651044 --- /dev/null +++ b/TestApplication/SUUpdateSettingsWindowController.m @@ -0,0 +1,32 @@ +// +// SUUpdateSettingsWindowController.m +// Sparkle +// +// Created by Mayur Pawashe on 7/25/15. +// Copyright (c) 2015 Sparkle Project. All rights reserved. +// + +#import "SUUpdateSettingsWindowController.h" +#import + +@interface SUUpdateSettingsWindowController () + +@property (nonatomic) IBOutlet SUUpdater *updater; + +@end + +@implementation SUUpdateSettingsWindowController + +@synthesize updater = _updater; + +- (NSString *)windowNibName +{ + return NSStringFromClass([self class]); +} + +- (IBAction)checkForUpdates:(id __unused)sender +{ + [self.updater checkForUpdates:nil]; +} + +@end diff --git a/TestApplication/SUUpdateSettingsWindowController.xib b/TestApplication/SUUpdateSettingsWindowController.xib new file mode 100644 index 00000000..99d04aef --- /dev/null +++ b/TestApplication/SUUpdateSettingsWindowController.xib @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TestApplication/TestApplication-Info.plist b/TestApplication/TestApplication-Info.plist index 7f99a9f0..45b0254b 100644 --- a/TestApplication/TestApplication-Info.plist +++ b/TestApplication/TestApplication-Info.plist @@ -18,6 +18,8 @@ ???? CFBundleVersion 1.5 + CFBundleShortVersionString + 1.5 NSMainNibFile MainMenu NSPrincipalClass @@ -25,21 +27,13 @@ SUEnableSystemProfiling SUFeedURL - http://sparkle-project.org/files/sparkletestcast.xml + http://0.0.0.0:1337/sparkletestcast.xml SUPublicDSAKeyFile test_app_only_dsa_pub.pem NSAppTransportSecurity - NSExceptionDomains - - sparkle-project.org - - NSIncludesSubdomains - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - + NSAllowsArbitraryLoads + diff --git a/TestApplication/sparkletestcast.xml b/TestApplication/sparkletestcast.xml new file mode 100644 index 00000000..670d606c --- /dev/null +++ b/TestApplication/sparkletestcast.xml @@ -0,0 +1,23 @@ + + + + Sparkle Test App Changelog + Most recent changes with links to updates. + en + + Version 2.0 + + +
  • Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  • +
  • Suspendisse sed felis ac ante ultrices rhoncus. Etiam quis elit vel nibh placerat facilisis in id leo.
  • +
  • Vestibulum nec tortor odio, nec malesuada libero. Cras vel convallis nunc.
  • +
  • Suspendisse tristique massa eget velit consequat tincidunt. Praesent sodales hendrerit pretium.
  • + + ]]> +
    + Sat, 26 Jul 2014 15:20:11 +0000 + +
    +
    +
    diff --git a/TestApplication/test_app_only_dsa_priv_dont_ever_do_this_for_real.pem b/TestApplication/test_app_only_dsa_priv_dont_ever_do_this_for_real.pem new file mode 100644 index 00000000..42efc795 --- /dev/null +++ b/TestApplication/test_app_only_dsa_priv_dont_ever_do_this_for_real.pem @@ -0,0 +1,36 @@ +-----BEGIN DSA PRIVATE KEY----- +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 +z3tWjm2F6noctsjrVH5d0jRZ +-----END DSA PRIVATE KEY----- diff --git a/TestApplication/test_app_only_dsa_pub.pem b/TestApplication/test_app_only_dsa_pub.pem index dacd55e9..8e54f1b3 100644 --- a/TestApplication/test_app_only_dsa_pub.pem +++ b/TestApplication/test_app_only_dsa_pub.pem @@ -1,20 +1,36 @@ -----BEGIN PUBLIC KEY----- -MIIDOzCCAi0GByqGSM44BAEwggIgAoIBAQD2WbLx8Bd1b1vp8FdDpSzkHZ0tlX5x -Hrzm0WWE9IokOmJw/UWk1GQYRJnA8UlufFTJV4dZVL3It4xwqqWWFyN36LWgQUpf -ss9eTn7M7vjk7BVYch7QMs4jGEnSYkebuYfVhUZlg5VViQ+37Rj+ENtBUrkPJxIY -CGAOIJn45uX5oNIPbElFkadU6m7zd1gn8KhRgIepa2k3iBbkFuCbxTPT/aqLI+MW -8kR4jXITTgBkDew6DXLVL9SsJup4LeAEizTGyyTBY5bfMJaO8NaB8+uPrkC3SZV+ -r/LIaBcmU3vVfmw43FGzBlJtGflPaL8Ek9lRK1aSzk3Gr7tPdaado9tPAhUAmn4E -HKjL3lXfHzBmDSrrp5G5+IkCggEAFvGRfoL0u3zN4O+8imTxfiSYcFUjBUly4gIl -NXM4AgFmy8WE+diZRh6/3eg+CO0B1io+thmU2sTFAbV7sHVuGaBpPyFtcvrCHGGp -EcqWwmxuhUc1CzeoBvGw4u8mfCBvcUPjFfhllJJFdIgaTrYXFxqgsb6ZKWKsYz9J -jjJkOlRFIlRfowd1RlqodZYYvdvfWnPd32HpI9i/ofhPdlF5W2f51diH/jVJaRCo -TKECwcYG+qkPC5gkIIgzC6/DPRT8pzCLJ0NoWj3TQwL1LffMSmT9hTGAD1iyJjn5 -S9ZLLkz/K+QoGS+Rv4gboMAxa0Cla7R8NwtXqMD0kpeZwDAAgQOCAQYAAoIBAQDw -tDiRJy5DsFNRIaKe6NlyW1gyjYIhbeOCDt5fYMdX7tOR64ng28ACU5ESu6jRANMp -NYjE9oTBx28C0TXXRLDiblHe6IsisKsJJgkNkNc2DwUdPcGoPTRK/MS0k0CQsPQq -cU0Uh/vYXNQ3rsJMAJ0xJ+yYllm3MVQkbZrWlJTe/nU6M8ahiR6WBelrKhzHrhuy -MZ8n+oXvBc/Jo8Z63O/5e94BS0PiGb1Eo84ds6ramno7XJpTXE/nxphBSsaXCwdy -T97rvDzfDG0v0eo9fdX9aL7jPVODDt0bk+MSRdDpcMlgJzhIpNUtafrTUHIkPyKb -/BX9wwwXLfWGTz5TRovi +MIIGOzCCBC0GByqGSM44BAEwggQgAoICAQC++zm/9VtzqBiWzlacdSZbL2uFSy4C +9/4cC7P1POnrd9vwKeLxqp76qSIvdEq5puX3YEArtXC/gQw5ejMOU09ZlLkRlQFm +6JDu+1AL0SDcLrwpbBuWuFLDPJWdfPy3APvkKJH6g9JkQiI5DzU6T//+LX5NXXuJ +6tsvFgnZJ3XBNFB0t5LuuacvpouRrQ822wW8WW9b0ZuuU0/09loaaslhp2xNXn4X +1dlEWfBlzpyuasij4MBU25yCoF1lQ03QJbP04l8qv8YozD5uVMXZaLEOcYfYUq02 +HtBK5HCW+KhcGNgltfhRXqMmrFl0tQxKb2Jm14LxDfhwVXCs+LPBEE7/xjH+G0U+ +u/IiQPS698w7nl1uSV3SdZ9sdxQlEeNIQ49qE6UccZ6OYtYSwG2n28PjndzMVeLX +0aFH3yARpeZxvA6viAcDVYdOo7BTHouX4AVYbmfJkgoH1LExQFa7TOdWD133CpgA +vT9oFaFcQV7zrFh1F4rPRG+dNHJUNsgaEytEy+LJqJMYcFslULrYCmmn9+XyjQcV +Iol9PCFFJ+Yu6mq3RcQLUZNtJn2XTh+yvJj93LK474Td7/5DWPHKqt0kj2aGRRjb +DgVaZqi9JxY1t6TCFdurLr5uxjZnK40aNH9LTEXIfD3mXlUaId7JcP5taD2VhDMh +QuNffNMBToUVgwIVAK600getQF7MdDFTGxAOAa5tJn3TAoICAAocv8BudKcZygM3 +Da0NOt9i9BAfUI3z/LHRfWvJTDOf0ElgLOXo1NodnH8tLCFJqw1GaJKWn3liqEtr +fXEkM9odVkfxIMvIJKesFYKspopPxTc8qXvVZSfG21gjIxPI1iHp5/44/W7EOc6f +RqxZiKdsMQzkToKtGZYCgrHTIOByGLI4waLAK5M3Vnt/HQAvxj4lnW6U4mPB36oF +o8hP+127Pl8rMS9+kfLqx45pEC6P8I3HWy9KIKLXqeUdmOUWVvMTn4iVfmI69ISu +hpwZuPsUeYeVFOl2AGgTPq7NJXd2s8Oawf2NvSe+HL8wCQGsdU6biOPvvrXecP9C +U7ciWujHn47Uu5itTpyDLlkR6TT3dBSxrMeieNlz5u1giyGzgVNYb2AFtlFBsnLR +w6U16LRdzAgc5aolc4ktalXVle7YjEuF9uDg23TbPUI0dOb5UoPxQ/JQKTwx/1K4 +9TNFd5YyIsTnv7yGxSwFwy+9RFGAdmpVo107mS1v6L+DTOEQgVo7J8IDBko3MvLP +8m7Cixs6u4sxbRgKdo6aP1i87QxD7Mdx3zTqf/23yyKDr3NT/jCD2XEmuBa9/ctu +PAGKLXjecNxK7cMZpmNOL1kCPX0BtRfc8Hjib1MPEXBMNMUj7GnwdJW2VbHU+3Yp +duzEPmY/UsSkemrUY4HvMtxEvUXXA4ICBgACggIBAJYpKwCLQtSOphyrLdRkCw6/ +XNOzriCQPhiSCQeiKvyvwo3VAEY7/9y+peKT991QGckoeo6jHt0JvVtGWevO2Erl +VkQrJdsilgFrql5vM2hIo2h2UUmurcoI/RFDGds2yRDj4oSHVgfnx3MHdNSgKlM2 +GRFmb8O3y2TRNkDNHpkGot1NVd0l2J3stal1vZSd/BIweC62M3AxWWjSl4nb16N5 +yOujNTICPZQJbZkSxgDiZlemyyryRBVaUrseXLm1yEj0AZQMPWW9eVD3NyAHvNo1 ++3HLCPER3ucXiHqWdHO8Z5PifLBa4Aa5TdbMJItlnxmr0DrFfZGYO/a2Agd3zrcU +bAgXEDmrC9veWFrUIeYP3QkFgCTMfuklTFsK//9GErt+tcyWpHRc/77LFVRpGrp9 +GzNmEzmD9WWaei8h8CK1hKofZndr9jQF9YeC5LayfDh4AVf8+v2MxTpbGuNuA75d +Y51KMytUQ1+f89hZ19SdtoTUmH8djPMEw9PfscCchTs0/IP6Y5Cr2DIL51lY7zjc +LzOZ3Njhc7h5fSVb3ReS20mDzjPypEa7YPnXp40+P38KdeoBnArCH/kWxAzdRfa1 +oOYTTyrXlZKzJerLrmWTrux+xLmSIhHFt28V2IjfCy18EuBulR/vX7FJkrrCWSsY +QbkU4c3octJ+pX4EkURi -----END PUBLIC KEY----- diff --git a/Vendor/CocoatechCore/NTSynchronousTask.m b/Vendor/CocoatechCore/NTSynchronousTask.m index b0fdee24..f96bdbf8 100644 --- a/Vendor/CocoatechCore/NTSynchronousTask.m +++ b/Vendor/CocoatechCore/NTSynchronousTask.m @@ -6,11 +6,6 @@ // Copyright 2005 Steve Gehrman. All rights reserved. // -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" #import "NTSynchronousTask.h" @interface NTSynchronousTask ()