From c7184c21da819287d08d10a958d6de1af54e53e3 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Fri, 10 Jul 2015 09:40:49 -0700 Subject: [PATCH 01/24] Add script to generate a report comparing the Sparkle.strings files --- Makefile | 5 ++ Sparkle/CheckLocalizations.swift | 89 ++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100755 Sparkle/CheckLocalizations.swift diff --git a/Makefile b/Makefile index 6912bdda..58dd0724 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,8 @@ ci: xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Debug test ; \ fi ; \ done + +check-localizations: + xcrun swiftc -sdk `xcrun --show-sdk-path` -o "$(TMPDIR)/CheckLocalizations" Sparkle/CheckLocalizations.swift + "$(TMPDIR)/CheckLocalizations" . "$(TMPDIR)/LocalizationsReport.htm" + open "$(TMPDIR)/LocalizationsReport.htm" diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift new file mode 100755 index 00000000..a8eac8d1 --- /dev/null +++ b/Sparkle/CheckLocalizations.swift @@ -0,0 +1,89 @@ +import Foundation + +let args = NSProcessInfo.processInfo().arguments +if args.count < 3 { + println("ERROR: Missing arguments.") + exit(1) +} +let sparkleRoot = args[1] as! String +let htmlPath = args[2] as! String + +let enStringsPath = sparkleRoot + "/Sparkle/en.lproj/Sparkle.strings" +let enStringsDict = NSDictionary(contentsOfFile: enStringsPath) +if enStringsDict == nil { + println("ERROR: Invalid English strings.") + exit(1) +} +let enStringsDictKeys = enStringsDict!.allKeys + +let dirPath = sparkleRoot + "/Sparkle" +let dirContents = NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath, error: nil) as! [String] +let css = + "body { font-family: sans-serif; font-size: 10pt; }" + + "h1 { font-size: 12pt; }" + + ".missing { background-color: #FFBABA; color: #D6010E; }" + + ".unused { background-color: #BDE5F8; color: #00529B; }" + + ".unlocalized { background-color: #FEEFB3; color: #9F6000; }" +var html = "\n\nLocalizations\n\n\n" +let locale = NSLocale.currentLocale() +for dirEntry in dirContents { + if dirEntry.pathExtension != "lproj" || dirEntry == "en.lproj" { + continue + } + + let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: dirEntry.stringByDeletingPathExtension) + html += "

\(dirEntry) (\(lang!))

\n" + + let stringsPath = dirPath.stringByAppendingPathComponent(dirEntry).stringByAppendingPathComponent("Sparkle.strings") + let stringsDict = NSDictionary(contentsOfFile: stringsPath) + if stringsDict == nil { + println(" ERROR: Invalid strings file \(dirEntry)") + continue + } + + var missing: [String] = [] + var unlocalized: [String] = [] + var unused: [String] = [] + + for key in enStringsDictKeys { + let str = stringsDict?.objectForKey(key) as? String + if str == nil { + missing.append(key as! String) + } else if let enStr = enStringsDict?.objectForKey(key) as? String { + if enStr == str { + unlocalized.append(key as! String) + } + } + } + + let stringsDictKeys = stringsDict!.allKeys + for key in stringsDictKeys { + if enStringsDict?.objectForKey(key) == nil { + unused.append(key as! String) + } + } + + let sorter = { (s1: String, s2: String) -> Bool in + return s1 < s2 + } + missing.sort(sorter) + unlocalized.sort(sorter) + unused.sort(sorter) + + for key in missing { + html += "Missing \"\(key)\"
\n" + } + for key in unlocalized { + html += "Unlocalized \"\(key)\"
\n" + } + for key in unused { + html += "Unused \"\(key)\"
\n" + } +} +html += "" + +var err: NSError? +if !html.writeToFile(htmlPath, atomically: true, encoding: NSUTF8StringEncoding, error: &err) { + println("ERROR: Can't write report: \(err)") + exit(1) +} From b3d8cf11f71f318027fcbdd4b86457fc6238d740 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Fri, 10 Jul 2015 12:56:13 -0700 Subject: [PATCH 02/24] CheckLocalizations: escape HTML --- Sparkle/CheckLocalizations.swift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift index a8eac8d1..7d04d9ae 100755 --- a/Sparkle/CheckLocalizations.swift +++ b/Sparkle/CheckLocalizations.swift @@ -1,5 +1,12 @@ import Foundation +func escapeHTML(str: String) -> String { + if let node = NSXMLNode.textWithStringValue(str) as? NSXMLNode { + return node.XMLString + } + return "" +} + let args = NSProcessInfo.processInfo().arguments if args.count < 3 { println("ERROR: Missing arguments.") @@ -71,13 +78,13 @@ for dirEntry in dirContents { unused.sort(sorter) for key in missing { - html += "Missing \"\(key)\"
\n" + html += "Missing \"\(escapeHTML(key))\"
\n" } for key in unlocalized { - html += "Unlocalized \"\(key)\"
\n" + html += "Unlocalized \"\(escapeHTML(key))\"
\n" } for key in unused { - html += "Unused \"\(key)\"
\n" + html += "Unused \"\(escapeHTML(key))\"
\n" } } html += "" From 0d9597c9a9fd907a088ab546009900e72f618c52 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Fri, 10 Jul 2015 13:02:16 -0700 Subject: [PATCH 03/24] CheckLocalizations: add a helper for error handling --- Sparkle/CheckLocalizations.swift | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift index 7d04d9ae..6da698c2 100755 --- a/Sparkle/CheckLocalizations.swift +++ b/Sparkle/CheckLocalizations.swift @@ -1,16 +1,20 @@ import Foundation +func die(msg: String) { + println("ERROR: \(msg)") + exit(1) +} + func escapeHTML(str: String) -> String { if let node = NSXMLNode.textWithStringValue(str) as? NSXMLNode { return node.XMLString } - return "" + die("NSXMLNode failure"); return "" } let args = NSProcessInfo.processInfo().arguments if args.count < 3 { - println("ERROR: Missing arguments.") - exit(1) + die("Missing arguments") } let sparkleRoot = args[1] as! String let htmlPath = args[2] as! String @@ -18,8 +22,7 @@ let htmlPath = args[2] as! String let enStringsPath = sparkleRoot + "/Sparkle/en.lproj/Sparkle.strings" let enStringsDict = NSDictionary(contentsOfFile: enStringsPath) if enStringsDict == nil { - println("ERROR: Invalid English strings.") - exit(1) + die("Invalid English strings") } let enStringsDictKeys = enStringsDict!.allKeys @@ -44,7 +47,7 @@ for dirEntry in dirContents { let stringsPath = dirPath.stringByAppendingPathComponent(dirEntry).stringByAppendingPathComponent("Sparkle.strings") let stringsDict = NSDictionary(contentsOfFile: stringsPath) if stringsDict == nil { - println(" ERROR: Invalid strings file \(dirEntry)") + die("Invalid strings file \(dirEntry)") continue } @@ -91,6 +94,5 @@ html += "" var err: NSError? if !html.writeToFile(htmlPath, atomically: true, encoding: NSUTF8StringEncoding, error: &err) { - println("ERROR: Can't write report: \(err)") - exit(1) + die("Can't write report: \(err)") } From 14fe42e7da586aab0b86f6980f93699fa7322338 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Fri, 10 Jul 2015 13:10:38 -0700 Subject: [PATCH 04/24] CheckLocalizations: use NSUserDefaults to read args --- Makefile | 2 +- Sparkle/CheckLocalizations.swift | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 58dd0724..ab7ee819 100644 --- a/Makefile +++ b/Makefile @@ -29,5 +29,5 @@ ci: check-localizations: xcrun swiftc -sdk `xcrun --show-sdk-path` -o "$(TMPDIR)/CheckLocalizations" Sparkle/CheckLocalizations.swift - "$(TMPDIR)/CheckLocalizations" . "$(TMPDIR)/LocalizationsReport.htm" + "$(TMPDIR)/CheckLocalizations" -root . -htmlPath "$(TMPDIR)/LocalizationsReport.htm" open "$(TMPDIR)/LocalizationsReport.htm" diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift index 6da698c2..4c2a518b 100755 --- a/Sparkle/CheckLocalizations.swift +++ b/Sparkle/CheckLocalizations.swift @@ -12,21 +12,21 @@ func escapeHTML(str: String) -> String { die("NSXMLNode failure"); return "" } -let args = NSProcessInfo.processInfo().arguments -if args.count < 3 { +let ud = NSUserDefaults.standardUserDefaults() +let sparkleRoot = ud.objectForKey("root") as? String +let htmlPath = ud.objectForKey("htmlPath") as? String +if sparkleRoot == nil || htmlPath == nil { die("Missing arguments") } -let sparkleRoot = args[1] as! String -let htmlPath = args[2] as! String -let enStringsPath = sparkleRoot + "/Sparkle/en.lproj/Sparkle.strings" +let enStringsPath = sparkleRoot! + "/Sparkle/en.lproj/Sparkle.strings" let enStringsDict = NSDictionary(contentsOfFile: enStringsPath) if enStringsDict == nil { die("Invalid English strings") } let enStringsDictKeys = enStringsDict!.allKeys -let dirPath = sparkleRoot + "/Sparkle" +let dirPath = sparkleRoot! + "/Sparkle" let dirContents = NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath, error: nil) as! [String] let css = "body { font-family: sans-serif; font-size: 10pt; }" + @@ -93,6 +93,6 @@ for dirEntry in dirContents { html += "" var err: NSError? -if !html.writeToFile(htmlPath, atomically: true, encoding: NSUTF8StringEncoding, error: &err) { +if !html.writeToFile(htmlPath!, atomically: true, encoding: NSUTF8StringEncoding, error: &err) { die("Can't write report: \(err)") } From 9992fa28ed3df8bf0ef19d7cc690134ad8063611 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Fri, 10 Jul 2015 13:14:22 -0700 Subject: [PATCH 05/24] CheckLocalizations: use swift shebang --- Makefile | 3 +-- Sparkle/CheckLocalizations.swift | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ab7ee819..b3de3f8f 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,5 @@ ci: done check-localizations: - xcrun swiftc -sdk `xcrun --show-sdk-path` -o "$(TMPDIR)/CheckLocalizations" Sparkle/CheckLocalizations.swift - "$(TMPDIR)/CheckLocalizations" -root . -htmlPath "$(TMPDIR)/LocalizationsReport.htm" + ./Sparkle/CheckLocalizations.swift -root . -htmlPath "$(TMPDIR)/LocalizationsReport.htm" open "$(TMPDIR)/LocalizationsReport.htm" diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift index 4c2a518b..1f751fda 100755 --- a/Sparkle/CheckLocalizations.swift +++ b/Sparkle/CheckLocalizations.swift @@ -1,3 +1,5 @@ +#!/usr/bin/xcrun swift + import Foundation func die(msg: String) { From e08422234b648304fc54da17b5cba46334c6047c Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Mon, 27 Jul 2015 12:22:40 -0400 Subject: [PATCH 06/24] Quiet warnings generated by -Wassign-enum by casting to the expected enum type. Most of these warnings are inevitable because of the design of the enum type to separately declare enum constants for specific APIs, but to stick to the more generic shared enum type in the function prototype. --- Sparkle/SUCodeSigningVerifier.m | 6 +++--- Sparkle/SUDSAVerifier.m | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUCodeSigningVerifier.m b/Sparkle/SUCodeSigningVerifier.m index 73efc6c1..8690641b 100644 --- a/Sparkle/SUCodeSigningVerifier.m +++ b/Sparkle/SUCodeSigningVerifier.m @@ -52,7 +52,7 @@ // Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing. // See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206 - SecCSFlags flags = kSecCSDefaultFlags | kSecCSCheckAllArchitectures; + SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures); result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, requirement, &cfError); if (cfError) { @@ -108,7 +108,7 @@ finally: // Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing. // See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206 - SecCSFlags flags = kSecCSDefaultFlags | kSecCSCheckAllArchitectures; + SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures); result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, NULL, &cfError); if (cfError) { @@ -136,7 +136,7 @@ static id valueOrNSNull(id value) { + (void)logSigningInfoForCode:(SecStaticCodeRef)code label:(NSString*)label { CFDictionaryRef signingInfo = nil; - const SecCSFlags flags = kSecCSSigningInformation | kSecCSRequirementInformation | kSecCSDynamicInformation | kSecCSContentInformation; + const SecCSFlags flags = (SecCSFlags) (kSecCSSigningInformation | kSecCSRequirementInformation | kSecCSDynamicInformation | kSecCSContentInformation); if (SecCodeCopySigningInformation(code, flags, &signingInfo) == noErr) { NSDictionary *signingDict = CFBridgingRelease(signingInfo); NSMutableDictionary *relevantInfo = [NSMutableDictionary dictionary]; diff --git a/Sparkle/SUDSAVerifier.m b/Sparkle/SUDSAVerifier.m index 4789327e..b9018471 100644 --- a/Sparkle/SUDSAVerifier.m +++ b/Sparkle/SUDSAVerifier.m @@ -55,7 +55,7 @@ SecExternalItemType itemType = kSecItemTypePublicKey; CFArrayRef items = NULL; - OSStatus status = SecItemImport((__bridge CFDataRef)data, NULL, &format, &itemType, 0, NULL, NULL, &items); + OSStatus status = SecItemImport((__bridge CFDataRef)data, NULL, &format, &itemType, (SecItemImportExportFlags)0, NULL, NULL, &items); if (status != errSecSuccess || !items) { if (items) { CFRelease(items); From 93957e5183273b8be414e548417cc50a40df4098 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Mon, 27 Jul 2015 13:05:13 -0400 Subject: [PATCH 07/24] Quiet warning about casting away const-ness of CFTypeRef. --- Sparkle/SUDSAVerifier.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sparkle/SUDSAVerifier.m b/Sparkle/SUDSAVerifier.m index b9018471..fa5f9934 100644 --- a/Sparkle/SUDSAVerifier.m +++ b/Sparkle/SUDSAVerifier.m @@ -65,7 +65,13 @@ } if (format == kSecFormatOpenSSL && itemType == kSecItemTypePublicKey && CFArrayGetCount(items) == 1) { + // Seems silly, but we can't quiet the warning about dropping CFTypeRef's const qualifier through + // any manner of casting I've tried, including interim explicit cast to void*. The -Wcast-qual + // warning is on by default with -Weverything and apparently became more noisy as of Xcode 7. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-qual" _secKey = (SecKeyRef)CFRetain(CFArrayGetValueAtIndex(items, 0)); +#pragma clang diagnostic pop } CFRelease(items); From 43442f8b9b6eed81d12494b4715ae3078ac78a7b Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Mon, 27 Jul 2015 13:10:01 -0400 Subject: [PATCH 08/24] Beginning with the 10.11 SDK, WebView expects delegates to conform with explicit protocols. Declare these protocols on SUUpdateAlert, and define dummy protocols when building with an earlier SDK. --- Sparkle/SUUpdateAlert.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sparkle/SUUpdateAlert.h b/Sparkle/SUUpdateAlert.h index 2db57bf4..fa643c81 100644 --- a/Sparkle/SUUpdateAlert.h +++ b/Sparkle/SUUpdateAlert.h @@ -9,9 +9,19 @@ #ifndef SUUPDATEALERT_H #define SUUPDATEALERT_H +#import #import "SUWindowController.h" #import "SUVersionDisplayProtocol.h" +// WebKit protocols are not explicitly declared until 10.11 SDK, so +// declare dummy protocols to keep the build working on earlier SDKs. +#if !defined(MAC_OS_X_VERSION_10_11) +@protocol WebFrameLoadDelegate +@end +@protocol WebPolicyDelegate +@end +#endif + @protocol SUUpdateAlertDelegate; typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { @@ -22,7 +32,7 @@ typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { }; @class WebView, SUAppcastItem, SUHost; -@interface SUUpdateAlert : SUWindowController +@interface SUUpdateAlert : SUWindowController @property (weak) id versionDisplayer; From 7347631d34cdb0b2bc91186fc18616f4c2f5e69c Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 10:47:09 -0700 Subject: [PATCH 09/24] Don't pollute headers with version checks. --- Sparkle/SUUpdateAlert.h | 14 ++------------ Sparkle/SUUpdateAlert.m | 11 ++++++++++- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Sparkle/SUUpdateAlert.h b/Sparkle/SUUpdateAlert.h index fa643c81..999afd5e 100644 --- a/Sparkle/SUUpdateAlert.h +++ b/Sparkle/SUUpdateAlert.h @@ -9,19 +9,9 @@ #ifndef SUUPDATEALERT_H #define SUUPDATEALERT_H -#import #import "SUWindowController.h" #import "SUVersionDisplayProtocol.h" -// WebKit protocols are not explicitly declared until 10.11 SDK, so -// declare dummy protocols to keep the build working on earlier SDKs. -#if !defined(MAC_OS_X_VERSION_10_11) -@protocol WebFrameLoadDelegate -@end -@protocol WebPolicyDelegate -@end -#endif - @protocol SUUpdateAlertDelegate; typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { @@ -31,8 +21,8 @@ typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { SUOpenInfoURLChoice }; -@class WebView, SUAppcastItem, SUHost; -@interface SUUpdateAlert : SUWindowController +@class SUAppcastItem, SUHost; +@interface SUUpdateAlert : SUWindowController @property (weak) id versionDisplayer; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index bd1ebf0d..6338956d 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -17,7 +17,16 @@ #import "SUConstants.h" -@interface SUUpdateAlert () +// WebKit protocols are not explicitly declared until 10.11 SDK, so +// declare dummy protocols to keep the build working on earlier SDKs. +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100 +@protocol WebFrameLoadDelegate +@end +@protocol WebPolicyDelegate +@end +#endif + +@interface SUUpdateAlert () @property (strong) SUAppcastItem *updateItem; @property (strong) SUHost *host; From 7554daca6562f1ccb0b6e36568654fa6c4fefac0 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 10:50:13 -0700 Subject: [PATCH 10/24] Remove obsolete build phase that Xcode 7 complains about. This does not seem to lose any functionality as testing is handled by the test scheme. --- Sparkle.xcodeproj/project.pbxproj | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index a91a852c..aef95ef1 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -28,7 +28,7 @@ 1420DF50196247F900203BB0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1420DF4F196247F900203BB0 /* Images.xcassets */; }; 1420DF51196247F900203BB0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1420DF4F196247F900203BB0 /* Images.xcassets */; }; 142E0E0019A6954400E4312B /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 142E0E0219A6A14700E4312B /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 142E0E0219A6A14700E4312B /* Sparkle.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 142E0E0419A6A26F00E4312B /* Autoupdate.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55C14BB7136EEF1500649790 /* Autoupdate.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 142E0E0819A83AAC00E4312B /* SUBinaryDeltaTest.m */; }; 14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E20FD68CC7005AE3F6 /* SUBinaryDeltaCommon.m */; }; @@ -278,14 +278,15 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 142E0E0119A6A13300E4312B /* CopyFiles */ = { + 142E0E0119A6A13300E4312B /* Copy Files */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 142E0E0219A6A14700E4312B /* Sparkle.framework in CopyFiles */, + 142E0E0219A6A14700E4312B /* Sparkle.framework in Copy Files */, ); + name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; }; 142E0E0319A6A24100E4312B /* CopyFiles */ = { @@ -1138,8 +1139,7 @@ 612279D50DB5470200AB99EA /* Sources */, 612279D60DB5470200AB99EA /* Frameworks */, 14958C6D19AEBC890061B14F /* Resources */, - 142E0E0119A6A13300E4312B /* CopyFiles */, - 612279D70DB5470200AB99EA /* ShellScript */, + 142E0E0119A6A13300E4312B /* Copy Files */, ); buildRules = ( ); @@ -1338,20 +1338,6 @@ shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\""; showEnvVarsInLog = 0; }; - 612279D70DB5470200AB99EA /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - showEnvVarsInLog = 0; - }; 6131B1910DDCDE32005215F0 /* Run Script: Set Git Version Info */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 12; From 01caea16117ceb1f645b7626d42f4b4aacef34f0 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 10:56:40 -0700 Subject: [PATCH 11/24] Commit some auto-generated Xcode changes. --- .../xcshareddata/xcschemes/Distribution.xcscheme | 8 ++++---- Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme b/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme index 5ea1b73a..7a051ea2 100644 --- a/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme +++ b/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme @@ -23,10 +23,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -52,11 +52,11 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -52,11 +52,11 @@ Date: Mon, 27 Jul 2015 14:24:25 -0400 Subject: [PATCH 12/24] For Debug builds, disabling timestamps in code signing means the builds can take place without a network connection. --- Configurations/ConfigCommonDebug.xcconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Configurations/ConfigCommonDebug.xcconfig b/Configurations/ConfigCommonDebug.xcconfig index 53972350..fdf6acae 100644 --- a/Configurations/ConfigCommonDebug.xcconfig +++ b/Configurations/ConfigCommonDebug.xcconfig @@ -10,3 +10,7 @@ SPARKLE_EXTRA_DEBUG = -DDEBUG OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG) ONLY_ACTIVE_ARCH = YES COPY_PHASE_STRIP = NO + +// For Debug builds, we don't require timestamping because Apple's +// server may be down or we may be off-network +OTHER_CODE_SIGN_FLAGS = --timestamp=none From 59d372222e51c953bd81c3eae37db83212f8e05b Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Mon, 27 Jul 2015 14:40:15 -0400 Subject: [PATCH 13/24] Remove unused temporaryName: parameter and supporting code. The temporaryName: parameter to SUPlainInstaller's copyPathWithAuthentication... method was not being used internally but was still mucking up the (already long) method signature for the method and related methods up the chain. Also remove related, no-longer-used temporaryNameForPath method. --- Sparkle/SUBasicUpdateDriver.m | 2 +- Sparkle/SUPlainInstaller.m | 3 +-- Sparkle/SUPlainInstallerInternals.h | 3 +-- Sparkle/SUPlainInstallerInternals.m | 24 +----------------------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index c092f49c..9f17008c 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -431,7 +431,7 @@ NSError *error = nil; [[NSFileManager defaultManager] createDirectoryAtPath:[targetPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:@{} error:&error]; - if ([SUPlainInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath temporaryName:nil appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error]) { + if ([SUPlainInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error]) { self.relaunchPath = targetPath; } else { [self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{ diff --git a/Sparkle/SUPlainInstaller.m b/Sparkle/SUPlainInstaller.m index 95afaba0..975e1184 100644 --- a/Sparkle/SUPlainInstaller.m +++ b/Sparkle/SUPlainInstaller.m @@ -33,9 +33,8 @@ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSError *error = nil; NSString *oldPath = [host bundlePath]; - NSString *tempName = [self temporaryNameForPath:[host installationPath]]; - BOOL result = [self copyPathWithAuthentication:path overPath:installationPath temporaryName:tempName appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error]; + BOOL result = [self copyPathWithAuthentication:path overPath:installationPath appendVersion:SPARKLE_APPEND_VERSION_NUMBER error:&error]; if (result) { if ([SUCodeSigningVerifier applicationAtPathIsCodeSigned:installationPath]) { diff --git a/Sparkle/SUPlainInstallerInternals.h b/Sparkle/SUPlainInstallerInternals.h index cc6778b4..25b2b6f7 100644 --- a/Sparkle/SUPlainInstallerInternals.h +++ b/Sparkle/SUPlainInstallerInternals.h @@ -14,8 +14,7 @@ #import "SUPlainInstaller.h" @interface SUPlainInstaller (Internals) -+ (NSString *)temporaryNameForPath:(NSString *)path; -+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)tmp appendVersion:(BOOL)a error:(NSError **)error; ++ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)a error:(NSError **)error; + (void)_movePathToTrash:(NSString *)path appendVersion:(BOOL)a; + (BOOL)_removeFileAtPath:(NSString *)path error:(NSError **)error; + (BOOL)_removeFileAtPathWithForcedAuthentication:(NSString *)src error:(NSError **)error; diff --git a/Sparkle/SUPlainInstallerInternals.m b/Sparkle/SUPlainInstallerInternals.m index 3f126875..7fd97e27 100644 --- a/Sparkle/SUPlainInstallerInternals.m +++ b/Sparkle/SUPlainInstallerInternals.m @@ -85,28 +85,6 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza @implementation SUPlainInstaller (Internals) -+ (NSString *)temporaryNameForPath:(NSString *)path -{ - // Let's try to read the version number so the filename will be more meaningful. - NSString *postFix; - NSString *version; - if ((version = [[NSBundle bundleWithPath:path] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]) && ![version isEqualToString:@""]) - { - NSMutableCharacterSet *validCharacters = [NSMutableCharacterSet alphanumericCharacterSet]; - [validCharacters formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@".-()"]]; - postFix = [version stringByTrimmingCharactersInSet:[validCharacters invertedSet]]; - } - else - postFix = @"old"; - NSString *prefix = [[path stringByDeletingPathExtension] stringByAppendingFormat:@" (%@)", postFix]; - NSString *tempDir = [prefix stringByAppendingPathExtension:[path pathExtension]]; - // Now let's make sure we get a unique path. - unsigned int cnt = 2; - while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999) - tempDir = [NSString stringWithFormat:@"%@ %u.%@", prefix, cnt++, [path pathExtension]]; - return [tempDir lastPathComponent]; -} - + (NSString *)_temporaryCopyNameForPath:(NSString *)path appendVersion:(BOOL)appendVersion didFindTrash:(BOOL *)outDidFindTrash { // *** MUST BE SAFE TO CALL ON NON-MAIN THREAD! @@ -464,7 +442,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza } } -+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)__unused tmp appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)error ++ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst appendVersion:(BOOL)appendVersion error:(NSError *__autoreleasing *)error { FSRef srcRef, dstRef, dstDirRef, tmpDirRef; OSStatus err; From 73c337b14ef8f975cc22d9a262392f54c7ae3863 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 15:27:24 -0700 Subject: [PATCH 14/24] Use NSXML the whole way through for building the report document. --- Sparkle/CheckLocalizations.swift | 57 ++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift index 1f751fda..f0c05797 100755 --- a/Sparkle/CheckLocalizations.swift +++ b/Sparkle/CheckLocalizations.swift @@ -7,11 +7,11 @@ func die(msg: String) { exit(1) } -func escapeHTML(str: String) -> String { - if let node = NSXMLNode.textWithStringValue(str) as? NSXMLNode { - return node.XMLString +extension NSXMLElement { + convenience init(name: String, attributes: [String: String], stringValue string: String? = nil) { + self.init(name: name, stringValue: string) + setAttributesWithDictionary(attributes) } - die("NSXMLNode failure"); return "" } let ud = NSUserDefaults.standardUserDefaults() @@ -32,31 +32,43 @@ let dirPath = sparkleRoot! + "/Sparkle" let dirContents = NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath, error: nil) as! [String] let css = "body { font-family: sans-serif; font-size: 10pt; }" + - "h1 { font-size: 12pt; }" + - ".missing { background-color: #FFBABA; color: #D6010E; }" + - ".unused { background-color: #BDE5F8; color: #00529B; }" + - ".unlocalized { background-color: #FEEFB3; color: #9F6000; }" -var html = "\n\nLocalizations\n\n\n" + "h1 { font-size: 12pt; }" + + ".missing { background-color: #FFBABA; color: #D6010E; white-space: pre; }" + + ".unused { background-color: #BDE5F8; color: #00529B; white-space: pre; }" + + ".unlocalized { background-color: #FEEFB3; color: #9F6000; white-space: pre; }" +var html = NSXMLDocument(rootElement: NSXMLElement(name: "html")) +html.DTD = NSXMLDTD() +html.DTD!.name = html.rootElement()!.name +html.characterEncoding = "UTF-8" +html.documentContentKind = NSXMLDocumentContentKind.XHTMLKind +var body = NSXMLElement(name: "body") +var head = NSXMLElement(name: "head") +html.rootElement()!.addChild(head) +html.rootElement()!.addChild(body) +head.addChild(NSXMLElement(name: "meta", attributes: ["charset": html.characterEncoding!])) +head.addChild(NSXMLElement(name: "title", stringValue: "Sparkle Localizations Report")) +head.addChild(NSXMLElement(name: "style", stringValue: css)) + let locale = NSLocale.currentLocale() for dirEntry in dirContents { if dirEntry.pathExtension != "lproj" || dirEntry == "en.lproj" { continue } - + let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: dirEntry.stringByDeletingPathExtension) - html += "

\(dirEntry) (\(lang!))

\n" - + body.addChild(NSXMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))")) + let stringsPath = dirPath.stringByAppendingPathComponent(dirEntry).stringByAppendingPathComponent("Sparkle.strings") let stringsDict = NSDictionary(contentsOfFile: stringsPath) if stringsDict == nil { die("Invalid strings file \(dirEntry)") continue } - + var missing: [String] = [] var unlocalized: [String] = [] var unused: [String] = [] - + for key in enStringsDictKeys { let str = stringsDict?.objectForKey(key) as? String if str == nil { @@ -74,27 +86,30 @@ for dirEntry in dirContents { unused.append(key as! String) } } - + let sorter = { (s1: String, s2: String) -> Bool in return s1 < s2 } missing.sort(sorter) unlocalized.sort(sorter) unused.sort(sorter) - + + let addRow = { (prefix: String, cssClass: String, key: String) -> Void in + body.addChild(NSXMLElement(name: "span", attributes: ["class": cssClass], stringValue: " ".join([prefix, key]) + "\n")) + } + for key in missing { - html += "Missing \"\(escapeHTML(key))\"
\n" + addRow("Missing", "missing", key) } for key in unlocalized { - html += "Unlocalized \"\(escapeHTML(key))\"
\n" + addRow("Unlocalized", "unlocalized", key) } for key in unused { - html += "Unused \"\(escapeHTML(key))\"
\n" + addRow("Unused", "unused", key) } } -html += "" var err: NSError? -if !html.writeToFile(htmlPath!, atomically: true, encoding: NSUTF8StringEncoding, error: &err) { +if !html.XMLData.writeToFile(htmlPath!, atomically: true) { die("Can't write report: \(err)") } From 0167c50b1d938b281b8f58d4afa0f836796e3c55 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 15:27:36 -0700 Subject: [PATCH 15/24] Add SparkleLocalizations.swift to the Xcode project. --- Sparkle.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index aef95ef1..41405694 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -340,6 +340,7 @@ 14732BC41960F3FF00593899 /* sign_update */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = sign_update; sourceTree = ""; }; 14732BC91960F70A00593899 /* make-release-package.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "make-release-package.sh"; sourceTree = ""; }; 14732BD219610A1800593899 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CheckLocalizations.swift; path = Sparkle/CheckLocalizations.swift; sourceTree = SOURCE_ROOT; }; 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 = ""; }; @@ -750,6 +751,7 @@ isa = PBXGroup; children = ( 14732BC21960F3FF00593899 /* bin */, + 147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */, 14732BBA1960EF7100593899 /* CHANGELOG */, 61C268090E2DB5D000175E6C /* LICENSE */, 14732BC11960F3B200593899 /* Makefile */, From c1f10ac7f0f9d0127d743775715e6a0cd80fb1b5 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 15:46:23 -0700 Subject: [PATCH 16/24] Add existing localization files to Xcode project. Catalan, Finnish, Hebrew. --- Sparkle.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 41405694..154c4e35 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -341,6 +341,9 @@ 14732BC91960F70A00593899 /* make-release-package.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "make-release-package.sh"; sourceTree = ""; }; 14732BD219610A1800593899 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CheckLocalizations.swift; path = Sparkle/CheckLocalizations.swift; sourceTree = SOURCE_ROOT; }; + 147D6DA71B66EC1C006607AB /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Sparkle.strings; sourceTree = ""; }; + 147D6DA91B66EC22006607AB /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Sparkle.strings; sourceTree = ""; }; + 147D6DAA1B66EC25006607AB /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Sparkle.strings; sourceTree = ""; }; 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 = ""; }; @@ -1697,6 +1700,9 @@ 0263187214FEBB31005EBF43 /* uk */, 61131A090F846D0A00E97AF6 /* zh_CN */, 61131A0A0F846D1100E97AF6 /* zh_TW */, + 147D6DA71B66EC1C006607AB /* ca */, + 147D6DA91B66EC22006607AB /* fi */, + 147D6DAA1B66EC25006607AB /* he */, ); name = Sparkle.strings; sourceTree = ""; From 59b94a2c7d56ff4aba637ccaf410a556923d2412 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 15:53:14 -0700 Subject: [PATCH 17/24] Delete languages which don't actually have any translations. --- Sparkle/cy.lproj/Sparkle.strings | 52 -------------------------------- Sparkle/hu.lproj/Sparkle.strings | 52 -------------------------------- Sparkle/id.lproj/Sparkle.strings | 52 -------------------------------- 3 files changed, 156 deletions(-) delete mode 100644 Sparkle/cy.lproj/Sparkle.strings delete mode 100644 Sparkle/hu.lproj/Sparkle.strings delete mode 100644 Sparkle/id.lproj/Sparkle.strings diff --git a/Sparkle/cy.lproj/Sparkle.strings b/Sparkle/cy.lproj/Sparkle.strings deleted file mode 100644 index a9b47b25..00000000 --- a/Sparkle/cy.lproj/Sparkle.strings +++ /dev/null @@ -1,52 +0,0 @@ -"%@ of %@" = "%1$@ of %2$@"; - -"%@ %@ has been installed and will be ready to use next time %@ starts! Would you like to relaunch now?" = "%1$@ %2$@ has been installed and will be ready to use next time %3$@ starts! Would you like to relaunch now?"; - -"%@ %@ is currently the newest version available." = "%1$@ %2$@ is currently the newest version available."; - -"%@ %@ is now available (you have %@). Would you like to download it now?" = "%1$@ %2$@ is now available (you have %3$@). Would you like to download it now?"; - -"%@ does not have permission to write to the application's directory! Are you running off a disk image? If not, ask your system administrator for help." = "%@ does not have permission to write to the application's directory! Are you running off a disk image? If not, ask your system administrator for help."; - -"A new version of %@ has been installed!" = "A new version of %@ has been installed!"; - -"A new version of %@ is available!" = "A new version of %@ is available!"; - -"An error occurred during installation. Please try again later." = "An error occurred during installation. Please try again later."; - -"An error occurred in retrieving update information. Please try again later." = "An error occurred in retrieving update information. Please try again later."; - -"An error occurred while extracting the archive. Please try again later." = "An error occurred while extracting the archive. Please try again later."; - -"An error occurred while trying to download the file. Please try again later." = "An error occurred while trying to download the file. Please try again later."; - -"An update is already in progress!" = "An update is already in progress!"; - -"Cancel" = "Cancel"; - -"Check for updates on startup?" = "Check for updates on startup?"; - -"Downloading update..." = "Downloading update…"; - -"Extracting update..." = "Extracting update…"; - -"Install and Relaunch" = "Install and Relaunch"; - -"Installing update..." = "Installing update…"; - -"No" = "No"; - -"OK" = "OK"; - -"Ready to Install" = "Ready to Install"; - -"Update Error!" = "Update Error!"; - -"Updating %@" = "Updating %@"; - -"Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the application menu." = "Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the application menu."; - -"Yes" = "Yes"; - -"You're up to date!" = "You're up to date!"; - diff --git a/Sparkle/hu.lproj/Sparkle.strings b/Sparkle/hu.lproj/Sparkle.strings deleted file mode 100644 index a9b47b25..00000000 --- a/Sparkle/hu.lproj/Sparkle.strings +++ /dev/null @@ -1,52 +0,0 @@ -"%@ of %@" = "%1$@ of %2$@"; - -"%@ %@ has been installed and will be ready to use next time %@ starts! Would you like to relaunch now?" = "%1$@ %2$@ has been installed and will be ready to use next time %3$@ starts! Would you like to relaunch now?"; - -"%@ %@ is currently the newest version available." = "%1$@ %2$@ is currently the newest version available."; - -"%@ %@ is now available (you have %@). Would you like to download it now?" = "%1$@ %2$@ is now available (you have %3$@). Would you like to download it now?"; - -"%@ does not have permission to write to the application's directory! Are you running off a disk image? If not, ask your system administrator for help." = "%@ does not have permission to write to the application's directory! Are you running off a disk image? If not, ask your system administrator for help."; - -"A new version of %@ has been installed!" = "A new version of %@ has been installed!"; - -"A new version of %@ is available!" = "A new version of %@ is available!"; - -"An error occurred during installation. Please try again later." = "An error occurred during installation. Please try again later."; - -"An error occurred in retrieving update information. Please try again later." = "An error occurred in retrieving update information. Please try again later."; - -"An error occurred while extracting the archive. Please try again later." = "An error occurred while extracting the archive. Please try again later."; - -"An error occurred while trying to download the file. Please try again later." = "An error occurred while trying to download the file. Please try again later."; - -"An update is already in progress!" = "An update is already in progress!"; - -"Cancel" = "Cancel"; - -"Check for updates on startup?" = "Check for updates on startup?"; - -"Downloading update..." = "Downloading update…"; - -"Extracting update..." = "Extracting update…"; - -"Install and Relaunch" = "Install and Relaunch"; - -"Installing update..." = "Installing update…"; - -"No" = "No"; - -"OK" = "OK"; - -"Ready to Install" = "Ready to Install"; - -"Update Error!" = "Update Error!"; - -"Updating %@" = "Updating %@"; - -"Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the application menu." = "Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the application menu."; - -"Yes" = "Yes"; - -"You're up to date!" = "You're up to date!"; - diff --git a/Sparkle/id.lproj/Sparkle.strings b/Sparkle/id.lproj/Sparkle.strings deleted file mode 100644 index a9b47b25..00000000 --- a/Sparkle/id.lproj/Sparkle.strings +++ /dev/null @@ -1,52 +0,0 @@ -"%@ of %@" = "%1$@ of %2$@"; - -"%@ %@ has been installed and will be ready to use next time %@ starts! Would you like to relaunch now?" = "%1$@ %2$@ has been installed and will be ready to use next time %3$@ starts! Would you like to relaunch now?"; - -"%@ %@ is currently the newest version available." = "%1$@ %2$@ is currently the newest version available."; - -"%@ %@ is now available (you have %@). Would you like to download it now?" = "%1$@ %2$@ is now available (you have %3$@). Would you like to download it now?"; - -"%@ does not have permission to write to the application's directory! Are you running off a disk image? If not, ask your system administrator for help." = "%@ does not have permission to write to the application's directory! Are you running off a disk image? If not, ask your system administrator for help."; - -"A new version of %@ has been installed!" = "A new version of %@ has been installed!"; - -"A new version of %@ is available!" = "A new version of %@ is available!"; - -"An error occurred during installation. Please try again later." = "An error occurred during installation. Please try again later."; - -"An error occurred in retrieving update information. Please try again later." = "An error occurred in retrieving update information. Please try again later."; - -"An error occurred while extracting the archive. Please try again later." = "An error occurred while extracting the archive. Please try again later."; - -"An error occurred while trying to download the file. Please try again later." = "An error occurred while trying to download the file. Please try again later."; - -"An update is already in progress!" = "An update is already in progress!"; - -"Cancel" = "Cancel"; - -"Check for updates on startup?" = "Check for updates on startup?"; - -"Downloading update..." = "Downloading update…"; - -"Extracting update..." = "Extracting update…"; - -"Install and Relaunch" = "Install and Relaunch"; - -"Installing update..." = "Installing update…"; - -"No" = "No"; - -"OK" = "OK"; - -"Ready to Install" = "Ready to Install"; - -"Update Error!" = "Update Error!"; - -"Updating %@" = "Updating %@"; - -"Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the application menu." = "Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the application menu."; - -"Yes" = "Yes"; - -"You're up to date!" = "You're up to date!"; - From f3e44d39ee062aaed336afa40136e545d529e64d Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 15:43:41 -0700 Subject: [PATCH 18/24] Fix some simple translation issues. --- Sparkle/ca.lproj/Sparkle.strings | 2 +- Sparkle/cs.lproj/Sparkle.strings | 2 +- Sparkle/fi.lproj/Sparkle.strings | 2 +- Sparkle/he.lproj/Sparkle.strings | 2 +- Sparkle/is.lproj/Sparkle.strings | 2 +- Sparkle/ko.lproj/Sparkle.strings | 2 +- Sparkle/no.lproj/Sparkle.strings | 2 +- Sparkle/pl.lproj/Sparkle.strings | 2 +- Sparkle/pt_BR.lproj/Sparkle.strings | 2 +- Sparkle/sk.lproj/Sparkle.strings | 1 - Sparkle/tr.lproj/Sparkle.strings | 2 +- 11 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Sparkle/ca.lproj/Sparkle.strings b/Sparkle/ca.lproj/Sparkle.strings index d0ab278c..4f0876a2 100644 --- a/Sparkle/ca.lproj/Sparkle.strings +++ b/Sparkle/ca.lproj/Sparkle.strings @@ -50,5 +50,5 @@ "Yes" = "Sí"; -"You're up to date!" = "Ja esteu al dia!"; +"You're up-to-date!" = "Ja esteu al dia!"; diff --git a/Sparkle/cs.lproj/Sparkle.strings b/Sparkle/cs.lproj/Sparkle.strings index 843f0b2f..2ca1b168 100644 --- a/Sparkle/cs.lproj/Sparkle.strings +++ b/Sparkle/cs.lproj/Sparkle.strings @@ -67,5 +67,5 @@ "You already have the newest version of %@." = "Máte nainstalovanou nejnovější verzi aplikace @."; -"You're up to date!" = "Vaše verze je aktuální!"; +"You're up-to-date!" = "Vaše verze je aktuální!"; diff --git a/Sparkle/fi.lproj/Sparkle.strings b/Sparkle/fi.lproj/Sparkle.strings index f57a8b5a..02268cdb 100644 --- a/Sparkle/fi.lproj/Sparkle.strings +++ b/Sparkle/fi.lproj/Sparkle.strings @@ -48,5 +48,5 @@ "Yes" = "Kyllä"; -"You're up to date!" = "Sinulla on viimeisin versio!"; +"You're up-to-date!" = "Sinulla on viimeisin versio!"; diff --git a/Sparkle/he.lproj/Sparkle.strings b/Sparkle/he.lproj/Sparkle.strings index 0d2aa275..7390d3d8 100644 --- a/Sparkle/he.lproj/Sparkle.strings +++ b/Sparkle/he.lproj/Sparkle.strings @@ -48,5 +48,5 @@ "Yes" = "כן"; -"You're up to date!" = "התכנה עדכנית!"; +"You're up-to-date!" = "התכנה עדכנית!"; diff --git a/Sparkle/is.lproj/Sparkle.strings b/Sparkle/is.lproj/Sparkle.strings index da6f2c63..f3256406 100644 --- a/Sparkle/is.lproj/Sparkle.strings +++ b/Sparkle/is.lproj/Sparkle.strings @@ -48,5 +48,5 @@ "Yes" = "Já"; -"You're up to date!" = "Það er allt uppfært hjá þér!"; +"You're up-to-date!" = "Það er allt uppfært hjá þér!"; diff --git a/Sparkle/ko.lproj/Sparkle.strings b/Sparkle/ko.lproj/Sparkle.strings index 50a93997..5d908b7e 100644 --- a/Sparkle/ko.lproj/Sparkle.strings +++ b/Sparkle/ko.lproj/Sparkle.strings @@ -67,5 +67,5 @@ "You already have the newest version of %@." = "이미 %@ 최신 버전입니다."; -"You're up to date!" = "최신 버전입니다."; +"You're up-to-date!" = "최신 버전입니다."; diff --git a/Sparkle/no.lproj/Sparkle.strings b/Sparkle/no.lproj/Sparkle.strings index 866607cb..ff803c7a 100644 --- a/Sparkle/no.lproj/Sparkle.strings +++ b/Sparkle/no.lproj/Sparkle.strings @@ -48,5 +48,5 @@ "Yes" = "Ja"; -"You're up to date!" = "Du er oppdatert!"; +"You're up-to-date!" = "Du er oppdatert!"; diff --git a/Sparkle/pl.lproj/Sparkle.strings b/Sparkle/pl.lproj/Sparkle.strings index e8bc35c2..953bf45f 100644 --- a/Sparkle/pl.lproj/Sparkle.strings +++ b/Sparkle/pl.lproj/Sparkle.strings @@ -69,5 +69,5 @@ "You already have the newest version of %@." = "Posiadasz najnowszą wersję %@."; -"You're up to date!" = "Jesteś na bieżąco!"; +"You're up-to-date!" = "Jesteś na bieżąco!"; diff --git a/Sparkle/pt_BR.lproj/Sparkle.strings b/Sparkle/pt_BR.lproj/Sparkle.strings index 3b7893e8..a911f9ca 100755 --- a/Sparkle/pt_BR.lproj/Sparkle.strings +++ b/Sparkle/pt_BR.lproj/Sparkle.strings @@ -67,5 +67,5 @@ "You already have the newest version of %@." = "Você já possui a versão mais recente do %@."; -"You're up to date!" = "Você está atualizado!"; +"You're up-to-date!" = "Você está atualizado!"; diff --git a/Sparkle/sk.lproj/Sparkle.strings b/Sparkle/sk.lproj/Sparkle.strings index 4efb5311..7d5760b9 100644 --- a/Sparkle/sk.lproj/Sparkle.strings +++ b/Sparkle/sk.lproj/Sparkle.strings @@ -67,5 +67,4 @@ "You already have the newest version of %@." = "Máte aktuálnu verziu aplikácie %@."; -"You're up to date!" = "Máte aktuálnu verziu!"; "You're up-to-date!" = "Máte aktuálnu verziu!"; diff --git a/Sparkle/tr.lproj/Sparkle.strings b/Sparkle/tr.lproj/Sparkle.strings index b394c64c..177c111c 100644 --- a/Sparkle/tr.lproj/Sparkle.strings +++ b/Sparkle/tr.lproj/Sparkle.strings @@ -119,5 +119,5 @@ "You already have the newest version of %@." = "%@ uygulamasının en güncel sürümü sizde mevcut."; -"You're up to date!" = "Uygulama güncel!"; +"You're up-to-date!" = "Uygulama güncel!"; From 87702985dccf1eed99c9666b88c59bc8e3d6c18f Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 16:10:59 -0700 Subject: [PATCH 19/24] Fix a few more easy translation issues. Here, the English text changed slightly but the original meaning is mostly kept, so the translations can be reconnected. --- Sparkle/ca.lproj/Sparkle.strings | 4 ++-- Sparkle/is.lproj/Sparkle.strings | 4 ++-- Sparkle/tr.lproj/Sparkle.strings | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sparkle/ca.lproj/Sparkle.strings b/Sparkle/ca.lproj/Sparkle.strings index 4f0876a2..2c3eec74 100644 --- a/Sparkle/ca.lproj/Sparkle.strings +++ b/Sparkle/ca.lproj/Sparkle.strings @@ -42,12 +42,12 @@ "Ready to Install" = "A punt per instal·lar"; +"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Voleu que %1$@ comprovi si hi ha noves actualitzacions al iniciar? Si no, podeu inciar la comprovació manualment des del menú %1$@."; + "Update Error!" = "Error d'actualització!"; "Updating %@" = "Actualitzant %@"; -"Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the %@ menu." = "Voleu que %@ comprovi si hi ha noves actualitzacions al iniciar? Si no, podeu inciar la comprovació manualment des del menú @."; - "Yes" = "Sí"; "You're up-to-date!" = "Ja esteu al dia!"; diff --git a/Sparkle/is.lproj/Sparkle.strings b/Sparkle/is.lproj/Sparkle.strings index f3256406..2ba44113 100644 --- a/Sparkle/is.lproj/Sparkle.strings +++ b/Sparkle/is.lproj/Sparkle.strings @@ -40,12 +40,12 @@ "OK" = "Í lagi"; +"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Viltu að forritið %1$@ athugi með uppfærslur þegar það er ræst? Ef ekki getur þú athugað handvirkt af %1$@-valblaðinu."; + "Update Error!" = "Villa við uppfærslu!"; "Updating %@" = "Uppfæri %@"; -"Would you like %@ to check for updates on startup? If not, you can initiate the check manually from the %@ menu." = "Viltu að forritið %@ athugi með uppfærslur þegar það er ræst? Ef ekki getur þú athugað handvirkt af %@-valblaðinu."; - "Yes" = "Já"; "You're up-to-date!" = "Það er allt uppfært hjá þér!"; diff --git a/Sparkle/tr.lproj/Sparkle.strings b/Sparkle/tr.lproj/Sparkle.strings index 177c111c..73072cdc 100644 --- a/Sparkle/tr.lproj/Sparkle.strings +++ b/Sparkle/tr.lproj/Sparkle.strings @@ -4,7 +4,7 @@ /* de_DE v0.1 - No comment provided by engineer. */ -"%1$@ can't be updated when it's running from a disk image. Move %1$@ to your Applications folder, relaunch it from there, and try again." = "%1$@ uygulaması disk kalıbı içerisindeyken güncellenemez. Lütfen %1$@ uygulamasını Uygulamalar dizinine kopyalayıp yeniden başlatınız."; +"%1$@ can't be updated when it's running from a read-only volume like a disk image or an optical drive. Move %1$@ to your Applications folder, relaunch it from there, and try again." = "%1$@ uygulaması disk kalıbı içerisindeyken güncellenemez. Lütfen %1$@ uygulamasını Uygulamalar dizinine kopyalayıp yeniden başlatınız."; /* de_DE v0.1 - No comment provided by engineer. */ From 147906f067728c0083821acde171ba49cbfe8f33 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 16:45:02 -0700 Subject: [PATCH 20/24] Use NSByteCountFormatter if available. --- Sparkle/SUUIBasedUpdateDriver.m | 54 ++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index b1e09370..9a3524c4 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -14,6 +14,21 @@ #import "SUStatusController.h" #import "SUConstants.h" +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1080 +@interface NSByteCountFormatter : NSFormatter { +@private + unsigned int _allowedUnits; + char _countStyle; + BOOL _allowsNonnumericFormatting, _includesUnit, _includesCount, _includesActualByteCount, + _adaptive, _zeroPadsFractionDigits; + int _formattingContext; + int _reserved[5]; +} ++ (NSString *)stringFromByteCount:(long long)byteCount + countStyle:(NSByteCountFormatterCountStyle)countStyle; +@end +#endif + @interface SUUIBasedUpdateDriver () @property (strong) SUStatusController *statusController; @@ -111,30 +126,41 @@ [self.statusController setMaxProgressValue:[response expectedContentLength]]; } -- (NSString *)humanReadableSizeFromDouble:(double)value +- (NSString *)localizedStringFromByteCount:(long long)value { - if (value < 1000) { - return [NSString stringWithFormat:@"%.0lf %@", value, SULocalizedString(@"B", @"the unit for bytes")]; + SInt32 minor = 0; + Gestalt(gestaltSystemVersionMinor, &minor); + if (minor < 8) { + if (value < 1000) { + return [NSString stringWithFormat:@"%.0lf %@", value / 1.0, + SULocalizedString(@"B", @"the unit for bytes")]; + } + + if (value < 1000 * 1000) { + return [NSString stringWithFormat:@"%.0lf %@", value / 1000.0, + SULocalizedString(@"KB", @"the unit for kilobytes")]; + } + + if (value < 1000 * 1000 * 1000) { + return [NSString stringWithFormat:@"%.1lf %@", value / 1000.0 / 1000.0, + SULocalizedString(@"MB", @"the unit for megabytes")]; + } + + return [NSString stringWithFormat:@"%.2lf %@", value / 1000.0 / 1000.0 / 1000.0, + SULocalizedString(@"GB", @"the unit for gigabytes")]; } - if (value < 1000 * 1000) { - return [NSString stringWithFormat:@"%.0lf %@", value / 1000.0, SULocalizedString(@"KB", @"the unit for kilobytes")]; - } - - if (value < 1000 * 1000 * 1000) { - return [NSString stringWithFormat:@"%.1lf %@", value / 1000.0 / 1000.0, SULocalizedString(@"MB", @"the unit for megabytes")]; - } - - return [NSString stringWithFormat:@"%.2lf %@", value / 1000.0 / 1000.0 / 1000.0, SULocalizedString(@"GB", @"the unit for gigabytes")]; + return [NSByteCountFormatter stringFromByteCount:value + countStyle:NSByteCountFormatterCountStyleFile]; } - (void)download:(NSURLDownload *)__unused download didReceiveDataOfLength:(NSUInteger)length { [self.statusController setProgressValue:[self.statusController progressValue] + (double)length]; if ([self.statusController maxProgressValue] > 0.0) - [self.statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ of %@", nil), [self humanReadableSizeFromDouble:[self.statusController progressValue]], [self humanReadableSizeFromDouble:[self.statusController maxProgressValue]]]]; + [self.statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ of %@", nil), [self localizedStringFromByteCount:(long long)self.statusController.progressValue], [self localizedStringFromByteCount:(long long)self.statusController.maxProgressValue]]]; else - [self.statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ downloaded", nil), [self humanReadableSizeFromDouble:[self.statusController progressValue]]]]; + [self.statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ downloaded", nil), [self localizedStringFromByteCount:(long long)self.statusController.progressValue]]]; } - (IBAction)cancelDownload:(id)__unused sender From e4470413378c6138898bccb0ff41f608faf2ebd7 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Tue, 28 Jul 2015 00:00:39 -0400 Subject: [PATCH 21/24] =?UTF-8?q?Revert=20"For=20Debug=20builds,=20disabli?= =?UTF-8?q?ng=20timestamps=20in=20code=20signing=20means=20the=20buil?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configurations/ConfigCommonDebug.xcconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Configurations/ConfigCommonDebug.xcconfig b/Configurations/ConfigCommonDebug.xcconfig index fdf6acae..53972350 100644 --- a/Configurations/ConfigCommonDebug.xcconfig +++ b/Configurations/ConfigCommonDebug.xcconfig @@ -10,7 +10,3 @@ SPARKLE_EXTRA_DEBUG = -DDEBUG OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG) ONLY_ACTIVE_ARCH = YES COPY_PHASE_STRIP = NO - -// For Debug builds, we don't require timestamping because Apple's -// server may be down or we may be off-network -OTHER_CODE_SIGN_FLAGS = --timestamp=none From 3c02940c7e9743495f6eb417d28d8dedbdbb71bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Wed, 29 Jul 2015 00:08:11 +0100 Subject: [PATCH 22/24] Updated model translation plist --- Resources/SUModelTranslation.plist | 58 +++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Resources/SUModelTranslation.plist b/Resources/SUModelTranslation.plist index 74db0ff0..f00e01e5 100644 --- a/Resources/SUModelTranslation.plist +++ b/Resources/SUModelTranslation.plist @@ -16,6 +16,8 @@ iMac (Core 2 Duo, 17 inch, Combo Drive) iMac6,1 iMac (Core 2 Duo, 24 inch, SuperDrive) + iMac7,1 + iMac Intel Core 2 Duo (aluminum enclosure) iMac8,1 iMac (Core 2 Duo, 20 or 24 inch, Early 2008 ) iMac9,1 @@ -25,7 +27,7 @@ iMac11,1 iMac (Core i5 or i7, 27 inch Late 2009) iMac11,2 - iMac (Core i3 or i5, 27 inch Mid 2010) + 21.5" iMac (mid 2010) iMac11,3 iMac (Core i5 or i7, 27 inch Mid 2010) iMac12,1 @@ -42,6 +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) MacBook1,1 MacBook (Core Duo) MacBook2,1 @@ -90,8 +96,54 @@ MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo) MacBookPro4,1 MacBook Pro (Core 2 Duo Feb 2008) + MacBookPro5,1 + MacBook Pro Intel Core 2 Duo (aluminum unibody) + MacBookPro5,2 + MacBook Pro Intel Core 2 Duo (aluminum unibody) + MacBookPro5,3 + MacBook Pro Intel Core 2 Duo (aluminum unibody) + MacBookPro5,4 + MacBook Pro Intel Core 2 Duo (aluminum unibody) + MacBookPro5,5 + MacBook Pro Intel Core 2 Duo (aluminum unibody) + MacBookPro6,1 + MacBook Pro Intel Core i5, Intel Core i7 (mid 2010) + MacBookPro6,2 + MacBook Pro Intel Core i5, Intel Core i7 (mid 2010) + MacBookPro7,1 + MacBook Pro Intel Core 2 Duo (mid 2010) + MacBookPro8,1 + MacBook Pro Intel Core i5, Intel Core i7, 13" (early 2011) + MacBookPro8,2 + MacBook Pro Intel Core i7, 15" (early 2011) + MacBookPro8,3 + MacBook Pro Intel Core i7, 17" (early 2011) + MacBookPro9,1 + MacBook Pro (15-inch, Mid 2012) + MacBookPro9,2 + MacBook Pro (13-inch, Mid 2012) + MacBookPro10,1 + MacBook Pro (Retina, Mid 2012) + MacBookPro10,2 + MacBook Pro (Retina, 13-inch, Late 2012) + MacBookPro11,1 + MacBook Pro (Retina, 13-inch, Late 2013) + MacbookPro11,4 + MacBook Pro (Retina, 15-inch, Mid 2015) + MacbookPro11,5 + MacBook Pro (Retina, 15-inch, Mid 2015) + MacbookPro12,1  + MacBook Pro (Retina, 13-inch, Early 2015) Macmini1,1 Mac Mini (Core Solo/Duo) + Macmini2,1 + Mac mini Intel Core + Macmini3,1 + Mac mini Intel Core + Macmini4,1 + Mac mini Intel Core (mid 2010) + MacPro1,1,Quad + Mac Pro MacPro1,1 Mac Pro (four-core) MacPro2,1 @@ -198,6 +250,8 @@ iMac G4 (17-inch Flat Panel) PowerMac5,1 Power Macintosh G4 Cube + PowerMac5,2 + Power Mac G4 Cube PowerMac6,1 iMac G4 (USB 2.0) PowerMac6,3 @@ -224,5 +278,7 @@ Xserve (Intel Xeon) Xserve2,1 Xserve (January 2008 quad-core) + Xserve3,1 + Xserve (early 2009) From 8a026f2f6ed50ddeb6b5c3a14640e7786e9126d1 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Tue, 28 Jul 2015 17:23:13 -0700 Subject: [PATCH 23/24] Make CI fail properly. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b3de3f8f..f23423c2 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 ; \ + xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Debug test || exit 1 ; \ fi ; \ done From 3e1c6da5846a8fa26042bb370d10582c2f4e2233 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Tue, 28 Jul 2015 17:36:12 -0700 Subject: [PATCH 24/24] Turn off Clang modules for SDK 10.7 and 10.8. Apparently this causes problems... --- Configurations/ConfigCommon.xcconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index d9e78800..2d2c1fe1 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -78,6 +78,10 @@ GCC_WARN_UNUSED_LABEL = YES GCC_WARN_UNUSED_PARAMETER = YES GCC_WARN_UNUSED_VARIABLE = YES +// Fixes a strange issue where the compiler thinks references to some enums are ambiguous +CLANG_ENABLE_MODULES[sdk=macosx10.7] = NO +CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO + // These should be removed once the conversion to ARC is complete WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties