mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5173763c07 | ||
|
|
5a8f25faed | ||
|
|
d1175e4dd9 | ||
|
|
bd90fb7b18 | ||
|
|
9684a433ee | ||
|
|
ff4d4f53a8 | ||
|
|
469f423e28 | ||
|
|
846838c90b | ||
|
|
f6a86f52b3 | ||
|
|
f0ceaf5cc9 | ||
|
|
569f69b463 | ||
|
|
7cc751ff4f |
No files matched your search
@@ -29,4 +29,4 @@ https://github.com/sparkle-project/Sparkle#troubleshooting
|
|||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
[please specify versions of Sparkle this is applicable to; note the old 1.x (master) branch is only taking fixes to regressions and security fixes now.]
|
[please specify versions of Sparkle this is applicable to]
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
name: Sparkle 1.x doesn't work in my app
|
|
||||||
about: Problems with integration, unexpected errors using Sparkle 1
|
|
||||||
title: ''
|
|
||||||
labels: '1.x'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
The answer to your issue is probably already in Console.app on your computer.
|
|
||||||
Please use Console.app and search for Sparkle.
|
|
||||||
|
|
||||||
Please try troubleshooting steps:
|
|
||||||
https://github.com/sparkle-project/Sparkle#troubleshooting
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Description of the problem
|
|
||||||
|
|
||||||
|
|
||||||
### Do you use Sandboxing in your app?
|
|
||||||
|
|
||||||
### Version of `Sparkle.framework` in the latest version of your app
|
|
||||||
|
|
||||||
### Version of `Sparkle.framework` in the old version of app that your users have (or N/A)
|
|
||||||
|
|
||||||
### Sparkle's output from Console.app
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
### Steps to reproduce the behavior
|
|
||||||
|
|
||||||
[The more information provided and pasted verbatim, the easier it will be to diagnose an issue. If you can provide the affected application/binary and XML feed to reproduce an issue, share them]
|
|
||||||
+2
-3
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: Sparkle 2.x doesn't work in my app
|
name: Sparkle doesn't work in my app
|
||||||
about: Problems with integration, unexpected errors using Sparkle 2
|
about: Problems with integration, unexpected errors using Sparkle
|
||||||
title: ''
|
title: ''
|
||||||
labels: '2.x'
|
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -7,8 +7,6 @@ Fixes # (issue)
|
|||||||
- [ ] My change requires a documentation update on [Sparkle's website repository](https://github.com/sparkle-project/sparkle-project.github.io)
|
- [ ] My change requires a documentation update on [Sparkle's website repository](https://github.com/sparkle-project/sparkle-project.github.io)
|
||||||
- [ ] My change requires changes to generate_appcast, generate_keys, or sign_update
|
- [ ] My change requires changes to generate_appcast, generate_keys, or sign_update
|
||||||
|
|
||||||
Only bug fixes to regressions or security fixes are being backported to the 1.x (master) branch now. If you believe your change is significant enough to backport, please also create a separate pull request against the master branch.
|
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
I tested and verified my change by using one or multiple of these methods:
|
I tested and verified my change by using one or multiple of these methods:
|
||||||
|
|||||||
@@ -26,9 +26,12 @@ jobs:
|
|||||||
name: Build and Test Sparkle
|
name: Build and Test Sparkle
|
||||||
runs-on: ${{ matrix.macos }}
|
runs-on: ${{ matrix.macos }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -80,11 +83,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Post Analyzed Warnings
|
- name: Post Analyzed Warnings
|
||||||
if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' && steps.findwarnings.outputs.analyzestatus == '0' }}
|
if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' && steps.findwarnings.outputs.analyzestatus == '0' }}
|
||||||
uses: mshick/add-pr-comment@v1
|
uses: mshick/add-pr-comment@v2
|
||||||
with:
|
with:
|
||||||
allow-repeats: false
|
allow-repeats: false
|
||||||
repo-token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
|
|
||||||
repo-token-user-login: 'Sparkle-Bot'
|
|
||||||
message: "``` ${{ steps.warnings.outputs.content }} ```"
|
message: "``` ${{ steps.warnings.outputs.content }} ```"
|
||||||
|
|
||||||
- name: Build Release Distribution
|
- name: Build Release Distribution
|
||||||
@@ -94,13 +95,13 @@ jobs:
|
|||||||
xcodebuild build -project Sparkle.xcodeproj -scheme Distribution -configuration Release -derivedDataPath build
|
xcodebuild build -project Sparkle.xcodeproj -scheme Distribution -configuration Release -derivedDataPath build
|
||||||
- name: Archive Test Results
|
- name: Archive Test Results
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-logs
|
name: build-logs
|
||||||
path: build/Logs
|
path: build/Logs
|
||||||
- name: Upload Distribution
|
- name: Upload Distribution
|
||||||
if: ${{ success() && matrix.upload-dist }}
|
if: ${{ success() && matrix.upload-dist }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Sparkle-distribution-${{ matrix.xcode }}.tar.xz
|
name: Sparkle-distribution-${{ matrix.xcode }}.tar.xz
|
||||||
path: build/Build/Products/Release/sparkle-dist.tar.xz
|
path: build/Build/Products/Release/sparkle-dist.tar.xz
|
||||||
@@ -25,6 +25,7 @@ static NSArray <NSString *> * _Nullable _commandAndArgumentsConformingToTypeOfPa
|
|||||||
NSArray <NSString *> *extractTBZ = @[@"/usr/bin/tar", @"-jxC"];
|
NSArray <NSString *> *extractTBZ = @[@"/usr/bin/tar", @"-jxC"];
|
||||||
NSArray <NSString *> *extractTXZ = extractTGZ;
|
NSArray <NSString *> *extractTXZ = extractTGZ;
|
||||||
|
|
||||||
|
// Note: keep this list in sync with generate_appcast's unarchiveUpdates()
|
||||||
NSDictionary <NSString *, NSArray<NSString *> *> *extractCommandDictionary =
|
NSDictionary <NSString *, NSArray<NSString *> *> *extractCommandDictionary =
|
||||||
@{
|
@{
|
||||||
@".zip" : @[@"/usr/bin/ditto", @"-x",@"-k",@"-"],
|
@".zip" : @[@"/usr/bin/ditto", @"-x",@"-k",@"-"],
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* Replace CFUUID* with NSUUID (#2395) (Eitot)
|
* Replace CFUUID* with NSUUID (#2395) (Eitot)
|
||||||
* Report an error when detecting duplicate updates in generate_appcast (#2407) (Zorg)
|
* Report an error when detecting duplicate updates in generate_appcast (#2407) (Zorg)
|
||||||
* Improve error for rejecting xattr based code signing for delta updates (#2408) (Zorg)
|
* Improve error for rejecting xattr based code signing for delta updates (#2408) (Zorg)
|
||||||
|
* Fail gracefully when auxiliary tool cannot be located (#2436) (Zorg)
|
||||||
|
|
||||||
# 2.4.2
|
# 2.4.2
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"1.27.1": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.1/Sparkle-1.27.1.tar.xz", "2.0.0-beta.6": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-beta.6/Sparkle-2.0.0-beta.6.tar.xz", "2.0.0-rc.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-rc.1/Sparkle-2.0.0-rc.1.tar.xz", "2.0.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0/Sparkle-2.0.0.tar.xz", "2.1.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.1/Sparkle-2.1.0-beta.1.tar.xz", "2.1.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.2/Sparkle-2.1.0-beta.2.tar.xz", "2.1.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz", "2.2.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.1/Sparkle-2.2.0-beta.1.tar.xz", "2.2.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.2/Sparkle-2.2.0-beta.2.tar.xz", "2.2.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0/Sparkle-2.2.0.tar.xz", "2.2.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.1/Sparkle-2.2.1.tar.xz", "2.2.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.2/Sparkle-2.2.2.tar.xz", "2.3.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.1/Sparkle-2.3.0-beta.1.tar.xz", "2.3.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.2/Sparkle-2.3.0-beta.2.tar.xz", "2.3.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0/Sparkle-2.3.0.tar.xz", "2.3.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.1/Sparkle-2.3.1.tar.xz", "2.3.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.2/Sparkle-2.3.2.tar.xz", "2.4.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.1/Sparkle-2.4.0-beta.1.tar.xz", "2.4.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.2/Sparkle-2.4.0-beta.2.tar.xz", "2.4.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0/Sparkle-2.4.0.tar.xz", "2.4.1-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1-beta.1/Sparkle-2.4.1-beta.1.tar.xz", "2.4.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1/Sparkle-2.4.1.tar.xz", "2.4.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.2/Sparkle-2.4.2.tar.xz", "2.5.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.1/Sparkle-2.5.0-beta.1.tar.xz", "2.5.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.2/Sparkle-2.5.0-beta.2.tar.xz"}
|
{"1.27.1": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.1/Sparkle-1.27.1.tar.xz", "2.0.0-beta.6": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-beta.6/Sparkle-2.0.0-beta.6.tar.xz", "2.0.0-rc.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-rc.1/Sparkle-2.0.0-rc.1.tar.xz", "2.0.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0/Sparkle-2.0.0.tar.xz", "2.1.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.1/Sparkle-2.1.0-beta.1.tar.xz", "2.1.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.2/Sparkle-2.1.0-beta.2.tar.xz", "2.1.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz", "2.2.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.1/Sparkle-2.2.0-beta.1.tar.xz", "2.2.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.2/Sparkle-2.2.0-beta.2.tar.xz", "2.2.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0/Sparkle-2.2.0.tar.xz", "2.2.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.1/Sparkle-2.2.1.tar.xz", "2.2.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.2/Sparkle-2.2.2.tar.xz", "2.3.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.1/Sparkle-2.3.0-beta.1.tar.xz", "2.3.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.2/Sparkle-2.3.0-beta.2.tar.xz", "2.3.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0/Sparkle-2.3.0.tar.xz", "2.3.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.1/Sparkle-2.3.1.tar.xz", "2.3.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.2/Sparkle-2.3.2.tar.xz", "2.4.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.1/Sparkle-2.4.0-beta.1.tar.xz", "2.4.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.2/Sparkle-2.4.0-beta.2.tar.xz", "2.4.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0/Sparkle-2.4.0.tar.xz", "2.4.1-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1-beta.1/Sparkle-2.4.1-beta.1.tar.xz", "2.4.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1/Sparkle-2.4.1.tar.xz", "2.4.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.2/Sparkle-2.4.2.tar.xz", "2.5.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.1/Sparkle-2.5.0-beta.1.tar.xz", "2.5.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.2/Sparkle-2.5.0-beta.2.tar.xz", "2.5.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0/Sparkle-2.5.0.tar.xz"}
|
||||||
@@ -96,8 +96,8 @@ SPARKLE_VERSION_PATCH = 0
|
|||||||
|
|
||||||
// This should be in SemVer format or empty, ie. "-beta.1"
|
// This should be in SemVer format or empty, ie. "-beta.1"
|
||||||
// These variables must have a space after the '=' too
|
// These variables must have a space after the '=' too
|
||||||
SPARKLE_VERSION_SUFFIX = -beta.2
|
SPARKLE_VERSION_SUFFIX =
|
||||||
CURRENT_PROJECT_VERSION = 2030
|
CURRENT_PROJECT_VERSION = 2031
|
||||||
|
|
||||||
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
|
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO
|
ALWAYS_SEARCH_USER_PATHS = NO
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ INFOPLIST_FILE = Downloader/Info.plist
|
|||||||
WRAPPER_EXTENSION = xpc
|
WRAPPER_EXTENSION = xpc
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = ${DOWNLOADER_BUNDLE_ID}
|
PRODUCT_BUNDLE_IDENTIFIER = ${DOWNLOADER_BUNDLE_ID}
|
||||||
PRODUCT_NAME = ${DOWNLOADER_NAME}
|
PRODUCT_NAME = ${DOWNLOADER_NAME}
|
||||||
CODE_SIGN_ENTITLEMENTS = Downloader/${DOWNLOADER_BUNDLE_ID}.entitlements
|
CODE_SIGN_ENTITLEMENTS = Downloader/org.sparkle-project.Downloader.entitlements
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) BUILDING_SPARKLE_SOURCES_EXTERNALLY=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) BUILDING_SPARKLE_SOURCES_EXTERNALLY=1
|
||||||
CLANG_MODULES_AUTOLINK = NO
|
CLANG_MODULES_AUTOLINK = NO
|
||||||
@@ -7,7 +7,7 @@ rm -rd "$BUILT_PRODUCTS_DIR/Sparkle.xcframework"
|
|||||||
xcodebuild archive -scheme Sparkle -archivePath "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive" BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO
|
xcodebuild archive -scheme Sparkle -archivePath "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive" BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO
|
||||||
|
|
||||||
if [ $XCODE_VERSION_MAJOR -ge "1200" ]; then
|
if [ $XCODE_VERSION_MAJOR -ge "1200" ]; then
|
||||||
xcodebuild -create-xcframework -framework "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/Products/Library/Frameworks/Sparkle.framework" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Sparkle.framework.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Autoupdate.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Updater.app.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Installer.xpc.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Downloader.xpc.dSYM" -output "$BUILT_PRODUCTS_DIR/Sparkle.xcframework"
|
xcodebuild -create-xcframework -framework "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/Products/Library/Frameworks/Sparkle.framework" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Sparkle.framework.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Autoupdate.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Updater.app.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/$INSTALLER_LAUNCHER_NAME.xpc.dSYM" -debug-symbols "$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/$DOWNLOADER_NAME.xpc.dSYM" -output "$BUILT_PRODUCTS_DIR/Sparkle.xcframework"
|
||||||
else
|
else
|
||||||
echo "warning: Your Xcode version does not support bundling dSYMs in XCFrameworks directly. You should copy them manually into the XCFramework."
|
echo "warning: Your Xcode version does not support bundling dSYMs in XCFrameworks directly. You should copy them manually into the XCFramework."
|
||||||
echo "note: cp '$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Sparkle.framework.dSYM' '$BUILT_PRODUCTS_DIR/Sparkle.xcframework/your_architecture/dSYMs'"
|
echo "note: cp '$BUILT_PRODUCTS_DIR/Sparkle.xcarchive/dSYMs/Sparkle.framework.dSYM' '$BUILT_PRODUCTS_DIR/Sparkle.xcframework/your_architecture/dSYMs'"
|
||||||
|
|||||||
@@ -326,10 +326,17 @@
|
|||||||
} else {
|
} else {
|
||||||
auxiliaryToolURL = [bundle URLForAuxiliaryExecutable:nameWithExtension];
|
auxiliaryToolURL = [bundle URLForAuxiliaryExecutable:nameWithExtension];
|
||||||
}
|
}
|
||||||
assert(auxiliaryToolURL != nil);
|
|
||||||
|
if (auxiliaryToolURL == nil) {
|
||||||
|
SULog(SULogLevelError, @"Error: Cannot retrieve path for auxiliary tool: %@", nameWithExtension);
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
NSURL *resolvedAuxiliaryToolURL = [auxiliaryToolURL URLByResolvingSymlinksInPath];
|
NSURL *resolvedAuxiliaryToolURL = [auxiliaryToolURL URLByResolvingSymlinksInPath];
|
||||||
assert(resolvedAuxiliaryToolURL != nil);
|
if (resolvedAuxiliaryToolURL == nil) {
|
||||||
|
SULog(SULogLevelError, @"Error: Cannot retrieve resolved path for auxiliary tool path: %@", auxiliaryToolURL.path);
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
return resolvedAuxiliaryToolURL.path;
|
return resolvedAuxiliaryToolURL.path;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -2,10 +2,10 @@
|
|||||||
import PackageDescription
|
import PackageDescription
|
||||||
|
|
||||||
// Version is technically not required here, SPM doesn't check
|
// Version is technically not required here, SPM doesn't check
|
||||||
let version = "2.5.0-beta.2"
|
let version = "2.5.0"
|
||||||
// Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it.
|
// 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.5.0-beta.2"
|
let tag = "2.5.0"
|
||||||
let checksum = "8efa53590e1c49a2e12e472cf078ca4f263bc61c80412a8ea564939050d864ce"
|
let checksum = "f7e6ef91edee5704b76358c9485edc63a79dfefe770d8b5340818b7db69187df"
|
||||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
|
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = "Sparkle"
|
s.name = "Sparkle"
|
||||||
s.version = "2.5.0-beta.2"
|
s.version = "2.5.0"
|
||||||
s.summary = "A software update framework for macOS"
|
s.summary = "A software update framework for macOS"
|
||||||
s.description = "Sparkle is an easy-to-use software update framework for macOS."
|
s.description = "Sparkle is an easy-to-use software update framework for macOS."
|
||||||
s.homepage = "https://sparkle-project.org"
|
s.homepage = "https://sparkle-project.org"
|
||||||
|
|||||||
-3
@@ -117,12 +117,9 @@
|
|||||||
{
|
{
|
||||||
if (_showingUserInitiatedProgress) {
|
if (_showingUserInitiatedProgress) {
|
||||||
_showingUserInitiatedProgress = NO;
|
_showingUserInitiatedProgress = NO;
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
if ([_userDriver respondsToSelector:@selector(dismissUserInitiatedUpdateCheck)]) {
|
if ([_userDriver respondsToSelector:@selector(dismissUserInitiatedUpdateCheck)]) {
|
||||||
[_userDriver dismissUserInitiatedUpdateCheck];
|
[_userDriver dismissUserInitiatedUpdateCheck];
|
||||||
}
|
}
|
||||||
#pragma clang diagnostic pop
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+30
-12
@@ -115,7 +115,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (NSString *name in nodesDict) {
|
for (NSString *name in nodesDict) {
|
||||||
node = [self bestNodeInNodes:[nodesDict objectForKey:name]];
|
node = [self bestNodeInNodes:[nodesDict objectForKey:name] name:name];
|
||||||
if ([name isEqualToString:SURSSElementEnclosure] || [name isEqualToString:SUAppcastElementCriticalUpdate]) {
|
if ([name isEqualToString:SURSSElementEnclosure] || [name isEqualToString:SUAppcastElementCriticalUpdate]) {
|
||||||
// These are flattened as a separate dictionary for some reason
|
// These are flattened as a separate dictionary for some reason
|
||||||
NSDictionary *innerDict = [self attributesOfNode:(NSXMLElement *)node];
|
NSDictionary *innerDict = [self attributesOfNode:(NSXMLElement *)node];
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
return appcastItems;
|
return appcastItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes SPU_OBJC_DIRECT
|
- (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes name:(NSString *)name SPU_OBJC_DIRECT
|
||||||
{
|
{
|
||||||
// We use this method to pick out the localized version of a node when one's available.
|
// We use this method to pick out the localized version of a node when one's available.
|
||||||
if ([nodes count] == 1)
|
if ([nodes count] == 1)
|
||||||
@@ -213,19 +213,37 @@
|
|||||||
else if ([nodes count] == 0)
|
else if ([nodes count] == 0)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
NSMutableArray *languages = [NSMutableArray array];
|
// Now that we reached here, we are dealing with multiple nodes
|
||||||
NSString *lang;
|
NSMutableArray<NSString *> *languages = [NSMutableArray array];
|
||||||
NSUInteger i;
|
|
||||||
for (NSXMLElement *node in nodes) {
|
for (NSXMLElement *node in nodes) {
|
||||||
lang = [[node attributeForName:@"xml:lang"] stringValue];
|
NSString *nodeLanguage = [[node attributeForName:SUXMLLanguage] stringValue];
|
||||||
[languages addObject:(lang ? lang : @"")];
|
NSString *language;
|
||||||
|
if (nodeLanguage.length == 0) {
|
||||||
|
language = @"en";
|
||||||
|
|
||||||
|
SULog(SULogLevelError, @"Error: Multiple nodes for %@ element are present and one of them does not have %@ attribute specified. Defaulting to %@=\"en\" but not all versions of Sparkle handle an implicit set language. Please specify the %@ attribute explicitly for all %@ elements.", name, SUXMLLanguage, SUXMLLanguage, SUXMLLanguage, name);
|
||||||
|
} else {
|
||||||
|
language = nodeLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
[languages addObject:language];
|
||||||
}
|
}
|
||||||
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
|
|
||||||
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
|
NSString *preferredLanguage = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
|
||||||
if (i == NSNotFound) {
|
if (preferredLanguage == nil) {
|
||||||
i = 0;
|
SULog(SULogLevelError, @"Error: Failed to obtain preferred localizations from %@ for node %@.", languages, name);
|
||||||
|
|
||||||
|
return [nodes objectAtIndex:0];
|
||||||
}
|
}
|
||||||
return [nodes objectAtIndex:i];
|
|
||||||
|
NSUInteger preferredLanguageIndex = [languages indexOfObject:preferredLanguage];
|
||||||
|
if (preferredLanguageIndex == NSNotFound) {
|
||||||
|
SULog(SULogLevelError, @"Error: Failed to find preferred language index for %@ for node %@.", preferredLanguage, name);
|
||||||
|
|
||||||
|
return [nodes objectAtIndex:0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [nodes objectAtIndex:preferredLanguageIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (SUAppcast *)copyByFilteringItems:(BOOL (^)(SUAppcastItem *))filterBlock
|
- (SUAppcast *)copyByFilteringItems:(BOOL (^)(SUAppcastItem *))filterBlock
|
||||||
|
|||||||
@@ -2,16 +2,53 @@
|
|||||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
|
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
|
||||||
<channel>
|
<channel>
|
||||||
<title>For unit test only</title>
|
<title>For unit test only</title>
|
||||||
<!-- A release testing localized release notes -->
|
<!-- Releases testing localized release notes -->
|
||||||
|
|
||||||
|
<!-- test other localization before implicit English !-->
|
||||||
|
<item>
|
||||||
|
<title>Version 6.3</title>
|
||||||
|
<sparkle:version>6.3</sparkle:version>
|
||||||
|
<sparkle:channel>english-later-implicit</sparkle:channel>
|
||||||
|
<pubDate>Sat, 26 Jul 2019 15:20:13 +0000</pubDate>
|
||||||
|
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" />
|
||||||
|
<sparkle:releaseNotesLink xml:lang="es">https://sparkle-project.org/notes.es.html</sparkle:releaseNotesLink>
|
||||||
|
<sparkle:releaseNotesLink>https://sparkle-project.org/notes.en.html</sparkle:releaseNotesLink>
|
||||||
|
<sparkle:minimumSystemVersion>2.0.0</sparkle:minimumSystemVersion>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- test implicit English before other localization !-->
|
||||||
|
<item>
|
||||||
|
<title>Version 6.2</title>
|
||||||
|
<sparkle:version>6.2</sparkle:version>
|
||||||
|
<sparkle:channel>english-first-implicit</sparkle:channel>
|
||||||
|
<pubDate>Sat, 26 Jul 2019 15:20:13 +0000</pubDate>
|
||||||
|
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" />
|
||||||
|
<sparkle:releaseNotesLink>https://sparkle-project.org/notes.en.html</sparkle:releaseNotesLink>
|
||||||
|
<sparkle:releaseNotesLink xml:lang="es">https://sparkle-project.org/notes.es.html</sparkle:releaseNotesLink>
|
||||||
|
<sparkle:minimumSystemVersion>2.0.0</sparkle:minimumSystemVersion>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- test English before other localization !-->
|
||||||
|
<item>
|
||||||
|
<title>Version 6.1</title>
|
||||||
|
<sparkle:version>6.1</sparkle:version>
|
||||||
|
<sparkle:channel>english-first</sparkle:channel>
|
||||||
|
<pubDate>Sat, 26 Jul 2019 15:20:13 +0000</pubDate>
|
||||||
|
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" />
|
||||||
|
<sparkle:releaseNotesLink xml:lang="en">https://sparkle-project.org/notes.en.html</sparkle:releaseNotesLink>
|
||||||
|
<sparkle:releaseNotesLink xml:lang="es">https://sparkle-project.org/notes.es.html</sparkle:releaseNotesLink>
|
||||||
|
<sparkle:minimumSystemVersion>2.0.0</sparkle:minimumSystemVersion>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- test other localization before English !-->
|
||||||
<item>
|
<item>
|
||||||
<title>Version 6.0</title>
|
<title>Version 6.0</title>
|
||||||
<sparkle:version>6.0</sparkle:version>
|
<sparkle:version>6.0</sparkle:version>
|
||||||
|
<sparkle:channel>english-later</sparkle:channel>
|
||||||
<pubDate>Sat, 26 Jul 2019 15:20:13 +0000</pubDate>
|
<pubDate>Sat, 26 Jul 2019 15:20:13 +0000</pubDate>
|
||||||
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" />
|
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" />
|
||||||
<sparkle:releaseNotesLink>https://sparkle-project.org/#works</sparkle:releaseNotesLink>
|
<sparkle:releaseNotesLink xml:lang="es">https://sparkle-project.org/notes.es.html</sparkle:releaseNotesLink>
|
||||||
<sparkle:releaseNotesLink xml:lang='en'>
|
<sparkle:releaseNotesLink xml:lang="en">https://sparkle-project.org/notes.en.html</sparkle:releaseNotesLink>
|
||||||
https://sparkle-project.org/#localized_notes_link_works
|
|
||||||
</sparkle:releaseNotesLink>
|
|
||||||
<sparkle:minimumSystemVersion>2.0.0</sparkle:minimumSystemVersion>
|
<sparkle:minimumSystemVersion>2.0.0</sparkle:minimumSystemVersion>
|
||||||
</item>
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
|
|||||||
@@ -869,15 +869,51 @@ class SUAppcastTest: XCTestCase {
|
|||||||
ofType: "xml")!
|
ofType: "xml")!
|
||||||
let testFileUrl = URL(fileURLWithPath: testFile)
|
let testFileUrl = URL(fileURLWithPath: testFile)
|
||||||
XCTAssertNotNil(testFileUrl)
|
XCTAssertNotNil(testFileUrl)
|
||||||
|
|
||||||
|
let preferredLanguage = Bundle.preferredLocalizations(from: ["en", "es"])[0]
|
||||||
|
|
||||||
|
NSLog("Using preferred locale %@", preferredLanguage)
|
||||||
|
|
||||||
|
let expectedReleaseNotesLink = (preferredLanguage == "es") ? "https://sparkle-project.org/notes.es.html" : "https://sparkle-project.org/notes.en.html"
|
||||||
|
|
||||||
do {
|
do {
|
||||||
let testFileData = try Data(contentsOf: testFileUrl)
|
let testFileData = try Data(contentsOf: testFileUrl)
|
||||||
|
|
||||||
let stateResolver = SPUAppcastItemStateResolver(hostVersion: "1.0", applicationVersionComparator: SUStandardVersionComparator.default, standardVersionComparator: SUStandardVersionComparator.default)
|
let stateResolver = SPUAppcastItemStateResolver(hostVersion: "1.0", applicationVersionComparator: SUStandardVersionComparator.default, standardVersionComparator: SUStandardVersionComparator.default)
|
||||||
|
|
||||||
let appcast = try SUAppcast(xmlData: testFileData, relativeTo: testFileUrl, stateResolver: stateResolver)
|
let fullAppcast = try SUAppcast(xmlData: testFileData, relativeTo: testFileUrl, stateResolver: stateResolver)
|
||||||
let items = appcast.items
|
|
||||||
XCTAssertEqual("https://sparkle-project.org/#localized_notes_link_works", items[0].releaseNotesURL!.absoluteString)
|
do {
|
||||||
|
let appcast = SUAppcastDriver.filterAppcast(fullAppcast, forMacOSAndAllowedChannels: ["english-later"])
|
||||||
|
let items = appcast.items
|
||||||
|
XCTAssertEqual(items.count, 1)
|
||||||
|
XCTAssertEqual(items[0].versionString, "6.0")
|
||||||
|
XCTAssertEqual(expectedReleaseNotesLink, items[0].releaseNotesURL!.absoluteString)
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
let appcast = SUAppcastDriver.filterAppcast(fullAppcast, forMacOSAndAllowedChannels: ["english-first"])
|
||||||
|
let items = appcast.items
|
||||||
|
XCTAssertEqual(items.count, 1)
|
||||||
|
XCTAssertEqual(items[0].versionString, "6.1")
|
||||||
|
XCTAssertEqual(expectedReleaseNotesLink, items[0].releaseNotesURL!.absoluteString)
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
let appcast = SUAppcastDriver.filterAppcast(fullAppcast, forMacOSAndAllowedChannels: ["english-first-implicit"])
|
||||||
|
let items = appcast.items
|
||||||
|
XCTAssertEqual(items.count, 1)
|
||||||
|
XCTAssertEqual(items[0].versionString, "6.2")
|
||||||
|
XCTAssertEqual(expectedReleaseNotesLink, items[0].releaseNotesURL!.absoluteString)
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
let appcast = SUAppcastDriver.filterAppcast(fullAppcast, forMacOSAndAllowedChannels: ["english-later-implicit"])
|
||||||
|
let items = appcast.items
|
||||||
|
XCTAssertEqual(items.count, 1)
|
||||||
|
XCTAssertEqual(items[0].versionString, "6.3")
|
||||||
|
XCTAssertEqual(expectedReleaseNotesLink, items[0].releaseNotesURL!.absoluteString)
|
||||||
|
}
|
||||||
} catch let err as NSError {
|
} catch let err as NSError {
|
||||||
NSLog("%@", err)
|
NSLog("%@", err)
|
||||||
XCTFail(err.localizedDescription)
|
XCTFail(err.localizedDescription)
|
||||||
|
|||||||
@@ -56,7 +56,18 @@ func unarchiveUpdates(archivesSourceDir: URL, archivesDestDir: URL, disableNeste
|
|||||||
// so we can ignore duplicate archive entries before trying to unarchive archives in parallel
|
// so we can ignore duplicate archive entries before trying to unarchive archives in parallel
|
||||||
var fileEntries: [URL: URL] = [:]
|
var fileEntries: [URL: URL] = [:]
|
||||||
let dir = try fileManager.contentsOfDirectory(atPath: archivesSourceDir.path)
|
let dir = try fileManager.contentsOfDirectory(atPath: archivesSourceDir.path)
|
||||||
for item in dir.filter({ !$0.hasPrefix(".") && !$0.hasSuffix(".delta") && !$0.hasSuffix(".xml") && !$0.hasSuffix(".html") && !$0.hasSuffix(".txt") }) {
|
for item in dir {
|
||||||
|
if item.hasPrefix(".") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
let itemURL = archivesSourceDir.appendingPathComponent(item)
|
||||||
|
let fileExtension = itemURL.pathExtension
|
||||||
|
// Note: keep this list in sync with SUPipedUnarchiver
|
||||||
|
guard ["zip", "tar", "gz", "tgz", "bz2", "tbz", "xz", "txz", "lzma", "dmg"].contains(fileExtension) else {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
let itemPath = archivesSourceDir.appendingPathComponent(item)
|
let itemPath = archivesSourceDir.appendingPathComponent(item)
|
||||||
|
|
||||||
// Ignore directories
|
// Ignore directories
|
||||||
|
|||||||
Reference in new issue
Block a user