Merge pull request #1758 from sparkle-project/flat-package-mpkg

Support mpkg for updating/installing flat non-archived packages
This commit is contained in:
Mayur Pawashe authored and GitHub committed 2021-02-13 11:12:56 -08:00
commit 25820ccd4b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@
+ (BOOL)canUnarchivePath:(NSString *)path
{
return [path.pathExtension isEqualToString:@"pkg"];
return [path.pathExtension isEqualToString:@"pkg"] || [path.pathExtension isEqualToString:@"mpkg"];
}
+ (BOOL)mustValidateBeforeExtraction
+1 -1
View File
@@ -316,7 +316,7 @@ static NSString *SUAppcastItemInstallationTypeKey = @"SUAppcastItemInstallationT
// If we have a flat package, assume installation type is guided
// (flat / non-archived interactive packages are not supported)
// Otherwise assume we have a normal application inside an archive
if ([_fileURL.pathExtension isEqualToString:@"pkg"]) {
if ([_fileURL.pathExtension isEqualToString:@"pkg"] || [_fileURL.pathExtension isEqualToString:@"mpkg"]) {
_installationType = SPUInstallationTypeGuidedPackage;
} else {
_installationType = SPUInstallationTypeApplication;