From 003430b2313eccecce38b26a6e22c1279739d138 Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Mon, 6 May 2019 16:26:53 -0700 Subject: [PATCH 1/4] Turn off conversion warnings when building ed25519 submodule --- Sparkle.xcodeproj/project.pbxproj | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 75a258b56..0a84064a4 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -112,23 +112,23 @@ 5AAD006A1E0C2DB500AF411E /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; }; 5AAD006C1E0C2DBF00AF411E /* libxar.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5AAD006B1E0C2DBF00AF411E /* libxar.tbd */; }; 5AB8F169214D4AE300A1187F /* SUSignatures.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF04876214D2E5F00B5789F /* SUSignatures.m */; }; - 5AB8F180214D564C00A1187F /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; }; + 5AB8F180214D564C00A1187F /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 5AB8F181214D564C00A1187F /* sha512.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F170214D564A00A1187F /* sha512.h */; }; - 5AB8F182214D564C00A1187F /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; }; - 5AB8F183214D564C00A1187F /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; }; + 5AB8F182214D564C00A1187F /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5AB8F183214D564C00A1187F /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 5AB8F184214D564C00A1187F /* fe.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F173214D564B00A1187F /* fe.h */; }; 5AB8F185214D564C00A1187F /* ed25519.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F174214D564B00A1187F /* ed25519.h */; }; - 5AB8F186214D564C00A1187F /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; }; + 5AB8F186214D564C00A1187F /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 5AB8F187214D564C00A1187F /* precomp_data.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F176214D564B00A1187F /* precomp_data.h */; }; - 5AB8F188214D564C00A1187F /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; }; - 5AB8F189214D564C00A1187F /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; }; + 5AB8F188214D564C00A1187F /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5AB8F189214D564C00A1187F /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 5AB8F18A214D564C00A1187F /* fixedint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F179214D564B00A1187F /* fixedint.h */; }; 5AB8F18B214D564C00A1187F /* ge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F17A214D564B00A1187F /* ge.h */; }; - 5AB8F18C214D564C00A1187F /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; }; - 5AB8F18D214D564C00A1187F /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; }; - 5AB8F18E214D564C00A1187F /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; }; + 5AB8F18C214D564C00A1187F /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5AB8F18D214D564C00A1187F /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5AB8F18E214D564C00A1187F /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 5AB8F18F214D564C00A1187F /* sc.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AB8F17E214D564B00A1187F /* sc.h */; }; - 5AB8F190214D564C00A1187F /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; }; + 5AB8F190214D564C00A1187F /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 5AB8F191214DA5FD00A1187F /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; }; 5AB8F192214DA5FD00A1187F /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; }; 5AB8F193214DA5FD00A1187F /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; }; @@ -190,16 +190,16 @@ 5D1AF59A0FD767E50065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; }; 5D1AF82B0FD768180065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; }; 5F1510A21C96E591006E1629 /* testnamespaces.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5F1510A11C96E591006E1629 /* testnamespaces.xml */; }; - 5FD37C9D216B3E5A0003A1B6 /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; }; - 5FD37C9E216B3E5A0003A1B6 /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; }; - 5FD37C9F216B3E5A0003A1B6 /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; }; - 5FD37CA0216B3E5A0003A1B6 /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; }; - 5FD37CA1216B3E5A0003A1B6 /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; }; - 5FD37CA2216B3E5A0003A1B6 /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; }; - 5FD37CA3216B3E5A0003A1B6 /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; }; - 5FD37CA4216B3E5A0003A1B6 /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; }; - 5FD37CA5216B3E5A0003A1B6 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; }; - 5FD37CA6216B3E5A0003A1B6 /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; }; + 5FD37C9D216B3E5A0003A1B6 /* add_scalar.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F171214D564A00A1187F /* add_scalar.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37C9E216B3E5A0003A1B6 /* fe.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17C214D564B00A1187F /* fe.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37C9F216B3E5A0003A1B6 /* ge.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F175214D564B00A1187F /* ge.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA0216B3E5A0003A1B6 /* key_exchange.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F178214D564B00A1187F /* key_exchange.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA1216B3E5A0003A1B6 /* keypair.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17F214D564C00A1187F /* keypair.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA2216B3E5A0003A1B6 /* sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F16F214D564A00A1187F /* sc.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA3216B3E5A0003A1B6 /* seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17B214D564B00A1187F /* seed.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA4216B3E5A0003A1B6 /* sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F172214D564B00A1187F /* sha512.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA5216B3E5A0003A1B6 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F17D214D564B00A1187F /* sign.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; + 5FD37CA6216B3E5A0003A1B6 /* verify.c in Sources */ = {isa = PBXBuildFile; fileRef = 5AB8F177214D564B00A1187F /* verify.c */; settings = {COMPILER_FLAGS = "-Wno-sign-conversion -Wno-conversion -Wno-cast-qual"; }; }; 610134730DD250470049ACDF /* SUUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134710DD250470049ACDF /* SUUpdateDriver.h */; settings = {ATTRIBUTES = (); }; }; 610134740DD250470049ACDF /* SUUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 610134720DD250470049ACDF /* SUUpdateDriver.m */; }; 6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */; settings = {ATTRIBUTES = (); }; }; @@ -1107,7 +1107,7 @@ 14732BB51960ECBA00593899 /* Third Party */, 1420DE391962322200203BB0 /* Documentation */, FA1941C40D94A6EA00DD942E /* Configurations */, - 726B2B5E1C645FC900388755 /* UI Tests */, + 726B2B5E1C645FC900388755 /* UITests */, 5AB8F1A0214DA72000A1187F /* generate_keys */, 5A5ADED8214EDE4900DF0099 /* sign_update */, 0867D69AFE84028FC02AAC07 /* Frameworks */, @@ -1550,13 +1550,13 @@ path = ../../fileop; sourceTree = ""; }; - 726B2B5E1C645FC900388755 /* UI Tests */ = { + 726B2B5E1C645FC900388755 /* UITests */ = { isa = PBXGroup; children = ( 720B16431C66433D006985FB /* SUTestApplicationTest.swift */, 720B16421C66433D006985FB /* UITests-Info.plist */, ); - path = "UITests"; + path = UITests; sourceTree = ""; }; FA1941C40D94A6EA00DD942E /* Configurations */ = { From 65b66c441c4f4568634aab245074d55a83ce765b Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Mon, 6 May 2019 16:30:05 -0700 Subject: [PATCH 2/4] Convert project to point to correct lproj files on disk and change the test app to use en.lproj instead of the deprecated English.lproj --- Sparkle.xcodeproj/project.pbxproj | 15 +++++---------- .../{English.lproj => en.lproj}/InfoPlist.strings | 0 .../{English.lproj => en.lproj}/MainMenu.xib | 0 3 files changed, 5 insertions(+), 10 deletions(-) rename TestApplication/{English.lproj => en.lproj}/InfoPlist.strings (100%) rename TestApplication/{English.lproj => en.lproj}/MainMenu.xib (100%) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 0a84064a4..4a0e57fc3 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -849,8 +849,6 @@ 61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sparkle Test App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 61B5F90409C4CEE200B25A18 /* TestApplication-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestApplication-Info.plist"; sourceTree = ""; }; 61B5F92409C4CFC900B25A18 /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 61B5F92B09C4CFD800B25A18 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 61B5F92D09C4CFD800B25A18 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; 61B5FB9409C4F04600B25A18 /* SUAppcast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUAppcast.h; sourceTree = ""; }; 61B5FB9509C4F04600B25A18 /* SUAppcast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUAppcast.m; sourceTree = ""; }; 61B5FC3F09C4FD4000B25A18 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; @@ -948,6 +946,8 @@ A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTestWebServer.h; sourceTree = ""; }; A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTestWebServer.m; sourceTree = ""; }; C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */ = {isa = PBXFileReference; lastKnownFileType = file; path = SparkleTestCodeSignApp.enc.dmg; sourceTree = ""; }; + CD76759E2280FAB30068578B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + CD76759F2280FAB30068578B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; E1545EC31E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTouchBarButtonGroup.h; sourceTree = ""; }; E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTouchBarButtonGroup.m; sourceTree = ""; }; E19CA4901E2E7E4D009D4D18 /* SUTouchBarForwardDeclarations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SUTouchBarForwardDeclarations.h; sourceTree = ""; }; @@ -1944,14 +1944,9 @@ }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Sparkle" */; compatibilityVersion = "Xcode 6.3"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, - Italian, zh_TW, en, ca, @@ -2683,7 +2678,6 @@ 1A985A3A1C5C32A50001163A /* da */, 1A985A341C5C329E0001163A /* de */, 1A985A531C5C32BD0001163A /* el */, - 61B5F92B09C4CFD800B25A18 /* English */, 1A985A3B1C5C32A60001163A /* es */, 1A985A3C1C5C32A70001163A /* fi */, 1A985A331C5C329D0001163A /* fr */, @@ -2712,6 +2706,7 @@ 1A985A511C5C32BB0001163A /* uk */, 1A985A4A1C5C32B50001163A /* zh-Hans */, 1A985A351C5C329E0001163A /* zh-Hant */, + CD76759E2280FAB30068578B /* en */, ); name = InfoPlist.strings; sourceTree = ""; @@ -2719,7 +2714,7 @@ 61B5F92C09C4CFD800B25A18 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( - 61B5F92D09C4CFD800B25A18 /* English */, + CD76759F2280FAB30068578B /* en */, ); name = MainMenu.xib; sourceTree = ""; diff --git a/TestApplication/English.lproj/InfoPlist.strings b/TestApplication/en.lproj/InfoPlist.strings similarity index 100% rename from TestApplication/English.lproj/InfoPlist.strings rename to TestApplication/en.lproj/InfoPlist.strings diff --git a/TestApplication/English.lproj/MainMenu.xib b/TestApplication/en.lproj/MainMenu.xib similarity index 100% rename from TestApplication/English.lproj/MainMenu.xib rename to TestApplication/en.lproj/MainMenu.xib From 25b0f78c7659922c924f67573689371e90419225 Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Tue, 7 May 2019 08:05:35 -0700 Subject: [PATCH 3/4] Update Swift version in project to 5.0 (no source changes required) and fix -Weverything warnings about sending messages to id which come with the Swift update --- Sparkle.xcodeproj/project.pbxproj | 5 ++++- Sparkle/SUBinaryDeltaCreate.m | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 4a0e57fc3..78ab95e47 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -1926,7 +1926,7 @@ ProvisioningStyle = Automatic; }; 612279D80DB5470200AB99EA = { - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; TestTargetID = 8DC2EF4F0486A6940098B216; }; 722954B31D04ADAF00ECF9CA = { @@ -2788,6 +2788,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */; buildSettings = { + SWIFT_VERSION = 5.0; }; name = Coverage; }; @@ -2981,6 +2982,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */; buildSettings = { + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -2988,6 +2990,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */; buildSettings = { + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Sparkle/SUBinaryDeltaCreate.m b/Sparkle/SUBinaryDeltaCreate.m index 44e2d5011..fe9c500a5 100644 --- a/Sparkle/SUBinaryDeltaCreate.m +++ b/Sparkle/SUBinaryDeltaCreate.m @@ -165,7 +165,7 @@ static bool codeSignatureExtendedAttributeExists(const FTSENT *ent) static BOOL shouldSkipDeltaCompression(NSDictionary *originalInfo, NSDictionary *newInfo) { - unsigned long long fileSize = [newInfo[INFO_SIZE_KEY] unsignedLongLongValue]; + unsigned long long fileSize = [(NSNumber *)newInfo[INFO_SIZE_KEY] unsignedLongLongValue]; if (fileSize < MIN_FILE_SIZE_FOR_CREATING_DELTA) { return YES; } @@ -174,11 +174,11 @@ static BOOL shouldSkipDeltaCompression(NSDictionary *originalInfo, NSDictionary return YES; } - if ([originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [newInfo[INFO_TYPE_KEY] unsignedShortValue]) { + if ([(NSNumber *)originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [(NSNumber *)newInfo[INFO_TYPE_KEY] unsignedShortValue]) { return YES; } - if ([originalInfo[INFO_HASH_KEY] isEqual:newInfo[INFO_HASH_KEY]]) { + if ([(NSData *)originalInfo[INFO_HASH_KEY] isEqual:(NSData *)newInfo[INFO_HASH_KEY]]) { // this is possible if just the permissions have changed return YES; } @@ -192,7 +192,7 @@ static BOOL shouldDeleteThenExtract(NSDictionary *originalInfo, NSDictionary *ne return NO; } - if ([originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [newInfo[INFO_TYPE_KEY] unsignedShortValue]) { + if ([(NSNumber *)originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [(NSNumber *)newInfo[INFO_TYPE_KEY] unsignedShortValue]) { return YES; } @@ -205,11 +205,11 @@ static BOOL shouldSkipExtracting(NSDictionary *originalInfo, NSDictionary *newIn return NO; } - if ([originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [newInfo[INFO_TYPE_KEY] unsignedShortValue]) { + if ([(NSNumber *)originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [(NSNumber *)newInfo[INFO_TYPE_KEY] unsignedShortValue]) { return NO; } - if (![originalInfo[INFO_HASH_KEY] isEqual:newInfo[INFO_HASH_KEY]]) { + if (![(NSData *)originalInfo[INFO_HASH_KEY] isEqual:(NSData *)newInfo[INFO_HASH_KEY]]) { return NO; } @@ -222,11 +222,11 @@ static BOOL shouldChangePermissions(NSDictionary *originalInfo, NSDictionary *ne return NO; } - if ([originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [newInfo[INFO_TYPE_KEY] unsignedShortValue]) { + if ([(NSNumber *)originalInfo[INFO_TYPE_KEY] unsignedShortValue] != [(NSNumber *)newInfo[INFO_TYPE_KEY] unsignedShortValue]) { return NO; } - if ([originalInfo[INFO_PERMISSIONS_KEY] unsignedShortValue] == [newInfo[INFO_PERMISSIONS_KEY] unsignedShortValue]) { + if ([(NSNumber *)originalInfo[INFO_PERMISSIONS_KEY] unsignedShortValue] == [(NSNumber *)newInfo[INFO_PERMISSIONS_KEY] unsignedShortValue]) { return NO; } @@ -379,7 +379,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF // We should also not allow files with code signed extended attributes since Apple doesn't recommend inserting these // inside an application, and since we don't preserve extended attribitutes anyway - mode_t permissions = [info[INFO_PERMISSIONS_KEY] unsignedShortValue]; + mode_t permissions = [(NSNumber *)info[INFO_PERMISSIONS_KEY] unsignedShortValue]; if (!isSymLink(ent) && !IS_VALID_PERMISSIONS(permissions)) { permissions = 0755; if (verbose) { @@ -414,7 +414,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF } else { newTreeState[key] = info; - if (oldInfo && [oldInfo[INFO_TYPE_KEY] unsignedShortValue] == FTS_D && [info[INFO_TYPE_KEY] unsignedShortValue] != FTS_D) { + if (oldInfo && [(NSNumber *)oldInfo[INFO_TYPE_KEY] unsignedShortValue] == FTS_D && [(NSNumber *)info[INFO_TYPE_KEY] unsignedShortValue] != FTS_D) { NSArray *parentPathComponents = key.pathComponents; for (NSString *childPath in originalTreeState) { @@ -489,7 +489,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF for (NSString *key in keys) { id value = [newTreeState valueForKey:key]; - if ([value isEqual:[NSNull null]]) { + if ([(NSObject *)value isEqual:[NSNull null]]) { xar_file_t newFile = xar_add_frombuffer(x, 0, [key fileSystemRepresentation], (char *)"", 1); assert(newFile); xar_prop_set(newFile, DELETE_KEY, "true"); @@ -507,10 +507,10 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF if (shouldChangePermissions(originalInfo, newInfo)) { xar_file_t newFile = xar_add_frombuffer(x, 0, [key fileSystemRepresentation], (char *)"", 1); assert(newFile); - xar_prop_set(newFile, MODIFY_PERMISSIONS_KEY, [[NSString stringWithFormat:@"%u", [newInfo[INFO_PERMISSIONS_KEY] unsignedShortValue]] UTF8String]); + xar_prop_set(newFile, MODIFY_PERMISSIONS_KEY, [[NSString stringWithFormat:@"%u", [(NSNumber *)newInfo[INFO_PERMISSIONS_KEY] unsignedShortValue]] UTF8String]); if (verbose) { - fprintf(stderr, "\n👮 %s %s (0%o -> 0%o)", VERBOSE_MODIFIED, [key fileSystemRepresentation], [originalInfo[INFO_PERMISSIONS_KEY] unsignedShortValue], [newInfo[INFO_PERMISSIONS_KEY] unsignedShortValue]); + fprintf(stderr, "\n👮 %s %s (0%o -> 0%o)", VERBOSE_MODIFIED, [key fileSystemRepresentation], [(NSNumber *)originalInfo[INFO_PERMISSIONS_KEY] unsignedShortValue], [(NSNumber *)newInfo[INFO_PERMISSIONS_KEY] unsignedShortValue]); } } } else { From ae138df923fc53d321319864c17cf90dcf69a9b5 Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Tue, 7 May 2019 08:19:32 -0700 Subject: [PATCH 4/4] Add "Base" to the kist of known regions in the project file. This suppresses the warning to enable base localization, which we can't enable because we're targeting 10.7 as a minimum deployment target --- Sparkle.xcodeproj/project.pbxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 78ab95e47..48969cc83 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -1989,6 +1989,7 @@ "pt-PT", "pt-BR", hr, + Base, ); mainGroup = 0867D691FE84028FC02AAC07 /* Sparkle */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;