mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-23 04:34:27 +00:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d43f88a83 | ||
|
|
2268b96c78 | ||
|
|
3de3591d13 | ||
|
|
7a9c1d76e6 | ||
|
|
fad6f1efe8 | ||
|
|
8045bf7af8 | ||
|
|
a436711133 | ||
|
|
ae7e7f12bc | ||
|
|
80abad4477 | ||
|
|
c9097ba42c | ||
|
|
08f473fe82 | ||
|
|
6f8e8e4789 | ||
|
|
a9d5a42768 | ||
|
|
9364c96336 |
No files matched your search
@@ -10,13 +10,13 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
xcode: ['xcode12.5', 'xcode13']
|
||||
xcode: ['xcode12.5.1', 'xcode13.1']
|
||||
include:
|
||||
- xcode: 'xcode12.5'
|
||||
xcode-path: '/Applications/Xcode_12.5.app/Contents/Developer'
|
||||
- xcode: 'xcode12.5.1'
|
||||
xcode-path: '/Applications/Xcode_12.5.1.app/Contents/Developer'
|
||||
upload-dist: true
|
||||
- xcode: 'xcode13'
|
||||
xcode-path: '/Applications/Xcode_13.0.app/Contents/Developer'
|
||||
- xcode: 'xcode13.1'
|
||||
xcode-path: '/Applications/Xcode_13.1.app/Contents/Developer'
|
||||
upload-dist: false # In Beta, so no upload
|
||||
|
||||
name: Build and Test Sparkle
|
||||
|
||||
@@ -4,6 +4,20 @@ SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
|
||||
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
|
||||
SPARKLE_INSTALLER_PROGRESS_TOOL_NAME = Updater
|
||||
|
||||
// Set to 1 or 0 to bundle or not bundle provided XPC Services in Sparkle framework
|
||||
SPARKLE_EMBED_INSTALLER_LAUNCHER_XPC_SERVICE = 1
|
||||
SPARKLE_EMBED_DOWNLOADER_XPC_SERVICE = 1
|
||||
SPARKLE_EMBED_INSTALLER_STATUS_XPC_SERVICE = 0
|
||||
SPARKLE_EMBED_INSTALLER_CONNECTION_XPC_SERVICE = 0
|
||||
|
||||
// Set this to your own prefix if you want to use XPC Service names with different prefix
|
||||
XPC_SERVICE_BUNDLE_ID_PREFIX = org.sparkle-project
|
||||
|
||||
INSTALLER_CONNECTION_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerConnection
|
||||
INSTALLER_STATUS_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerStatus
|
||||
INSTALLER_LAUNCHER_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerLauncher
|
||||
DOWNLOADER_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.Downloader
|
||||
|
||||
// Set to 0 to only build all non-UI bits
|
||||
SPARKLE_BUILD_UI_BITS = 1
|
||||
|
||||
@@ -23,8 +37,8 @@ SPARKLE_VERSION_MINOR = 0
|
||||
SPARKLE_VERSION_PATCH = 0
|
||||
|
||||
// This should be in SemVer format or empty, ie. "-beta.1"
|
||||
SPARKLE_VERSION_SUFFIX = -beta.3
|
||||
CURRENT_PROJECT_VERSION = 2003
|
||||
SPARKLE_VERSION_SUFFIX = -beta.4
|
||||
CURRENT_PROJECT_VERSION = 2004
|
||||
|
||||
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
@@ -36,12 +50,6 @@ MACOSX_DEPLOYMENT_TARGET = 10.11
|
||||
PRODUCT_NAME = ${TARGET_NAME}
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
XPC_SERVICE_BUNDLE_ID_PREFIX = org.sparkle-project
|
||||
INSTALLER_CONNECTION_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerConnection
|
||||
INSTALLER_STATUS_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerStatus
|
||||
INSTALLER_LAUNCHER_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.InstallerLauncher
|
||||
DOWNLOADER_BUNDLE_ID = ${XPC_SERVICE_BUNDLE_ID_PREFIX}.Downloader
|
||||
|
||||
GCC_PREPROCESSOR_DEFINITIONS_COMMON = SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=$(SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) SPARKLE_BUILD_UI_BITS=$(SPARKLE_BUILD_UI_BITS) SPARKLE_BUNDLE_IDENTIFIER=\"$(SPARKLE_BUNDLE_IDENTIFIER)\" CURRENT_PROJECT_VERSION=\"$(CURRENT_PROJECT_VERSION)\" MARKETING_VERSION=\"$(MARKETING_VERSION)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" SPARKLE_INSTALLER_PROGRESS_TOOL_NAME=\"$(SPARKLE_INSTALLER_PROGRESS_TOOL_NAME)\" SPARKLE_ICON_NAME=\"$(SPARKLE_ICON_NAME)\" INSTALLER_LAUNCHER_BUNDLE_ID=\"${INSTALLER_LAUNCHER_BUNDLE_ID}\" INSTALLER_CONNECTION_BUNDLE_ID=\"${INSTALLER_CONNECTION_BUNDLE_ID}\" INSTALLER_STATUS_BUNDLE_ID=\"${INSTALLER_STATUS_BUNDLE_ID}\" DOWNLOADER_BUNDLE_ID=\"${DOWNLOADER_BUNDLE_ID}\"
|
||||
|
||||
CODE_SIGN_IDENTITY = -
|
||||
|
||||
@@ -16,3 +16,4 @@ DEAD_CODE_STRIPPING = YES
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES
|
||||
COPY_PHASE_STRIP = NO
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO
|
||||
@@ -4,7 +4,15 @@ DYLIB_INSTALL_NAME_BASE = @rpath
|
||||
DYLIB_COMPATIBILITY_VERSION = 1.6
|
||||
DYLIB_CURRENT_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
|
||||
WRAPPER_EXTENSION = framework
|
||||
FRAMEWORK_VERSION = A
|
||||
|
||||
// Sparkle 2 used to support developers embedding XPC Services in their own app bundle
|
||||
// However the Sparkle framework now bundles these XPC Services. Unfortunately this causes
|
||||
// a cache conflict in the system from upgrading from previous to newer versions of Sparkle, and
|
||||
// XPC Services inside Sparkle may not launch (a system reboot would fix this though).
|
||||
// The system cache seems to depend on the Sparkle file path,
|
||||
// so as a better workaround we have changed the FRAMEWORK_VERSION from A to B
|
||||
FRAMEWORK_VERSION = B
|
||||
|
||||
INFOPLIST_FILE = Sparkle/Sparkle-Info.plist
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BUILDING_SPARKLE=1
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os, sys, subprocess, tempfile, pathlib
|
||||
|
||||
PRODUCT_BUNDLE_ID_MACRO = "$(PRODUCT_BUNDLE_IDENTIFIER)"
|
||||
|
||||
def log_message(message):
|
||||
sys.stderr.write(message + "\n")
|
||||
|
||||
#Surround a token with double quotes if it has a space in it
|
||||
def sanitize(argument):
|
||||
return ('"' + argument + '"' if ' ' in argument else argument)
|
||||
|
||||
def _codesign_service(identity, path, entitlements_path=None):
|
||||
command = ["codesign", "-o", "runtime", "-fs", identity, path] + ([] if entitlements_path is None else ["--entitlements", entitlements_path])
|
||||
log_message(" ".join(map(sanitize, command)))
|
||||
|
||||
process = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
process.communicate()
|
||||
if process.returncode != 0:
|
||||
log_message("Error: Failed to codesign %s" % (path))
|
||||
sys.exit(1)
|
||||
|
||||
def codesign_service(service_name, identity, path, entitlements_path=None):
|
||||
#Sign the auxiliary executables (if any)
|
||||
executables_path = os.path.join(path, "Contents/MacOS/")
|
||||
if os.path.exists(executables_path):
|
||||
for executable in os.listdir(executables_path):
|
||||
if executable != service_name:
|
||||
_codesign_service(identity, os.path.join(executables_path, executable), entitlements_path)
|
||||
|
||||
#Sign the service bundle
|
||||
_codesign_service(identity, path, entitlements_path)
|
||||
|
||||
# Returns entitlements back with a bundle id applied if needed
|
||||
def applied_entitlements_path(entitlements_path, bundle_id, temp_dir):
|
||||
entitlements_str = pathlib.Path(entitlements_path).read_text()
|
||||
if PRODUCT_BUNDLE_ID_MACRO in entitlements_str:
|
||||
if bundle_id is None:
|
||||
return None
|
||||
else:
|
||||
new_entitlements_str = entitlements_str.replace(PRODUCT_BUNDLE_ID_MACRO, bundle_id)
|
||||
new_entitlements_path = os.path.join(temp_dir, os.path.basename(entitlements_path))
|
||||
pathlib.Path(new_entitlements_path).write_text(new_entitlements_str)
|
||||
return new_entitlements_path
|
||||
else:
|
||||
return entitlements_path
|
||||
|
||||
def print_usage():
|
||||
log_message("Usage:\n\t%s code-signing-identity [-b app-bundle-id] service1 service2 ..." % (sys.argv[0]))
|
||||
log_message("Example:\n\t%s \"Developer ID Application\" ./XPCServices/org.sparkle-project.InstallerLauncher.xpc" % (sys.argv[0]))
|
||||
log_message("")
|
||||
log_message("Use this script to sign XPC Services to include in your Sandboxed application.")
|
||||
log_message("")
|
||||
log_message("bundle-id is optional and only needs to be provided when signing InstallerConnection and InstallerStatus services. Most applications do not need to use these services and can provide additional entitlements to their application instead.")
|
||||
log_message("")
|
||||
log_message("This script may not be needed for common development workflows. Please visit https://sparkle-project.org/documentation/sandboxing/ for more details and instructions.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 3:
|
||||
print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
signing_identity = sys.argv[1]
|
||||
remaining_args = sys.argv[2:]
|
||||
bundle_id = None
|
||||
if remaining_args[0] == '-b':
|
||||
if len(remaining_args) < 3:
|
||||
# We need the bundle-id and at least one XPC Service to sign
|
||||
print_usage()
|
||||
sys.exit(1)
|
||||
else:
|
||||
bundle_id = remaining_args[1]
|
||||
services = remaining_args[2:]
|
||||
else:
|
||||
services = remaining_args
|
||||
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
for service in services:
|
||||
parent, child = os.path.split(service)
|
||||
service_name = os.path.splitext(child)[0]
|
||||
entitlements_path = os.path.join(parent, service_name + ".entitlements")
|
||||
if os.path.exists(entitlements_path):
|
||||
service_entitlements_path = applied_entitlements_path(entitlements_path, bundle_id, temp_dir)
|
||||
if service_entitlements_path is None:
|
||||
print_usage()
|
||||
log_message("")
|
||||
log_message("Error: Bundle ID must be specified for signing %s. As noted in the usage above, you probably don't need to embed this service." % (service_name))
|
||||
sys.exit(1)
|
||||
else:
|
||||
service_entitlements_path = None
|
||||
|
||||
codesign_service(service_name, signing_identity, service, service_entitlements_path)
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create symlinks to our helper tools in Sparkle and SparkleCore framework bundles
|
||||
# Create symlinks to our helper tools in Sparkle framework bundle
|
||||
# so URLForAuxiliaryExecutable: will pick up the tools. Doing this is supported in the Code Signing in Depth guide.
|
||||
|
||||
FRAMEWORK_PATH="${TARGET_BUILD_DIR}"/"${FULL_PRODUCT_NAME}"
|
||||
|
||||
@@ -13,10 +13,6 @@ function verify_code_signatures() {
|
||||
|
||||
# Search the current directory for all instances of the framework to verify them (XCFrameworks can have multiple copies of a framework for different platforms).
|
||||
find "${verification_directory}" -name "Sparkle.framework" -type d -exec codesign --verify -vvv --deep {} \;
|
||||
codesign --verify -vvv --deep "${verification_directory}/XPCServices/org.sparkle-project.Downloader.xpc"
|
||||
codesign --verify -vvv --deep "${verification_directory}/XPCServices/org.sparkle-project.InstallerConnection.xpc"
|
||||
codesign --verify -vvv --deep "${verification_directory}/XPCServices/org.sparkle-project.InstallerLauncher.xpc"
|
||||
codesign --verify -vvv --deep "${verification_directory}/XPCServices/org.sparkle-project.InstallerStatus.xpc"
|
||||
codesign --verify -vvv --deep "${verification_directory}/sparkle.app"
|
||||
codesign --verify -vvv --deep "${verification_directory}/Sparkle Test App.app"
|
||||
codesign --verify -vvv --deep "${verification_directory}/bin/BinaryDelta"
|
||||
@@ -41,8 +37,6 @@ if [ "$ACTION" = "" ] ; then
|
||||
cp "$CONFIGURATION_BUILD_DIR/generate_appcast" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp "$CONFIGURATION_BUILD_DIR/generate_keys" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp "$CONFIGURATION_BUILD_DIR/sign_update" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp "$SRCROOT/Configurations/codesign_xpc_service.py" "$CONFIGURATION_BUILD_DIR/staging/bin/codesign_xpc_service"
|
||||
chmod 0755 "$CONFIGURATION_BUILD_DIR/staging/bin/codesign_xpc_service"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sparkle.app" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
@@ -50,37 +44,25 @@ if [ "$ACTION" = "" ] ; then
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.xcframework" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
|
||||
mkdir -p "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$INSTALLER_LAUNCHER_BUNDLE_ID.xpc" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$DOWNLOADER_BUNDLE_ID.xpc" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$INSTALLER_CONNECTION_BUNDLE_ID.xpc" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$INSTALLER_STATUS_BUNDLE_ID.xpc" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
|
||||
cp "$SRCROOT/Downloader/$DOWNLOADER_BUNDLE_ID.entitlements" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp "$SRCROOT/InstallerConnection/$INSTALLER_CONNECTION_BUNDLE_ID.entitlements" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp "$SRCROOT/InstallerStatus/$INSTALLER_STATUS_BUNDLE_ID.entitlements" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
mkdir -p "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
|
||||
# Only copy dSYMs for Release builds, but don't check for the presence of the actual files
|
||||
# because missing dSYMs in a release build SHOULD trigger a build failure
|
||||
if [ "$CONFIGURATION" = "Release" ] ; then
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/BinaryDelta.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/generate_appcast.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/generate_keys.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sign_update.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sparkle.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sparkle.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$INSTALLER_LAUNCHER_BUNDLE_ID.xpc.dSYM" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$DOWNLOADER_BUNDLE_ID.xpc.dSYM" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$INSTALLER_CONNECTION_BUNDLE_ID.xpc.dSYM" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/$INSTALLER_STATUS_BUNDLE_ID.xpc.dSYM" "$CONFIGURATION_BUILD_DIR/staging/XPCServices"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/BinaryDelta.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/generate_appcast.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/generate_keys.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sign_update.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/sparkle.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Autoupdate.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Updater.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/org.sparkle-project.InstallerLauncher.xpc.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/org.sparkle-project.Downloader.xpc.dSYM" "$CONFIGURATION_BUILD_DIR/staging/Symbols"
|
||||
fi
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/staging/bin" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/staging/XPCServices" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/staging/Symbols" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
|
||||
cd "$CONFIGURATION_BUILD_DIR/staging"
|
||||
|
||||
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
FRAMEWORK_PATH="${TARGET_BUILD_DIR}"/"${FULL_PRODUCT_NAME}"
|
||||
|
||||
removedservices=0
|
||||
|
||||
if [[ "$SPARKLE_EMBED_INSTALLER_LAUNCHER_XPC_SERVICE" -eq 0 ]]; then
|
||||
rm -rf "${FRAMEWORK_PATH}"/"Versions/"${FRAMEWORK_VERSION}"/XPCServices"/"${INSTALLER_LAUNCHER_BUNDLE_ID}.xpc"
|
||||
removedservices=$((removedservices+1))
|
||||
fi
|
||||
|
||||
if [[ "$SPARKLE_EMBED_DOWNLOADER_XPC_SERVICE" -eq 0 ]]; then
|
||||
rm -rf "${FRAMEWORK_PATH}"/"Versions/"${FRAMEWORK_VERSION}"/XPCServices"/"${DOWNLOADER_BUNDLE_ID}.xpc"
|
||||
removedservices=$((removedservices+1))
|
||||
fi
|
||||
|
||||
if [[ "$SPARKLE_EMBED_INSTALLER_STATUS_XPC_SERVICE" -eq 0 ]]; then
|
||||
rm -rf "${FRAMEWORK_PATH}"/"Versions/"${FRAMEWORK_VERSION}"/XPCServices"/"${INSTALLER_STATUS_BUNDLE_ID}.xpc"
|
||||
removedservices=$((removedservices+1))
|
||||
fi
|
||||
|
||||
if [[ "$SPARKLE_EMBED_INSTALLER_CONNECTION_XPC_SERVICE" -eq 0 ]]; then
|
||||
rm -rf "${FRAMEWORK_PATH}"/"Versions/"${FRAMEWORK_VERSION}"/XPCServices"/"${INSTALLER_CONNECTION_BUNDLE_ID}.xpc"
|
||||
removedservices=$((removedservices+1))
|
||||
fi
|
||||
|
||||
if [[ "$removedservices" -eq 4 ]]; then
|
||||
rm -rf "${FRAMEWORK_PATH}"/"Versions/"${FRAMEWORK_VERSION}"/XPCServices"
|
||||
rm -rf "${FRAMEWORK_PATH}"/"XPCServices"
|
||||
fi
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## XPC Services
|
||||
|
||||
XPC services in Sparkle are all optional, so the code involved in the services needs to be usable directly from the framework as well. For this to work well, if the class used in the XPC service takes a delegate, it must not be weakly referenced, so the retain cycle will have to be broken explicitly (via an explicit added invalidate method). dealloc also must not be implemented (do cleanup in custom invalidate method). As one may tell, a couple of the services are simply proxies (InstallerConnection, InstallerStatus), and I wish that didn't have to be the case -- it would be a burden to require a developer to set up a temporary exception with a specific bundle ID, and unsure how long that approach would work for in the future.
|
||||
XPC services in Sparkle are all optional, so the code involved in the services needs to be usable directly from the framework as well. For this to work well, if the class used in the XPC service takes a delegate, it must not be weakly referenced, so the retain cycle will have to be broken explicitly (via an explicit added invalidate method). dealloc also must not be implemented (do cleanup in custom invalidate method). As one may tell, two of the services are simply proxies (InstallerConnection, InstallerStatus) -- we now recommend most developers to set up a temporary exception with their bundle ID rather than use these two services.
|
||||
|
||||
The protocols used in XPC services must also not adopt other protocols (i.e, one protocol inheriting from another protocol). This is because the XPC protocol decoder on older supported systems doesn't properly handle this case, and won't be able to find that methods exist on a class.
|
||||
|
||||
@@ -18,7 +18,7 @@ The original `SUUpdater` may have also been created to assist plug-ins and other
|
||||
|
||||
## Extensibility
|
||||
|
||||
This fork does not support subclassing classes internal (not exported) to Sparkle anymore. Doing so would be almost impossible to maintain into the future. Subclassing in general has been banned in this fork. Composition is prefered everywhere, even amongst the internal update drivers which were rewritten to follow a protocol oriented approach. The reason why composition is preferred is because it's easier to follow the flow of logic.
|
||||
Sparkle 2.0 does not support subclassing classes internal (not exported) to Sparkle anymore. Doing so would be almost impossible to maintain into the future. Subclassing in general has been banned. Composition is prefered everywhere, even amongst the internal update drivers which were rewritten to follow a protocol oriented approach. The reason why composition is preferred is because it's easier to follow the flow of logic.
|
||||
|
||||
I hope the user driver API gives enough extensibility without someone wanting to create another fork.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ First, some references I've found to be quite useful:
|
||||
* [EvenBetterAuthorizationExample](https://developer.apple.com/library/mac/samplecode/EvenBetterAuthorizationSample/Introduction/Intro.html) sample code by Apple for showing off privileged authorization as well as in sandboxed applications.
|
||||
* Apple's [Daemons and Agents Technote](https://developer.apple.com/library/mac/technotes/tn2083/_index.html). Outdated and before XPC existed, but insightful.
|
||||
|
||||
This fork puts a huge emphasis on splitting Sparkle into several components to achieve privilege separation.
|
||||
Sparkle 2.0 puts a huge emphasis on splitting Sparkle into several components to achieve privilege separation.
|
||||
|
||||
* User Driver (Application; AppKit permitted)
|
||||
* Updater Scheduler (Framework)
|
||||
@@ -18,18 +18,18 @@ These achieve privilege separation, because at least theoretically, they can all
|
||||
|
||||
For XPC Services, it's significant to understand they can be used independent of sandboxing (although I wouldn't recommend this personally). Besides privilege separation, they also have an impact on fault tolerance and termination.
|
||||
|
||||
XPC Services also act inside an application bundle namespace, which is one of many reasons why they aren't bundled inside the framework. We have code that detects whether or not services are available inside the main bundle. This is simpler and more efficient than attempting to create a connection and wait for a timeout. We don't have *any* checks for seeing if the "current process" is sandboxed; doing so is a rather broken behavior. The XPC Services are important, not the sandboxing.
|
||||
We have code that detects whether or not XPC services are available and enabled by the main application bundle. This is simpler and more efficient than attempting to create a connection and wait for a timeout. We don't have *any* checks for seeing if the "current process" is sandboxed; doing so is a rather broken behavior. The XPC Services are important, not the sandboxing.
|
||||
|
||||
I said above that XPC services are looked up in the main bundle. One may think this assumption doesn't hold for helpers or plug-ins inside applications. My response to that is they probably don't need the services, and they probably shoudn't be injecting Sparkle inside the host application anyway due to unintended conflicts and other consequences. A more appropriate approach may be to bundle a separate tool such as the sparkle command line utility.
|
||||
|
||||
The `InstallerLauncher` XPC service needs a `JoinExistingSession` key set to `YES` otherwise authorization will not work properly, and even less so on older systems. It took me forever to debug this, so it's worth mentioning.
|
||||
|
||||
When developing this fork, I still had a huge hole in the privilege separation even after supporting XPC Services and sandboxing. I fixed that by removing references to `AuthorizationExecuteWithPrivileges` and submitting a launchd agent/daemon for the installer. This is overlooked, but absolutely essential for our model to be secure.
|
||||
When developing Sparkle 2.0, I still had a huge hole in the privilege separation even after supporting XPC Services and sandboxing. I fixed that by removing references to `AuthorizationExecuteWithPrivileges` and submitting a launchd agent/daemon for the installer. This is overlooked, but absolutely essential for our model to be secure.
|
||||
|
||||
When communicating to a launchd job, we've several options to use for IPC such as BSD Sockets, Mach ports, XPC (note: XPC is an IPC API and is != "XPC Services"), and file IO. The technote I linked above describes why Mach ports have user namespace issues and why BSD sockets may be preferred over them. However, now, XPC which allows you to choose which domain to look up is the simplest, best, and most modern choice. It's crucial in any event we don't have a daemon (running in system domain) try to *connect* to something in the user domain. Our launchd tasks should also be connected to rather than the other way around. As for communication via file IO, I just wouldn't go anywhere close to trusting such a model mixing in system and user running processes.
|
||||
|
||||
For sending Obj-C objects across the wire, we use `SPUSecureCoding` because Cocoa doesn't support sending objects securely out of the box unless working with XPC Services. It's very important the objects implement `NSSecureCoding` and whitelist types that are expected to be decoded, as well as whitelist types inside collections before decoding them.
|
||||
|
||||
The installer handles extraction, validation, and installation of the update. This was the main reason why other forks were rejected from being secure. The point to be stressed anyway is that these all need to be done in the same process; they can't be handed off by some other process. This is also why removing references to `AuthorizationExecuteWithPrivileges` is crucial as well.
|
||||
The installer handles extraction, validation, and installation of the update. This was the main reason why other sandboxed-capable forks were rejected from being secure. The point to be stressed anyway is that these all need to be done in the same process; they can't be handed off by some other process. This is also why removing references to `AuthorizationExecuteWithPrivileges` is crucial as well.
|
||||
|
||||
Note that the installer does *not* handle downloading. That is handled by the updater framework. This is ideal because downloading can be done without disrupting the user, allowing it to be done silently without presenting an authorization dialog. The downloading portion of code can also be stuck into a XPC service with just an entitlement for allowing incoming connections. This also means for secure installations the installer cannot know (or trust) what protocol the update was downloaded from (i.e: http vs https). A good installer will not care, which is why applying updates without a DSA signature/key is now deprecated (reminder that Apple's code signature checks are not intended for complete integrity).
|
||||
@@ -301,13 +301,21 @@
|
||||
return status;
|
||||
}
|
||||
|
||||
- (NSString *)pathForBundledTool:(NSString *)toolName extension:(NSString *)extension inBundle:(NSBundle *)bundle
|
||||
- (NSString *)pathForBundledTool:(NSString *)toolName extension:(NSString *)extension fromBundle:(NSBundle *)bundle
|
||||
{
|
||||
// If the path extension is empty, we don't want to add a "." at the end
|
||||
NSString *nameWithExtension = (extension.length > 0) ? [toolName stringByAppendingPathExtension:extension] : toolName;
|
||||
assert(nameWithExtension != nil);
|
||||
|
||||
NSURL *auxiliaryToolURL = [bundle URLForAuxiliaryExecutable:nameWithExtension];
|
||||
NSURL *auxiliaryToolURL;
|
||||
if ([bundle.bundleURL.pathExtension isEqualToString:@"xpc"]) {
|
||||
// Paranoid check to get full bundle URL
|
||||
NSURL *fullURL = bundle.bundleURL.URLByResolvingSymlinksInPath;
|
||||
|
||||
auxiliaryToolURL = [fullURL.URLByDeletingLastPathComponent.URLByDeletingLastPathComponent URLByAppendingPathComponent:nameWithExtension];
|
||||
} else {
|
||||
auxiliaryToolURL = [bundle URLForAuxiliaryExecutable:nameWithExtension];
|
||||
}
|
||||
assert(auxiliaryToolURL != nil);
|
||||
|
||||
NSURL *resolvedAuxiliaryToolURL = [auxiliaryToolURL URLByResolvingSymlinksInPath];
|
||||
@@ -396,7 +404,7 @@ static BOOL SPUSystemNeedsAuthorizationAccess(NSString *path, NSString *installa
|
||||
|
||||
// Note we do not have to copy this tool out of the bundle it's in because it's a utility with no dependencies.
|
||||
// Furthermore, we can keep the tool at a place that may not necessarily be writable.
|
||||
NSString *installerPath = [self pathForBundledTool:@""SPARKLE_RELAUNCH_TOOL_NAME extension:@"" inBundle:ourBundle];
|
||||
NSString *installerPath = [self pathForBundledTool:@""SPARKLE_RELAUNCH_TOOL_NAME extension:@"" fromBundle:ourBundle];
|
||||
if (installerPath == nil) {
|
||||
SULog(SULogLevelError, @"Error: Cannot submit installer because the installer could not be located");
|
||||
completionHandler(SUInstallerLauncherFailure, needsSystemAuthorization);
|
||||
@@ -404,7 +412,7 @@ static BOOL SPUSystemNeedsAuthorizationAccess(NSString *path, NSString *installa
|
||||
}
|
||||
|
||||
// We do however have to copy the progress tool app somewhere safe due to its external depedencies
|
||||
NSString *progressToolResourcePath = [self pathForBundledTool:@""SPARKLE_INSTALLER_PROGRESS_TOOL_NAME extension:@"app" inBundle:ourBundle];
|
||||
NSString *progressToolResourcePath = [self pathForBundledTool:@""SPARKLE_INSTALLER_PROGRESS_TOOL_NAME extension:@"app" fromBundle:ourBundle];
|
||||
|
||||
if (progressToolResourcePath == nil) {
|
||||
SULog(SULogLevelError, @"Error: Cannot submit progress tool because the progress tool could not be located");
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
import PackageDescription
|
||||
|
||||
// Version is technically not required here, SPM doesn't check
|
||||
let version = "2.0.0-beta.3"
|
||||
let version = "2.0.0-beta.4"
|
||||
// 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 = "2.0.0-beta.3"
|
||||
let checksum = "a8145d156be49bfd48b166bf3baf9d3368997217c933ad9900ddd1446c07ef15"
|
||||
let tag = "2.0.0-beta.4"
|
||||
let checksum = "4f863dc048e8c4170e0c3fdbdb9a9b03af605adbd778aa11799db3f34068202d"
|
||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
|
||||
|
||||
let package = Package(
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Sparkle"
|
||||
s.version = "2.0.0-beta.3"
|
||||
s.version = "2.0.0-beta.4"
|
||||
s.summary = "A software update framework for macOS"
|
||||
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
|
||||
s.homepage = "https://sparkle-project.org"
|
||||
@@ -20,10 +20,10 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.platform = :osx, '10.11'
|
||||
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.xz" }
|
||||
s.source_files = 'Sparkle.framework/Versions/A/Headers/*.h'
|
||||
s.source_files = 'Sparkle.framework/Versions/B/Headers/*.h'
|
||||
|
||||
s.preserve_paths = ['bin/*', 'XPCServices/*']
|
||||
s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h'
|
||||
s.preserve_paths = ['bin/*', 'Symbols']
|
||||
s.public_header_files = 'Sparkle.framework/Versions/B/Headers/*.h'
|
||||
s.vendored_frameworks = 'Sparkle.framework'
|
||||
s.xcconfig = {
|
||||
'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/Sparkle"',
|
||||
|
||||
@@ -107,6 +107,10 @@
|
||||
61EF67560E25B58D00F754E0 /* SUHost.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EF67550E25B58D00F754E0 /* SUHost.m */; };
|
||||
61EF67590E25C5B400F754E0 /* SUHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 61EF67580E25C5B400F754E0 /* SUHost.h */; };
|
||||
7202DC9A269ABD3500737EC4 /* testappcast_phasedRollout.xml in Resources */ = {isa = PBXBuildFile; fileRef = 7202DC99269ABD3500737EC4 /* testappcast_phasedRollout.xml */; };
|
||||
72045CE026FEE535004F96E5 /* org.sparkle-project.Downloader.xpc in Copy XPC Services */ = {isa = PBXBuildFile; fileRef = 726E07EF1CAF37BD001A286B /* org.sparkle-project.Downloader.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
72045CE126FEE535004F96E5 /* org.sparkle-project.InstallerConnection.xpc in Copy XPC Services */ = {isa = PBXBuildFile; fileRef = 724BB36C1D31D0B7005D534A /* org.sparkle-project.InstallerConnection.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
72045CE226FEE535004F96E5 /* org.sparkle-project.InstallerLauncher.xpc in Copy XPC Services */ = {isa = PBXBuildFile; fileRef = 726E07AD1CAF08D6001A286B /* org.sparkle-project.InstallerLauncher.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
72045CE326FEE535004F96E5 /* org.sparkle-project.InstallerStatus.xpc in Copy XPC Services */ = {isa = PBXBuildFile; fileRef = 724BB3931D333832005D534A /* org.sparkle-project.InstallerStatus.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
720595EF1D700568000572E8 /* SUApplicationInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 725602D41C83551C00DAA70E /* SUApplicationInfo.m */; };
|
||||
7205C4411E13049400E370AE /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7205C4401E13049400E370AE /* main.swift */; };
|
||||
7205C44C1E1304CE00E370AE /* Appcast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7205C4471E1304CE00E370AE /* Appcast.swift */; };
|
||||
@@ -157,9 +161,7 @@
|
||||
721D5ABC25C680A300D23BEA /* SUFlatPackageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 721D5A8425C65D3F00D23BEA /* SUFlatPackageUnarchiver.m */; };
|
||||
721D5B1B25C692BB00D23BEA /* SUFlatPackageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 721D5A8425C65D3F00D23BEA /* SUFlatPackageUnarchiver.m */; };
|
||||
721D8A611D48413B0032E472 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
||||
721D8A721D4950B80032E472 /* Autoupdate in Copy Tools */ = {isa = PBXBuildFile; fileRef = 72B398D21D3D879300EE297F /* Autoupdate */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
721D8A7B1D4963190032E472 /* SPULocalCacheDirectory.m in Sources */ = {isa = PBXBuildFile; fileRef = 721BC20D1D1CDE55002BC71E /* SPULocalCacheDirectory.m */; };
|
||||
721D8A811D498B9B0032E472 /* Updater.app in Copy Tools */ = {isa = PBXBuildFile; fileRef = 721C24451CB753E6005440CB /* Updater.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
721D8A861D4ADFEB0032E472 /* SPULocalCacheDirectory.m in Sources */ = {isa = PBXBuildFile; fileRef = 721BC20D1D1CDE55002BC71E /* SPULocalCacheDirectory.m */; };
|
||||
721D8A871D4C5BF10032E472 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
|
||||
722545B626805FF80036465C /* testappcast_info_updates.xml in Resources */ = {isa = PBXBuildFile; fileRef = 722545B526805FF80036465C /* testappcast_info_updates.xml */; };
|
||||
@@ -385,7 +387,6 @@
|
||||
72F94F581CC44DE1002DEE68 /* SPUXPCServiceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 72F94F561CC44DE1002DEE68 /* SPUXPCServiceInfo.h */; };
|
||||
72F94F591CC44DE1002DEE68 /* SPUXPCServiceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F94F571CC44DE1002DEE68 /* SPUXPCServiceInfo.m */; };
|
||||
72F94F5A1CC450DE002DEE68 /* SUInstallerLauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = 726E07B11CAF08D6001A286B /* SUInstallerLauncher.m */; };
|
||||
72F94F5D1CC455B4002DEE68 /* org.sparkle-project.InstallerLauncher.xpc in Embed XPC Services */ = {isa = PBXBuildFile; fileRef = 726E07AD1CAF08D6001A286B /* org.sparkle-project.InstallerLauncher.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
72F9EBE21D517E2F004AC8B6 /* SUUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 72F9EBE01D517E2F004AC8B6 /* SUUpdater.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
72F9EBE31D517E2F004AC8B6 /* SUUpdater.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9EBE11D517E2F004AC8B6 /* SUUpdater.m */; };
|
||||
72F9EC341D5BF542004AC8B6 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5E41D3D90AA00D1BF90 /* SUFileManager.m */; };
|
||||
@@ -529,6 +530,34 @@
|
||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||
remoteInfo = Sparkle;
|
||||
};
|
||||
72045CD726FEE471004F96E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 726E07EE1CAF37BD001A286B;
|
||||
remoteInfo = SparkleDownloader;
|
||||
};
|
||||
72045CD926FEE471004F96E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 724BB36B1D31D0B7005D534A;
|
||||
remoteInfo = SparkleInstallerConnection;
|
||||
};
|
||||
72045CDB26FEE471004F96E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 726E07AC1CAF08D6001A286B;
|
||||
remoteInfo = SparkleInstallerLauncher;
|
||||
};
|
||||
72045CDD26FEE471004F96E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 724BB3921D333832005D534A;
|
||||
remoteInfo = SparkleInstallerStatus;
|
||||
};
|
||||
7205C4681E1306FB00E370AE /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
@@ -557,20 +586,6 @@
|
||||
remoteGlobalIDString = 724BB3921D333832005D534A;
|
||||
remoteInfo = SparkleInstallerStatus;
|
||||
};
|
||||
721D8A771D4952B60032E472 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 72B398D11D3D879300EE297F;
|
||||
remoteInfo = Autoupdate;
|
||||
};
|
||||
721D8A791D4952B60032E472 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 721C24441CB753E6005440CB;
|
||||
remoteInfo = "Installer Progress";
|
||||
};
|
||||
725148E8266D918900247C9C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
@@ -627,13 +642,6 @@
|
||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||
remoteInfo = Sparkle;
|
||||
};
|
||||
72F94F611CC48669002DEE68 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 726E07AC1CAF08D6001A286B;
|
||||
remoteInfo = SparkleInstallerLauncher;
|
||||
};
|
||||
72F94F6A1CC4A0C8002DEE68 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
@@ -699,6 +707,20 @@
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
72045CDF26FEE51D004F96E5 /* Copy XPC Services */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "$(CONTENTS_FOLDER_PATH)/XPCServices";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
72045CE026FEE535004F96E5 /* org.sparkle-project.Downloader.xpc in Copy XPC Services */,
|
||||
72045CE126FEE535004F96E5 /* org.sparkle-project.InstallerConnection.xpc in Copy XPC Services */,
|
||||
72045CE226FEE535004F96E5 /* org.sparkle-project.InstallerLauncher.xpc in Copy XPC Services */,
|
||||
72045CE326FEE535004F96E5 /* org.sparkle-project.InstallerStatus.xpc in Copy XPC Services */,
|
||||
);
|
||||
name = "Copy XPC Services";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7205C43C1E13049400E370AE /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -708,25 +730,12 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
721D8A711D4950910032E472 /* Copy Tools */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 6;
|
||||
files = (
|
||||
721D8A721D4950B80032E472 /* Autoupdate in Copy Tools */,
|
||||
721D8A811D498B9B0032E472 /* Updater.app in Copy Tools */,
|
||||
);
|
||||
name = "Copy Tools";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
726E4A261C86C88F00C57C6A /* Embed XPC Services */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "$(CONTENTS_FOLDER_PATH)/XPCServices";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
72F94F5D1CC455B4002DEE68 /* org.sparkle-project.InstallerLauncher.xpc in Embed XPC Services */,
|
||||
726E4A211C86C88F00C57C6A /* TestAppHelper.xpc in Embed XPC Services */,
|
||||
);
|
||||
name = "Embed XPC Services";
|
||||
@@ -911,6 +920,7 @@
|
||||
61F3AC1215C22D4A00260CA2 /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||
61F614540E24A12D009F47E7 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||
7202DC99269ABD3500737EC4 /* testappcast_phasedRollout.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testappcast_phasedRollout.xml; sourceTree = "<group>"; };
|
||||
72045CE426FEE708004F96E5 /* strip-xpc-services.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "strip-xpc-services.sh"; sourceTree = "<group>"; };
|
||||
7205C43E1E13049400E370AE /* generate_appcast */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = generate_appcast; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7205C4401E13049400E370AE /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
7205C4461E1304C300E370AE /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
@@ -930,6 +940,7 @@
|
||||
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; };
|
||||
720B4C2325EBFAFD005A0592 /* link-tools.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "link-tools.sh"; sourceTree = "<group>"; };
|
||||
720C192827127A3800740C8E /* release-move-tag.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "release-move-tag.sh"; sourceTree = "<group>"; };
|
||||
720E21791D0D00BF003A311C /* SPUUpdaterCycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPUUpdaterCycle.h; sourceTree = "<group>"; };
|
||||
720E217A1D0D00BF003A311C /* SPUUpdaterCycle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUUpdaterCycle.m; sourceTree = "<group>"; };
|
||||
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUUnarchiverTest.swift; sourceTree = "<group>"; };
|
||||
@@ -940,7 +951,6 @@
|
||||
721652671D3C8FED00FD13D8 /* SUInstallerLauncherStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SUInstallerLauncherStatus.h; path = InstallerLauncher/SUInstallerLauncherStatus.h; sourceTree = SOURCE_ROOT; };
|
||||
7218EC362623F31C008FECF3 /* org.sparkle-project.InstallerConnection.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "org.sparkle-project.InstallerConnection.entitlements"; sourceTree = "<group>"; };
|
||||
7218EC372623F32E008FECF3 /* org.sparkle-project.InstallerStatus.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "org.sparkle-project.InstallerStatus.entitlements"; sourceTree = "<group>"; };
|
||||
7218EC4B2623F51C008FECF3 /* codesign_xpc_service.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = codesign_xpc_service.py; sourceTree = "<group>"; };
|
||||
721AB11626C777D900D34A86 /* SPUDownloadDataPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPUDownloadDataPrivate.h; sourceTree = "<group>"; };
|
||||
721BC2061D17A532002BC71E /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
|
||||
721BC2081D17A553002BC71E /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
|
||||
@@ -2308,8 +2318,9 @@
|
||||
EA1E285722B6622E004AA304 /* ed25519-Release.xcconfig */,
|
||||
EA1E285922B6622E004AA304 /* ed25519-Shared.xcconfig */,
|
||||
14732BC91960F70A00593899 /* make-release-package.sh */,
|
||||
7218EC4B2623F51C008FECF3 /* codesign_xpc_service.py */,
|
||||
14652F7919A93E5F00959E44 /* set-git-version-info.sh */,
|
||||
72045CE426FEE708004F96E5 /* strip-xpc-services.sh */,
|
||||
720C192827127A3800740C8E /* release-move-tag.sh */,
|
||||
720B4C2325EBFAFD005A0592 /* link-tools.sh */,
|
||||
146EC84E19A68CF8004A50C5 /* Sparkle.podspec */,
|
||||
);
|
||||
@@ -2482,7 +2493,6 @@
|
||||
);
|
||||
dependencies = (
|
||||
61B5F91C09C4CF7200B25A18 /* PBXTargetDependency */,
|
||||
72F94F621CC48669002DEE68 /* PBXTargetDependency */,
|
||||
726E4A201C86C88F00C57C6A /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Sparkle Test App";
|
||||
@@ -2534,7 +2544,6 @@
|
||||
724BB3681D31D0B7005D534A /* Sources */,
|
||||
724BB3691D31D0B7005D534A /* Frameworks */,
|
||||
724BB36A1D31D0B7005D534A /* Resources */,
|
||||
7269E49E264919CD0088C213 /* Run Script: Set Git Version Info */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2552,7 +2561,6 @@
|
||||
724BB38F1D333832005D534A /* Sources */,
|
||||
724BB3901D333832005D534A /* Frameworks */,
|
||||
724BB3911D333832005D534A /* Resources */,
|
||||
7269E49F264919D40088C213 /* Run Script: Set Git Version Info */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2587,14 +2595,10 @@
|
||||
buildPhases = (
|
||||
726E07A91CAF08D6001A286B /* Sources */,
|
||||
726E07AA1CAF08D6001A286B /* Frameworks */,
|
||||
721D8A711D4950910032E472 /* Copy Tools */,
|
||||
7269E49D264919C20088C213 /* Run Script: Set Git Version Info */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
721D8A781D4952B60032E472 /* PBXTargetDependency */,
|
||||
721D8A7A1D4952B60032E472 /* PBXTargetDependency */,
|
||||
);
|
||||
name = SparkleInstallerLauncher;
|
||||
productName = InstallerLauncher;
|
||||
@@ -2608,7 +2612,6 @@
|
||||
726E07EB1CAF37BD001A286B /* Sources */,
|
||||
726E07EC1CAF37BD001A286B /* Frameworks */,
|
||||
726E07ED1CAF37BD001A286B /* Resources */,
|
||||
7269E4A0264919D90088C213 /* Run Script: Set Git Version Info */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2681,6 +2684,8 @@
|
||||
8DC2EF500486A6940098B216 /* Headers */,
|
||||
8DC2EF520486A6940098B216 /* Resources */,
|
||||
142E0E0319A6A24100E4312B /* Copy Tools */,
|
||||
72045CDF26FEE51D004F96E5 /* Copy XPC Services */,
|
||||
72045CE626FEE8CC004F96E5 /* Strip XPC Services */,
|
||||
8DC2EF540486A6940098B216 /* Sources */,
|
||||
8DC2EF560486A6940098B216 /* Frameworks */,
|
||||
6131B1910DDCDE32005215F0 /* Run Script: Set Git Version Info */,
|
||||
@@ -2689,6 +2694,10 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
72045CD826FEE471004F96E5 /* PBXTargetDependency */,
|
||||
72045CDA26FEE471004F96E5 /* PBXTargetDependency */,
|
||||
72045CDC26FEE471004F96E5 /* PBXTargetDependency */,
|
||||
72045CDE26FEE471004F96E5 /* PBXTargetDependency */,
|
||||
72A5D5AC1D6929260009E5AC /* PBXTargetDependency */,
|
||||
72D954BA1CBB6E27006F28BD /* PBXTargetDependency */,
|
||||
);
|
||||
@@ -3060,6 +3069,24 @@
|
||||
shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
72045CE626FEE8CC004F96E5 /* Strip XPC Services */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Strip XPC Services";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/strip-xpc-services.sh\"\n";
|
||||
};
|
||||
720B4C2125EBFAA5005A0592 /* Run Script: Link Tools */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -3078,78 +3105,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/link-tools.sh\"\n";
|
||||
};
|
||||
7269E49D264919C20088C213 /* Run Script: Set Git Version Info */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script: Set Git Version Info";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\"\n";
|
||||
};
|
||||
7269E49E264919CD0088C213 /* Run Script: Set Git Version Info */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script: Set Git Version Info";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\"\n";
|
||||
};
|
||||
7269E49F264919D40088C213 /* Run Script: Set Git Version Info */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script: Set Git Version Info";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\"\n";
|
||||
};
|
||||
7269E4A0264919D90088C213 /* Run Script: Set Git Version Info */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script: Set Git Version Info";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\"\n";
|
||||
};
|
||||
895C5DC524D78E460058A82D /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -3597,6 +3552,26 @@
|
||||
target = 8DC2EF4F0486A6940098B216 /* Sparkle */;
|
||||
targetProxy = 61FA528C0E2D9EB200EF58AD /* PBXContainerItemProxy */;
|
||||
};
|
||||
72045CD826FEE471004F96E5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 726E07EE1CAF37BD001A286B /* SparkleDownloader */;
|
||||
targetProxy = 72045CD726FEE471004F96E5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
72045CDA26FEE471004F96E5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 724BB36B1D31D0B7005D534A /* SparkleInstallerConnection */;
|
||||
targetProxy = 72045CD926FEE471004F96E5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
72045CDC26FEE471004F96E5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 726E07AC1CAF08D6001A286B /* SparkleInstallerLauncher */;
|
||||
targetProxy = 72045CDB26FEE471004F96E5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
72045CDE26FEE471004F96E5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 724BB3921D333832005D534A /* SparkleInstallerStatus */;
|
||||
targetProxy = 72045CDD26FEE471004F96E5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
7205C4691E1306FB00E370AE /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 7205C43D1E13049400E370AE /* generate_appcast */;
|
||||
@@ -3617,16 +3592,6 @@
|
||||
target = 724BB3921D333832005D534A /* SparkleInstallerStatus */;
|
||||
targetProxy = 7218EC342623ED97008FECF3 /* PBXContainerItemProxy */;
|
||||
};
|
||||
721D8A781D4952B60032E472 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 72B398D11D3D879300EE297F /* Autoupdate */;
|
||||
targetProxy = 721D8A771D4952B60032E472 /* PBXContainerItemProxy */;
|
||||
};
|
||||
721D8A7A1D4952B60032E472 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 721C24441CB753E6005440CB /* Installer Progress */;
|
||||
targetProxy = 721D8A791D4952B60032E472 /* PBXContainerItemProxy */;
|
||||
};
|
||||
725148E9266D918900247C9C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 726E07EE1CAF37BD001A286B /* SparkleDownloader */;
|
||||
@@ -3667,11 +3632,6 @@
|
||||
target = 8DC2EF4F0486A6940098B216 /* Sparkle */;
|
||||
targetProxy = 72EF30B826747E39008CE987 /* PBXContainerItemProxy */;
|
||||
};
|
||||
72F94F621CC48669002DEE68 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 726E07AC1CAF08D6001A286B /* SparkleInstallerLauncher */;
|
||||
targetProxy = 72F94F611CC48669002DEE68 /* PBXContainerItemProxy */;
|
||||
};
|
||||
72F94F6B1CC4A0C8002DEE68 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 726E07AC1CAF08D6001A286B /* SparkleInstallerLauncher */;
|
||||
@@ -4112,7 +4072,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 72F94ED51CC3441A002DEE68 /* ConfigInstallerLauncherDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
INFOPLIST_FILE = InstallerLauncher/Info.plist;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -4120,7 +4079,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 72F94ED51CC3441A002DEE68 /* ConfigInstallerLauncherDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
INFOPLIST_FILE = InstallerLauncher/Info.plist;
|
||||
};
|
||||
name = Coverage;
|
||||
};
|
||||
@@ -4128,7 +4086,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 726E07C11CAF1E79001A286B /* ConfigInstallerLauncher.xcconfig */;
|
||||
buildSettings = {
|
||||
INFOPLIST_FILE = InstallerLauncher/Info.plist;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
Vendored
+5
-5
@@ -12,7 +12,7 @@
|
||||
|
||||
"%@ %@ is currently the newest version available." = "%1$@ %2$@ is currently the newest version available.";
|
||||
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ is currently the newest version available.\n(You are currently running version %3$@.)";
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ is currently the newest version available.\n(You are currently running version %3$@.)";
|
||||
|
||||
"An error occurred while running the updater. Please try again later." = "An error occurred while running the updater. Please try again later.";
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
"Update Installed" = "Update Installed";
|
||||
|
||||
"%@ is now updated to version %@!" = "%@ is now updated to version %@!";
|
||||
"%@ is now updated to version %@!" = "%@ is now updated to version %@!";
|
||||
|
||||
"%@ is now updated!" = "%@ is now updated!";
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available—you have %3$@. Would you like to learn more about this update on the web?";
|
||||
|
||||
/* Critical downloadable update */
|
||||
"%@ %@ is now available--you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@ is now available--you have %3$@. This is an important update; would you like to download it now?";
|
||||
"%@ %@ is now available--you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@ is now available—you have %3$@. This is an important update; would you like to download it now?";
|
||||
|
||||
"%@ downloaded" = "%@ downloaded";
|
||||
|
||||
@@ -137,11 +137,11 @@
|
||||
|
||||
"Your macOS version is too old" = "Your macOS version is too old";
|
||||
|
||||
"%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required." = "%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required.";
|
||||
"%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required." = "%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required.";
|
||||
|
||||
"Your macOS version is too new" = "Your macOS version is too new";
|
||||
|
||||
"%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@." = "%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@.";
|
||||
"%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@." = "%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@.";
|
||||
|
||||
/* Used when a new update is not found */
|
||||
"Version History" = "Version History";
|
||||
|
||||
Vendored
+4
@@ -57,6 +57,10 @@
|
||||
[self.coreDriver setCompletionHandler:completionBlock];
|
||||
}
|
||||
|
||||
- (void)setUpdateShownHandler:(void (^)(void))updateShownHandler
|
||||
{
|
||||
}
|
||||
|
||||
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders
|
||||
{
|
||||
[self.coreDriver checkForUpdatesAtAppcastURL:appcastURL withUserAgent:userAgent httpHeaders:httpHeaders inBackground:YES requiresSilentInstall:YES];
|
||||
|
||||
Vendored
+1
-1
@@ -61,7 +61,7 @@
|
||||
if (self != nil) {
|
||||
_host = host;
|
||||
|
||||
if (!SPUXPCServiceExists(@DOWNLOADER_BUNDLE_ID)) {
|
||||
if (!SPUXPCServiceIsEnabled(SUEnableDownloaderServiceKey)) {
|
||||
_downloader = [[SPUDownloader alloc] initWithDelegate:self];
|
||||
} else {
|
||||
_connection = [[NSXPCConnection alloc] initWithServiceName:@DOWNLOADER_BUNDLE_ID];
|
||||
|
||||
Vendored
+2
-2
@@ -106,7 +106,7 @@
|
||||
NSString *hostBundleIdentifier = self.host.bundle.bundleIdentifier;
|
||||
assert(hostBundleIdentifier != nil);
|
||||
|
||||
if (!SPUXPCServiceExists(@INSTALLER_CONNECTION_BUNDLE_ID)) {
|
||||
if (!SPUXPCServiceIsEnabled(SUEnableInstallerConnectionServiceKey)) {
|
||||
self.installerConnection = [[SUInstallerConnection alloc] initWithDelegate:self];
|
||||
} else {
|
||||
self.installerConnection = [[SUXPCInstallerConnection alloc] initWithDelegate:self];
|
||||
@@ -323,7 +323,7 @@
|
||||
__block BOOL retrievedLaunchStatus = NO;
|
||||
NSXPCConnection *launcherConnection = nil;
|
||||
|
||||
if (!SPUXPCServiceExists(@INSTALLER_LAUNCHER_BUNDLE_ID)) {
|
||||
if (!SPUXPCServiceIsEnabled(SUEnableInstallerLauncherServiceKey)) {
|
||||
installerLauncher = [[SUInstallerLauncher alloc] init];
|
||||
} else {
|
||||
launcherConnection = [[NSXPCConnection alloc] initWithServiceName:@INSTALLER_LAUNCHER_BUNDLE_ID];
|
||||
|
||||
Vendored
+3
-2
@@ -13,6 +13,7 @@
|
||||
#import "SPUSecureCoding.h"
|
||||
#import "SUInstallerStatus.h"
|
||||
#import "SUXPCInstallerStatus.h"
|
||||
#import "SUConstants.h"
|
||||
#import "SULog.h"
|
||||
|
||||
|
||||
@@ -27,7 +28,7 @@
|
||||
+ (void)probeInstallerInProgressForHostBundleIdentifier:(NSString *)hostBundleIdentifier completion:(void (^)(BOOL))completionHandler
|
||||
{
|
||||
id<SUInstallerStatusProtocol> installerStatus = nil;
|
||||
BOOL usesXPC = SPUXPCServiceExists(@INSTALLER_STATUS_BUNDLE_ID);
|
||||
BOOL usesXPC = SPUXPCServiceIsEnabled(SUEnableInstallerStatusServiceKey);
|
||||
if (!usesXPC) {
|
||||
installerStatus = [[SUInstallerStatus alloc] init];
|
||||
} else {
|
||||
@@ -90,7 +91,7 @@
|
||||
+ (void)probeInstallerUpdateItemForHostBundleIdentifier:(NSString *)hostBundleIdentifier completion:(void (^)(SPUInstallationInfo * _Nullable))completionHandler
|
||||
{
|
||||
id<SUInstallerStatusProtocol> installerStatus = nil;
|
||||
BOOL usesXPC = SPUXPCServiceExists(@INSTALLER_STATUS_BUNDLE_ID);
|
||||
BOOL usesXPC = SPUXPCServiceIsEnabled(SUEnableInstallerStatusServiceKey);
|
||||
if (!usesXPC) {
|
||||
installerStatus = [[SUInstallerStatus alloc] init];
|
||||
} else {
|
||||
|
||||
Vendored
+4
@@ -38,6 +38,10 @@
|
||||
[self.basicDriver setCompletionHandler:completionBlock];
|
||||
}
|
||||
|
||||
- (void)setUpdateShownHandler:(void (^)(void))updateShownHandler
|
||||
{
|
||||
}
|
||||
|
||||
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders
|
||||
{
|
||||
[self.basicDriver checkForUpdatesAtAppcastURL:appcastURL withUserAgent:userAgent httpHeaders:httpHeaders inBackground:YES];
|
||||
|
||||
Vendored
+11
@@ -19,6 +19,7 @@
|
||||
|
||||
@property (nonatomic, readonly) SPUUIBasedUpdateDriver *uiDriver;
|
||||
@property (nonatomic) BOOL showedUpdate;
|
||||
@property (nonatomic) void (^updateDidShowHandler)(void);
|
||||
|
||||
@end
|
||||
|
||||
@@ -26,6 +27,7 @@
|
||||
|
||||
@synthesize uiDriver = _uiDriver;
|
||||
@synthesize showedUpdate = _showedUpdate;
|
||||
@synthesize updateDidShowHandler = _updateDidShowHandler;
|
||||
|
||||
- (instancetype)initWithHost:(SUHost *)host applicationBundle:(NSBundle *)applicationBundle updater:(id)updater userDriver:(id <SPUUserDriver>)userDriver updaterDelegate:(nullable id <SPUUpdaterDelegate>)updaterDelegate
|
||||
{
|
||||
@@ -41,6 +43,11 @@
|
||||
[self.uiDriver setCompletionHandler:completionBlock];
|
||||
}
|
||||
|
||||
- (void)setUpdateShownHandler:(void (^)(void))handler
|
||||
{
|
||||
self.updateDidShowHandler = handler;
|
||||
}
|
||||
|
||||
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders
|
||||
{
|
||||
[self.uiDriver checkForUpdatesAtAppcastURL:appcastURL withUserAgent:userAgent httpHeaders:httpHeaders inBackground:YES];
|
||||
@@ -59,6 +66,10 @@
|
||||
- (void)uiDriverDidShowUpdate
|
||||
{
|
||||
self.showedUpdate = YES;
|
||||
|
||||
if (self.updateDidShowHandler != nil) {
|
||||
self.updateDidShowHandler();
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)showingUpdate
|
||||
|
||||
Vendored
+2
@@ -21,6 +21,8 @@ typedef void (^SPUUpdateDriverCompletion)(BOOL shouldShowUpdateImmediately, id<S
|
||||
|
||||
- (void)setCompletionHandler:(SPUUpdateDriverCompletion)completionBlock;
|
||||
|
||||
- (void)setUpdateShownHandler:(void (^)(void))updateShownHandler;
|
||||
|
||||
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders;
|
||||
|
||||
- (void)resumeInstallingUpdate;
|
||||
|
||||
Vendored
+2
@@ -144,6 +144,8 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
|
||||
This property is suitable to use for menu item validation for seeing if `-checkForUpdates` can be invoked.
|
||||
|
||||
This property is also KVO-compliant.
|
||||
|
||||
Note this property does not reflect whether or not an update session is in progress. Please see `sessionInProgress` property instead.
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL canCheckForUpdates;
|
||||
|
||||
Vendored
+109
-62
@@ -58,6 +58,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
@property (nonatomic) BOOL startedUpdater;
|
||||
@property (nonatomic, nullable) id<SPUResumableUpdate> resumableUpdate;
|
||||
@property (nonatomic) BOOL sessionInProgress;
|
||||
@property (nonatomic) BOOL canCheckForUpdates;
|
||||
@property (nonatomic) BOOL showingPermissionRequest;
|
||||
|
||||
@property (nonatomic, copy) NSDate *updateLastCheckedDate;
|
||||
@@ -83,6 +84,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
@synthesize startedUpdater = _startedUpdater;
|
||||
@synthesize resumableUpdate = _resumableUpdate;
|
||||
@synthesize sessionInProgress = _sessionInProgress;
|
||||
@synthesize canCheckForUpdates = _canCheckForUpdates;
|
||||
@synthesize showingPermissionRequest = _showingPermissionRequest;
|
||||
@synthesize updateLastCheckedDate = _updateLastCheckedDate;
|
||||
@synthesize loggedATSWarning = _loggedATSWarning;
|
||||
@@ -150,11 +152,12 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
return YES;
|
||||
}
|
||||
|
||||
if (![self checkIfConfiguredProperlyAndRequireFeedURL:NO error:error]) {
|
||||
if (![self checkIfConfiguredProperlyAndRequireFeedURL:NO validateXPCServices:YES error:error]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
self.startedUpdater = YES;
|
||||
self.canCheckForUpdates = YES;
|
||||
|
||||
// Start updater on next update cycle so we make sure the application invoking the updater is ready
|
||||
// This also gives the developer a cycle to check for updates before Sparkle's update cycle scheduler kicks in
|
||||
@@ -180,7 +183,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
return ([bundle objectForInfoDictionaryKey:@"NSAppTransportSecurity"] == nil);
|
||||
}
|
||||
|
||||
- (BOOL)checkIfConfiguredProperlyAndRequireFeedURL:(BOOL)requireFeedURL error:(NSError * __autoreleasing *)error
|
||||
- (BOOL)checkIfConfiguredProperlyAndRequireFeedURL:(BOOL)requireFeedURL validateXPCServices:(BOOL)validateXPCServices error:(NSError * __autoreleasing *)error
|
||||
{
|
||||
NSString *hostName = self.host.name;
|
||||
|
||||
@@ -205,6 +208,40 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||
if (validateXPCServices) {
|
||||
// Check that all enabled XPC Services are embedded
|
||||
SUHost *mainBundleHost = [[SUHost alloc] initWithBundle:mainBundle];
|
||||
|
||||
NSArray<NSString *> *xpcServiceIDs = @[@INSTALLER_LAUNCHER_BUNDLE_ID, @DOWNLOADER_BUNDLE_ID, @INSTALLER_CONNECTION_BUNDLE_ID, @INSTALLER_STATUS_BUNDLE_ID];
|
||||
NSArray<NSString *> *xpcServiceEnabledKeys = @[SUEnableInstallerLauncherServiceKey, SUEnableDownloaderServiceKey, SUEnableInstallerConnectionServiceKey, SUEnableInstallerStatusServiceKey];
|
||||
NSUInteger xpcServiceCount = xpcServiceIDs.count;
|
||||
|
||||
for (NSUInteger xpcServiceIndex = 0; xpcServiceIndex < xpcServiceCount; xpcServiceIndex++) {
|
||||
NSString *xpcServiceEnabledKey = xpcServiceEnabledKeys[xpcServiceIndex];
|
||||
NSString *xpcServiceBundleName = [xpcServiceIDs[xpcServiceIndex] stringByAppendingPathExtension:@"xpc"];
|
||||
|
||||
if ([mainBundleHost boolForInfoDictionaryKey:xpcServiceEnabledKey]) {
|
||||
NSURL *xpcServiceBundleURL = [[self.sparkleBundle.bundleURL URLByAppendingPathComponent:@"XPCServices"] URLByAppendingPathComponent:xpcServiceBundleName];
|
||||
|
||||
if (![xpcServiceBundleURL checkResourceIsReachableAndReturnError:NULL]) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInvalidUpdaterError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"XPC Service is enabled (%@) but does not exist: %@", xpcServiceEnabledKey, xpcServiceBundleURL.path] }];
|
||||
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the app isn't bundling XPC Services directly
|
||||
NSURL *mainBundleXPCServiceURL = [[[mainBundle.bundleURL URLByAppendingPathComponent:@"Contents"] URLByAppendingPathComponent:@"XPCServices"] URLByAppendingPathComponent:xpcServiceBundleName];
|
||||
|
||||
if ([mainBundleXPCServiceURL checkResourceIsReachableAndReturnError:NULL]) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInvalidUpdaterError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"XPC Service (%@) must be in the Sparkle framework, not in the application bundle (%@). Please visit https://sparkle-project.org/documentation/sandboxing/ for up to date Sandboxing instructions.", xpcServiceBundleName, mainBundleXPCServiceURL.path] }];
|
||||
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL servingOverHttps = NO;
|
||||
NSError *feedError = nil;
|
||||
NSURL *feedURL = [self retrieveFeedURL:&feedError];
|
||||
@@ -217,17 +254,26 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
}
|
||||
|
||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||
BOOL updatingMainBundle = [self.host.bundle isEqualTo:mainBundle];
|
||||
|
||||
if (feedURL != nil) {
|
||||
servingOverHttps = [[[feedURL scheme] lowercaseString] isEqualToString:@"https"];
|
||||
if (!servingOverHttps) {
|
||||
BOOL foundXPCPersistentDownloaderService = NO;
|
||||
BOOL foundATSPersistentIssue = [self checkATSIssueForBundle:SPUXPCServiceBundle(@DOWNLOADER_BUNDLE_ID) getBundleExists:&foundXPCPersistentDownloaderService];
|
||||
if (!servingOverHttps && !self.loggedATSWarning) {
|
||||
BOOL foundXPCDownloaderService = NO;
|
||||
|
||||
SUHost *mainBundleHost = [[SUHost alloc] initWithBundle:mainBundle];
|
||||
NSBundle *downloaderBundle;
|
||||
if ([mainBundleHost boolForInfoDictionaryKey:SUEnableDownloaderServiceKey]) {
|
||||
NSURL *downloaderServiceBundleURL = [[[self.sparkleBundle.bundleURL URLByAppendingPathComponent:@"XPCServices"] URLByAppendingPathComponent:@DOWNLOADER_BUNDLE_ID] URLByAppendingPathExtension:@"xpc"];
|
||||
downloaderBundle = [NSBundle bundleWithURL:downloaderServiceBundleURL];
|
||||
} else {
|
||||
downloaderBundle = nil;
|
||||
}
|
||||
|
||||
BOOL foundATSPersistentIssue = [self checkATSIssueForBundle:downloaderBundle getBundleExists:&foundXPCDownloaderService];
|
||||
|
||||
BOOL foundATSMainBundleIssue = NO;
|
||||
if (!foundATSPersistentIssue && !foundXPCPersistentDownloaderService) {
|
||||
if (!foundATSPersistentIssue && !foundXPCDownloaderService) {
|
||||
BOOL foundATSIssue = ([mainBundle objectForInfoDictionaryKey:@"NSAppTransportSecurity"] == nil);
|
||||
|
||||
if (updatingMainBundle) {
|
||||
@@ -238,12 +284,10 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
|
||||
if (foundATSPersistentIssue || foundATSMainBundleIssue) {
|
||||
if (!self.loggedATSWarning) {
|
||||
// Just log a warning. Don't outright fail in case we are wrong (eg: app is linked on an old SDK where ATS doesn't take effect)
|
||||
SULog(SULogLevelDefault, @"The feed URL (%@) may need to change to use HTTPS.\nFor more information: https://sparkle-project.org/documentation/app-transport-security", [feedURL absoluteString]);
|
||||
|
||||
self.loggedATSWarning = YES;
|
||||
}
|
||||
// Just log a warning. Don't outright fail in case we are wrong (eg: app is linked on an old SDK where ATS doesn't take effect)
|
||||
SULog(SULogLevelDefault, @"The feed URL (%@) may need to change to use HTTPS.\nFor more information: https://sparkle-project.org/documentation/app-transport-security", [feedURL absoluteString]);
|
||||
|
||||
self.loggedATSWarning = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,13 +335,6 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
}
|
||||
|
||||
// Check XPC Services are functional
|
||||
for (NSString *xpcServiceID in @[@INSTALLER_LAUNCHER_BUNDLE_ID, @DOWNLOADER_BUNDLE_ID, @INSTALLER_CONNECTION_BUNDLE_ID, @INSTALLER_STATUS_BUNDLE_ID]) {
|
||||
if (!SPUXPCValidateServiceIfBundleExists(xpcServiceID, self.sparkleBundle, error)) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -341,6 +378,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
self.showingPermissionRequest = YES;
|
||||
self.sessionInProgress = YES;
|
||||
self.canCheckForUpdates = YES;
|
||||
|
||||
__weak SPUUpdater *weakSelf = self;
|
||||
[self.userDriver showUpdatePermissionRequest:updatePermissionRequest reply:^(SUUpdatePermissionResponse *response) {
|
||||
@@ -360,7 +398,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
// We start the update checks and register as observer for changes after the prompt finishes
|
||||
} else {
|
||||
// We check if the user's said they want updates, or they haven't said anything, and the default is set to checking.
|
||||
[self scheduleNextUpdateCheck];
|
||||
[self scheduleNextUpdateCheckFiringImmediately:NO];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,16 +427,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
[self didChangeValueForKey:NSStringFromSelector(@selector((lastUpdateCheckDate)))];
|
||||
}
|
||||
|
||||
- (void)scheduleNextUpdateCheck
|
||||
{
|
||||
[self scheduleNextUpdateCheckFiringImmediately:NO];
|
||||
}
|
||||
|
||||
- (BOOL)canCheckForUpdates
|
||||
{
|
||||
return self.startedUpdater && (self.showingPermissionRequest || self.driver.showingUpdate || !self.sessionInProgress);
|
||||
}
|
||||
|
||||
// Note this method is never called when sessionInProgress is YES
|
||||
- (void)scheduleNextUpdateCheckFiringImmediately:(BOOL)firingImmediately
|
||||
{
|
||||
[self.updaterTimer invalidate];
|
||||
@@ -413,7 +442,36 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
if (firingImmediately) {
|
||||
[self checkForUpdatesInBackground];
|
||||
} else {
|
||||
[self retrieveNextUpdateCheckInterval:^(NSTimeInterval updateCheckInterval) {
|
||||
// This may not return the same update check interval as the developer has configured
|
||||
// Notably it may differ when we have an update that has been already downloaded and needs to resume,
|
||||
// as well as if that update is marked critical or not
|
||||
void (^retrieveNextUpdateCheckInterval)(void (^)(NSTimeInterval)) = ^(void (^completionHandler)(NSTimeInterval)) {
|
||||
NSString *hostBundleIdentifier = self.host.bundle.bundleIdentifier;
|
||||
assert(hostBundleIdentifier != nil);
|
||||
[SPUProbeInstallStatus probeInstallerUpdateItemForHostBundleIdentifier:hostBundleIdentifier completion:^(SPUInstallationInfo * _Nullable installationInfo) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSTimeInterval regularCheckInterval = [self updateCheckInterval];
|
||||
if (installationInfo == nil) {
|
||||
// Proceed as normal if there's no resumable updates
|
||||
completionHandler(regularCheckInterval);
|
||||
} else {
|
||||
if (!installationInfo.canSilentlyInstall || [installationInfo.appcastItem isCriticalUpdate] || [installationInfo.appcastItem isInformationOnlyUpdate]) {
|
||||
completionHandler(MIN(regularCheckInterval, SUImpatientUpdateCheckInterval));
|
||||
} else {
|
||||
completionHandler(MAX(regularCheckInterval, SUImpatientUpdateCheckInterval));
|
||||
}
|
||||
}
|
||||
});
|
||||
}];
|
||||
};
|
||||
|
||||
self.canCheckForUpdates = NO;
|
||||
self.sessionInProgress = YES;
|
||||
|
||||
retrieveNextUpdateCheckInterval(^(NSTimeInterval updateCheckInterval) {
|
||||
self.canCheckForUpdates = YES;
|
||||
self.sessionInProgress = NO;
|
||||
|
||||
// This callback is asynchronous, so the timer may be set. Invalidate to make sure it isn't.
|
||||
[self.updaterTimer invalidate];
|
||||
|
||||
@@ -435,7 +493,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
// We're overdue! Run one now.
|
||||
[self checkForUpdatesInBackground];
|
||||
}
|
||||
}];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,6 +515,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
|
||||
self.sessionInProgress = YES;
|
||||
self.canCheckForUpdates = NO;
|
||||
|
||||
// We don't want the probe check to act on the driver if the updater is going near death
|
||||
__weak SPUUpdater *weakSelf = self;
|
||||
@@ -518,6 +577,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
|
||||
self.sessionInProgress = YES;
|
||||
self.canCheckForUpdates = NO;
|
||||
|
||||
id <SPUUpdateDriver> theUpdateDriver = [[SPUUserInitiatedUpdateDriver alloc] initWithHost:self.host applicationBundle:self.applicationBundle updater:self userDriver:self.userDriver updaterDelegate:self.delegate];
|
||||
|
||||
@@ -549,6 +609,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
|
||||
self.sessionInProgress = YES;
|
||||
self.canCheckForUpdates = NO;
|
||||
|
||||
NSString *bundleIdentifier = self.host.bundle.bundleIdentifier;
|
||||
assert(bundleIdentifier != nil);
|
||||
@@ -564,6 +625,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
- (void)checkForUpdatesWithDriver:(id <SPUUpdateDriver> )d updateCheck:(SPUUpdateCheck)updateCheck installerInProgress:(BOOL)installerInProgress
|
||||
{
|
||||
assert(self.driver == nil);
|
||||
if (self.driver != nil) {
|
||||
return;
|
||||
}
|
||||
@@ -600,16 +662,18 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
SPUUpdater *strongSelf = weakSelf;
|
||||
if (strongSelf != nil) {
|
||||
strongSelf.driver = nil;
|
||||
strongSelf.sessionInProgress = NO;
|
||||
|
||||
[strongSelf updateLastUpdateCheckDate];
|
||||
|
||||
strongSelf.sessionInProgress = NO;
|
||||
strongSelf.canCheckForUpdates = YES;
|
||||
|
||||
notifyDelegateOfDriverCompletion(error, NO);
|
||||
|
||||
// Ensure the delegate doesn't start a new session when being notified of the previous one ending
|
||||
if (!strongSelf.sessionInProgress) {
|
||||
if (shouldScheduleNextUpdateCheck) {
|
||||
[strongSelf scheduleNextUpdateCheck];
|
||||
[strongSelf scheduleNextUpdateCheckFiringImmediately:NO];
|
||||
} else {
|
||||
SULog(SULogLevelDefault, @"Disabling scheduled updates..");
|
||||
}
|
||||
@@ -636,7 +700,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
// Because an application can change the configuration (eg: the feed url) at any point, we should always check if it's valid
|
||||
// We will not schedule a next update check if the bundle is misconfigured
|
||||
NSError *configurationError = nil;
|
||||
if (![self checkIfConfiguredProperlyAndRequireFeedURL:YES error:&configurationError]) {
|
||||
if (![self checkIfConfiguredProperlyAndRequireFeedURL:YES validateXPCServices:NO error:&configurationError]) {
|
||||
SULog(SULogLevelError, @"Sparkle configuration error (%ld): %@", (long)configurationError.code, configurationError.localizedDescription);
|
||||
|
||||
abortUpdateDriver(configurationError, NO);
|
||||
@@ -650,9 +714,12 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
if (strongSelf != nil) {
|
||||
strongSelf.resumableUpdate = resumableUpdate;
|
||||
strongSelf.driver = nil;
|
||||
strongSelf.sessionInProgress = NO;
|
||||
|
||||
[strongSelf updateLastUpdateCheckDate];
|
||||
|
||||
strongSelf.sessionInProgress = NO;
|
||||
strongSelf.canCheckForUpdates = YES;
|
||||
|
||||
notifyDelegateOfDriverCompletion(error, shouldShowUpdateImmediately);
|
||||
|
||||
// Ensure the delegate doesn't start a new session when being notified of the previous one ending
|
||||
@@ -662,6 +729,10 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
}];
|
||||
|
||||
[self.driver setUpdateShownHandler:^{
|
||||
weakSelf.canCheckForUpdates = YES;
|
||||
}];
|
||||
|
||||
if (installerInProgress) {
|
||||
// Resume an update that has already begun installing in the background
|
||||
[self.driver resumeInstallingUpdate];
|
||||
@@ -698,7 +769,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
if (!self.sessionInProgress) {
|
||||
[self cancelNextUpdateCycle];
|
||||
[self scheduleNextUpdateCheck];
|
||||
[self scheduleNextUpdateCheckFiringImmediately:NO];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,30 +1006,6 @@ static NSString *escapeURLComponent(NSString *str) {
|
||||
return [self.updaterSettings updateCheckInterval];
|
||||
}
|
||||
|
||||
// This may not return the same update check interval as the developer has configured
|
||||
// Notably it may differ when we have an update that has been already downloaded and needs to resume,
|
||||
// as well as if that update is marked critical or not
|
||||
- (void)retrieveNextUpdateCheckInterval:(void (^)(NSTimeInterval))completionHandler
|
||||
{
|
||||
NSString *hostBundleIdentifier = self.host.bundle.bundleIdentifier;
|
||||
assert(hostBundleIdentifier != nil);
|
||||
[SPUProbeInstallStatus probeInstallerUpdateItemForHostBundleIdentifier:hostBundleIdentifier completion:^(SPUInstallationInfo * _Nullable installationInfo) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSTimeInterval regularCheckInterval = [self updateCheckInterval];
|
||||
if (installationInfo == nil) {
|
||||
// Proceed as normal if there's no resumable updates
|
||||
completionHandler(regularCheckInterval);
|
||||
} else {
|
||||
if (!installationInfo.canSilentlyInstall || [installationInfo.appcastItem isCriticalUpdate] || [installationInfo.appcastItem isInformationOnlyUpdate]) {
|
||||
completionHandler(MIN(regularCheckInterval, SUImpatientUpdateCheckInterval));
|
||||
} else {
|
||||
completionHandler(MAX(regularCheckInterval, SUImpatientUpdateCheckInterval));
|
||||
}
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
// Stop checking for updates
|
||||
|
||||
+17
-1
@@ -20,6 +20,7 @@
|
||||
@property (nonatomic) BOOL showingUserInitiatedProgress;
|
||||
@property (nonatomic) BOOL showingUpdate;
|
||||
@property (nonatomic) BOOL aborted;
|
||||
@property (nonatomic) void (^updateDidShowHandler)(void);
|
||||
|
||||
@end
|
||||
|
||||
@@ -30,6 +31,7 @@
|
||||
@synthesize showingUserInitiatedProgress = _showingUserInitiatedProgress;
|
||||
@synthesize showingUpdate = _showingUpdate;
|
||||
@synthesize aborted = _aborted;
|
||||
@synthesize updateDidShowHandler = _updateDidShowHandler;
|
||||
|
||||
- (instancetype)initWithHost:(SUHost *)host applicationBundle:(NSBundle *)applicationBundle updater:(id)updater userDriver:(id <SPUUserDriver>)userDriver updaterDelegate:(nullable id <SPUUpdaterDelegate>)updaterDelegate
|
||||
{
|
||||
@@ -46,10 +48,19 @@
|
||||
[self.uiDriver setCompletionHandler:completionBlock];
|
||||
}
|
||||
|
||||
- (void)setUpdateShownHandler:(void (^)(void))handler
|
||||
{
|
||||
self.updateDidShowHandler = handler;
|
||||
}
|
||||
|
||||
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders
|
||||
{
|
||||
self.showingUserInitiatedProgress = YES;
|
||||
self.showingUpdate = YES;
|
||||
|
||||
if (self.updateDidShowHandler != nil) {
|
||||
self.updateDidShowHandler();
|
||||
self.updateDidShowHandler = nil;
|
||||
}
|
||||
|
||||
[self.userDriver showUserInitiatedUpdateCheckWithCancellation:^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@@ -77,6 +88,11 @@
|
||||
// When a new update check has not been initiated and an update has been resumed,
|
||||
// update the driver to indicate we are showing an update to the user
|
||||
self.showingUpdate = YES;
|
||||
|
||||
if (self.updateDidShowHandler != nil) {
|
||||
self.updateDidShowHandler();
|
||||
self.updateDidShowHandler = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)basicDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error
|
||||
|
||||
Vendored
+1
-5
@@ -10,10 +10,6 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
BOOL SPUXPCServiceExists(NSString *bundleName);
|
||||
|
||||
BOOL SPUXPCValidateServiceIfBundleExists(NSString *bundleName, NSBundle *sparkleBundle, NSError * __autoreleasing *error);
|
||||
|
||||
NSBundle * _Nullable SPUXPCServiceBundle(NSString *bundleName);
|
||||
BOOL SPUXPCServiceIsEnabled(NSString *enabledKey);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+4
-53
@@ -9,63 +9,14 @@
|
||||
#import "SPUXPCServiceInfo.h"
|
||||
#import "SUErrors.h"
|
||||
#import "SUConstants.h"
|
||||
|
||||
#import "SUHost.h"
|
||||
|
||||
#include "AppKitPrevention.h"
|
||||
|
||||
BOOL SPUXPCServiceExists(NSString *bundleName)
|
||||
{
|
||||
NSBundle *xpcBundle = SPUXPCServiceBundle(bundleName);
|
||||
return (xpcBundle != nil);
|
||||
}
|
||||
|
||||
BOOL SPUXPCValidateServiceIfBundleExists(NSString *bundleName, NSBundle *sparkleBundle, NSError * __autoreleasing *error)
|
||||
{
|
||||
NSBundle *xpcBundle = SPUXPCServiceBundle(bundleName);
|
||||
if (xpcBundle == nil) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
// Post install scripts for appending git hash info to CFBundleShortVersionString are too unreliable to verify for debug/development
|
||||
// Fortunately debug builds of Sparkle are not usable in a production environment
|
||||
(void)sparkleBundle; // Mark parameter as used
|
||||
#else
|
||||
// Make sure the display versions of Sparkle and the XPC bundle match
|
||||
// These versions may contain a git hash identifier if built from the Sparkle repository
|
||||
NSString *sparkleDisplayVersion = [sparkleBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||
NSString *xpcDisplayVersion = [xpcBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||
|
||||
if (sparkleDisplayVersion == nil || xpcDisplayVersion == nil || ![sparkleDisplayVersion isEqualToString:xpcDisplayVersion]) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInvalidUpdaterError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"XPC Version mismatch. Framework display version is %@ but XPC Service (%@) display version is %@. Bundled XPC Service cannot be used.", sparkleDisplayVersion, xpcBundle.bundlePath, xpcDisplayVersion] }];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Make sure the bundle versions of Sparkle and the XPC bundle match
|
||||
NSString *xpcBundleVersion = [xpcBundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey];
|
||||
|
||||
if (xpcBundleVersion == nil || ![xpcBundleVersion isEqualToString:@""CURRENT_PROJECT_VERSION]) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInvalidUpdaterError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"XPC Version mismatch. Framework bundle version is %@ but XPC Service (%@) bundle version is %@. Bundled XPC Service cannot be used.", @""CURRENT_PROJECT_VERSION, xpcBundle.bundlePath, xpcBundleVersion] }];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
NSBundle * _Nullable SPUXPCServiceBundle(NSString *bundleName)
|
||||
BOOL SPUXPCServiceIsEnabled(NSString *enabledKey)
|
||||
{
|
||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||
NSURL *executableURL = mainBundle.executableURL;
|
||||
if (executableURL == nil) {
|
||||
return nil;
|
||||
}
|
||||
SUHost *mainBundleHost = [[SUHost alloc] initWithBundle:mainBundle];
|
||||
|
||||
NSURL *xpcBundleURL = [[[executableURL.URLByDeletingLastPathComponent.URLByDeletingLastPathComponent URLByAppendingPathComponent:@"XPCServices"] URLByAppendingPathComponent:bundleName] URLByAppendingPathExtension:@"xpc"];
|
||||
|
||||
return [NSBundle bundleWithURL:xpcBundleURL];
|
||||
return [mainBundleHost boolForInfoDictionaryKey:enabledKey];
|
||||
}
|
||||
Vendored
+4
@@ -52,6 +52,10 @@ extern NSString *const SUPublicEDKeyKey;
|
||||
extern NSString *const SUAutomaticallyUpdateKey;
|
||||
extern NSString *const SUAllowsAutomaticUpdatesKey;
|
||||
extern NSString *const SUEnableAutomaticChecksKey;
|
||||
extern NSString *const SUEnableInstallerLauncherServiceKey;
|
||||
extern NSString *const SUEnableDownloaderServiceKey;
|
||||
extern NSString *const SUEnableInstallerConnectionServiceKey;
|
||||
extern NSString *const SUEnableInstallerStatusServiceKey;
|
||||
extern NSString *const SUEnableSystemProfilingKey;
|
||||
extern NSString *const SUSendProfileInfoKey;
|
||||
extern NSString *const SUUpdateGroupIdentifierKey;
|
||||
|
||||
Vendored
+4
@@ -49,6 +49,10 @@ NSString *const SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate";
|
||||
NSString *const SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates";
|
||||
NSString *const SUEnableSystemProfilingKey = @"SUEnableSystemProfiling";
|
||||
NSString *const SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
|
||||
NSString *const SUEnableInstallerLauncherServiceKey = @"SUEnableInstallerLauncherService";
|
||||
NSString *const SUEnableDownloaderServiceKey = @"SUEnableDownloaderService";
|
||||
NSString *const SUEnableInstallerConnectionServiceKey = @"SUEnableInstallerConnectionService";
|
||||
NSString *const SUEnableInstallerStatusServiceKey = @"SUEnableInstallerStatusService";
|
||||
NSString *const SUSendProfileInfoKey = @"SUSendProfileInfo";
|
||||
NSString *const SUUpdateGroupIdentifierKey = @"SUUpdateGroupIdentifier";
|
||||
NSString *const SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate";
|
||||
|
||||
Vendored
+3
-2
@@ -30,8 +30,9 @@
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
_webView = [[WebView alloc] initWithFrame:NSZeroRect];
|
||||
|
||||
WebPreferences *preferences = _webView.preferences;
|
||||
|
||||
WebPreferences *preferences = [[WebPreferences alloc] initWithIdentifier:@"sparkle-project.org.legacy-web-view"];
|
||||
preferences.autosaves = NO;
|
||||
preferences.javaScriptEnabled = javaScriptEnabled;
|
||||
preferences.javaEnabled = NO;
|
||||
preferences.plugInsEnabled = NO;
|
||||
|
||||
Vendored
+1
-1
@@ -320,7 +320,7 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
|
||||
// If the developer is using the downloader XPC service, they are very most likely are a) sandboxed b) do not use outgoing network entitlement.
|
||||
// In this case, fall back to legacy WebKit view.
|
||||
// (In theory it is possible for a non-sandboxed app or sandboxed app with outgoing network entitlement to use the XPC service, it's just pretty unlikely. And falling back to a legacy web view would not be too harmful in those cases).
|
||||
BOOL useWKWebView = !SPUXPCServiceExists(@DOWNLOADER_BUNDLE_ID);
|
||||
BOOL useWKWebView = !SPUXPCServiceIsEnabled(SUEnableDownloaderServiceKey);
|
||||
|
||||
if (useWKWebView) {
|
||||
self.webView = [[SUWKWebView alloc] initWithColorStyleSheetLocation:colorStyleURL fontFamily:defaultFontFamily fontPointSize:defaultFontSize javaScriptEnabled:javaScriptEnabled];
|
||||
|
||||
Vendored
+1
-1
@@ -79,7 +79,7 @@ static WKUserScript *_userScriptWithInjectedStyleSource(NSString *styleSource)
|
||||
|
||||
WKUserContentController *userContentController = [[WKUserContentController alloc] init];
|
||||
|
||||
NSString *fontStyleContents = [NSString stringWithFormat:@"body { font-family: %@; font-size: %dpt; }", fontFamily, fontPointSize];
|
||||
NSString *fontStyleContents = [NSString stringWithFormat:@"body { font-family: %@; font-size: %dpx; }", fontFamily, fontPointSize];
|
||||
|
||||
NSString *finalStyleContents;
|
||||
if (colorStyleContents == nil) {
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
Vendored
+124
-21
@@ -1,93 +1,196 @@
|
||||
"%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$@ wurde geladen und steht zur Installation bereit! Dies ist ein wichtiges Update. Möchtest du %1$@ jetzt durch die neue Version ersetzen und neu starten?";
|
||||
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ wurde geladen und steht zur Installation bereit! Möchtest du %1$@ jetzt durch die neue Version ersetzen und neu starten?";
|
||||
|
||||
"%1$@ can't be updated, because it was opened from a read-only or a temporary location." = "%1$@ kann nicht aktualisiert werden, da es aus dem Downloads-Order, oder von einer DMG-Datei oder einem Laufwerk ohne Schreibzugriff gestartet wurde.";
|
||||
|
||||
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Kopiere %1$@ in den Programmeordner, starte es von dort aus und versuche es erneut zu aktualisieren.";
|
||||
|
||||
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "Beende „%1$@“, bewege es in den Ordner „Programme“, starte das Programm von dort erneut und versuche es noch einmal.";
|
||||
|
||||
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "„%1$@“ kann nicht aktualisiert werden, wenn das Programm von dem Ort ausgeführt wird, an den es heruntergeladen wurde.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ %@ is currently the newest version available." = "%1$@ %2$@ ist zurzeit die neueste verfügbare Version.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ ist zurzeit die neueste verfügbare Version.\n(Die derzeit installierte Version ist %3$@.)";
|
||||
|
||||
/* Critical downloadable update */
|
||||
"%@ %@ is now available--you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@ ist verfügbar – du verwendest Version %3$@. Dies ist ein wichtiges Update. Möchtest du die neue Version jetzt laden?";
|
||||
|
||||
/* Description text for SUUpdateAlert when the update is downloadable. */
|
||||
"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ ist verfügbar – du verwendest Version %3$@. Möchtest du die neue Version jetzt laden?";
|
||||
"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ ist verfügbar – du verwendest Version %3$@. Möchtest du die neue Version jetzt laden?";
|
||||
|
||||
/* Description text for SUUpdateAlert when the update informational with no download. */
|
||||
"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ ist verfügbar – du verwendest Version %3$@. Möchtest du mehr über dieses Update erfahren?";
|
||||
"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ ist verfügbar – du verwendest Version %3$@. Möchtest du mehr über dieses Update erfahren?";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ downloaded" = "%@ geladen";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ is now updated to version %@!" = "%@ ist aktualisiert auf Version %@!";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ is now updated!" = "%@ ist aktualisiert!";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ of %@" = "%1$@ von %2$@";
|
||||
|
||||
/* (No Comment) */
|
||||
"%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$@ wurde geladen und steht zur Installation bereit! Dies ist ein wichtiges Update. Möchtest du %1$@ jetzt durch die neue Version ersetzen und neu starten?";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ wurde geladen und steht zur Installation bereit! Möchtest du %1$@ jetzt durch die neue Version ersetzen und neu starten?";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@." = "%1$@ %2$@ ist verfügbar, aber deine Version von macOS ist zu neu für dieses Update. Das Update unterstützt nur bis macOS %3$@.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required." = "%1$@ %2$@ ist verfügbar, aber deine Version von macOS ist zu alt, um das Update zu installieren. Es wird mindestens macOS %3$@ benötigt.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ can't be updated, because it was opened from a read-only or a temporary location." = "%1$@ kann nicht aktualisiert werden, da es aus dem Downloads-Order, oder von einer DMG-Datei oder einem Laufwerk ohne Schreibzugriff gestartet wurde.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "„%1$@“ kann nicht aktualisiert werden, wenn das Programm von dem Ort ausgeführt wird, an den es heruntergeladen wurde.";
|
||||
|
||||
/* Authorization message shown when app wants permission to update another app / bundle. */
|
||||
"%1$@ wants permission to update %2$@." = "%1$@ benötigt Zugriffsrechte zum Aktualisieren von %@$@.";
|
||||
|
||||
/* Authorization message shown when app wants permission to update itself. */
|
||||
"%1$@ wants permission to update." = "%1$@ benötigt Zugriffsrechte zum Aktualisieren";
|
||||
|
||||
/* (No Comment) */
|
||||
"A new version of %@ is available!" = "Eine neue Version von %@ ist verfügbar!";
|
||||
|
||||
/* (No Comment) */
|
||||
"A new version of %@ is ready to install!" = "Eine neue Version von %@ steht zur Installation bereit!";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred in retrieving update information. Please try again later." = "Beim Laden der Updateinformationen ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while connecting to the installer. Please try again later." = "Beim Verbinden mit dem Installationsprogramm ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while downloading the update feed." = "Beim Laden der Updateinformationen ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while downloading the update. Please try again later." = "Beim Laden des Updates ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while extracting the archive. Please try again later." = "Beim Entpacken des Archivs ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while installing the update. Please try again later." = "Beim Installieren des Updates ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while launching the installer. Please try again later." = "Beim Starten des Installationsprogramms ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while parsing the update feed." = "Beim Lesen der Updateinformationen ist ein Fehler aufgetreten.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Beim Neustart von %1$@ ist ein Fehler aufgetreten. Die neue Version von %1$@ steht beim nächsten Programmstart zur Verfügung.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while running the updater. Please try again later." = "Beim Ausführen des Aktualisierungsprogramms ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while starting the installer. Please try again later." = "Beim Starten des Installationsprogramms ist ein Fehler aufgetreten. Bitte versuche es später erneut.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An important update to %@ is ready to install" = "Ein wichtiges Update von %@ steht zur Installation bereit";
|
||||
|
||||
/* Title confirmation for skipping major upgrade and future updates */
|
||||
"Are you sure you want to skip this upgrade?" = "Möchtest du dieses Update wirklich überspringen?";
|
||||
|
||||
/* the unit for bytes */
|
||||
"B" = "B";
|
||||
|
||||
/* (No Comment) */
|
||||
"Cancel" = "Abbrechen";
|
||||
|
||||
/* (No Comment) */
|
||||
"Cancel Update" = "Aktualisierung abbrechen";
|
||||
|
||||
"Checking for updates..." = "Nach Updates suchen …";
|
||||
/* (No Comment) */
|
||||
"Checking for updates..." = "Nach Updates suchen …";
|
||||
|
||||
/* Not skipping a major upgrade */
|
||||
"Don't Skip" = "Nicht überspringen";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Downloading update..." = "Update laden …";
|
||||
"Downloading update..." = "Update laden …";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Extracting update..." = "Update entpacken …";
|
||||
"Extracting update..." = "Update entpacken …";
|
||||
|
||||
/* (No Comment) */
|
||||
"Failed to resume installing update." = "Das Fortsetzen der Installation ist fehlgeschlagen.";
|
||||
|
||||
/* the unit for gigabytes */
|
||||
"GB" = "GB";
|
||||
|
||||
/* (No Comment) */
|
||||
"Install and Relaunch" = "Installieren und neu starten";
|
||||
|
||||
/* (No Comment) */
|
||||
"Install on Quit" = "Installieren beim Beenden";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Installing update..." = "Update installieren …";
|
||||
"Installing update..." = "Update installieren …";
|
||||
|
||||
/* 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..." = "Mehr über …";
|
||||
|
||||
/* the unit for megabytes */
|
||||
"MB" = "MB";
|
||||
|
||||
/* OK button. */
|
||||
"OK" = "OK";
|
||||
|
||||
/* (No Comment) */
|
||||
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "Beende „%1$@“, bewege es in den Ordner „Programme“, starte das Programm von dort erneut und versuche es noch einmal.";
|
||||
|
||||
/* Status message on progress window once download has finished. */
|
||||
"Ready to Install" = "Bereit zum Installieren";
|
||||
|
||||
/* 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." = "Soll %1$@ automatisch nach Updates suchen? Du kannst im %1$@-Menü auch manuell nach Updates suchen.";
|
||||
|
||||
/* Skipping major upgrade */
|
||||
"Skip Upgrade" = "Update überspringen";
|
||||
|
||||
/* Confirmation message for skipping major upgrade and future updates */
|
||||
"Skipping this major upgrade will opt out of alerts for future updates." = "Wenn du dieses Hauptupdate überspringst, wirst du keine Hinweise für zukünftige Updates erhalten.";
|
||||
|
||||
/* (No Comment) */
|
||||
"The update checker failed to start correctly. You should contact the app developer to report this issue and verify that you have the latest version" = "Das Aktualisierungsprogramm wurde nicht richtig gestartet. Du solltest den App-Entwickler kontaktieren, um diesen Fehler zu melden und zu prüfen, ob du die neueste Version hast.";
|
||||
|
||||
/* (No Comment) */
|
||||
"The update is improperly signed." = "Das Update ist nicht ordnungsgemäß signiert.";
|
||||
|
||||
/* (No Comment) */
|
||||
"Unable to Check For Updates" = "Suche nach Updates ist fehlgeschlagen";
|
||||
|
||||
/* (No Comment) */
|
||||
"Update Error!" = "Fehler beim Aktualisieren!";
|
||||
|
||||
/* (No Comment) */
|
||||
"Update Installed" = "Update installiert";
|
||||
|
||||
/* (No Comment) */
|
||||
"Updating %@" = "Aktualisierung von %@";
|
||||
|
||||
/* (No Comment) */
|
||||
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Kopiere %1$@ in den Programmeordner, starte es von dort aus und versuche es erneut zu aktualisieren.";
|
||||
|
||||
/* Used when a new update is not found */
|
||||
"Version History" = "Versionsverlauf";
|
||||
|
||||
/* '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 %@." = "Du hast bereits die neueste Version von %@.";
|
||||
|
||||
/* 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!" = "Du bist auf dem neuesten Stand!";
|
||||
|
||||
/* Alternative name for "Install" button if we have a paid update or other update
|
||||
without a download but with a URL. */
|
||||
/* (No Comment) */
|
||||
"Your macOS version is too new" = "Deine Version von macOS ist zu neu";
|
||||
|
||||
/* (No Comment) */
|
||||
"Your macOS version is too old" = "Deine Version von macOS ist zu alt";
|
||||
|
||||
"Learn More..." = "Mehr über …";
|
||||
Vendored
+2
@@ -91,3 +91,5 @@
|
||||
"Learn More..." = "En savoir plus…";
|
||||
|
||||
"The update is improperly signed." = "La signature numérique de la mise à jour est incorrecte";
|
||||
|
||||
"Version History" = "Historique des versions";
|
||||
BIN
Binary file not shown.
Binary file not shown.
Vendored
+124
-16
@@ -1,12 +1,11 @@
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ is gedownload en klaar om te installeren! Wil je %1$@ nu installeren en herstarten?";
|
||||
|
||||
"%1$@ can't be updated, because it was opened from a read-only or a temporary location." = "%1$@ kan niet worden geüpdatet, omdat het vanuit een alleen-lezen- of tijdelijke locatie geopend is.";
|
||||
|
||||
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Verplaats %1$@ naar de map ’Programma’s’, herstart vandaar en probeer opnieuw.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ %@ is currently the newest version available." = "%1$@ %2$@ is momenteel de nieuwste versie.";
|
||||
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ is momenteel de nieuwste versie.\n(You are currently running version %3$@.)";
|
||||
/* (No Comment) */
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ is momenteel de nieuwste versie.\n(Je gebruikt op dit moment versie %3$@.)";
|
||||
|
||||
/* Critical downloadable update */
|
||||
"%@ %@ is now available--you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@ is nu beschikbaar – je hebt %3$@. Dit is een belangrijke update. Wil je deze nu downloaden?";
|
||||
|
||||
/* Description text for SUUpdateAlert when the update is downloadable. */
|
||||
"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ is nu beschikbaar – je hebt %3$@. Wil je de update nu downloaden?";
|
||||
@@ -14,75 +13,184 @@
|
||||
/* Description text for SUUpdateAlert when the update informational with no download. */
|
||||
"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is nu beschikbaar – je hebt %3$@. Wil je een webpagina openen met meer informatie?";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ downloaded" = "%@ gedownload";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ is now updated to version %@!" = "%@ is nu bijgewerkt naar versie %@!";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ is now updated!" = "%@ is nu bijgewerkt!";
|
||||
|
||||
/* (No Comment) */
|
||||
"%@ of %@" = "%1$@ van %2$@";
|
||||
|
||||
/* (No Comment) */
|
||||
"%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$@ is gedownload en klaar om te installeren! Dit is een belangrijke update. Wil je deze nu installeren en %1$@ herstarten?";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ is gedownload en klaar om te installeren! Wil je deze nu installeren en %1$@ herstarten?";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@." = "%1$@ %2$@ is beschikbaar, maar je versie van macOS is te nieuw voor deze update. De update kan alleen worden gebruikt tot macOS %3$@.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required." = "%1$@ %2$@ is beschikbaar, maar je versie van macOS is te oud om deze te installeren. Ten minste macOS %3$@ is vereist.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ can't be updated, because it was opened from a read-only or a temporary location." = "%1$@ kan niet worden bijgewerkt, omdat het vanuit een alleen-lezen- of tijdelijke locatie is geopend.";
|
||||
|
||||
/* (No Comment) */
|
||||
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "%1$@ kan niet worden bijgewerkt als het is geopend vanuit de downloadlocatie.";
|
||||
|
||||
/* Authorization message shown when app wants permission to update another app / bundle. */
|
||||
"%1$@ wants permission to update %2$@." = "%1$@ vraagt om toestemming om %2$@ bij te werken.";
|
||||
|
||||
/* Authorization message shown when app wants permission to update itself. */
|
||||
"%1$@ wants permission to update." = "%1$@ vraagt om toestemming om bij te werken.";
|
||||
|
||||
/* (No Comment) */
|
||||
"A new version of %@ is available!" = "Een nieuwe versie van %@ is beschikbaar!";
|
||||
|
||||
/* (No Comment) */
|
||||
"A new version of %@ is ready to install!" = "Een nieuwe versie van %@ is klaar om te installeren!";
|
||||
|
||||
"An error occurred in retrieving update information. Please try again later." = "Bij het ophalen van update-informatie deed zich een fout voor. Probeer het later opnieuw.";
|
||||
/* (No Comment) */
|
||||
"An error occurred in retrieving update information. Please try again later." = "Er heeft zich een fout voorgedaan bij het ophalen van update-informatie. Probeer het later opnieuw.";
|
||||
|
||||
"An error occurred while downloading the update. Please try again later." = "Bij het downloaden van de update deed zich een fout voor. Probeer het later opnieuw";
|
||||
/* (No Comment) */
|
||||
"An error occurred while connecting to the installer. Please try again later." = "Er heeft zich een fout voorgedaan bij het verbinden met het installatieprogramma. Probeer het later opnieuw.";
|
||||
|
||||
"An error occurred while extracting the archive. Please try again later." = "Bij het uitpakken van het archief deed zich een fout voor. Probeer het later opnieuw.";
|
||||
/* (No Comment) */
|
||||
"An error occurred while downloading the update feed." = "Er heeft zich een fout voorgedaan bij het downloaden van de update-informatie.";
|
||||
|
||||
"An error occurred while installing the update. Please try again later." = "Bij het installeren van de update deed zich een fout voor. Probeer het later opnieuw.";
|
||||
/* (No Comment) */
|
||||
"An error occurred while downloading the update. Please try again later." = "Er heeft zich een fout voorgedaan bij het downloaden van de update. Probeer het later opnieuw";
|
||||
|
||||
"An error occurred while parsing the update feed." = "Bij het verwerken van de update-informatie deed zich een fout voor.";
|
||||
/* (No Comment) */
|
||||
"An error occurred while extracting the archive. Please try again later." = "Er heeft zich een fout voorgedaan bij het uitpakken van het archief. Probeer het later opnieuw.";
|
||||
|
||||
"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Bij het herstarten van %1$@ deed zich een fout voor. De nieuwe versie is beschikbaar wanneer je %1$@ de volgende keer opent.";
|
||||
/* (No Comment) */
|
||||
"An error occurred while installing the update. Please try again later." = "Er heeft zich een fout voorgedaan bij het installeren van de update. Probeer het later opnieuw.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while launching the installer. Please try again later." = "Er heeft zich een fout voorgedaan bij het starten van het installatieprogramma. Probeer het later opnieuw.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while parsing the update feed." = "Er heeft zich een fout voorgedaan bij het verwerken van de update-informatie.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Er heeft zich een fout voorgedaan bij het herstarten van %1$@. De nieuwe versie is beschikbaar wanneer je %1$@ de volgende keer opent.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while running the updater. Please try again later." = "Er heeft zich een fout voorgedaan bij het uitvoeren van het bijwerkprogramma. Probeer het later opnieuw.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An error occurred while starting the installer. Please try again later." = "Er heeft zich een fout voorgedaan bij het starten van het installatieprogramma. Probeer het later opnieuw.";
|
||||
|
||||
/* (No Comment) */
|
||||
"An important update to %@ is ready to install" = "Een belangrijke update voor %@ is klaar om te installeren";
|
||||
|
||||
/* Title confirmation for skipping major upgrade and future updates */
|
||||
"Are you sure you want to skip this upgrade?" = "Weet je zeker dat je deze update wilt overslaan?";
|
||||
|
||||
/* the unit for bytes */
|
||||
"B" = "B";
|
||||
|
||||
/* (No Comment) */
|
||||
"Cancel" = "Annuleer";
|
||||
|
||||
/* (No Comment) */
|
||||
"Cancel Update" = "Annuleer update";
|
||||
|
||||
/* (No Comment) */
|
||||
"Checking for updates..." = "Naar updates zoeken…";
|
||||
|
||||
/* Not skipping a major upgrade */
|
||||
"Don't Skip" = "Sla niet over";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Downloading update..." = "Update downloaden…";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Extracting update..." = "Update uitpakken…";
|
||||
|
||||
/* (No Comment) */
|
||||
"Failed to resume installing update." = "Het hervatten van de update-installatie is mislukt.";
|
||||
|
||||
/* the unit for gigabytes */
|
||||
"GB" = "GB";
|
||||
|
||||
/* (No Comment) */
|
||||
"Install and Relaunch" = "Installeer en herstart";
|
||||
|
||||
/* (No Comment) */
|
||||
"Install on Quit" = "Installeer bij het stoppen";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Installing update..." = "Update installeren…";
|
||||
|
||||
/* 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..." = "Meer informatie…";
|
||||
|
||||
/* the unit for megabytes */
|
||||
"MB" = "MB";
|
||||
|
||||
/* OK button. */
|
||||
"OK" = "OK";
|
||||
|
||||
/* (No Comment) */
|
||||
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "Stop %1$@, verplaats het naar de map 'Apps', herstart het van daaruit en probeer opnieuw.";
|
||||
|
||||
/* Status message on progress window once download has finished. */
|
||||
"Ready to Install" = "Klaar om te installeren";
|
||||
|
||||
/* 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." = "Wil je dat %1$@ automatisch naar updates zoekt? Je kunt altijd nog handmatig zoeken naar updates via het %1$@-menu.";
|
||||
|
||||
/* Skipping major upgrade */
|
||||
"Skip Upgrade" = "Sla update over";
|
||||
|
||||
/* Confirmation message for skipping major upgrade and future updates */
|
||||
"Skipping this major upgrade will opt out of alerts for future updates." = "Als je deze hoofdupdate overslaat, zul je geen meldingen voor toekomstige updates ontvangen.";
|
||||
|
||||
/* (No Comment) */
|
||||
"The update checker failed to start correctly. You should contact the app developer to report this issue and verify that you have the latest version" = "Het bijwerkprogramma is niet goed gestart. Je kunt wellicht met de app-ontwikkelaar contact opnemen om de fout te melden en te controleren dat je de nieuwste versie hebt";
|
||||
|
||||
/* (No Comment) */
|
||||
"The update is improperly signed." = "De update is onjuist gesigneerd.";
|
||||
|
||||
/* (No Comment) */
|
||||
"Unable to Check For Updates" = "Zoeken naar updates mislukt";
|
||||
|
||||
/* (No Comment) */
|
||||
"Update Error!" = "Fout bij het bijwerken!";
|
||||
|
||||
/* (No Comment) */
|
||||
"Update Installed" = "Update geïnstalleerd";
|
||||
|
||||
/* (No Comment) */
|
||||
"Updating %@" = "%@ bijwerken…";
|
||||
|
||||
/* (No Comment) */
|
||||
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Gebruik Finder om %1$@ naar de map 'Apps' te kopiëren, herstart het van daaruit en probeer opnieuw.";
|
||||
|
||||
/* Used when a new update is not found */
|
||||
"Version History" = "Versiegeschiedenis";
|
||||
|
||||
/* '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 %@." = "Je hebt al de nieuwste versie van %@.";
|
||||
|
||||
/* 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!" = "Je hebt de nieuwste versie!";
|
||||
|
||||
/* Alternative name for "Install" button if we have a paid update or other update
|
||||
without a download but with a URL. */
|
||||
/* (No Comment) */
|
||||
"Your macOS version is too new" = "Je versie van macOS is te nieuw";
|
||||
|
||||
/* (No Comment) */
|
||||
"Your macOS version is too old" = "Je versie van macOS is te oud";
|
||||
|
||||
"Learn More..." = "Meer informatie…";
|
||||
@@ -32,6 +32,8 @@
|
||||
<string>http://localhost:1337/sparkletestcast.xml</string>
|
||||
<key>SUPublicEDKey</key>
|
||||
<string>eRFPLZuNM6m8bltmtpPX4fzKbufI1z6rKJHtgIIsllk=</string>
|
||||
<key>SUEnableInstallerLauncherService</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -29,6 +29,26 @@ func text(_ text: String) -> XMLNode {
|
||||
return XMLNode.text(withStringValue: text) as! XMLNode
|
||||
}
|
||||
|
||||
func extractVersion(parent: XMLNode) -> String? {
|
||||
guard let itemElement = parent as? XMLElement else {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Look for version attribute in enclosure
|
||||
if let enclosure = findElement(name: "enclosure", parent: itemElement) {
|
||||
if let versionAttribute = enclosure.attribute(forName: SUAppcastAttributeVersion) {
|
||||
return versionAttribute.stringValue
|
||||
}
|
||||
}
|
||||
|
||||
// Look for top level version element
|
||||
if let versionElement = findElement(name: SUAppcastElementVersion, parent: itemElement) {
|
||||
return versionElement.stringValue
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem], newVersions: Set<String>?, maxNewVersionsInFeed: Int, link: String?, newChannel: String?, majorVersion: String?, phasedRolloutInterval: Int?, criticalUpdateVersion: String?, informationalUpdateVersions: [String]?) throws -> (numNewUpdates: Int, numExistingUpdates: Int) {
|
||||
let appBaseName = updates[0].appPath.deletingPathExtension().lastPathComponent
|
||||
|
||||
@@ -68,6 +88,8 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem], newVersions: Set
|
||||
|
||||
var numNewUpdates = 0
|
||||
var numExistingUpdates = 0
|
||||
|
||||
let versionComparator = SUStandardVersionComparator()
|
||||
|
||||
var numItems = 0
|
||||
for update in updates {
|
||||
@@ -102,12 +124,34 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem], newVersions: Set
|
||||
|
||||
if createNewItem {
|
||||
item = XMLElement.element(withName: "item") as! XMLElement
|
||||
|
||||
// When we insert a new item, find the best place to insert the new update item in
|
||||
// This takes account of existing items and even ones that we don't have existing info on
|
||||
var foundBestUpdateInsertion = false
|
||||
if let itemNodes = try? channel.nodes(forXPath: "item") {
|
||||
for childItemNode in itemNodes {
|
||||
guard let childItemNode = childItemNode as? XMLElement else {
|
||||
continue
|
||||
}
|
||||
|
||||
guard let childItemVersion = extractVersion(parent: childItemNode) else {
|
||||
continue
|
||||
}
|
||||
|
||||
if versionComparator.compareVersion(update.version, toVersion: childItemVersion) == .orderedDescending {
|
||||
channel.insertChild(item, at: childItemNode.index)
|
||||
foundBestUpdateInsertion = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !foundBestUpdateInsertion {
|
||||
channel.addChild(item)
|
||||
}
|
||||
} else {
|
||||
item = existingItems[0] as! XMLElement
|
||||
// Remove the existing item to make sure it's inserted in the correct order when we re-add it
|
||||
channel.removeChild(at: item.index)
|
||||
}
|
||||
channel.addChild(item)
|
||||
|
||||
if nil == findElement(name: "title", parent: item) {
|
||||
item.addChild(XMLElement.element(withName: "title", stringValue: update.shortVersion) as! XMLElement)
|
||||
|
||||
Reference in new issue
Block a user