mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
747250d0d8 | ||
|
|
06f4a5e52c | ||
|
|
1f6113eae4 | ||
|
|
d4b498c94d | ||
|
|
f765ea6c72 | ||
|
|
6c05c09161 | ||
|
|
262fac60ad | ||
|
|
9f53310253 | ||
|
|
a819fbbfa9 | ||
|
|
08f55bce01 | ||
|
|
51f26f4ae1 | ||
|
|
58d568727b | ||
|
|
6c56b0a9f0 | ||
|
|
ae1c516afb | ||
|
|
1de486956a | ||
|
|
ad78f264fa | ||
|
|
9ed93dd592 |
No files matched your search
@@ -41,3 +41,5 @@ Carthage/Build
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
.idea/
|
||||
@@ -1,7 +1,7 @@
|
||||
// Common
|
||||
|
||||
SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
|
||||
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
|
||||
SPARKLE_BUNDLE_IDENTIFIER = com.binaryage.sparkle
|
||||
SPARKLE_RELAUNCH_TOOL_NAME = Updater
|
||||
SPARKLE_FILEOP_TOOL_NAME = fileop
|
||||
|
||||
SPARKLE_APPEND_VERSION_NUMBER = 1
|
||||
@@ -26,7 +26,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
|
||||
ARCHS = $(ARCHS_STANDARD)
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9
|
||||
PRODUCT_NAME = ${TARGET_NAME}
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@@ -88,4 +88,4 @@ CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO
|
||||
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 $(WARNING_CFLAGS_EXTRA)
|
||||
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-partial-availability -Wno-dollar-in-identifier-extension $(WARNING_CFLAGS_EXTRA)
|
||||
+3
-9
@@ -33,24 +33,18 @@ Secure and reliable software update framework for Cocoa developers.
|
||||
* Build: Xcode 7 and 10.8 SDK or greater
|
||||
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
|
||||
|
||||
## Usage
|
||||
|
||||
See [getting started guide](https://sparkle-project.org/documentation/). No code is necessary, but a bit of Xcode configuration is required.
|
||||
|
||||
## Development
|
||||
|
||||
### API symbols
|
||||
## API
|
||||
|
||||
Sparkle is built with `-fvisibility=hidden -fvisibility-inlines-hidden` which means no symbols are exported by default.
|
||||
If you are adding a symbol to the public API you must decorate the declaration with the `SU_EXPORT` macro (grep the source code for examples).
|
||||
|
||||
### Building the distribution package
|
||||
## Building the distribution package
|
||||
|
||||
`cd` to the root of the Sparkle source tree and run `make release`. Sparkle-*VERSION*.tar.bz2 will be created in a temporary directory and revealed in Finder after the build has completed.
|
||||
|
||||
Alternatively, build the Distribution scheme in the Xcode UI.
|
||||
|
||||
### Code of Conduct
|
||||
## Code of Conduct
|
||||
|
||||
We pledge to have an open and welcoming environment. See our [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
1420DF50196247F900203BB0 /* 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 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, ); }; };
|
||||
142E0E0419A6A26F00E4312B /* Updater.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55C14BB7136EEF1500649790 /* Updater.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 */; };
|
||||
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E00FD68CC7005AE3F6 /* SUBinaryDeltaApply.m */; };
|
||||
@@ -412,7 +412,7 @@
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 12;
|
||||
files = (
|
||||
142E0E0419A6A26F00E4312B /* Autoupdate.app in CopyFiles */,
|
||||
142E0E0419A6A26F00E4312B /* Updater.app in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -530,7 +530,7 @@
|
||||
555CF29B196C523E0000B31E /* el */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = el; path = el.lproj/SUAutomaticUpdateAlert.xib; sourceTree = "<group>"; };
|
||||
555CF29C196C52460000B31E /* el */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = el; path = el.lproj/SUUpdateAlert.xib; sourceTree = "<group>"; };
|
||||
555CF29D196C524C0000B31E /* el */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = el; path = el.lproj/SUUpdatePermissionPrompt.xib; sourceTree = "<group>"; };
|
||||
55C14BB7136EEF1500649790 /* Autoupdate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Autoupdate.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
55C14BB7136EEF1500649790 /* Updater.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Updater.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
55C14BB9136EEF1500649790 /* Autoupdate-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Autoupdate-Info.plist"; sourceTree = "<group>"; };
|
||||
55C14BD3136EEFCE00649790 /* Autoupdate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Autoupdate.m; sourceTree = "<group>"; };
|
||||
55C14BD8136EF00C00649790 /* SUStatus.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SUStatus.xib; sourceTree = "<group>"; };
|
||||
@@ -924,7 +924,7 @@
|
||||
5D06E8D00FD68C7C005AE3F6 /* BinaryDelta */,
|
||||
722954B41D04ADAF00ECF9CA /* fileop */,
|
||||
5AE13FB31E0D9E07000D2C2C /* generate_appcast */,
|
||||
55C14BB7136EEF1500649790 /* Autoupdate.app */,
|
||||
55C14BB7136EEF1500649790 /* Updater.app */,
|
||||
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */,
|
||||
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */,
|
||||
8DC2EF5B0486A6940098B216 /* Sparkle.framework */,
|
||||
@@ -1235,7 +1235,6 @@
|
||||
72316BE11E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h */,
|
||||
72316BE21E0E1C7F0039EFD9 /* SUSystemUpdateInfo.m */,
|
||||
);
|
||||
includeInIndex = 1;
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -1487,7 +1486,7 @@
|
||||
);
|
||||
name = Autoupdate;
|
||||
productName = Autoupdate;
|
||||
productReference = 55C14BB7136EEF1500649790 /* Autoupdate.app */;
|
||||
productReference = 55C14BB7136EEF1500649790 /* Updater.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
5AA96C541E0AE0DB00CA4346 /* generate_appcast */ = {
|
||||
@@ -1628,7 +1627,7 @@
|
||||
attributes = {
|
||||
CLASSPREFIX = SU;
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastUpgradeCheck = 0830;
|
||||
LastUpgradeCheck = 0900;
|
||||
ORGANIZATIONNAME = "Sparkle Project";
|
||||
TargetAttributes = {
|
||||
5AA96C541E0AE0DB00CA4346 = {
|
||||
@@ -2574,6 +2573,89 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D6233BC41E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA1941CC0D94A70100DD942E /* ConfigCommonRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BC51E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA1941D50D94A70100DD942E /* ConfigFrameworkRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BC61E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BC71E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BC81E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5D06E8F30FD68D21005AE3F6 /* ConfigBinaryDeltaRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BC91E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BCA1E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BCB1E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BCC1E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BCD1E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 729F11001C65A9B500DFCCC5 /* ConfigUITestRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D6233BCE1E1DB4910088E907 /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */;
|
||||
buildSettings = {
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
D68CC3231EECA6C4008877BF /* ReleaseLogging */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = Appcast;
|
||||
};
|
||||
name = ReleaseLogging;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -2583,6 +2665,7 @@
|
||||
1420DF4B1962329200203BB0 /* Debug */,
|
||||
149B78611B7D398100D7D62C /* Coverage */,
|
||||
1420DF4C1962329200203BB0 /* Release */,
|
||||
D6233BCB1E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2593,6 +2676,7 @@
|
||||
14732BC71960F69300593899 /* Debug */,
|
||||
149B78601B7D398100D7D62C /* Coverage */,
|
||||
14732BC81960F69300593899 /* Release */,
|
||||
D6233BCA1E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2603,6 +2687,7 @@
|
||||
14950061195FB89500BC5B5B /* Debug */,
|
||||
149B78621B7D398100D7D62C /* Coverage */,
|
||||
14950062195FB89500BC5B5B /* Release */,
|
||||
D6233BCC1E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2613,6 +2698,7 @@
|
||||
1DEB91AE08733DA50010E9CD /* Debug */,
|
||||
149B785B1B7D398100D7D62C /* Coverage */,
|
||||
1DEB91AF08733DA50010E9CD /* Release */,
|
||||
D6233BC51E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2623,6 +2709,7 @@
|
||||
1DEB91B208733DA50010E9CD /* Debug */,
|
||||
149B785A1B7D398100D7D62C /* Coverage */,
|
||||
1DEB91B308733DA50010E9CD /* Release */,
|
||||
D6233BC41E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2633,6 +2720,7 @@
|
||||
55C14BBB136EEF1500649790 /* Debug */,
|
||||
149B785F1B7D398100D7D62C /* Coverage */,
|
||||
55C14BBC136EEF1500649790 /* Release */,
|
||||
D6233BC91E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2643,6 +2731,7 @@
|
||||
5AA96C591E0AE0DC00CA4346 /* Debug */,
|
||||
5AA96C5A1E0AE0DC00CA4346 /* Coverage */,
|
||||
5AA96C5B1E0AE0DC00CA4346 /* Release */,
|
||||
D68CC3231EECA6C4008877BF /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2653,6 +2742,7 @@
|
||||
5D06E8D20FD68C7D005AE3F6 /* Debug */,
|
||||
149B785E1B7D398100D7D62C /* Coverage */,
|
||||
5D06E8D30FD68C7D005AE3F6 /* Release */,
|
||||
D6233BC81E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2663,6 +2753,7 @@
|
||||
612279DB0DB5470300AB99EA /* Debug */,
|
||||
149B785D1B7D398100D7D62C /* Coverage */,
|
||||
612279DC0DB5470300AB99EA /* Release */,
|
||||
D6233BC71E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2673,6 +2764,7 @@
|
||||
61B5F90609C4CEE300B25A18 /* Debug */,
|
||||
149B785C1B7D398100D7D62C /* Coverage */,
|
||||
61B5F90709C4CEE300B25A18 /* Release */,
|
||||
D6233BC61E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2683,6 +2775,7 @@
|
||||
722954B81D04ADAF00ECF9CA /* Debug */,
|
||||
722954B91D04ADAF00ECF9CA /* Coverage */,
|
||||
722954BA1D04ADAF00ECF9CA /* Release */,
|
||||
D6233BCE1E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2693,6 +2786,7 @@
|
||||
726B2B641C645FC900388755 /* Debug */,
|
||||
726B2B651C645FC900388755 /* Coverage */,
|
||||
726B2B661C645FC900388755 /* Release */,
|
||||
D6233BCD1E1DB4910088E907 /* ReleaseLogging */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "14732BC51960F69300593899"
|
||||
BuildableName = "Distribution"
|
||||
BlueprintName = "Distribution"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "612279D80DB5470200AB99EA"
|
||||
BuildableName = "Sparkle Unit Tests.xctest"
|
||||
BlueprintName = "Sparkle Unit Tests"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "14732BC51960F69300593899"
|
||||
BuildableName = "Distribution"
|
||||
BlueprintName = "Distribution"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "14732BC51960F69300593899"
|
||||
BuildableName = "Distribution"
|
||||
BlueprintName = "Distribution"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "14732BC51960F69300593899"
|
||||
BuildableName = "Distribution"
|
||||
BlueprintName = "Distribution"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
|
||||
BuildableName = "Sparkle.framework"
|
||||
BlueprintName = "Sparkle"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "612279D80DB5470200AB99EA"
|
||||
BuildableName = "Sparkle Unit Tests.xctest"
|
||||
BlueprintName = "Sparkle Unit Tests"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
|
||||
BuildableName = "Sparkle.framework"
|
||||
BlueprintName = "Sparkle"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugXPCServices = "NO"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
|
||||
BuildableName = "Sparkle.framework"
|
||||
BlueprintName = "Sparkle"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
|
||||
BuildableName = "Sparkle.framework"
|
||||
BlueprintName = "Sparkle"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
|
||||
BuildableName = "generate_appcast"
|
||||
BlueprintName = "generate_appcast"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
|
||||
BuildableName = "generate_appcast"
|
||||
BlueprintName = "generate_appcast"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
|
||||
BuildableName = "generate_appcast"
|
||||
BlueprintName = "generate_appcast"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
|
||||
BuildableName = "generate_appcast"
|
||||
BlueprintName = "generate_appcast"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
Vendored
+2
-8
@@ -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: 0 statusText: @""];
|
||||
[self.statusController showWindow:self];
|
||||
}
|
||||
|
||||
@@ -151,14 +151,8 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
|
||||
return;
|
||||
}
|
||||
|
||||
void(^progressBlock)(double) = ^(double progress){
|
||||
dispatch_async(dispatch_get_main_queue(), ^(){
|
||||
self.statusController.progressValue = progress * 100.0;
|
||||
});
|
||||
};
|
||||
|
||||
NSError *finalInstallationError = nil;
|
||||
if (![installer performFinalInstallationProgressBlock:progressBlock error:&finalInstallationError]) {
|
||||
if (![installer performFinalInstallation:&finalInstallationError]) {
|
||||
NSError *underlyingError = [finalInstallationError.userInfo objectForKey:NSUnderlyingErrorKey];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (underlyingError == nil || underlyingError.code != SUInstallationCancelledError) {
|
||||
|
||||
Vendored
+29
-29
@@ -2,21 +2,21 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
func die(_ msg: String) {
|
||||
func die(msg: String) {
|
||||
print("ERROR: \(msg)")
|
||||
exit(1)
|
||||
}
|
||||
|
||||
extension XMLElement {
|
||||
extension NSXMLElement {
|
||||
convenience init(name: String, attributes: [String: String], stringValue string: String? = nil) {
|
||||
self.init(name: name, stringValue: string)
|
||||
setAttributesWith(attributes)
|
||||
setAttributesWithDictionary(attributes)
|
||||
}
|
||||
}
|
||||
|
||||
let ud = UserDefaults.standard
|
||||
let sparkleRoot = ud.object(forKey: "root") as? String
|
||||
let htmlPath = ud.object(forKey: "htmlPath") as? String
|
||||
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")
|
||||
}
|
||||
@@ -29,36 +29,36 @@ if enStringsDict == nil {
|
||||
let enStringsDictKeys = enStringsDict!.allKeys
|
||||
|
||||
let dirPath = NSString(string: sparkleRoot! + "/Sparkle")
|
||||
let dirContents = try! FileManager.default.contentsOfDirectory(atPath: dirPath as String)
|
||||
let dirContents = try! NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath as String)
|
||||
let css =
|
||||
"body { font-family: sans-serif; font-size: 10pt; }" +
|
||||
"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 = XMLDocument(rootElement: XMLElement(name: "html"))
|
||||
html.dtd = XMLDTD()
|
||||
html.dtd!.name = html.rootElement()!.name
|
||||
var html = NSXMLDocument(rootElement: NSXMLElement(name: "html"))
|
||||
html.DTD = NSXMLDTD()
|
||||
html.DTD!.name = html.rootElement()!.name
|
||||
html.characterEncoding = "UTF-8"
|
||||
html.documentContentKind = XMLDocument.ContentKind.xhtml
|
||||
var body = XMLElement(name: "body")
|
||||
var head = XMLElement(name: "head")
|
||||
html.documentContentKind = NSXMLDocumentContentKind.XHTMLKind
|
||||
var body = NSXMLElement(name: "body")
|
||||
var head = NSXMLElement(name: "head")
|
||||
html.rootElement()!.addChild(head)
|
||||
html.rootElement()!.addChild(body)
|
||||
head.addChild(XMLElement(name: "meta", attributes: ["charset": html.characterEncoding!]))
|
||||
head.addChild(XMLElement(name: "title", stringValue: "Sparkle Localizations Report"))
|
||||
head.addChild(XMLElement(name: "style", stringValue: css))
|
||||
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 = Locale.current
|
||||
let locale = NSLocale.currentLocale()
|
||||
for dirEntry in dirContents {
|
||||
if NSString(string: dirEntry).pathExtension != "lproj" || dirEntry == "en.lproj" {
|
||||
continue
|
||||
}
|
||||
|
||||
let lang = (locale as NSLocale).displayName(forKey: NSLocale.Key.languageCode, value: NSString(string: dirEntry).deletingPathExtension)
|
||||
body.addChild(XMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))"))
|
||||
let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: NSString(string: dirEntry).stringByDeletingPathExtension)
|
||||
body.addChild(NSXMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))"))
|
||||
|
||||
let stringsPath = NSString(string: dirPath.appendingPathComponent(dirEntry)).appendingPathComponent("Sparkle.strings")
|
||||
let stringsPath = NSString(string: dirPath.stringByAppendingPathComponent(dirEntry)).stringByAppendingPathComponent("Sparkle.strings")
|
||||
let stringsDict = NSDictionary(contentsOfFile: stringsPath)
|
||||
if stringsDict == nil {
|
||||
die("Invalid strings file \(dirEntry)")
|
||||
@@ -70,10 +70,10 @@ for dirEntry in dirContents {
|
||||
var unused: [String] = []
|
||||
|
||||
for key in enStringsDictKeys {
|
||||
let str = stringsDict?.object(forKey: key) as? String
|
||||
let str = stringsDict?.objectForKey(key) as? String
|
||||
if str == nil {
|
||||
missing.append(key as! String)
|
||||
} else if let enStr = enStringsDict?.object(forKey: key) as? String {
|
||||
} else if let enStr = enStringsDict?.objectForKey(key) as? String {
|
||||
if enStr == str {
|
||||
unlocalized.append(key as! String)
|
||||
}
|
||||
@@ -82,7 +82,7 @@ for dirEntry in dirContents {
|
||||
|
||||
let stringsDictKeys = stringsDict!.allKeys
|
||||
for key in stringsDictKeys {
|
||||
if enStringsDict?.object(forKey: key) == nil {
|
||||
if enStringsDict?.objectForKey(key) == nil {
|
||||
unused.append(key as! String)
|
||||
}
|
||||
}
|
||||
@@ -90,12 +90,12 @@ for dirEntry in dirContents {
|
||||
let sorter = { (s1: String, s2: String) -> Bool in
|
||||
return s1 < s2
|
||||
}
|
||||
missing.sort(by: sorter)
|
||||
unlocalized.sort(by: sorter)
|
||||
unused.sort(by: sorter)
|
||||
missing.sortInPlace(sorter)
|
||||
unlocalized.sortInPlace(sorter)
|
||||
unused.sortInPlace(sorter)
|
||||
|
||||
let addRow = { (prefix: String, cssClass: String, key: String) -> Void in
|
||||
body.addChild(XMLElement(name: "span", attributes: ["class": cssClass], stringValue: [prefix, key].joined(separator: " ") + "\n"))
|
||||
body.addChild(NSXMLElement(name: "span", attributes: ["class": cssClass], stringValue: [prefix, key].joinWithSeparator(" ") + "\n"))
|
||||
}
|
||||
|
||||
for key in missing {
|
||||
@@ -110,6 +110,6 @@ for dirEntry in dirContents {
|
||||
}
|
||||
|
||||
var err: NSError?
|
||||
if !((try? html.xmlData.write(to: URL(fileURLWithPath: htmlPath!), options: [.atomic])) != nil) {
|
||||
die("Can't write report: \(err!)")
|
||||
if !html.XMLData.writeToFile(htmlPath!, atomically: true) {
|
||||
die("Can't write report: \(err)")
|
||||
}
|
||||
Vendored
+4
@@ -414,6 +414,10 @@
|
||||
|
||||
- (void)installWithToolAndRelaunch:(BOOL)relaunch
|
||||
{
|
||||
// TotalFinder-related HACK to prevent relaunch, installer does relaunch automatically
|
||||
// same applies for TotalTerminal and Asepsis
|
||||
relaunch = NO;
|
||||
|
||||
// Perhaps a poor assumption but: if we're not relaunching, we assume we shouldn't be showing any UI either. Because non-relaunching installations are kicked off without any user interaction, we shouldn't be interrupting them.
|
||||
[self installWithToolAndRelaunch:relaunch displayingUserInterface:relaunch];
|
||||
}
|
||||
|
||||
Vendored
+13
-13
@@ -58,7 +58,7 @@
|
||||
{
|
||||
@autoreleasepool {
|
||||
BOOL mountedSuccessfully = NO;
|
||||
|
||||
|
||||
// get a unique mount point path
|
||||
NSString *mountPoint = nil;
|
||||
NSFileManager *manager;
|
||||
@@ -81,12 +81,12 @@
|
||||
}
|
||||
// Note: this check does not follow symbolic links, which is what we want
|
||||
while ([[NSURL fileURLWithPath:mountPoint] checkResourceIsReachableAndReturnError:NULL]);
|
||||
|
||||
|
||||
NSData *promptData = nil;
|
||||
promptData = [NSData dataWithBytes:"yes\n" length:4];
|
||||
|
||||
|
||||
NSMutableArray *arguments = [@[@"attach", self.archivePath, @"-mountpoint", mountPoint, /*@"-noverify",*/ @"-nobrowse", @"-noautoopen"] mutableCopy];
|
||||
|
||||
|
||||
if (self.decryptionPassword) {
|
||||
NSMutableData *passwordData = [[self.decryptionPassword dataUsingEncoding:NSUTF8StringEncoding] mutableCopy];
|
||||
// From the hdiutil docs:
|
||||
@@ -96,10 +96,10 @@
|
||||
[passwordData appendData:[NSData dataWithBytes:"\0" length:1]];
|
||||
[passwordData appendData:promptData];
|
||||
promptData = passwordData;
|
||||
|
||||
|
||||
[arguments addObject:@"-stdinpass"];
|
||||
}
|
||||
|
||||
|
||||
NSData *output = nil;
|
||||
NSInteger taskResult = -1;
|
||||
@try
|
||||
@@ -132,7 +132,7 @@
|
||||
{
|
||||
goto reportError;
|
||||
}
|
||||
|
||||
|
||||
[notifier notifyProgress:0.5];
|
||||
|
||||
if (taskResult != 0)
|
||||
@@ -142,7 +142,7 @@
|
||||
goto reportError;
|
||||
}
|
||||
mountedSuccessfully = YES;
|
||||
|
||||
|
||||
// Now that we've mounted it, we need to copy out its contents.
|
||||
manager = [[NSFileManager alloc] init];
|
||||
contents = [manager contentsOfDirectoryAtPath:mountPoint error:&error];
|
||||
@@ -159,12 +159,12 @@
|
||||
{
|
||||
NSString *fromPath = [mountPoint stringByAppendingPathComponent:item];
|
||||
NSString *toPath = [[self.archivePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:item];
|
||||
|
||||
|
||||
// We skip any files in the DMG which are not readable.
|
||||
if (![manager isReadableFileAtPath:fromPath]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
itemsCopied += 1.0;
|
||||
[notifier notifyProgress:0.5 + itemsCopied/(totalItems*2.0)];
|
||||
SULog(SULogLevelDefault, @"copyItemAtPath:%@ toPath:%@", fromPath, toPath);
|
||||
@@ -174,10 +174,10 @@
|
||||
goto reportError;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[notifier notifySuccess];
|
||||
goto finally;
|
||||
|
||||
|
||||
reportError:
|
||||
[notifier notifyFailureWithError:error];
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
task.arguments = @[@"detach", mountPoint, @"-force"];
|
||||
task.standardOutput = [NSPipe pipe];
|
||||
task.standardError = [NSPipe pipe];
|
||||
|
||||
|
||||
@try {
|
||||
[task launch];
|
||||
} @catch (NSException *exception) {
|
||||
|
||||
Vendored
+1
-2
@@ -146,7 +146,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
* Runs an installer package (pkg) in a headless mode using /usr/sbin/installer
|
||||
* @param packageURL A URL pointing to the package to execute. The item at this URL must exist.
|
||||
* @param progressBlock Callback that takes double value (0..1 range) notifying how far the installation has progressed
|
||||
* @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
|
||||
* @return YES if the installer ran the package successfully, otherwise NO with a populated error object
|
||||
*
|
||||
@@ -154,7 +153,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* an initial authorization prompt if the calling process does not have root privileges. In other words, root privileges are required to use this method, and the file manager instance must have been created by allowing authorization.
|
||||
* An error can occur if the package is unable to be ran by the installer, or if the installer reports a non-zero exit status code.
|
||||
*/
|
||||
- (BOOL)executePackageAtURL:(NSURL *)packageURL progressBlock:(nullable void(^)(double))progressBlock error:(NSError *_Nullable*_Nullable)error;
|
||||
- (BOOL)executePackageAtURL:(NSURL *)packageURL error:(NSError *_Nullable*_Nullable)error;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
|
||||
Vendored
+4
-39
@@ -143,11 +143,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)_authorizeAndExecuteCommand:(char *)command sourcePath:(char *)sourcePath destinationPath:(char *)destinationPath error:(NSError * __autoreleasing *)error {
|
||||
return [self _authorizeAndExecuteCommand:command sourcePath:sourcePath destinationPath:destinationPath lineCallback:nil error:error];
|
||||
}
|
||||
|
||||
- (BOOL)_authorizeAndExecuteCommand:(char *)command sourcePath:(char *)sourcePath destinationPath:(char *)destinationPath lineCallback:(void(^)(NSString*))lineCallback error:(NSError * __autoreleasing *)error
|
||||
- (BOOL)_authorizeAndExecuteCommand:(char *)command sourcePath:(char *)sourcePath destinationPath:(char *)destinationPath error:(NSError * __autoreleasing *)error
|
||||
{
|
||||
NSError *acquireError = nil;
|
||||
if (![self _acquireAuthorizationWithError:&acquireError]) {
|
||||
@@ -174,7 +170,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
if (runStatus != errAuthorizationSuccess) {
|
||||
#pragma clang diagnostic pop
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Failed to run authorization tool %s (%d).", toolPath, (int)runStatus] }];
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Failed to run authorization tool %@ (%d).", [NSString stringWithCString:toolPath encoding:NSUTF8StringEncoding], (int)runStatus] }];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
@@ -188,11 +184,6 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (lineCallback) {
|
||||
NSFileHandle *pipeHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno(pipe) closeOnDealloc:NO];
|
||||
[self parseLines:pipeHandle lineCallback:lineCallback];
|
||||
}
|
||||
|
||||
pid_t childPid = (int32_t)CFSwapInt32LittleToHost(pidData);
|
||||
int status = 0;
|
||||
|
||||
@@ -213,28 +204,6 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)parseLines:(NSFileHandle *)pipeHandle lineCallback:(void(^)(NSString *))lineCallback {
|
||||
__block NSMutableData *line = [NSMutableData new];
|
||||
pipeHandle.readabilityHandler = ^(NSFileHandle *handle){
|
||||
NSData *data = handle.availableData;
|
||||
NSUInteger length = data.length;
|
||||
if (!length) {
|
||||
return;
|
||||
}
|
||||
const char *bytes = data.bytes;
|
||||
for(NSUInteger i = 0; i < length; i++) {
|
||||
if (bytes[i] == '\n') {
|
||||
NSData *dataToEOL = [data subdataWithRange:NSMakeRange(0, i)];
|
||||
[line appendData:dataToEOL];
|
||||
NSString *fullLine = [[NSString alloc] initWithData:line encoding:NSUTF8StringEncoding];
|
||||
lineCallback(fullLine);
|
||||
line = [[data subdataWithRange:NSMakeRange(i+1, length-i-1)] mutableCopy];
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_auth != NULL) {
|
||||
@@ -955,7 +924,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
}
|
||||
|
||||
// Unlike other methods, authorization is required to execute this method successfully
|
||||
- (BOOL)executePackageAtURL:(NSURL *)packageURL progressBlock:(void(^)(double))progressBlock error:(NSError * __autoreleasing *)error
|
||||
- (BOOL)executePackageAtURL:(NSURL *)packageURL error:(NSError * __autoreleasing *)error
|
||||
{
|
||||
if (![self _itemExistsAtURL:packageURL]) {
|
||||
if (error != NULL) {
|
||||
@@ -973,11 +942,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
}
|
||||
|
||||
NSError *executeError = nil;
|
||||
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpInstallCommand sourcePath:path destinationPath:NULL lineCallback:^(NSString *line){
|
||||
if ([line hasPrefix:@"installer:%"]) {
|
||||
progressBlock([[line substringFromIndex:11] doubleValue]/100.0);
|
||||
}
|
||||
} error:&executeError];
|
||||
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpInstallCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||
|
||||
if (!success && error != NULL) {
|
||||
NSString* errorMessage = @"Failed to execute package installer.";
|
||||
|
||||
Vendored
+2
-2
@@ -42,11 +42,11 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performFinalInstallationProgressBlock:(nullable void(^)(double))progressBlock error:(NSError * __autoreleasing *)error
|
||||
- (BOOL)performFinalInstallation:(NSError * __autoreleasing *)error
|
||||
{
|
||||
SUFileManager *fileManager = [SUFileManager fileManagerWithAuthorizationToolPath:self.fileOperationToolPath];
|
||||
|
||||
return [fileManager executePackageAtURL:[NSURL fileURLWithPath:self.packagePath] progressBlock:progressBlock error:error];
|
||||
return [fileManager executePackageAtURL:[NSURL fileURLWithPath:self.packagePath] error:error];
|
||||
}
|
||||
|
||||
- (BOOL)canInstallSilently
|
||||
|
||||
Vendored
+1
-1
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// Any installation work after the user application has been terminated. This is where the final installation work can be done.
|
||||
// After this stage is done, the user application may be relaunched.
|
||||
// Should be able to be called from non-main thread
|
||||
- (BOOL)performFinalInstallationProgressBlock:(nullable void(^)(double))cb error:(NSError **)error;
|
||||
- (BOOL)performFinalInstallation:(NSError **)error;
|
||||
|
||||
// Indicates whether or not this installer can install the update silently in the background, without hindering the user
|
||||
// Should be thread safe
|
||||
|
||||
Vendored
+1
-1
@@ -39,7 +39,7 @@
|
||||
return version;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||
return [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
|
||||
Vendored
+1
-1
@@ -49,7 +49,7 @@ static NSString *SUOpenUtilityPath = @"/usr/bin/open";
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performFinalInstallationProgressBlock:(nullable void(^)(double))__unused cb error:(NSError *__autoreleasing*)error
|
||||
- (BOOL)performFinalInstallation:(NSError * __autoreleasing *)error
|
||||
{
|
||||
// Run installer using the "open" command to ensure it is launched in front of current application.
|
||||
// -W = wait until the app has quit.
|
||||
|
||||
Vendored
+12
-33
@@ -61,7 +61,7 @@
|
||||
return trimmedVersion.length > 0 ? trimmedVersion : nil;
|
||||
}
|
||||
|
||||
- (BOOL)performInstallationToURL:(NSURL *)installationURL fromUpdateAtURL:(NSURL *)newURL withHost:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath progressBlock:(nullable void(^)(double))progress error:(NSError * __autoreleasing *)error
|
||||
- (BOOL)performInstallationToURL:(NSURL *)installationURL fromUpdateAtURL:(NSURL *)newURL withHost:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath error:(NSError * __autoreleasing *)error
|
||||
{
|
||||
if (installationURL == nil || newURL == nil) {
|
||||
// this really shouldn't happen but just in case
|
||||
@@ -71,9 +71,7 @@
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
progress(1/10.0);
|
||||
|
||||
|
||||
SUFileManager *fileManager = [SUFileManager fileManagerWithAuthorizationToolPath:fileOperationToolPath];
|
||||
|
||||
// Create a temporary directory for our new app that resides on our destination's volume
|
||||
@@ -84,9 +82,7 @@
|
||||
SULog(SULogLevelError, @"Failed to make new temp directory");
|
||||
return NO;
|
||||
}
|
||||
|
||||
progress(2/10.0);
|
||||
|
||||
|
||||
// Move the new app to our temporary directory
|
||||
NSString *newURLLastPathComponent = newURL.lastPathComponent;
|
||||
NSURL *newTempURL = [tempNewDirectoryURL URLByAppendingPathComponent:newURLLastPathComponent];
|
||||
@@ -95,9 +91,7 @@
|
||||
[fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
|
||||
return NO;
|
||||
}
|
||||
|
||||
progress(3/10.0);
|
||||
|
||||
|
||||
// Release our new app from quarantine, fix its owner and group IDs, and update its modification time while it's at our temporary destination
|
||||
// We must leave moving the app to its destination as the final step in installing it, so that
|
||||
// it's not possible our new app can be left in an incomplete state at the final destination
|
||||
@@ -107,9 +101,7 @@
|
||||
// Not big enough of a deal to fail the entire installation
|
||||
SULog(SULogLevelError, @"Failed to release quarantine at %@ with error %@", newTempURL.path, quarantineError);
|
||||
}
|
||||
|
||||
progress(4/10.0);
|
||||
|
||||
|
||||
NSURL *oldURL = [NSURL fileURLWithPath:host.bundlePath];
|
||||
if (oldURL == nil) {
|
||||
// this really shouldn't happen but just in case
|
||||
@@ -127,16 +119,11 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
progress(5/10.0);
|
||||
|
||||
if (![fileManager updateModificationAndAccessTimeOfItemAtURL:newTempURL error:error]) {
|
||||
// Not a fatal error, but a pretty unfortunate one
|
||||
SULog(SULogLevelError, @"Failed to update modification and access time of new app at %@", newTempURL.path);
|
||||
}
|
||||
|
||||
progress(6/10.0);
|
||||
|
||||
|
||||
// Decide on a destination name we should use for the older app when we move it around the file system
|
||||
NSString *oldDestinationName = nil;
|
||||
if (SPARKLE_APPEND_VERSION_NUMBER) {
|
||||
@@ -158,9 +145,7 @@
|
||||
[fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
|
||||
return NO;
|
||||
}
|
||||
|
||||
progress(7/10.0);
|
||||
|
||||
|
||||
// Move the old app to the temporary directory
|
||||
NSURL *oldTempURL = [tempOldDirectoryURL URLByAppendingPathComponent:oldDestinationNameWithPathExtension];
|
||||
if (![fileManager moveItemAtURL:oldURL toURL:oldTempURL error:error]) {
|
||||
@@ -172,9 +157,7 @@
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
progress(8/10.0);
|
||||
|
||||
|
||||
// Move the new app to its final destination
|
||||
if (![fileManager moveItemAtURL:newTempURL toURL:installationURL error:error]) {
|
||||
SULog(SULogLevelError, @"Failed to move new app at %@ to final destination %@", newTempURL.path, installationURL.path);
|
||||
@@ -188,18 +171,14 @@
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
progress(9/10.0);
|
||||
|
||||
|
||||
// From here on out, we don't really need to bring up authorization if we haven't done so prior
|
||||
SUFileManager *constrainedFileManager = [fileManager fileManagerByPreservingAuthorizationRights];
|
||||
|
||||
// Cleanup
|
||||
[constrainedFileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
|
||||
[constrainedFileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
|
||||
|
||||
progress(10/10.0);
|
||||
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -228,9 +207,9 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performFinalInstallationProgressBlock:(nullable void(^)(double))cb error:(NSError *__autoreleasing*)error
|
||||
- (BOOL)performFinalInstallation:(NSError * __autoreleasing *)error
|
||||
{
|
||||
return [self performInstallationToURL:[NSURL fileURLWithPath:self.installationPath] fromUpdateAtURL:[NSURL fileURLWithPath:self.bundlePath] withHost:self.host fileOperationToolPath:self.fileOperationToolPath progressBlock:cb error:error];
|
||||
return [self performInstallationToURL:[NSURL fileURLWithPath:self.installationPath] fromUpdateAtURL:[NSURL fileURLWithPath:self.bundlePath] withHost:self.host fileOperationToolPath:self.fileOperationToolPath error:error];
|
||||
}
|
||||
|
||||
- (BOOL)canInstallSilently
|
||||
|
||||
Vendored
+4
-19
@@ -179,30 +179,15 @@ SU_EXPORT @interface SUUpdater : NSObject
|
||||
@property (nonatomic, copy) NSString *decryptionPassword;
|
||||
|
||||
/*!
|
||||
This function ignores normal update schedule, ignores user preferences,
|
||||
and interrupts users with an unwanted immediate app update.
|
||||
|
||||
WARNING: this function should not be used in regular apps. This function
|
||||
is a user-unfriendly hack only for very special cases, like unstable
|
||||
rapidly-changing beta builds that would not run correctly if they were
|
||||
even one day out of date.
|
||||
|
||||
Instead of this function you should set `SUAutomaticallyUpdate` to `YES`,
|
||||
which will gracefully install updates when the app quits.
|
||||
|
||||
For UI-less/daemon apps that aren't usually quit, instead of this function,
|
||||
you can use the delegate method
|
||||
SUUpdaterDelegate::updater:willInstallUpdateOnQuit:immediateInstallationInvocation:
|
||||
to immediately start installation when an update was found.
|
||||
|
||||
Checks for updates and, if available, immediately downloads and installs them.
|
||||
A progress dialog is shown but the user will never be prompted to read the
|
||||
release notes.
|
||||
|
||||
This function will cause update to be downloaded twice if automatic updates are
|
||||
enabled.
|
||||
|
||||
You may want to respond to the userDidCancelDownload delegate method in case
|
||||
the user clicks the "Cancel" button while the update is downloading.
|
||||
|
||||
If you are writing a UI-less background application, you probably want to instead use
|
||||
SUUpdaterDelegate::updater:willInstallUpdateOnQuit:immediateInstallationInvocation:
|
||||
*/
|
||||
- (void)installUpdatesIfAvailable;
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -170,7 +170,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
||||
[self showAlertText:SULocalizedString(@"Insecure feed URL is blocked in macOS 10.11", nil)
|
||||
informativeText:[NSString stringWithFormat:SULocalizedString(@"You must change the feed URL (%@) to use HTTPS or disable App Transport Security.\n\nFor more information:\nhttps://sparkle-project.org/documentation/app-transport-security/", nil), [feedURL absoluteString]]];
|
||||
} else if (!isMainBundle) {
|
||||
SULog(SULogLevelDefault, @"WARNING: Serving updates over HTTP may be blocked in macOS 10.11. Please change the feed URL (%@) to use HTTPS. For more information:\nhttps://sparkle-project.org/documentation/app-transport-security/", feedURL);
|
||||
// SULog(SULogLevelDefault, @"WARNING: Serving updates over HTTP may be blocked in macOS 10.11. Please change the feed URL (%@) to use HTTPS. For more information:\nhttps://sparkle-project.org/documentation/app-transport-security/", feedURL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -284,7 +284,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
||||
{
|
||||
// Do not use reachability for a preflight check. This can be deceptive and a bad idea. Apple does not recommend doing it.
|
||||
SUUpdateDriver *theUpdateDriver = [[([self automaticallyDownloadsUpdates] ? [SUAutomaticUpdateDriver class] : [SUScheduledUpdateDriver class])alloc] initWithUpdater:self];
|
||||
|
||||
|
||||
[self checkForUpdatesWithDriver:theUpdateDriver];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-17
@@ -1,5 +1,3 @@
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! This is an important update; would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ foi transferido e está pronto para uso! Esta é uma atualização importante; deseja instalar e reabrir o %1$@ agora?";
|
||||
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ foi transferido e está pronto para uso! Deseja instalar e reabrir o %1$@ agora?";
|
||||
|
||||
"%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$@ não pode ser atualizado enquanto for executado a partir de um volume somente de leitura, como uma imagem de disco ou CD/DVD. Mova o %1$@ para a pasta Aplicativos, reabra-o e tente novamente.";
|
||||
@@ -32,8 +30,6 @@
|
||||
|
||||
"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Ocorreu um erro ao reabrir o %1$@. A nova versão estará disponível da próxima vez que você abrir o %1$@.";
|
||||
|
||||
"An important update to %@ is ready to install" = "Uma atualização importante do %@ está pronta para ser instalada!";
|
||||
|
||||
/* the unit for bytes */
|
||||
"B" = "B";
|
||||
|
||||
@@ -60,30 +56,20 @@
|
||||
/* the unit for kilobytes */
|
||||
"KB" = "KB";
|
||||
|
||||
/* Alternative name for "Install" button if we have a paid update or other update
|
||||
without a download but with a URL. */
|
||||
"Learn More..." = "Saber Mais…";
|
||||
|
||||
/* the unit for megabytes */
|
||||
"MB" = "MB";
|
||||
|
||||
/* OK button. */
|
||||
"OK" = "OK";
|
||||
|
||||
/* Status message on progress window once download has finished. */
|
||||
"Ready to Install" = "Pronto para Instalar";
|
||||
|
||||
/* 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." = "Deseja que o %1$@ busque atualizações automaticamente? Você pode buscar atualizações manualmente, através do menu %1$@.";
|
||||
|
||||
"The update is improperly signed." = "A atualização está assinada incorretamente.";
|
||||
"Update Error!" = "Erro de Atualização!";
|
||||
|
||||
"Update Error!" = "Erro de atualização!";
|
||||
"Updating %@" = "Atualizando %@";
|
||||
|
||||
"Updating %@" = "Atualizando o %@";
|
||||
|
||||
/* 'Error' message when the user checks for updates but is already current or the feed doesn't contain any updates. (not necessarily shown in UI) */
|
||||
"You already have the newest version of %@." = "Você já possui a versão mais recente do %@.";
|
||||
|
||||
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */
|
||||
"You're up-to-date!" = "Você está atualizado!";
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
}
|
||||
|
||||
NSError *finalInstallationError = nil;
|
||||
if (![installer performFinalInstallationProgressBlock:nil error:&finalInstallationError]) {
|
||||
if (![installer performFinalInstallation:&finalInstallationError]) {
|
||||
XCTFail(@"Failed to perform final installation with underlying error = %@ ; error = %@", [finalInstallationError.userInfo objectForKey:NSUnderlyingErrorKey], finalInstallationError);
|
||||
}
|
||||
|
||||
|
||||
+3
-5
@@ -131,12 +131,10 @@ int main(int argc, const char *argv[])
|
||||
|
||||
NSTask *task = [[NSTask alloc] init];
|
||||
task.launchPath = installerPath;
|
||||
task.arguments = @[@"-verboseR",
|
||||
@"-pkg", filepath,
|
||||
@"-target", @"/"];
|
||||
task.arguments = @[@"-pkg", filepath, @"-target", @"/"];
|
||||
// Output won't show up anyway, so we may as well ignore it
|
||||
task.standardError = [NSPipe pipe];
|
||||
// Pass through verbose output from the installer, so the caller can parse it
|
||||
task.standardOutput = [NSFileHandle fileHandleWithStandardOutput];
|
||||
task.standardOutput = [NSPipe pipe];
|
||||
|
||||
@try {
|
||||
[task launch];
|
||||
|
||||
@@ -118,22 +118,6 @@ class ArchiveItem: CustomStringConvertible {
|
||||
var fileSize : Int64 {
|
||||
return (self.archiveFileAttributes[.size] as! NSNumber).int64Value;
|
||||
}
|
||||
|
||||
var releaseNotesPath : URL {
|
||||
let basename = self.archivePath.deletingPathExtension();
|
||||
let releaseNotes = basename.appendingPathExtension("html");
|
||||
return releaseNotes;
|
||||
}
|
||||
|
||||
var releaseNotesURL : URL? {
|
||||
guard let escapedFilename = self.releaseNotesPath.lastPathComponent.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) else {
|
||||
return nil;
|
||||
}
|
||||
if let relative = self.feedURL {
|
||||
return URL(string: escapedFilename, relativeTo: relative)
|
||||
}
|
||||
return URL(string: escapedFilename)
|
||||
}
|
||||
|
||||
let mimeType = "application/octet-stream";
|
||||
}
|
||||
@@ -110,19 +110,6 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
|
||||
}
|
||||
minVer?.setChildren([text(update.minimumSystemVersion)]);
|
||||
|
||||
let relElement = findElement(name: "sparkle:releaseNotesLink", parent: item);
|
||||
if nil == relElement {
|
||||
if FileManager.default.fileExists(atPath: update.releaseNotesPath.path) {
|
||||
linebreak(item);
|
||||
item.addChild(XMLElement.element(withName:"sparkle:releaseNotesLink", stringValue: (update.releaseNotesURL?.absoluteString)!) as! XMLElement);
|
||||
}
|
||||
} else {
|
||||
if !FileManager.default.fileExists(atPath: update.releaseNotesPath.path) {
|
||||
let childIndex = relElement?.index;
|
||||
item.removeChild(at: childIndex!);
|
||||
}
|
||||
}
|
||||
|
||||
var enclosure = findElement(name: "enclosure", parent: item);
|
||||
if nil == enclosure {
|
||||
enclosure = XMLElement.element(withName: "enclosure") as? XMLElement;
|
||||
|
||||
@@ -50,7 +50,7 @@ func unarchiveUpdates(archivesSourceDir: URL) throws -> [ArchiveItem] {
|
||||
|
||||
let dir = try fileManager.contentsOfDirectory(atPath: archivesSourceDir.path);
|
||||
var running = 0;
|
||||
for item in dir.filter({ !$0.hasPrefix(".") && !$0.hasSuffix(".delta") && !$0.hasSuffix(".xml") && !$0.hasSuffix(".html") }) {
|
||||
for item in dir.filter({ !$0.hasPrefix(".") && !$0.hasSuffix(".delta") && !$0.hasSuffix(".xml") }) {
|
||||
let itemPath = archivesSourceDir.appendingPathComponent(item);
|
||||
let archiveDestDir = archivesDestDir.appendingPathComponent(itemPath.lastPathComponent);
|
||||
|
||||
|
||||
Reference in new issue
Block a user