Merge branch 'master' into ui-separation-and-xpc

This commit is contained in:
Zorg committed 2017-01-17 15:58:02 -05:00
commit dfaed624ae
72 files changed
+162 -209

No files matched your search

+2 -3
View File
@@ -11,9 +11,8 @@
#import "SPUInstallerAgentProtocol.h"
#import "SUInstallerAgentInitiationProtocol.h"
#ifdef _APPKITDEFINES_H
#error This is a "daemon-safe" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface AgentConnection () <NSXPCListenerDelegate, SUInstallerAgentInitiationProtocol>
+2 -3
View File
@@ -28,9 +28,8 @@
#import "SPUInstallationType.h"
#import "SPULocalCacheDirectory.h"
#ifdef _APPKITDEFINES_H
#error This is a "daemon-safe" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
#define FIRST_UPDATER_MESSAGE_TIMEOUT 7ull
#define RETRIEVE_PROCESS_IDENTIFIER_TIMEOUT 5ull
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SPUInstallationInfo.h"
#import "SUAppcastItem.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SUAppcastItemKey = @"SUAppcastItem";
static NSString *SUCanSilentlyInstallKey = @"SUCanSilentlyInstall";
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SPUInstallationInputData.h"
#import "SPUInstallationType.h"
#ifdef _APPKITDEFINES_H
#error This is a "daemon-safe" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SURelaunchPathKey = @"SURelaunchPath";
static NSString *SUHostBundlePathKey = @"SUHostBundlePath";
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SPUMessageTypes.h"
#import "SUHost.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
NSString *SPUAppcastItemArchiveKey = @"SPUAppcastItemArchive";
+2 -3
View File
@@ -15,9 +15,8 @@
#include <stdlib.h>
#include <xar/xar.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static BOOL applyBinaryDeltaToFile(xar_t x, xar_file_t file, NSString *sourceFilePath, NSString *destinationFilePath)
{
+2 -3
View File
@@ -18,9 +18,8 @@
#include <sys/stat.h>
#include <xar/xar.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
int compareFiles(const FTSENT **a, const FTSENT **b)
{
+2 -3
View File
@@ -21,9 +21,8 @@
#include <sys/xattr.h>
#include <xar/xar.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
extern int bsdiff(int argc, const char **argv);
+2 -4
View File
@@ -12,10 +12,6 @@
#include <Foundation/Foundation.h>
#include <xar/xar.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#define VERBOSE_FLAG @"--verbose"
#define VERSION_FLAG @"--version"
@@ -24,6 +20,8 @@
#define VERSION_COMMAND @"version"
#define VERSION_ALTERNATE_COMMAND @"--version"
#include "AppKitPrevention.h"
static void printUsage(NSString *programName)
{
fprintf(stderr, "Usage:\n");
+2 -3
View File
@@ -13,9 +13,8 @@
#import "SULog.h"
#import "SUFileManager.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUBinaryDeltaUnarchiver ()
+2 -3
View File
@@ -11,9 +11,8 @@
#import "SUCodeSigningVerifier.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUCodeSigningVerifier
+2 -3
View File
@@ -16,9 +16,8 @@
#import "SULog.h"
#include <CommonCrypto/CommonDigest.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUDSAVerifier {
SecKeyRef _secKey;
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SUUnarchiverNotifier.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUDiskImageUnarchiver ()
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SUGuidedPackageInstaller.h"
#import "SUErrors.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUGuidedPackageInstaller ()
+2 -3
View File
@@ -16,9 +16,8 @@
#import "SUErrors.h"
#import "SPUInstallationType.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUInstaller
+2 -3
View File
@@ -11,9 +11,8 @@
#import "SUErrors.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUPackageInstaller ()
+2 -3
View File
@@ -11,9 +11,8 @@
#import "SULog.h"
#import "SUErrors.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUPipedUnarchiver ()
+2 -3
View File
@@ -15,9 +15,8 @@
#import "SUVersionComparisonProtocol.h"
#import "SUStandardVersionComparator.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUPlainInstaller ()
+2 -3
View File
@@ -12,9 +12,8 @@
#import "SUDiskImageUnarchiver.h"
#import "SUBinaryDeltaUnarchiver.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUUnarchiver
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SULocalizations.h"
#import "SUErrors.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUUnarchiverNotifier ()
+2 -3
View File
@@ -9,9 +9,8 @@
#import "StatusInfo.h"
#import "SPUMessageTypes.h"
#ifdef _APPKITDEFINES_H
#error This is a "daemon-safe" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface StatusInfo () <NSXPCListenerDelegate>
+2 -3
View File
@@ -13,9 +13,8 @@
#include <sys/event.h>
#include <sys/time.h>
#ifdef _APPKITDEFINES_H
#error This is a "daemon-safe" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface TerminationListener ()
+2 -3
View File
@@ -1,9 +1,8 @@
#import <Foundation/Foundation.h>
#import "AppInstaller.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
int main(int __unused argc, const char __unused *argv[])
{
+2 -3
View File
@@ -13,9 +13,8 @@
#import "SPUDownloadData.h"
#import "SUErrors.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
typedef NS_ENUM(NSUInteger, SPUDownloadMode)
{
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SUInstallerConnection.h"
#import "SPUSystemAuthorization.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection Keep Alive";
@@ -8,9 +8,8 @@
#import "SUXPCInstallerConnection.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUXPCInstallerConnection ()
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SUInstallerConnection.h"
#import "SUInstallerCommunicationProtocol.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface ServiceDelegate : NSObject <NSXPCListenerDelegate>
@end
+2 -3
View File
@@ -17,9 +17,8 @@
#import "SUHost.h"
#import <ServiceManagement/ServiceManagement.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUInstallerLauncher
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SUInstallerStatus.h"
#import "SPUSystemAuthorization.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUInstallerStatus ()
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SUXPCInstallerStatus.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUXPCInstallerStatus ()
+2 -3
View File
@@ -9,9 +9,8 @@
#import <Foundation/Foundation.h>
#import "SUInstallerStatus.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface ServiceDelegate : NSObject <NSXPCListenerDelegate>
@end
+2
View File
@@ -956,6 +956,7 @@
7205C46D1E13245600E370AE /* ConfigUnitTestRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUnitTestRelease.xcconfig; sourceTree = "<group>"; };
7205C46E1E13254500E370AE /* ConfigUITestDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestDebug.xcconfig; sourceTree = "<group>"; };
7205C46F1E13255900E370AE /* ConfigUITestRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestRelease.xcconfig; sourceTree = "<group>"; };
720767D11E2EB86200F9A850 /* AppKitPrevention.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitPrevention.h; sourceTree = "<group>"; };
720B16421C66433D006985FB /* UITests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UITests-Info.plist"; path = "UITests/UITests-Info.plist"; sourceTree = SOURCE_ROOT; };
720B16431C66433D006985FB /* SUTestApplicationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SUTestApplicationTest.swift; path = UITests/SUTestApplicationTest.swift; sourceTree = SOURCE_ROOT; };
720E21791D0D00BF003A311C /* SPUUpdaterCycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPUUpdaterCycle.h; sourceTree = "<group>"; };
@@ -1502,6 +1503,7 @@
1495006D195FBBBD00BC5B5B /* Sparkle */ = {
isa = PBXGroup;
children = (
720767D11E2EB86200F9A850 /* AppKitPrevention.h */,
61299B3909CB055000B7442F /* Appcast Support */,
55C14BD5136EEFD000649790 /* Autoupdate */,
72F9EBE41D519425004AC8B6 /* Deprecated */,
+20
View File
@@ -0,0 +1,20 @@
//
// AppKitPrevention.h
// Sparkle
//
// Created by Mayur Pawashe on 1/17/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
// #include (not #import) this header to prevent AppKit from being imported
// Note this should be your LAST #include in your implementation file
// If this error is triggered, you can have Xcode indicate to you which source file including this header caused the issue
// One may wonder for certain targets where AppKit is banned completely, why just not link AppKit instead.
// Well, Xcode has thing called auto-linking that I don't trust very much.
// Even after trying to disable the setting, I've had targets able to link to AppKit without AppKit being specified in the list of linked libraries.
#ifdef _APPKITDEFINES_H
#error This is a core or daemon-safe module and should NOT import AppKit
#endif
+2 -3
View File
@@ -16,9 +16,8 @@
#import "SPUUserDriver.h"
#import "SUErrors.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUAutomaticUpdateDriver () <SPUCoreBasedUpdateDriverDelegate>
+2 -3
View File
@@ -18,9 +18,8 @@
#import "SPUInstallationInfo.h"
#import "SPUResumableUpdate.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUBasicUpdateDriver () <SUAppcastDriverDelegate>
+2 -3
View File
@@ -21,9 +21,8 @@
#import "SULocalizations.h"
#import "SPUInstallationType.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUCoreBasedUpdateDriver () <SPUBasicUpdateDriverDelegate, SPUDownloadDriverDelegate, SPUInstallerDriverDelegate>
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUDownloadData.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SPUDownloadDataKey = @"SPUDownloadData";
static NSString *SPUDownloadTextEncodingKey = @"SPUDownloadTextEncoding";
+2 -3
View File
@@ -20,9 +20,8 @@
#import "SPUDownloadedUpdate.h"
#import "SPUDownloadData.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUDownloadDriver () <SPUDownloaderDelegate>
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUDownloadedUpdate.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SPUDownloadedUpdate
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUInformationalUpdate.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SPUInformationalUpdate
+2 -3
View File
@@ -26,9 +26,8 @@
#import "SPUDownloadedUpdate.h"
#import "SPUInstallationType.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
#define FIRST_INSTALLER_MESSAGE_TIMEOUT 7ull
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SPULocalCacheDirectory.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSTimeInterval OLD_ITEM_DELETION_INTERVAL = 86400 * 10; // 10 days
+2 -3
View File
@@ -15,9 +15,8 @@
#import "SUXPCInstallerStatus.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
// This timeout is if probing the installer takes too long
// It should be at least more than 1 second since a probe can take around that much time
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SPUProbingUpdateDriver.h"
#import "SPUBasicUpdateDriver.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUProbingUpdateDriver () <SPUBasicUpdateDriverDelegate>
+2 -3
View File
@@ -12,9 +12,8 @@
#import "SPUUpdaterDelegate.h"
#import "SPUUserDriver.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUScheduledUpdateDriver() <SPUUIBasedUpdateDriverDelegate>
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SPUSecureCoding.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SURootObjectArchiveKey = @"SURootObjectArchive";
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SPUInstallationType.h"
#import "SUFileManager.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
BOOL SPUNeedsSystemAuthorizationAccess(NSString *path, NSString *installationType)
{
+2 -3
View File
@@ -18,9 +18,8 @@
#import "SPUDownloadData.h"
#import "SPUResumableUpdate.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUUIBasedUpdateDriver() <SPUCoreBasedUpdateDriverDelegate>
+2 -3
View File
@@ -15,9 +15,8 @@
#import "SPUDownloader.h"
#import "SUErrors.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUTemporaryDownloaderDelegate : NSObject <SPUDownloaderDelegate>
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUURLRequest.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SPUURLRequestURLKey = @"SPUURLRequestURL";
static NSString *SPUURLRequestCachePolicyKey = @"SPUURLRequestCachePolicy";
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUUpdatePermissionRequest.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SPUUpdatePermissionRequestSystemProfileKey = @"SPUUpdatePermissionRequestSystemProfile";
+2 -3
View File
@@ -30,9 +30,8 @@
#import "SPUUpdaterTimer.h"
#import "SPUResumableUpdate.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
NSString *const SUUpdaterDidFinishLoadingAppCastNotification = @"SUUpdaterDidFinishLoadingAppCastNotification";
NSString *const SUUpdaterDidFindValidUpdateNotification = @"SUUpdaterDidFindValidUpdateNotification";
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUUpdaterCycle.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUUpdaterCycle ()
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SUHost.h"
#import "SUConstants.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUUpdaterSettings ()
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUUpdaterTimer.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUUpdaterTimer ()
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUUserDriverCoreComponent.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUUserDriverCoreComponent ()
+2 -3
View File
@@ -10,9 +10,8 @@
#import "SPUUIBasedUpdateDriver.h"
#import "SPUUserDriver.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SPUUserInitiatedUpdateDriver () <SPUUIBasedUpdateDriverDelegate>
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SPUXPCServiceInfo.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
BOOL SPUXPCServiceExists(NSString *bundleName)
{
+2 -3
View File
@@ -17,9 +17,8 @@
#import "SPUURLDownload.h"
#import "SPUDownloadData.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface NSXMLElement (SUAppcastExtensions)
@property (readonly, copy) NSDictionary *attributesAsDictionary;
+2 -3
View File
@@ -16,9 +16,8 @@
#import "SUHost.h"
#import "SUConstants.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUAppcastDriver ()
+2 -3
View File
@@ -12,9 +12,8 @@
#import "SUConstants.h"
#import "SPUInstallationType.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SUAppcastItemDeltaUpdatesKey = @"deltaUpdates";
static NSString *SUAppcastItemDisplayVersionStringKey = @"displayVersionString";
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SUBundleIcon.h"
#import "SUHost.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUBundleIcon
+1 -3
View File
@@ -13,9 +13,7 @@
#define DEBUG 0
#endif
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
// Define some minimum intervals to avoid DoS-like checking attacks
const NSTimeInterval SUMinimumUpdateCheckInterval = DEBUG ? 60 : (60 * 60);
+2 -3
View File
@@ -14,9 +14,8 @@
#include <sys/time.h>
#include <sys/stat.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static char SUAppleQuarantineIdentifier[] = "com.apple.quarantine";
+2 -3
View File
@@ -11,9 +11,8 @@
#include <sys/mount.h> // For statfs for isRunningOnReadOnlyVolume
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
// This class should not rely on AppKit and should also be process independent
// For example, it should not have code that tests writabilty to somewhere on disk,
+2 -3
View File
@@ -11,9 +11,8 @@
#include <os/log.h>
#import "SUOperatingSystem.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" implementation and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
// For converting constants to string literals using the preprocessor
#define STRINGIFY(x) #x
+2 -3
View File
@@ -7,9 +7,8 @@
#import "SUOperatingSystem.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000
@interface NSProcessInfo ()
+2 -3
View File
@@ -9,9 +9,8 @@
#import "SUVersionComparisonProtocol.h"
#import "SUStandardVersionComparator.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@implementation SUStandardVersionComparator
+2 -4
View File
@@ -8,14 +8,12 @@
//
#import "SUSystemProfiler.h"
#import "SUHost.h"
#import "SUOperatingSystem.h"
#include <sys/sysctl.h>
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *const SUSystemProfilerApplicationNameKey = @"appName";
static NSString *const SUSystemProfilerApplicationVersionKey = @"appVersion";
+3
View File
@@ -11,6 +11,9 @@
#import "SUConstants.h"
#import "SUFileManager.h"
#include "AppKitPrevention.h"
@implementation SUSystemUpdateInfo
+ (BOOL)systemAllowsAutomaticUpdatesForHost:(SUHost *)host
+2 -3
View File
@@ -8,9 +8,8 @@
#import "SUUpdatePermissionResponse.h"
#ifdef _APPKITDEFINES_H
#error This is a "core" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
static NSString *SUUpdatePermissionAutomaticUpdateChecksKey = @"SUUpdatePermissionAutomaticUpdateChecks";
static NSString *SUUpdatePermissionSendSystemProfileKey = @"SUUpdatePermissionSendSystemProfile";
+2 -3
View File
@@ -13,9 +13,8 @@
#import "SUHost.h"
#import "SULog.h"
#ifdef _APPKITDEFINES_H
#error This is a "daemon-safe" class and should NOT import AppKit
#endif
#include "AppKitPrevention.h"
@interface SUUpdateValidator ()