From 1a09baf0edb74e3213ae22e123e3636a5e432785 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 23 Dec 2016 16:13:35 -0500 Subject: [PATCH] Remove Sparkle.pch and many file #includes This eliminates many dependencies that don't need to exist. --- Configurations/ConfigCommon.xcconfig | 2 -- Sparkle.xcodeproj/project.pbxproj | 8 +++--- Sparkle/Autoupdate/Autoupdate.m | 4 ++- Sparkle/SUAppcast.m | 7 ++---- Sparkle/SUAppcastItem.m | 6 +---- Sparkle/SUAutomaticUpdateAlert.m | 2 ++ Sparkle/SUAutomaticUpdateDriver.h | 3 --- Sparkle/SUAutomaticUpdateDriver.m | 5 +++- Sparkle/SUBasicUpdateDriver.h | 6 +---- Sparkle/SUBasicUpdateDriver.m | 5 ++++ Sparkle/SUBinaryDeltaApply.h | 2 ++ Sparkle/SUConstants.m | 6 +---- Sparkle/SUFileManager.m | 5 ++++ Sparkle/SUGuidedPackageInstaller.h | 1 - Sparkle/SUGuidedPackageInstaller.m | 2 +- Sparkle/SUHost.h | 4 --- Sparkle/SUHost.m | 3 ++- Sparkle/SUInstaller.h | 2 +- Sparkle/SUInstaller.m | 6 ++--- Sparkle/SULocalizations.h | 16 ++++++++++++ Sparkle/SUPackageInstaller.h | 6 ----- Sparkle/SUPackageInstaller.m | 2 +- Sparkle/SUPipedUnarchiver.m | 1 + Sparkle/SUPlainInstaller.h | 6 ----- Sparkle/SUPlainInstaller.m | 5 ++-- Sparkle/SUProbingUpdateDriver.h | 1 - Sparkle/SUScheduledUpdateDriver.h | 1 - Sparkle/SUScheduledUpdateDriver.m | 4 --- Sparkle/SUStandardVersionComparator.m | 4 --- Sparkle/SUStatusController.m | 6 +---- Sparkle/SUSystemProfiler.m | 2 +- Sparkle/SUUIBasedUpdateDriver.h | 2 -- Sparkle/SUUIBasedUpdateDriver.m | 2 ++ Sparkle/SUUnarchiverNotifier.m | 2 ++ Sparkle/SUUpdateAlert.m | 2 ++ Sparkle/SUUpdatePermissionPrompt.m | 1 + Sparkle/SUUpdater.h | 4 +-- Sparkle/SUUpdater.m | 1 + Sparkle/SUUserInitiatedUpdateDriver.h | 1 - Sparkle/SUUserInitiatedUpdateDriver.m | 1 + Sparkle/SUVersionComparisonProtocol.h | 4 +-- Sparkle/SUVersionDisplayProtocol.h | 4 +-- Sparkle/Sparkle.h | 6 ----- Sparkle/Sparkle.pch | 27 --------------------- TestApplication/SUTestApplicationDelegate.h | 2 +- Tests/SUBinaryDeltaTest.m | 2 +- Tests/SUCodeSigningVerifierTest.m | 2 +- Tests/SUDSAVerifierTest.m | 2 +- Tests/SUInstallerTest.m | 2 +- 49 files changed, 79 insertions(+), 121 deletions(-) create mode 100644 Sparkle/SULocalizations.h delete mode 100644 Sparkle/Sparkle.pch diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 0824aaeb..ba9508b7 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -23,8 +23,6 @@ SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VE CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION) ALWAYS_SEARCH_USER_PATHS = NO ENABLE_STRICT_OBJC_MSGSEND = YES -GCC_PRECOMPILE_PREFIX_HEADER = YES -GCC_PREFIX_HEADER = Sparkle/Sparkle.pch GCC_SYMBOLS_PRIVATE_EXTERN = YES GCC_INLINES_ARE_PRIVATE_EXTERN = YES ARCHS = $(ARCHS_STANDARD) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 53d8c170..68189b76 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -159,7 +159,6 @@ 61B93B280DD0FDD300DCD2F8 /* SUAutomaticUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B93B260DD0FDD300DCD2F8 /* SUAutomaticUpdateDriver.m */; }; 61B93C090DD112FF00DCD2F8 /* SUScheduledUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 61B93C070DD112FF00DCD2F8 /* SUScheduledUpdateDriver.h */; settings = {ATTRIBUTES = (); }; }; 61B93C0A0DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B93C080DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m */; }; - 61CFB3290E385186007A1735 /* Sparkle.pch in Headers */ = {isa = PBXBuildFile; fileRef = 61CFB3280E385186007A1735 /* Sparkle.pch */; }; 61D85D6D0E10B2ED00F9B4A9 /* SUPipedUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6129C0B90E0B79810062CE76 /* SUPipedUnarchiver.m */; }; 61EF67560E25B58D00F754E0 /* SUHost.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EF67550E25B58D00F754E0 /* SUHost.m */; }; 61EF67590E25C5B400F754E0 /* SUHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 61EF67580E25C5B400F754E0 /* SUHost.h */; }; @@ -190,6 +189,7 @@ 722954CA1D04EA6000ECF9CA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; }; 722954CB1D04EA6900ECF9CA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; }; 722954CC1D04EA7000ECF9CA /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; }; + 72316BD61E0DBF730039EFD9 /* SULocalizations.h in Headers */ = {isa = PBXBuildFile; fileRef = 72316BD51E0DBF730039EFD9 /* SULocalizations.h */; }; 723A920E1D722438004A9DED /* SUSpotlightImporterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 723A920D1D722438004A9DED /* SUSpotlightImporterTest.swift */; }; 723B252D1CEAB3A600909873 /* bscommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 723B252B1CEAB3A600909873 /* bscommon.c */; }; 723B252E1CEAB3A600909873 /* bscommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 723B252B1CEAB3A600909873 /* bscommon.c */; }; @@ -660,7 +660,6 @@ 61BA66DB14BDFC5500D02D86 /* sl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = sl; path = sl.lproj/SUUpdateAlert.xib; sourceTree = ""; }; 61BA66DC14BDFC5500D02D86 /* sl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = sl; path = sl.lproj/SUUpdatePermissionPrompt.xib; sourceTree = ""; }; 61C268090E2DB5D000175E6C /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; }; - 61CFB3280E385186007A1735 /* Sparkle.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sparkle.pch; sourceTree = ""; }; 61E31A80103299500051D188 /* pt_BR */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = pt_BR; path = pt_BR.lproj/Sparkle.strings; sourceTree = ""; }; 61EF67550E25B58D00F754E0 /* SUHost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUHost.m; sourceTree = ""; }; 61EF67580E25C5B400F754E0 /* SUHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUHost.h; sourceTree = ""; }; @@ -687,6 +686,7 @@ 722FB7471DD51331001D40CE /* ConfigSwift.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwift.xcconfig; sourceTree = ""; }; 722FB7481DD51350001D40CE /* ConfigSwiftDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwiftDebug.xcconfig; sourceTree = ""; }; 722FB7491DD51350001D40CE /* ConfigSwiftRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwiftRelease.xcconfig; sourceTree = ""; }; + 72316BD51E0DBF730039EFD9 /* SULocalizations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SULocalizations.h; sourceTree = ""; }; 723A920D1D722438004A9DED /* SUSpotlightImporterTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUSpotlightImporterTest.swift; sourceTree = ""; }; 723B252B1CEAB3A600909873 /* bscommon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bscommon.c; sourceTree = ""; }; 723B252C1CEAB3A600909873 /* bscommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bscommon.h; sourceTree = ""; }; @@ -1103,7 +1103,7 @@ isa = PBXGroup; children = ( 61299B3509CB04E000B7442F /* Sparkle.h */, - 61CFB3280E385186007A1735 /* Sparkle.pch */, + 72316BD51E0DBF730039EFD9 /* SULocalizations.h */, 61299A5B09CA6D4500B7442F /* SUConstants.h */, 61299A5F09CA6EB100B7442F /* SUConstants.m */, 55E6F33219EC9F6C00005E76 /* SUErrors.h */, @@ -1256,7 +1256,6 @@ files = ( 611142E910FB1BE5009810AA /* bspatch.h in Headers */, 61299B3609CB04E000B7442F /* Sparkle.h in Headers */, - 61CFB3290E385186007A1735 /* Sparkle.pch in Headers */, 722589DA1E0B19F4005EA0B9 /* SUUnarchiverNotifier.h in Headers */, 61B5FC0D09C4FC8200B25A18 /* SUAppcast.h in Headers */, 61B5FC7009C51F4A00B25A18 /* SUAppcastItem.h in Headers */, @@ -1285,6 +1284,7 @@ 6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */, 61B93C090DD112FF00DCD2F8 /* SUScheduledUpdateDriver.h in Headers */, 61A225A40D1C4AC000430CCD /* SUStandardVersionComparator.h in Headers */, + 72316BD61E0DBF730039EFD9 /* SULocalizations.h in Headers */, 6196CFF909C72148000DC222 /* SUStatusController.h in Headers */, 61A2279C0D1CEE7600430CCD /* SUSystemProfiler.h in Headers */, 61B93A3C0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.h in Headers */, diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index a021172b..e92ebfb0 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -1,4 +1,6 @@ -#import +#import +#import "SULocalizations.h" +#import "SUErrors.h" #import "SUInstaller.h" #import "SUHost.h" #import "SUStandardVersionComparator.h" diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index d4f32fd9..8873854a 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -6,14 +6,11 @@ // Copyright 2006 Andy Matuschak. All rights reserved. // -#import "SUUpdater.h" - #import "SUAppcast.h" #import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" -#import "SUAppcast.h" -#import "SUConstants.h" #import "SULog.h" +#import "SULocalizations.h" +#import "SUErrors.h" @interface NSXMLElement (SUAppcastExtensions) @property (readonly, copy) NSDictionary *attributesAsDictionary; diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 4cbc4e44..e6a6fb6f 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -6,13 +6,9 @@ // Copyright 2006 Andy Matuschak. All rights reserved. // -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" #import "SUAppcastItem.h" #import "SULog.h" +#import "SUConstants.h" @interface SUAppcastItem () @property (copy, readwrite) NSString *title; diff --git a/Sparkle/SUAutomaticUpdateAlert.m b/Sparkle/SUAutomaticUpdateAlert.m index c1e24d7f..91dbddec 100644 --- a/Sparkle/SUAutomaticUpdateAlert.m +++ b/Sparkle/SUAutomaticUpdateAlert.m @@ -7,6 +7,8 @@ // #import "SUAutomaticUpdateAlert.h" +#import "SULocalizations.h" +#import "SUAppcastItem.h" #import "SUHost.h" diff --git a/Sparkle/SUAutomaticUpdateDriver.h b/Sparkle/SUAutomaticUpdateDriver.h index d3fae435..08a24736 100644 --- a/Sparkle/SUAutomaticUpdateDriver.h +++ b/Sparkle/SUAutomaticUpdateDriver.h @@ -9,10 +9,7 @@ #ifndef SUAUTOMATICUPDATEDRIVER_H #define SUAUTOMATICUPDATEDRIVER_H -#import #import "SUBasicUpdateDriver.h" -#import "SUAutomaticUpdateAlert.h" -#import "SUUnarchiverProtocol.h" @interface SUAutomaticUpdateDriver : SUBasicUpdateDriver diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m index 6abb1294..8e7629fd 100644 --- a/Sparkle/SUAutomaticUpdateDriver.m +++ b/Sparkle/SUAutomaticUpdateDriver.m @@ -7,10 +7,13 @@ // #import "SUAutomaticUpdateDriver.h" - +#import "SUUpdater.h" +#import "SULocalizations.h" +#import "SUErrors.h" #import "SUAutomaticUpdateAlert.h" #import "SUHost.h" #import "SUConstants.h" +#import "SUAppcastItem.h" // If the user hasn't quit in a week, ask them if they want to relaunch to get the latest bits. It doesn't matter that this measure of "one day" is imprecise. static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 24 * 7; diff --git a/Sparkle/SUBasicUpdateDriver.h b/Sparkle/SUBasicUpdateDriver.h index 97dc34e8..bd83c4dd 100644 --- a/Sparkle/SUBasicUpdateDriver.h +++ b/Sparkle/SUBasicUpdateDriver.h @@ -9,13 +9,9 @@ #ifndef SUBASICUPDATEDRIVER_H #define SUBASICUPDATEDRIVER_H -#import #import "SUUpdateDriver.h" -#import "SUUnarchiver.h" -#import "SUAppcast.h" -#import "SUUnarchiverProtocol.h" -@class SUAppcastItem, SUHost; +@class SUAppcast, SUAppcastItem, SUHost; @interface SUBasicUpdateDriver : SUUpdateDriver @property (strong, readonly) SUAppcastItem *updateItem; diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 4e6d5d1f..267dfe27 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -8,6 +8,7 @@ #import "SUBasicUpdateDriver.h" +#import "SUUnarchiverProtocol.h" #import "SUHost.h" #import "SUOperatingSystem.h" #import "SUStandardVersionComparator.h" @@ -18,6 +19,10 @@ #import "SUUpdater_Private.h" #import "SUFileManager.h" #import "SUUpdateValidator.h" +#import "SULocalizations.h" +#import "SUErrors.h" +#import "SUAppcast.h" +#import "SUAppcastItem.h" @interface SUBasicUpdateDriver () diff --git a/Sparkle/SUBinaryDeltaApply.h b/Sparkle/SUBinaryDeltaApply.h index 4932cd9d..c8baa029 100644 --- a/Sparkle/SUBinaryDeltaApply.h +++ b/Sparkle/SUBinaryDeltaApply.h @@ -9,6 +9,8 @@ #ifndef SUBINARYDELTAAPPLY_H #define SUBINARYDELTAAPPLY_H +#import + @class NSString; BOOL applyBinaryDelta(NSString *source, NSString *destination, NSString *patchFile, BOOL verbose, void (^progressCallback)(double), NSError * __autoreleasing *error); diff --git a/Sparkle/SUConstants.m b/Sparkle/SUConstants.m index 33aa91fd..768d0b0d 100644 --- a/Sparkle/SUConstants.m +++ b/Sparkle/SUConstants.m @@ -6,12 +6,8 @@ // Copyright 2006 Andy Matuschak. All rights reserved. // -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" #import "SUConstants.h" +#import "SUErrors.h" #ifndef DEBUG #define DEBUG 0 diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index 6488e016..f08fff3c 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -7,9 +7,14 @@ // #import "SUFileManager.h" +#import "SUErrors.h" #import "SUOperatingSystem.h" #import "SUFileOperationConstants.h" +#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1080 +#import // for NSWorkspace +#endif + #include #include #include diff --git a/Sparkle/SUGuidedPackageInstaller.h b/Sparkle/SUGuidedPackageInstaller.h index 4a9fc74b..814b9330 100644 --- a/Sparkle/SUGuidedPackageInstaller.h +++ b/Sparkle/SUGuidedPackageInstaller.h @@ -23,7 +23,6 @@ A guided installation can be started by applications other than the application #define SUGUIDEDPACKAGEINSTALLER_H #import -#import "Sparkle.h" #import "SUInstaller.h" @interface SUGuidedPackageInstaller : SUInstaller diff --git a/Sparkle/SUGuidedPackageInstaller.m b/Sparkle/SUGuidedPackageInstaller.m index 97decfa2..387fb9a5 100644 --- a/Sparkle/SUGuidedPackageInstaller.m +++ b/Sparkle/SUGuidedPackageInstaller.m @@ -13,7 +13,7 @@ + (void)performInstallationToPath:(NSString *)destinationPath fromPath:(NSString *)packagePath host:(SUHost *)__unused host fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id)__unused comparator completionHandler:(void (^)(NSError *))completionHandler { - SUParameterAssert(packagePath); + NSParameterAssert(packagePath); dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ SUFileManager *fileManager = [SUFileManager fileManagerWithAuthorizationToolPath:fileOperationToolPath]; diff --git a/Sparkle/SUHost.h b/Sparkle/SUHost.h index 56fa7d18..d3390692 100644 --- a/Sparkle/SUHost.h +++ b/Sparkle/SUHost.h @@ -6,10 +6,6 @@ // #import -#import "SUUpdater.h" -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000 typedef struct { diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index d941e066..3d59f1a9 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -6,6 +6,7 @@ // #import "SUHost.h" +#import // for NSImage related code #import "SUConstants.h" #import "SUSystemProfiler.h" @@ -37,7 +38,7 @@ { if ((self = [super init])) { - SUParameterAssert(aBundle); + NSParameterAssert(aBundle); self.bundle = aBundle; if (![self.bundle bundleIdentifier]) { SULog(@"Error: the bundle being updated at %@ has no %@! This will cause preference read/write to not work properly.", self.bundle, kCFBundleIdentifierKey); diff --git a/Sparkle/SUInstaller.h b/Sparkle/SUInstaller.h index 0bb08c11..b48ea9e8 100644 --- a/Sparkle/SUInstaller.h +++ b/Sparkle/SUInstaller.h @@ -9,7 +9,7 @@ #ifndef SUINSTALLER_H #define SUINSTALLER_H -#import +#import #import "SUVersionComparisonProtocol.h" @class SUHost; diff --git a/Sparkle/SUInstaller.m b/Sparkle/SUInstaller.m index c96ffadd..0ee79ccf 100644 --- a/Sparkle/SUInstaller.m +++ b/Sparkle/SUInstaller.m @@ -11,8 +11,8 @@ #import "SUPackageInstaller.h" #import "SUGuidedPackageInstaller.h" #import "SUHost.h" -#import "SUConstants.h" #import "SULog.h" +#import "SUErrors.h" @implementation SUInstaller @@ -27,8 +27,8 @@ + (NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr { - SUParameterAssert(inUpdateFolder); - SUParameterAssert(host); + NSParameterAssert(inUpdateFolder); + NSParameterAssert(host); // Search subdirectories for the application NSString *currentFile, diff --git a/Sparkle/SULocalizations.h b/Sparkle/SULocalizations.h new file mode 100644 index 00000000..9575bdb3 --- /dev/null +++ b/Sparkle/SULocalizations.h @@ -0,0 +1,16 @@ +// +// SULocalizations.h +// Sparkle +// +// Created by Mayur Pawashe on 2/28/16. +// Copyright © 2016 Sparkle Project. All rights reserved. +// + +#ifndef SULocalizations_h +#define SULocalizations_h + +#import "SUConstants.h" + +#define SULocalizedString(key, comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", (NSBundle * _Nonnull)([NSBundle bundleWithIdentifier:SUBundleIdentifier] ? [NSBundle bundleWithIdentifier:SUBundleIdentifier] : [NSBundle mainBundle]), comment) + +#endif /* SULocalizations_h */ diff --git a/Sparkle/SUPackageInstaller.h b/Sparkle/SUPackageInstaller.h index 444ca7fe..836bf786 100644 --- a/Sparkle/SUPackageInstaller.h +++ b/Sparkle/SUPackageInstaller.h @@ -10,12 +10,6 @@ #define SUPACKAGEINSTALLER_H #import - -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" #import "SUPlainInstaller.h" @interface SUPackageInstaller : SUPlainInstaller diff --git a/Sparkle/SUPackageInstaller.m b/Sparkle/SUPackageInstaller.m index 2a38db44..146b3d30 100644 --- a/Sparkle/SUPackageInstaller.m +++ b/Sparkle/SUPackageInstaller.m @@ -7,8 +7,8 @@ // #import "SUPackageInstaller.h" -#import #import "SUConstants.h" +#import "SUErrors.h" @implementation SUPackageInstaller diff --git a/Sparkle/SUPipedUnarchiver.m b/Sparkle/SUPipedUnarchiver.m index c1549475..b155b408 100644 --- a/Sparkle/SUPipedUnarchiver.m +++ b/Sparkle/SUPipedUnarchiver.m @@ -9,6 +9,7 @@ #import "SUPipedUnarchiver.h" #import "SUUnarchiverNotifier.h" #import "SULog.h" +#import "SUErrors.h" @interface SUPipedUnarchiver () diff --git a/Sparkle/SUPlainInstaller.h b/Sparkle/SUPlainInstaller.h index 5bebdee8..b680e748 100644 --- a/Sparkle/SUPlainInstaller.h +++ b/Sparkle/SUPlainInstaller.h @@ -10,14 +10,8 @@ #define SUPLAININSTALLER_H #import - -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" #import "SUVersionComparisonProtocol.h" #import "SUInstaller.h" -#import "SUVersionComparisonProtocol.h" @class SUHost; diff --git a/Sparkle/SUPlainInstaller.m b/Sparkle/SUPlainInstaller.m index 0661a641..dac28769 100644 --- a/Sparkle/SUPlainInstaller.m +++ b/Sparkle/SUPlainInstaller.m @@ -8,10 +8,9 @@ #import "SUPlainInstaller.h" #import "SUFileManager.h" -#import "SUCodeSigningVerifier.h" -#import "SUConstants.h" #import "SUHost.h" #import "SULog.h" +#import "SUErrors.h" @implementation SUPlainInstaller @@ -160,7 +159,7 @@ + (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id)comparator completionHandler:(void (^)(NSError *))completionHandler { - SUParameterAssert(host); + NSParameterAssert(host); BOOL allowDowngrades = SPARKLE_AUTOMATED_DOWNGRADES; diff --git a/Sparkle/SUProbingUpdateDriver.h b/Sparkle/SUProbingUpdateDriver.h index bf897c8c..860bf58b 100644 --- a/Sparkle/SUProbingUpdateDriver.h +++ b/Sparkle/SUProbingUpdateDriver.h @@ -9,7 +9,6 @@ #ifndef SUPROBINGUPDATEDRIVER_H #define SUPROBINGUPDATEDRIVER_H -#import #import "SUBasicUpdateDriver.h" // This replaces the old SUStatusChecker. diff --git a/Sparkle/SUScheduledUpdateDriver.h b/Sparkle/SUScheduledUpdateDriver.h index dfdde51f..b2559c71 100644 --- a/Sparkle/SUScheduledUpdateDriver.h +++ b/Sparkle/SUScheduledUpdateDriver.h @@ -9,7 +9,6 @@ #ifndef SUSCHEDULEDUPDATEDRIVER_H #define SUSCHEDULEDUPDATEDRIVER_H -#import #import "SUUIBasedUpdateDriver.h" @interface SUScheduledUpdateDriver : SUUIBasedUpdateDriver diff --git a/Sparkle/SUScheduledUpdateDriver.m b/Sparkle/SUScheduledUpdateDriver.m index 9d6bf141..b8a3bedb 100644 --- a/Sparkle/SUScheduledUpdateDriver.m +++ b/Sparkle/SUScheduledUpdateDriver.m @@ -9,10 +9,6 @@ #import "SUScheduledUpdateDriver.h" #import "SUUpdater.h" -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" - @interface SUScheduledUpdateDriver () @property (assign) BOOL showErrors; diff --git a/Sparkle/SUStandardVersionComparator.m b/Sparkle/SUStandardVersionComparator.m index 415c3074..27558f9d 100644 --- a/Sparkle/SUStandardVersionComparator.m +++ b/Sparkle/SUStandardVersionComparator.m @@ -6,10 +6,6 @@ // Copyright 2007 Andy Matuschak. All rights reserved. // -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" #import "SUVersionComparisonProtocol.h" #import "SUStandardVersionComparator.h" diff --git a/Sparkle/SUStatusController.m b/Sparkle/SUStatusController.m index 23363248..9ee2ec92 100644 --- a/Sparkle/SUStatusController.m +++ b/Sparkle/SUStatusController.m @@ -6,14 +6,10 @@ // Copyright 2006 Andy Matuschak. All rights reserved. // -#import "SUUpdater.h" - -#import "SUAppcast.h" -#import "SUAppcastItem.h" -#import "SUVersionComparisonProtocol.h" #import "SUOperatingSystem.h" #import "SUStatusController.h" #import "SUHost.h" +#import "SULocalizations.h" @interface SUStatusController () @property (copy) NSString *title, *buttonTitle; diff --git a/Sparkle/SUSystemProfiler.m b/Sparkle/SUSystemProfiler.m index 4071da6b..099d1ecc 100644 --- a/Sparkle/SUSystemProfiler.m +++ b/Sparkle/SUSystemProfiler.m @@ -7,7 +7,7 @@ // Adapted from Sparkle+, by Tom Harrington. // -#import +#import #import "SUSystemProfiler.h" #import "SUHost.h" diff --git a/Sparkle/SUUIBasedUpdateDriver.h b/Sparkle/SUUIBasedUpdateDriver.h index e15dc5b9..69f34459 100644 --- a/Sparkle/SUUIBasedUpdateDriver.h +++ b/Sparkle/SUUIBasedUpdateDriver.h @@ -11,8 +11,6 @@ #import #import "SUBasicUpdateDriver.h" -#import "SUUpdateAlert.h" -#import "SUUnarchiverProtocol.h" @class SUStatusController; diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index caa3959a..3919fc57 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -14,6 +14,8 @@ #import "SUOperatingSystem.h" #import "SUStatusController.h" #import "SUConstants.h" +#import "SULocalizations.h" +#import "SUAppcastItem.h" #if __MAC_OS_X_VERSION_MAX_ALLOWED < 1080 @interface NSByteCountFormatter : NSFormatter { diff --git a/Sparkle/SUUnarchiverNotifier.m b/Sparkle/SUUnarchiverNotifier.m index ecd6c295..727ac7da 100644 --- a/Sparkle/SUUnarchiverNotifier.m +++ b/Sparkle/SUUnarchiverNotifier.m @@ -7,6 +7,8 @@ // #import "SUUnarchiverNotifier.h" +#import "SULocalizations.h" +#import "SUErrors.h" @interface SUUnarchiverNotifier () diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 3589ffd3..ebb925ca 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -17,6 +17,8 @@ #import "SUConstants.h" #import "SULog.h" +#import "SULocalizations.h" +#import "SUAppcastItem.h" // WebKit protocols are not explicitly declared until 10.11 SDK, so // declare dummy protocols to keep the build working on earlier SDKs. diff --git a/Sparkle/SUUpdatePermissionPrompt.m b/Sparkle/SUUpdatePermissionPrompt.m index 4a338dba..0a62bbfe 100644 --- a/Sparkle/SUUpdatePermissionPrompt.m +++ b/Sparkle/SUUpdatePermissionPrompt.m @@ -10,6 +10,7 @@ #import "SUHost.h" #import "SUConstants.h" +#import "SULocalizations.h" @interface SUUpdatePermissionPrompt () diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index ac7600eb..79be3bd5 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -10,9 +10,9 @@ #define SUUPDATER_H #if __has_feature(modules) -@import Foundation; +@import Cocoa; #else -#import +#import #endif #import "SUExport.h" #import "SUVersionComparisonProtocol.h" diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 9a0a0d5a..2d114abf 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -18,6 +18,7 @@ #import "SUConstants.h" #import "SULog.h" #import "SUCodeSigningVerifier.h" +#import "SULocalizations.h" #include NSString *const SUUpdaterDidFinishLoadingAppCastNotification = @"SUUpdaterDidFinishLoadingAppCastNotification"; diff --git a/Sparkle/SUUserInitiatedUpdateDriver.h b/Sparkle/SUUserInitiatedUpdateDriver.h index 079d2fea..fd2541ca 100644 --- a/Sparkle/SUUserInitiatedUpdateDriver.h +++ b/Sparkle/SUUserInitiatedUpdateDriver.h @@ -9,7 +9,6 @@ #ifndef SUUSERINITIATEDUPDATEDRIVER_H #define SUUSERINITIATEDUPDATEDRIVER_H -#import #import "SUUIBasedUpdateDriver.h" @interface SUUserInitiatedUpdateDriver : SUUIBasedUpdateDriver diff --git a/Sparkle/SUUserInitiatedUpdateDriver.m b/Sparkle/SUUserInitiatedUpdateDriver.m index 04e96b23..0d463ec8 100644 --- a/Sparkle/SUUserInitiatedUpdateDriver.m +++ b/Sparkle/SUUserInitiatedUpdateDriver.m @@ -10,6 +10,7 @@ #import "SUStatusController.h" #import "SUHost.h" +#import "SULocalizations.h" @interface SUUserInitiatedUpdateDriver () diff --git a/Sparkle/SUVersionComparisonProtocol.h b/Sparkle/SUVersionComparisonProtocol.h index 7cac76e6..c654fc4d 100644 --- a/Sparkle/SUVersionComparisonProtocol.h +++ b/Sparkle/SUVersionComparisonProtocol.h @@ -10,9 +10,9 @@ #define SUVERSIONCOMPARISONPROTOCOL_H #if __has_feature(modules) -@import Cocoa; +@import Foundation; #else -#import +#import #endif #import "SUExport.h" diff --git a/Sparkle/SUVersionDisplayProtocol.h b/Sparkle/SUVersionDisplayProtocol.h index cda2531f..980efb3f 100644 --- a/Sparkle/SUVersionDisplayProtocol.h +++ b/Sparkle/SUVersionDisplayProtocol.h @@ -7,9 +7,9 @@ // #if __has_feature(modules) -@import Cocoa; +@import Foundation; #else -#import +#import #endif #import "SUExport.h" diff --git a/Sparkle/Sparkle.h b/Sparkle/Sparkle.h index ab828c29..fad7a1cb 100644 --- a/Sparkle/Sparkle.h +++ b/Sparkle/Sparkle.h @@ -9,12 +9,6 @@ #ifndef SPARKLE_H #define SPARKLE_H -#if __has_feature(modules) -@import Cocoa; -#else -#import -#endif - // 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: diff --git a/Sparkle/Sparkle.pch b/Sparkle/Sparkle.pch deleted file mode 100644 index 7a53b80a..00000000 --- a/Sparkle/Sparkle.pch +++ /dev/null @@ -1,27 +0,0 @@ -// -// Sparkle.pch -// Sparkle -// -// Created by Andy Matuschak on 7/23/08. -// Copyright 2008 Andy Matuschak. All rights reserved. -// - -#ifdef __OBJC__ - -#if !defined(__clang_major__) || __clang_major__ < 7 -#define __nonnull -#define __nullable -#endif - -#import -#import "SUConstants.h" -#import "SUErrors.h" - -#define SULocalizedString(key, comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", (NSBundle *__nonnull)([NSBundle bundleWithIdentifier:SUBundleIdentifier] ? [NSBundle bundleWithIdentifier:SUBundleIdentifier] : [NSBundle mainBundle]), comment) - -// Work around a warning generated by some versions of Xcode that we still support, -// when using NSParameterAssert -#define SUParameterAssert(condition) \ - NSAssert((condition), @"Invalid parameter not satisfying: %@", @(#condition)) - -#endif diff --git a/TestApplication/SUTestApplicationDelegate.h b/TestApplication/SUTestApplicationDelegate.h index cbe0710c..70d4e6e8 100644 --- a/TestApplication/SUTestApplicationDelegate.h +++ b/TestApplication/SUTestApplicationDelegate.h @@ -6,7 +6,7 @@ // Copyright (c) 2015 Sparkle Project. All rights reserved. // -#import +#import @interface SUTestApplicationDelegate : NSObject diff --git a/Tests/SUBinaryDeltaTest.m b/Tests/SUBinaryDeltaTest.m index 210363c6..7978fa5c 100644 --- a/Tests/SUBinaryDeltaTest.m +++ b/Tests/SUBinaryDeltaTest.m @@ -6,7 +6,7 @@ // Copyright (c) 2014 Sparkle Project. All rights reserved. // -#import +#import #import #import "SUBinaryDeltaCommon.h" #import "SUBinaryDeltaCreate.h" diff --git a/Tests/SUCodeSigningVerifierTest.m b/Tests/SUCodeSigningVerifierTest.m index 918b0550..9c09bcdd 100644 --- a/Tests/SUCodeSigningVerifierTest.m +++ b/Tests/SUCodeSigningVerifierTest.m @@ -6,7 +6,7 @@ // Copyright (c) 2015 Sparkle Project. All rights reserved. // -#import +#import #import #import "SUCodeSigningVerifier.h" #import "SUFileManager.h" diff --git a/Tests/SUDSAVerifierTest.m b/Tests/SUDSAVerifierTest.m index 83f76e38..e7b6f840 100644 --- a/Tests/SUDSAVerifierTest.m +++ b/Tests/SUDSAVerifierTest.m @@ -6,7 +6,7 @@ // Copyright (c) 2014 Sparkle Project. All rights reserved. // -#import +#import #import #import "SUDSAVerifier.h" diff --git a/Tests/SUInstallerTest.m b/Tests/SUInstallerTest.m index 278060b0..b1910a8b 100644 --- a/Tests/SUInstallerTest.m +++ b/Tests/SUInstallerTest.m @@ -6,7 +6,7 @@ // Copyright (c) 2015 Sparkle Project. All rights reserved. // -#import +#import #import #import "SUHost.h" #import "SUInstaller.h"