Compare commits

...
33 Commits
Author SHA1 Message Date
Kornel c0933a516b Update Package.swift 2021-02-27 12:02:42 +00:00
Mayur Pawashe 490f8aa71a Merge pull request #1785 from sparkle-project/bump-unarchiving-test-timeout
Bump unarchiving tests timeout from 7 seconds to 30 seconds
2021-02-22 07:44:23 -08:00
Mayur Pawashe 2931c3f8aa Merge pull request #1782 from sparkle-project/bz2-make-fallback
Add fallback to bz2 when building Sparkle distribution
2021-02-22 07:44:00 -08:00
Kornel b5c9539f16 Fight SPM retagging 2021-02-22 09:46:32 +00:00
Kornel 9d9205851d Changelog 2021-02-22 09:37:50 +00:00
Zorg 22c15e8d79 Bump unarchiving tests timeout from 7 seconds to 30 seconds 2021-02-21 18:03:01 -08:00
Mayur Pawashe 056d84eaca Merge pull request #1780 from sparkle-project/fix-compiling
Fix compilation issues & add building distribution in Release in CI
2021-02-21 17:49:04 -08:00
Zorg 252cfc32e1 Add fallback to bz2 when building Sparkle distribution 2021-02-21 17:16:06 -08:00
Zorg cde2af9c7f Add SULog.m to Sparkle Test App to fix compile failures 2021-02-21 15:39:27 -08:00
Zorg 741bb2825d Add building distribution in Release in CI 2021-02-21 15:30:02 -08:00
Kornel 1a52f7df98 Bump 2021-02-21 17:23:31 +00:00
Mayur Pawashe 4853c187ae Merge pull request #1775 from sparkle-project/ignore-format-non-iso
Ignore -Wno-format-non-iso warnings
2021-02-21 07:14:19 -08:00
Zorg 8409cbb9f6 Ignore -Wno-format-non-iso warnings 2021-02-20 20:41:13 -08:00
Mayur Pawashe 126f9d214a Merge pull request #1772 from lovette/patch-2
Correct generate_appcast -s command line argument usage help
2021-02-20 20:00:34 -08:00
Lance Lovette c7b1d221b9 Correct generate_appcast -s command line argument usage help
Fixes sparkle-project/Sparkle#1766
2021-02-20 11:47:16 -05:00
Mayur Pawashe 1013c5076d Merge pull request #1771 from sparkle-project/fix-1768
Fix XQuartz update failing because NSLog caused issues
2021-02-20 08:35:10 -08:00
Zorg a1133829e4 Fix wrong SULog format specifier 2021-02-20 08:22:24 -08:00
Zorg 7980c4dfdc Disable determinate progress for guided pkg install properly 2021-02-19 20:50:04 -08:00
Zorg acd22dda12 Undo removing progress change 2021-02-19 20:38:47 -08:00
Zorg 9f5dd63697 Fix unit tests not building due to missing SULog symbol 2021-02-19 19:54:08 -08:00
Zorg 28a4d70aa0 Fix XQuartz update failing because NSLog caused issues
In Sparkle 1.x, Autoupdate is NSTask'ed from the updater with LSBackgroundOnly / LSUIElement set. Somehow when updating XQuartz, any NSLog usage makes Autoupdate get mysteriously killed afterwards.

Literally if I put the two statements right in main():

NSLog(@"foo");
NSLog(@"bar");

Only foo would be logged, bar would not be logged. I even verified this was not just a "logging" issue by writing out files to disk.

So in SUFileManager before we prompt the user an authorization dialog, we logged:
Sparkle: Authorization required to run pkg installer file:///Users/msp/Library/Caches/org.xquartz.X11/org.sparkle-project.Sparkle/PersistentDownloads/YYhaX4Tma/XQuartz%202.8.8/Xquartz.pkg

Which is the last thing seen. Normally if an error occurred we'd log it.

I don't know if there is an OS bug involved but anyway, we should just replace all NSLog usage with SULog in Autoupdate. fileop in 1.x which uses SUFileManager should probably never NSLog anyway. Autoupdate tool in 2.x is spawned as a launchd daemon for package installs, so it might not be affected, but I should update SULog usages there anyway to be in sync.

The determinate progress reporting was also broken (#1402), so I'm making it an indeterminate progress bar again rather than trying to debug what has apparently become fragile text parsing.
2021-02-19 19:29:10 -08:00
Mayur Pawashe abe6b493f8 Merge pull request #1765 from lovette/patch-1
Fix -f command line argument handling
2021-02-17 20:32:20 -08:00
Lance Lovette d5e80b56d6 Fix -f command line argument handling
https://github.com/sparkle-project/Sparkle/issues/1763
2021-02-17 08:54:51 -05:00
Kornel eee82a9b5c Merge pull request #1760 from vojtakonarik/master 2021-02-16 09:28:11 +00:00
Vojtěch Koňařík cdd1392362 Update Sparkle.strings 2021-02-14 00:13:22 +01:00
Vojtěch Koňařík a8be860ed9 Update Sparkle.strings 2021-02-14 00:09:43 +01:00
Vojtěch Koňařík 6d392e6800 Update SUUpdatePermissionPrompt.strings 2021-02-13 23:56:50 +01:00
Vojtěch Koňařík bf30749aa3 Update SUUpdateAlert.strings 2021-02-13 23:29:31 +01:00
Vojtěch Koňařík eb2b818c35 Update SUAutomaticUpdateAlert.strings 2021-02-13 22:08:38 +01:00
Mayur Pawashe 057e15e5f2 Merge pull request #1746 from sparkle-project/flat-package-1x
Backport flat non-archived package support from #1745 (for 1.x)
2021-02-13 11:14:01 -08:00
Zorg 6673fc18e2 Support mpkg for updating/installing flat non-archived packages 2021-02-13 10:14:53 -08:00
Zorg 067eedbb7a Fix generate_appcast compile error 2021-01-31 00:18:29 -08:00
Zorg a841415046 Backport flat package support from #1745 2021-01-31 00:02:38 -08:00
23 changed files with 212 additions and 35 deletions

No files matched your search

+5
View File
@@ -39,6 +39,11 @@ jobs:
DEVELOPER_DIR: ${{ matrix.xcode }}
run: |
xcodebuild test-without-building -project Sparkle.xcodeproj -scheme UITests -configuration Debug -derivedDataPath build
- name: Build Release Distribution
env:
DEVELOPER_DIR: ${{ matrix.xcode }}
run: |
xcodebuild build -project Sparkle.xcodeproj -scheme Distribution -configuration Release -derivedDataPath build
- name: Archive Test Results
if: failure()
uses: actions/upload-artifact@v2
+11
View File
@@ -1,3 +1,13 @@
# 1.26.0
* Flat package support from #1745 (Zorg)
* Correct generate_appcast -s command line argument usage help (Lance Lovette)
* Fix -f command line argument handling (Lance Lovette)
* Fix progress for guided pkg install (Zorg)
* Fix XQuartz update failing because NSLog caused issues (Zorg)
* Update localization (Vojtěch Koňařík)
* Various fixes to SPM logic (Jonas Zaugg)
# 1.25.0
* Raise minimum system version to 10.9 (Kornel)
@@ -25,6 +35,7 @@
* Add phased rollouts feature to automatic update driver too (Zorg)
* Remove hiding skip button and retitling later button (Zorg)
* Deprecate installUpdatesIfAvailable (Zorg)
* Apply custom headers to app download (Geraint White)
# 1.24.0
+2 -2
View File
@@ -16,7 +16,7 @@ SPARKLE_AUTOMATED_DOWNGRADES = 0
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
SPARKLE_VERSION_MAJOR = 1
SPARKLE_VERSION_MINOR = 25
SPARKLE_VERSION_MINOR = 26
SPARKLE_VERSION_PATCH = 0
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
@@ -86,4 +86,4 @@ GCC_WARN_UNUSED_VARIABLE = YES
WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties
// Turn on all warnings, then disable a few which are almost impossible to avoid
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments $(WARNING_CFLAGS_EXTRA)
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments -Wno-format-non-iso $(WARNING_CFLAGS_EXTRA)
+20 -2
View File
@@ -14,6 +14,7 @@ if [ "$ACTION" = "" ] ; then
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm"
rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.xz"
rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2"
rm -f "Sparkle-for-Swift-Package-Manager.zip"
mkdir -p "$CONFIGURATION_BUILD_DIR/staging"
@@ -44,8 +45,20 @@ if [ "$ACTION" = "" ] ; then
cp -R "$CONFIGURATION_BUILD_DIR/staging/bin" "$CONFIGURATION_BUILD_DIR/staging-spm"
cd "$CONFIGURATION_BUILD_DIR/staging"
if [ -x "$(command -v xz)" ]; then
XZ_EXISTS=1
else
XZ_EXISTS=0
fi
# Sorted file list groups similar files together, which improves tar compression
find . \! -type d | rev | sort | rev | tar cv --files-from=- | xz -9 > "../Sparkle-$CURRENT_PROJECT_VERSION.tar.xz"
if [ "$XZ_EXISTS" -eq 1 ] ; then
find . \! -type d | rev | sort | rev | tar cv --files-from=- | xz -9 > "../Sparkle-$CURRENT_PROJECT_VERSION.tar.xz"
else
# Fallback to bz2 compression if xz utility is not available
find . \! -type d | rev | sort | rev | tar cjvf "../Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2" --files-from=-
fi
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
# Generate zip containing the xcframework for SPM
@@ -57,7 +70,7 @@ if [ "$ACTION" = "" ] ; then
if [ "$CI" != true ]; then
# Get latest git tag
cd "$SRCROOT"
latest_git_tag=$(git describe --abbrev=0)
latest_git_tag=$(git describe --tags --abbrev=0)
# Check semantic versioning
if [[ $latest_git_tag =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
echo "Tag $latest_git_tag follows semantic versioning"
@@ -85,5 +98,10 @@ if [ "$ACTION" = "" ] ; then
else
echo "warning: Xcode version $XCODE_VERSION_ACTUAL does not support computing checksums for Swift Packages. Please update the Package manifest manually."
fi
if [ "$XZ_EXISTS" -eq 1 ] ; then
echo "WARNING: xz compression is used for official releases but bz2 is being used instead because xz tool is not installed on your system."
fi
rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm"
fi
+3 -3
View File
@@ -2,10 +2,10 @@
import PackageDescription
// Version is technically not required here, SPM doesn't check
let version = "1.25.0"
let version = "1.26.0"
// Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it.
let tag = "1.24.0-spm"
let checksum = "14f3a80c528d6ac5d6beff7ffda7e0ef6be83591d66cdd006fe55520fc6bbbf9"
let tag = "1.26.0"
let checksum = "0e7bd37ddfd6785f57f03451fef7397fe4ebee96a8613033cbf7d9bed19a7a60"
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
let package = Package(
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "1.25.0"
s.version = "1.26.0"
s.summary = "A software update framework for macOS"
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
s.homepage = "http://sparkle-project.org"
+20
View File
@@ -223,6 +223,10 @@
721BC2111D1DFF05002BC71E /* SUFileOperationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */; };
721CF1AA1AD7647000D9AC09 /* libxar.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5890FD7678C0065DB48 /* libxar.1.dylib */; };
721CF1AB1AD764EB00D9AC09 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D06E8FB0FD68D61005AE3F6 /* libbz2.dylib */; };
721D5B5A25C6940400D23BEA /* SUFlatPackageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 721D5B5825C6940400D23BEA /* SUFlatPackageUnarchiver.m */; };
721D5B5B25C6940400D23BEA /* SUFlatPackageUnarchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 721D5B5925C6940400D23BEA /* SUFlatPackageUnarchiver.h */; };
721D5B6925C69A6900D23BEA /* test.sparkle_interactive.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 721D5B6825C69A6900D23BEA /* test.sparkle_interactive.pkg */; };
721D5B8625C69F4A00D23BEA /* SUFlatPackageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 721D5B5825C6940400D23BEA /* SUFlatPackageUnarchiver.m */; };
722589D71E0AD86B005EA0B9 /* SUUnarchiverProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 722589D61E0AD86B005EA0B9 /* SUUnarchiverProtocol.h */; };
722589DA1E0B19F4005EA0B9 /* SUUnarchiverNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 722589D81E0B19F4005EA0B9 /* SUUnarchiverNotifier.h */; };
722589DB1E0B19F4005EA0B9 /* SUUnarchiverNotifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 722589D91E0B19F4005EA0B9 /* SUUnarchiverNotifier.m */; };
@@ -277,6 +281,9 @@
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; };
72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */; };
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */; };
72B3DC8225E3232400131B67 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
72C4AB7A25E0B4C500D14562 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
72C4ABAB25E0BF1900D14562 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
72E1D7DD25A3E3AD0001BA6D /* SUWebViewCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 72E1D7D625A3E3AC0001BA6D /* SUWebViewCommon.m */; };
72E1D7DE25A3E3AD0001BA6D /* SUWebViewCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 72E1D7D725A3E3AC0001BA6D /* SUWebViewCommon.h */; };
@@ -837,6 +844,9 @@
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; };
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUUnarchiverTest.swift; sourceTree = "<group>"; };
721D5B5825C6940400D23BEA /* SUFlatPackageUnarchiver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUFlatPackageUnarchiver.m; sourceTree = "<group>"; };
721D5B5925C6940400D23BEA /* SUFlatPackageUnarchiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFlatPackageUnarchiver.h; sourceTree = "<group>"; };
721D5B6825C69A6900D23BEA /* test.sparkle_interactive.pkg */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.sparkle_interactive.pkg; sourceTree = "<group>"; };
7223E7611AD1AEFF008E3161 /* sais.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sais.c; sourceTree = "<group>"; };
7223E7621AD1AEFF008E3161 /* sais.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sais.h; sourceTree = "<group>"; };
722589D61E0AD86B005EA0B9 /* SUUnarchiverProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUnarchiverProtocol.h; sourceTree = "<group>"; };
@@ -1351,6 +1361,7 @@
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */,
14958C6C19AEBC610061B14F /* test-pubkey.pem */,
5AF6C74E1AEA46D10014A3AB /* test.pkg */,
721D5B6825C69A6900D23BEA /* test.sparkle_interactive.pkg */,
5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */,
5F1510A11C96E591006E1629 /* testnamespaces.xml */,
4444E78E237B047B00CBB3CF /* testlocalizedreleasenotesappcast.xml */,
@@ -1480,6 +1491,8 @@
6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */,
6102FE440E077FCE00F85D09 /* SUPipedUnarchiver.h */,
6129C0B90E0B79810062CE76 /* SUPipedUnarchiver.m */,
721D5B5925C6940400D23BEA /* SUFlatPackageUnarchiver.h */,
721D5B5825C6940400D23BEA /* SUFlatPackageUnarchiver.m */,
61299A8B09CA790200B7442F /* SUUnarchiver.h */,
61299A8C09CA790200B7442F /* SUUnarchiver.m */,
722589D81E0B19F4005EA0B9 /* SUUnarchiverNotifier.h */,
@@ -1763,6 +1776,7 @@
72E1D7DE25A3E3AD0001BA6D /* SUWebViewCommon.h in Headers */,
5AB8F187214D564C00A1187F /* precomp_data.h in Headers */,
5AB8F18F214D564C00A1187F /* sc.h in Headers */,
721D5B5B25C6940400D23BEA /* SUFlatPackageUnarchiver.h in Headers */,
5AB8F181214D564C00A1187F /* sha512.h in Headers */,
61299B3609CB04E000B7442F /* Sparkle.h in Headers */,
34074B9F1FEABD5A001CB3A5 /* SPUDownloadData.h in Headers */,
@@ -2220,6 +2234,7 @@
C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */,
4444E790237B057900CBB3CF /* testlocalizedreleasenotesappcast.xml in Resources */,
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */,
721D5B6925C69A6900D23BEA /* test.sparkle_interactive.pkg in Resources */,
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */,
72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */,
72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */,
@@ -2368,6 +2383,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
721D5B8625C69F4A00D23BEA /* SUFlatPackageUnarchiver.m in Sources */,
5AE13FA01E0D4F65000D2C2C /* Appcast.swift in Sources */,
5AAD00521E0BE6BE00AF411E /* ArchiveItem.swift in Sources */,
5A5AC5381E0C6D3000998119 /* FeedXML.swift in Sources */,
@@ -2404,6 +2420,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72C4ABAB25E0BF1900D14562 /* SULog.m in Sources */,
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */,
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */,
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */,
@@ -2440,6 +2457,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72B3DC8225E3232400131B67 /* SULog.m in Sources */,
61B5F93009C4CFDC00B25A18 /* main.m in Sources */,
726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */,
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */,
@@ -2456,6 +2474,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72C4AB7A25E0B4C500D14562 /* SULog.m in Sources */,
722954B71D04ADAF00ECF9CA /* fileop.m in Sources */,
722954BD1D04AE3800ECF9CA /* SUConstants.m in Sources */,
722954BC1D04AE1100ECF9CA /* SUFileManager.m in Sources */,
@@ -2514,6 +2533,7 @@
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */,
61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */,
72316BE41E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m in Sources */,
721D5B5A25C6940400D23BEA /* SUFlatPackageUnarchiver.m in Sources */,
A3AD648C24D283F400058938 /* SUGlobalUpdateLock.m in Sources */,
E1545EC61E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m in Sources */,
61B93A3D0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.m in Sources */,
+4 -2
View File
@@ -136,7 +136,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
self.statusController = [[SUStatusController alloc] initWithHost:host];
[self.statusController setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO];
[self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"")
maxProgressValue:100 statusText: @""];
maxProgressValue:installer.supportsDeterminateProgress ? 100 : 0 statusText: @""];
[self.statusController showWindow:self];
}
@@ -153,7 +153,9 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
void(^progressBlock)(double) = ^(double progress){
dispatch_async(dispatch_get_main_queue(), ^(){
self.statusController.progressValue = progress * 100.0;
if (installer.supportsDeterminateProgress) {
self.statusController.progressValue = progress * 100.0;
}
});
};
+9 -8
View File
@@ -10,6 +10,7 @@
#import "SUOperatingSystem.h"
#import "SUFileOperationConstants.h"
#import "SULog.h"
#import "SUErrors.h"
#include <sys/xattr.h>
@@ -320,7 +321,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to remove quarantine %@", rootURL);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to remove quarantine: %@", rootURL);
NSError *executeError = nil;
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpRemoveQuarantineCommand sourcePath:path destinationPath:NULL error:&executeError];
@@ -520,7 +521,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to copy %@ to %@", sourceURL, destinationURL);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to copy %@ to %@", sourceURL, destinationURL);
NSError *executeError = nil;
if (![self _authorizeAndExecuteCommand:SUFileOpCopyCommand sourcePath:sourcePath destinationPath:destinationPath error:&executeError]) {
@@ -614,7 +615,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to move %@ to %@", sourceURL, destinationURL);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to move %@ to %@", sourceURL, destinationURL);
char sourcePath[PATH_MAX] = {0};
if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
@@ -785,7 +786,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to change permissions of %@ to match %@", targetURL, matchURL);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to change permissions of %@ to match %@", targetURL, matchURL);
NSError *executeError = nil;
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpChangeOwnerAndGroupCommand sourcePath:targetPath destinationPath:matchPath error:&executeError];
@@ -844,7 +845,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to update timestamp of %@", targetURL);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to update timestamp of %@", targetURL);
NSError *executeError = nil;
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpUpdateModificationAndAccessTimeCommand sourcePath:path destinationPath:NULL error:&executeError];
@@ -888,7 +889,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to make directory %@", url);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to make directory %@", url);
char path[PATH_MAX] = {0};
if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
@@ -952,7 +953,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to delete %@", url);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to delete %@", url);
char path[PATH_MAX] = {0};
if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
@@ -990,7 +991,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
return NO;
}
NSLog(@"Sparkle: Authorization required to run pkg installer %@", packageURL);
SULog(SULogLevelDefault, @"Sparkle: Authorization required to run pkg installer %@", packageURL);
NSError *executeError = nil;
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpInstallCommand sourcePath:path destinationPath:NULL lineCallback:^(NSString *line){
+21
View File
@@ -0,0 +1,21 @@
//
// SUFlatPackageUnarchiver.h
// Autoupdate
//
// Created by Mayur Pawashe on 1/30/21.
// Copyright © 2021 Sparkle Project. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SUUnarchiverProtocol.h"
NS_ASSUME_NONNULL_BEGIN
// An unarchiver for flat packages that doesn't really do any unarchiving
@interface SUFlatPackageUnarchiver : NSObject <SUUnarchiverProtocol>
- (instancetype)initWithFlatPackagePath:(NSString *)flatPackagePath;
@end
NS_ASSUME_NONNULL_END
+64
View File
@@ -0,0 +1,64 @@
//
// SUFlatPackageUnarchiver.m
// Autoupdate
//
// Created by Mayur Pawashe on 1/30/21.
// Copyright © 2021 Sparkle Project. All rights reserved.
//
#import "SUFlatPackageUnarchiver.h"
#import "SUUnarchiverNotifier.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@interface SUFlatPackageUnarchiver ()
@property (nonatomic, readonly) NSString *flatPackagePath;
@end
@implementation SUFlatPackageUnarchiver
@synthesize flatPackagePath = _flatPackagePath;
+ (BOOL)canUnarchivePath:(NSString *)path
{
return [path.pathExtension isEqualToString:@"pkg"] || [path.pathExtension isEqualToString:@"mpkg"];
}
// Note in 2.x this method returns YES, but 1.x does not support pre-validation of pkgs
+ (BOOL)mustValidateBeforeExtraction
{
return NO;
}
- (instancetype)initWithFlatPackagePath:(NSString *)flatPackagePath;
{
self = [super init];
if (self != nil) {
_flatPackagePath = [flatPackagePath copy];
}
return self;
}
- (void)unarchiveWithCompletionBlock:(void (^)(NSError * _Nullable))completionBlock progressBlock:(void (^ _Nullable)(double))progressBlock
{
SUUnarchiverNotifier *notifier = [[SUUnarchiverNotifier alloc] initWithCompletionBlock:completionBlock progressBlock:progressBlock];
// Flat packages must use guided package installs, not interactive
BOOL isDirectory = NO;
if ([[[self.flatPackagePath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_interactive"]) {
[notifier notifyFailureWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Flat packages can not be installed interactively with 'sparkle_interactive' and must instead be guided"]}]];
} else if (![[NSFileManager defaultManager] fileExistsAtPath:self.flatPackagePath isDirectory:&isDirectory] || isDirectory) {
[notifier notifyFailureWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Flat package does not exist at %@", self.flatPackagePath]}]];
} else {
[notifier notifyProgress:1.0];
[notifier notifySuccess];
}
}
- (NSString *)description { return [NSString stringWithFormat:@"%@ <%@>", [self class], self.flatPackagePath]; }
@end
+7
View File
@@ -54,4 +54,11 @@
return YES;
}
// We used to, but it broke due to fragile text processing
// Maybe one day someone will fix it, but until then.
- (BOOL)supportsDeterminateProgress
{
return NO;
}
@end
+2
View File
@@ -31,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
// Should be thread safe
- (NSString *)installationPath;
- (BOOL)supportsDeterminateProgress;
@end
NS_ASSUME_NONNULL_END
+5
View File
@@ -78,4 +78,9 @@ static NSString *SUOpenUtilityPath = @"/usr/bin/open";
return NO;
}
- (BOOL)supportsDeterminateProgress
{
return NO;
}
@end
+5
View File
@@ -265,4 +265,9 @@
return YES;
}
- (BOOL)supportsDeterminateProgress
{
return YES;
}
@end
+4
View File
@@ -11,6 +11,7 @@
#import "SUPipedUnarchiver.h"
#import "SUDiskImageUnarchiver.h"
#import "SUBinaryDeltaUnarchiver.h"
#import "SUFlatPackageUnarchiver.h"
#include "AppKitPrevention.h"
@@ -29,6 +30,9 @@
assert(hostPath != nil);
NSString *nonNullHostPath = hostPath;
return [[SUBinaryDeltaUnarchiver alloc] initWithArchivePath:path updateHostBundlePath:nonNullHostPath];
} else if ([SUFlatPackageUnarchiver canUnarchivePath:path]) {
return [[SUFlatPackageUnarchiver alloc] initWithFlatPackagePath:path];
}
return nil;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -12,7 +12,7 @@
"%@ %@ is currently the newest version available." = "%1$@ %2$@ je nejnovější dostupná verze";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ je nejnovější dostupná verze.\n(You are currently running version %3$@.)";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ je nejnovější dostupná verze.\n(Aktuálně používáte verzi %3$@.)";
/* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available--you have %@. Would you like to download it now?" = "Je k dispozici %1$@ %2$@ - nainstalována je %3$@. Přejete si nyní stáhnout aktualizaci?";
@@ -36,7 +36,7 @@
"An error occurred while installing the update. Please try again later." = "Při instalaci aktualizace se vyskytla chyba. Zkuste to prosím později.";
"An error occurred while parsing the update feed." = "Při zpracovávání údajů o aktualizaci se vyskytla chyba. Zkuste to prosím později.";
"An error occurred while parsing the update feed." = "Při zpracování údajů o aktualizaci se vyskytla chyba. Zkuste to prosím později.";
"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Vyskytla se chyba při novém spouštění aplikace %1$@, nová verze bude dostupná při dalším spuštění %1$@.";
@@ -49,7 +49,7 @@
"Cancel Update" = "Zrušit aktualizaci";
"Checking for updates..." = "Ověřuje se dostupnost aktualizací…";
"Checking for updates..." = "Hledání aktualizací…";
/* Take care not to overflow the status window. */
"Downloading update..." = "Stahuje se aktualizace…";
@@ -82,7 +82,7 @@
"Ready to Install" = "Připraveno k instalaci";
/* Message that is optionally shown at startup to allow users to turn on/off update checks. */
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Přejete si, aby aplikace %1$@ automaticky ověřovala dostupnost aktualizací? Tuto volbu můžete kdykoliv změnit v nabídce %1$@.";
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Přejete si, aby aplikace %1$@ automaticky vyhledávala aktualizace? Tuto volbu můžete kdykoliv změnit v nabídce %1$@.";
"The update is improperly signed." = "Tato aktualizace je nesprávně podepsána.";
Binary file not shown.
+23 -11
View File
@@ -10,8 +10,8 @@ import XCTest
class SUUnarchiverTest: XCTestCase
{
func unarchiveTestAppWithExtension(_ archiveExtension: String, password: String? = nil) {
let appName = "SparkleTestCodeSignApp"
func unarchiveTestAppWithExtension(_ archiveExtension: String, password: String? = nil, resourceName: String = "SparkleTestCodeSignApp", expectingSuccess: Bool = true) {
let appName = resourceName
let archiveResourceURL = Bundle(for: type(of: self)).url(forResource: appName, withExtension: archiveExtension)!
let fileManager = FileManager.default
@@ -27,17 +27,18 @@ class SUUnarchiverTest: XCTestCase
let tempArchiveURL = tempDirectoryURL.appendingPathComponent(archiveResourceURL.lastPathComponent)
let extractedAppURL = tempDirectoryURL.appendingPathComponent(appName).appendingPathExtension("app")
self.unarchiveTestSuccessAppWithExtension(archiveExtension, appName: appName, tempDirectoryURL: tempDirectoryURL, tempArchiveURL: tempArchiveURL, archiveResourceURL: archiveResourceURL, password: password, testExpectation: unarchivedSuccessExpectation)
self.unarchiveTestFailureAppWithExtension(archiveExtension, tempDirectoryURL: tempDirectoryURL, password: password, testExpectation: unarchivedFailureExpectation)
self.unarchiveTestAppWithExtension(archiveExtension, appName: appName, tempDirectoryURL: tempDirectoryURL, tempArchiveURL: tempArchiveURL, archiveResourceURL: archiveResourceURL, password: password, expectingSuccess: expectingSuccess, testExpectation: unarchivedSuccessExpectation)
self.unarchiveNonExistentFileTestFailureAppWithExtension(archiveExtension, tempDirectoryURL: tempDirectoryURL, password: password, testExpectation: unarchivedFailureExpectation)
super.waitForExpectations(timeout: 7.0, handler: nil)
super.waitForExpectations(timeout: 30.0, handler: nil)
XCTAssertTrue(fileManager.fileExists(atPath: extractedAppURL.path))
XCTAssertEqual("6a60ab31430cfca8fb499a884f4a29f73e59b472", hashOfTree(extractedAppURL.path))
if !archiveExtension.hasSuffix("pkg") {
XCTAssertTrue(fileManager.fileExists(atPath: extractedAppURL.path))
XCTAssertEqual("6a60ab31430cfca8fb499a884f4a29f73e59b472", hashOfTree(extractedAppURL.path))
}
}
func unarchiveTestFailureAppWithExtension(_ archiveExtension: String, tempDirectoryURL: URL, password: String?, testExpectation: XCTestExpectation) {
func unarchiveNonExistentFileTestFailureAppWithExtension(_ archiveExtension: String, tempDirectoryURL: URL, password: String?, testExpectation: XCTestExpectation) {
let tempArchiveURL = tempDirectoryURL.appendingPathComponent("error-invalid").appendingPathExtension(archiveExtension)
let unarchiver = SUUnarchiver.unarchiver(forPath: tempArchiveURL.path, updatingHostBundlePath: nil, decryptionPassword: password)!
@@ -48,7 +49,7 @@ class SUUnarchiverTest: XCTestCase
}
// swiftlint:disable function_parameter_count
func unarchiveTestSuccessAppWithExtension(_ archiveExtension: String, appName: String, tempDirectoryURL: URL, tempArchiveURL: URL, archiveResourceURL: URL, password: String?, testExpectation: XCTestExpectation) {
func unarchiveTestAppWithExtension(_ archiveExtension: String, appName: String, tempDirectoryURL: URL, tempArchiveURL: URL, archiveResourceURL: URL, password: String?, expectingSuccess: Bool, testExpectation: XCTestExpectation) {
let fileManager = FileManager.default
@@ -57,7 +58,11 @@ class SUUnarchiverTest: XCTestCase
let unarchiver = SUUnarchiver.unarchiver(forPath: tempArchiveURL.path, updatingHostBundlePath: nil, decryptionPassword: password)!
unarchiver.unarchive(completionBlock: {(error: Error?) -> Void in
XCTAssertNil(error)
if expectingSuccess {
XCTAssertNil(error)
} else {
XCTAssertNotNil(error)
}
testExpectation.fulfill()
}, progressBlock: nil)
}
@@ -96,4 +101,11 @@ class SUUnarchiverTest: XCTestCase
{
self.unarchiveTestAppWithExtension("enc.dmg", password: "testpass")
}
func testUnarchivingFlatPackage()
{
self.unarchiveTestAppWithExtension("pkg", resourceName: "test")
self.unarchiveTestAppWithExtension("pkg", resourceName: "test.sparkle_interactive", expectingSuccess: false)
}
}
+2 -2
View File
@@ -31,7 +31,7 @@ Usage: \(command) [OPTIONS] [ARCHIVES_FOLDER]
-f: provide the path to the private DSA key
-n: provide the name of the private DSA key. This option must be used with `-k`
-k: provide the name of the keychain. This option must be used with `-n`
-s: provide the path to the private EdDSA key
-s: provide the private EdDSA key (128 characters)
-o: provide a filename for the generated appcast (allowed when only one will be created)
--download-url-prefix: provide a prefix used to construct URLs for update downloads
@@ -126,8 +126,8 @@ func parseCommandLineOptions() -> CommandLineArguments {
}
// remove the already parsed arguments
arguments.remove(at: privateDSAKeyOptionIndex)
arguments.remove(at: privateDSAKeyOptionIndex + 1)
arguments.remove(at: privateDSAKeyOptionIndex)
}
// check if the private dsa sould be loaded using the keyname and the name of the keychain