mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c94eac3673 | ||
|
|
acea9b0d1d | ||
|
|
3b15ab08e1 | ||
|
|
02d5d44ffd | ||
|
|
1daba4d60f | ||
|
|
910f6a5966 | ||
|
|
5ed577fe78 | ||
|
|
d37bea0e67 | ||
|
|
5ca9c2fbbe | ||
|
|
bc1dc3ebf1 | ||
|
|
b9f6e9c8ae | ||
|
|
a30d745158 | ||
|
|
aa916f4bfe | ||
|
|
b820e4f288 | ||
|
|
2beaa9602c | ||
|
|
4953a96658 | ||
|
|
d47560283c | ||
|
|
b57ca4769c | ||
|
|
01b1ce7b9c | ||
|
|
32e59c6ea4 | ||
|
|
941a65f78f | ||
|
|
bd046ab1ad | ||
|
|
ebfb5f82b2 | ||
|
|
8039ce9862 | ||
|
|
26818ca11d | ||
|
|
1dcb87cc44 | ||
|
|
313daa4711 | ||
|
|
86278a2f32 | ||
|
|
a91749781d | ||
|
|
b52291cfc6 | ||
|
|
d5d9824b6c | ||
|
|
d487361cb9 | ||
|
|
5e906948f3 | ||
|
|
48ab89338b | ||
|
|
1c09a01ef9 | ||
|
|
4094dc3e83 | ||
|
|
d25e96f220 | ||
|
|
12531b635d | ||
|
|
bb645e9832 | ||
|
|
e24212f797 | ||
|
|
6b97e4a533 | ||
|
|
3956a27bd0 | ||
|
|
8a4578fe4d | ||
|
|
3c7b0805e1 | ||
|
|
d81139830e | ||
|
|
b6b704ea55 | ||
|
|
77fc6ca681 | ||
|
|
46c22e2bbf | ||
|
|
92d7b9f68f | ||
|
|
6b6b6b2405 | ||
|
|
b854b01e6a | ||
|
|
61e16cf276 | ||
|
|
e7088fc788 | ||
|
|
54aa6f2cc2 | ||
|
|
acf758e485 | ||
|
|
ceedfba634 | ||
|
|
addedeac13 | ||
|
|
eedb0ff0dd | ||
|
|
67a7bc3d62 | ||
|
|
65d7c38ab6 | ||
|
|
5b786043c2 | ||
|
|
ca23238d59 | ||
|
|
fc1870cbd2 | ||
|
|
659aec4eaf | ||
|
|
88a197a7f0 | ||
|
|
9119d287ab | ||
|
|
7797a8f58c | ||
|
|
1f0da95e59 | ||
|
|
84a2feb0ad | ||
|
|
bbe75fc6f2 | ||
|
|
9c8e08b7ae | ||
|
|
371c51fe5a | ||
|
|
feb2ad4b64 | ||
|
|
1e75acb963 | ||
|
|
b3c69f8b8c | ||
|
|
5cd9bdccf6 | ||
|
|
12eede4123 | ||
|
|
9633a57c6c | ||
|
|
ab389260be | ||
|
|
abf70ab8dc | ||
|
|
67ebc6ff74 | ||
|
|
1e14f7d7b6 | ||
|
|
5bd4c1ecb6 | ||
|
|
406f3da615 | ||
|
|
302eb082d6 | ||
|
|
16b75653dc | ||
|
|
fc8176a229 | ||
|
|
502c7fb6db | ||
|
|
71f747aec1 | ||
|
|
aebb767cfb | ||
|
|
04b1514452 | ||
|
|
22f9c96a1f | ||
|
|
78b08a0bee | ||
|
|
6fc58a1025 | ||
|
|
dbd2b9b30a |
No files matched your search
@@ -1,45 +0,0 @@
|
||||
AccessModifierOffset: -4
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackParameters: true
|
||||
BreakBeforeBinaryOperators: true
|
||||
BreakBeforeBraces: Linux
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 0
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: false
|
||||
#DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
#ForEachMacros: foreach,Q_FOREACH
|
||||
IndentCaseLabels: true
|
||||
IndentFunctionDeclarationAfterType: true
|
||||
IndentWidth: 4
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
Language: Cpp
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: All
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
#PointerAlignment: Right
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
Standard: Cpp03
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
name: Enhancements and Bug Fixes
|
||||
about: Found a bug? Want to implement a new feature?
|
||||
title: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
[provide general summary to the issue or enhancement and its rationale]
|
||||
|
||||
## Possible Fix
|
||||
|
||||
[not obligatory, but suggest fixes or reasons for the bug]
|
||||
|
||||
## Version
|
||||
|
||||
[please specify versions of Sparkle this is applicable to; note new pull requests must be developed and landed in 2.x development branch first]
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Sparkle 1.x doesn't work in my app
|
||||
about: Problems with integration, unexpected errors
|
||||
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
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Sparkle 2.x doesn't work in my app
|
||||
about: Problems with using the beta version of Sparkle 2
|
||||
title: ''
|
||||
labels: '2.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
|
||||
@@ -1,29 +0,0 @@
|
||||
(Insert summary of your pull request here)
|
||||
|
||||
Fixes # (issue)
|
||||
|
||||
## Checklist:
|
||||
|
||||
- [ ] My change is being tested and reviewed against the Sparkle 2.x branch. New changes must be developed on the 2.x development branch first.
|
||||
- [ ] My change is being backported to master branch (Sparkle 1.x), if deemed necessary. Please create a separate pull request for 1.x, should it be backported.
|
||||
- [ ] I have reviewed and commented my code, particularly in hard-to-understand areas.
|
||||
|
||||
## Type of change
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] My change is or requires a documentation or localization update
|
||||
|
||||
## Testing
|
||||
|
||||
I tested and verified my change by using one or multiple of these methods:
|
||||
|
||||
- [ ] Sparkle Test App
|
||||
- [ ] Unit Tests
|
||||
- [ ] My own app
|
||||
- [ ] Other (please specify)
|
||||
|
||||
(Describe all the cases that were tested)
|
||||
|
||||
macOS version tested: [place version here]
|
||||
@@ -1,67 +0,0 @@
|
||||
name: Build & Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 2.x, master ]
|
||||
pull_request:
|
||||
branches: [ 2.x, master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
xcode: ['xcode12.5.1', 'xcode13.1']
|
||||
include:
|
||||
- xcode: 'xcode12.5.1'
|
||||
xcode-path: '/Applications/Xcode_12.5.1.app/Contents/Developer'
|
||||
upload-dist: false
|
||||
- xcode: 'xcode13.1'
|
||||
xcode-path: '/Applications/Xcode_13.1.app/Contents/Developer'
|
||||
upload-dist: true
|
||||
|
||||
name: Build and Test Sparkle
|
||||
runs-on: macos-11
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- name: Build Unit Tests
|
||||
env:
|
||||
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
||||
run: |
|
||||
xcodebuild build-for-testing -project Sparkle.xcodeproj -scheme Distribution -enableCodeCoverage YES -derivedDataPath build
|
||||
- name: Run Unit Tests
|
||||
env:
|
||||
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
||||
run: |
|
||||
xcodebuild test-without-building -project Sparkle.xcodeproj -scheme Distribution -enableCodeCoverage YES -derivedDataPath build
|
||||
- name: Build UI Tests
|
||||
env:
|
||||
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
||||
run: |
|
||||
xcodebuild build-for-testing -project Sparkle.xcodeproj -scheme UITests -configuration Debug -derivedDataPath build
|
||||
- name: Run UI Tests
|
||||
env:
|
||||
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
||||
run: |
|
||||
xcodebuild test-without-building -project Sparkle.xcodeproj -scheme UITests -configuration Debug -derivedDataPath build
|
||||
- name: Build Release Distribution
|
||||
env:
|
||||
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
||||
run: |
|
||||
xcodebuild build -project Sparkle.xcodeproj -scheme Distribution -configuration Release -derivedDataPath build
|
||||
- name: Archive Test Results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build-logs
|
||||
path: build/Logs
|
||||
- name: Upload Distribution
|
||||
if: ${{ success() && matrix.upload-dist }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Sparkle-distribution-${{ matrix.xcode }}.tar.xz
|
||||
path: build/Build/Products/Release/sparkle-dist.tar.xz
|
||||
@@ -1,100 +0,0 @@
|
||||
name: "Create Draft Release"
|
||||
|
||||
env:
|
||||
BUILDDIR: "build"
|
||||
DEVELOPER_DIR: "/Applications/Xcode_13.1.app/Contents/Developer"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
marketingVersion:
|
||||
description: "Marketing Version"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
prereleaseSuffix:
|
||||
description: "Pre-release Suffix"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
buildVersion:
|
||||
description: "Product Build"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
concurrency:
|
||||
group: publish-release-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: "Publish binaries for release"
|
||||
runs-on: macos-11
|
||||
|
||||
steps:
|
||||
- name: "Checkout sources"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Extract latest changes from CHANGELOG"
|
||||
run: |
|
||||
./Configurations/generate_latest_changes.py > latest-changes.txt
|
||||
|
||||
- name: "Overwrite project versions in project"
|
||||
run: |
|
||||
IFS='.' read major minor patch <<< "${{ github.event.inputs.marketingVersion }}"
|
||||
sed -E -i '' "s/SPARKLE_VERSION_MAJOR =.+/SPARKLE_VERSION_MAJOR = $major/g" ./Configurations/ConfigCommon.xcconfig
|
||||
sed -E -i '' "s/SPARKLE_VERSION_MINOR =.+/SPARKLE_VERSION_MINOR = $minor/g" ./Configurations/ConfigCommon.xcconfig
|
||||
sed -E -i '' "s/SPARKLE_VERSION_PATCH =.+/SPARKLE_VERSION_PATCH = $patch/g" ./Configurations/ConfigCommon.xcconfig
|
||||
|
||||
if [[ ! -z "${{ github.event.inputs.prereleaseSuffix }}" ]]; then
|
||||
sed -E -i '' "s/SPARKLE_VERSION_SUFFIX =.*/SPARKLE_VERSION_SUFFIX = ${{ github.event.inputs.prereleaseSuffix }}/g" ./Configurations/ConfigCommon.xcconfig
|
||||
else
|
||||
sed -E -i '' "s/SPARKLE_VERSION_SUFFIX =.*/SPARKLE_VERSION_SUFFIX =/g" ./Configurations/ConfigCommon.xcconfig
|
||||
fi
|
||||
|
||||
sed -E -i '' "s/CURRENT_PROJECT_VERSION =.+/CURRENT_PROJECT_VERSION = ${{ github.event.inputs.buildVersion }}/g" ./Configurations/ConfigCommon.xcconfig
|
||||
git add ./Configurations/ConfigCommon.xcconfig
|
||||
|
||||
- name: "Determine if this is a pre-release version"
|
||||
run: |
|
||||
if [[ ! -z "${{ github.event.inputs.prereleaseSuffix }}" ]]; then
|
||||
echo "PRERELEASE_VERSION=true" >> $GITHUB_ENV
|
||||
else
|
||||
echo "PRERELEASE_VERSION=false" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: "Set up git and create tag"
|
||||
run: |
|
||||
git config user.name Sparkle-Bot
|
||||
git config user.email sparkle.project.bot@gmail.com
|
||||
git tag "${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
|
||||
|
||||
- name: "Build release distribution"
|
||||
run: make release
|
||||
env:
|
||||
GITHUB_ACTOR: ${{ github.actor }}
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
|
||||
|
||||
- name: "Push the updated Swift package description"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
|
||||
run: git push
|
||||
|
||||
- name: "Draft a release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
prerelease: ${{ env.PRERELEASE_VERSION }}
|
||||
name: "Sparkle ${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
|
||||
tag_name: "${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
|
||||
fail_on_unmatched_files: true
|
||||
token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
|
||||
body_path: latest-changes.txt
|
||||
files: |
|
||||
build/Build/Products/Release/Sparkle-*.tar.xz
|
||||
build/Build/Products/Release/Sparkle-for-Swift-Package-Manager.zip
|
||||
+7
-36
@@ -1,4 +1,5 @@
|
||||
build/
|
||||
# Xcode
|
||||
build/*
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
@@ -7,41 +8,11 @@ build/
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.xcworkspace
|
||||
!default.xcworkspace
|
||||
xcuserdata/
|
||||
profile
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.xcuserstate
|
||||
|
||||
## Ignore incredibly annoying .DS_Store files
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# With Carthage, if Sparkle is included as a Git submodule (e.g. with the
|
||||
# --use-submodules option), the main module's .gitignore can't reach all the
|
||||
# way inside the submodule to ignore the added Carthage/Build symlink, and Git
|
||||
# keeps complaining about untracked changes in the submodule forever, which
|
||||
# is very annoying. To avoid that issue, ignore here in Sparkle instead.
|
||||
Carthage/Build
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Swift Package Manager
|
||||
/.build
|
||||
.swiftpm
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "Vendor/ed25519"]
|
||||
path = Vendor/ed25519
|
||||
url = https://github.com/orlp/ed25519
|
||||
@@ -1,20 +0,0 @@
|
||||
excluded:
|
||||
- Vendor
|
||||
disabled_rules:
|
||||
- opening_brace
|
||||
- empty_parentheses_with_trailing_closure
|
||||
- function_body_length
|
||||
- line_length
|
||||
- cyclomatic_complexity
|
||||
- large_tuple
|
||||
|
||||
# Rule-specific config
|
||||
trailing_comma:
|
||||
mandatory_comma: true
|
||||
force_try:
|
||||
severity: warning
|
||||
force_cast:
|
||||
severity: warning
|
||||
identifier_name:
|
||||
min_length:
|
||||
warning: 2
|
||||
@@ -1,711 +0,0 @@
|
||||
# 1.27.3
|
||||
|
||||
* Create and use temp extraction directory in generate_appcast again (#2556) (Zorg)
|
||||
|
||||
# 1.27.2
|
||||
|
||||
* Extract archives in a separate directory from the input archive (#2552) (Zorg)
|
||||
* Fix incorrect xz log warning in make release (#2044) (trss)
|
||||
|
||||
# 1.27.1
|
||||
|
||||
* Use px instead of pt when specifying font size to fix default font size in WebView from #1962 (regressed in 1.25.0 with WKWebView adoption) (Daniel Jalkut)
|
||||
* Fix to prevent Sparkle manipulating the host app's high level WebView defaults from #1961 (affecting only macOS versions before 10.11 in 1.x branch) (Daniel Jalkut)
|
||||
* Add safer handling of applying binary delta files from #1990 (Zorg)
|
||||
* Don't use current date unless necessary when scheduling next update from #1991 (Zorg)
|
||||
* Whitelist about:srcdoc as a safe web URL from #1938, #2007 (Louis Pontoise, Zorg)
|
||||
* Backport not hiding update window on deactivation from #2008 (Zorg)
|
||||
|
||||
# 1.27.0
|
||||
|
||||
* Deprecate not using EdDSA and skip DSA verification when possible in #1892 (Zorg)
|
||||
* Pass http headers and user agent when downloading release notes from #1873 (Zorg)
|
||||
* Fix project warnings from #1893 (Zorg)
|
||||
* Update sample appcast from #1895 (Zorg)
|
||||
* Fix appcast pubDate tag generation in different locales from #1898 (Sungbin Jo)
|
||||
* Create valid xar archives for generating binary delta files from #1906 (Zorg)
|
||||
* Fix a few issues with German localization from #1931 (J-rg)
|
||||
* Fix issues with Russian localizations from #1947 (Konstantin Zamyakin)
|
||||
* Fix issues with Czech localizations from #1943 (Vojtěch Koňařík)
|
||||
* Add an automated workflow that builds and publishes official Sparkle releases (Tony Arnold, Zorg)
|
||||
|
||||
# 1.26.0
|
||||
|
||||
* Flat package support from #1745 (Zorg)
|
||||
* Correct generate_appcast -s command line argument usage help (Lance Lovette)
|
||||
* Fix -f command line argument handling (Lance Lovette)
|
||||
* Fix progress for guided pkg install (Zorg)
|
||||
* Fix XQuartz update failing because NSLog caused issues (Zorg)
|
||||
* Update localization (Vojtěch Koňařík)
|
||||
* Various fixes to SPM logic (Jonas Zaugg)
|
||||
|
||||
# 1.25.0
|
||||
|
||||
* Raise minimum system version to 10.9 (Kornel)
|
||||
* Allow an appcast to prevent the new version from being installed automatically (#1688) (pierswalter)
|
||||
* UI fixes
|
||||
* Show check for updates button only when automatic updates are enabled (Lorena Rangel)
|
||||
* Don't initialize the webview if we don't show release notes (Tobias Fonfara)
|
||||
* Keep skip button available if there is a minimum autoupdate version (Zorg)
|
||||
* Fix automatic updates checkbox state when not showing release notes (Zorg)
|
||||
* Fix edge cases with hiding alert buttons and using "Install Later" (Zorg)
|
||||
* Re-add setting WebUIDelegate fix for legacy web view (Zorg)
|
||||
* Adopt WKWebView for 1.x (Zorg)
|
||||
* Add auto layout constraints to SUAutomaticUpdateAlert window (Zorg)
|
||||
* Made buttons wide enough to display the full text. Made window wide enough to display the widened buttons (el, fi, ru, uk) (Piers Uso Walter)
|
||||
* Remove max size from update alert. (George Nachman)
|
||||
* Integrate generate_keys export/import options changes from #1730 (Zorg)
|
||||
* Add `—release-notes-url-prefix` support to localized release notes (Adam Tharani)
|
||||
* Translations
|
||||
* Enable base internalization for alert xibs (Zorg)
|
||||
* Capitalizes french translation of "Vous utilisez actuellement..." ("You are currently running...") (Micah Moore)
|
||||
* Fix and cleanup Hebrew, Catalan, Finnish localizations (Zorg)
|
||||
* Remove non-english localizations from TestApplication (Zorg)
|
||||
* Fix catch-22 Swift Package Manager binary target (Jonas Zaugg)
|
||||
* Add explicit dependencies to fix Xcode linking errors (Kornel)
|
||||
* Add phased rollouts feature to automatic update driver too (Zorg)
|
||||
* Remove hiding skip button and retitling later button (Zorg)
|
||||
* Deprecate installUpdatesIfAvailable (Zorg)
|
||||
* Apply custom headers to app download (Geraint White)
|
||||
|
||||
# 1.24.0
|
||||
|
||||
* Prioritize UserDefaults when fetching value for EnableAutomaticChecks (Nicolas Bosi)
|
||||
* Improve best appcast item selection handling (Ian Bytchek)
|
||||
* Create lockfile for improved compatibility with 3rd party updaters (CoreCode)
|
||||
* Enable SPM support via binary target (Jonas Zaugg)
|
||||
* `generate_appcast` improvements:
|
||||
* follow symbolic links (Denis Dzyubenko)
|
||||
* update the release notes element’s URL when required (Brad Andalman)
|
||||
* Added output filename option to generate_appcast (Brad Andalman)
|
||||
* Added —release-notes-url-prefix to generate_appcast (Brad Andalman)
|
||||
* Command line option to provide a download url prefix is now parsed and set on each archive item (Dominik H)
|
||||
* Added help command line option (Dominik H)
|
||||
* Locale updates:
|
||||
* Update zh_CN localization (柳东原 · Dongyuan Liu)
|
||||
* Update Sparkle.strings (Vojtěch Koňařík)
|
||||
* Update Croatian (#1603) (milotype)
|
||||
* Update SUUpdateAlert.xib (DanielFirlej)
|
||||
* fix: read SUAutomaticallyUpdate from Info.plist (Trevor DeVore)
|
||||
* Fix casting Boolean to BOOL on Apple Silicon (Kevin Wojniak)
|
||||
* Use build matrix to test on multiple Xcode versions (Rajiv Shah)
|
||||
* Set UpdateAlert and AutomaticUpdateAlert window's fullscreen collectionBehavior to NSWindowCollectionBehaviorFullScreenAuxiliary to allow them to present on top of the Main App's window if it's fullscreen. (Micah Moore)
|
||||
* Fixed error about "about:blank" release notes (Louis Pontoise)
|
||||
* Support App Store URL scheme in release note webview (Bi11)
|
||||
* Use the SHA-256 hash of the archive as the cache path (Nate Weaver)
|
||||
* Don't return an optional from the FileHandle method (Nate Weaver)
|
||||
* Added URL+Hashing (Nate Weaver)
|
||||
|
||||
# 1.23.0
|
||||
|
||||
* Support generating appcast with localizations (#1499) (Alik Vovkotrub)
|
||||
* Support versions with git commit SHA (#1504) (Alec Larson)
|
||||
* Hide "Skip..." and "Remind..." buttons when they're not relevant (#1480) (Kenneth Johnsen)
|
||||
* Preserve Finder tags while updating apps (#1512) (CoreCode)
|
||||
* Read-only update alert dialog formatting improvements (#1515) (Quinn Taylor)
|
||||
* Check if `SUBundleName` is set before normalizing (Jake Fenton)
|
||||
* `NSInteger` cast warning on Xcode 11 (Marga Keuvelaar)
|
||||
* Correct appcast file extension (Tom Vos)
|
||||
* Update Sparkle.strings (Emir Sarı)
|
||||
* Fix spelling (#1508) (Frank Chiarulli Jr)
|
||||
|
||||
# 1.22.0
|
||||
|
||||
* Enabled "Hardened Runtime" build option for Apple's notarization requirement
|
||||
* Add delegate methods to suppress update alerts (George Nachman)
|
||||
* Improved error when running from translocated location (Michael Buckley)
|
||||
* Add phased rollout feature (#1381) (Fabian Jäger)
|
||||
* Ignore non-standard permissions in delta updates instead of failing the build (Kornel Lesiński)
|
||||
* Notify user when installed version is newer than the latest in the appcast (CoreCode)
|
||||
* Reset timers after computer sleep (CoreCode)
|
||||
* Block-based alternatives to `NSInvocation`-based delegate methods (Fabian Jäger)
|
||||
* Add delegate `userDidSkipThisVersion` (BobZombie, Leo Natan, bono yusuke)
|
||||
* Pass item to updaterShouldShowUpdateAlertForScheduledUpdate delegate method (George Nachman)
|
||||
* Support providing private key as argument in `generate_appcast` (Yakuhzi, marchyang)
|
||||
* Separate the ed25519 sources into a new static library (Tony Arnold)
|
||||
* Disambiguate signing error messages (Nate Weaver)
|
||||
* Use `XMLNode.Options.nodePrettyPrint` in `generate_appcast` instead of trying to add whitespace manually (fumoboy007)
|
||||
* Annotate SUHost for nullability (Michael Buckley)
|
||||
* Use SUAVAILABLE macro (Christiaan Hofman)
|
||||
* Fix warnings when using modules (nivekkagicom)
|
||||
* Correction of Czech localization inconsistency (#1403) (vojtakonarik)
|
||||
* BR locale fix (BR Lingo)
|
||||
* Update Japanese localization (fujisoft)
|
||||
* French Sparkle.strings (Jean-Baptiste)
|
||||
|
||||
# 1.21.3
|
||||
|
||||
* Losslessly reduced the size of PNG (Barijaona Ramaholimihaso)
|
||||
* Catch exceptions from subcommands (Julian Mayer)
|
||||
* `generate_appcast` can sign any bundles instead of just apps (Nate Weaver)
|
||||
* Check that effectiveAppearance is being observed before calling removeObserver (Pierluigi)
|
||||
|
||||
# 1.21.2
|
||||
|
||||
* Allow EdDSA for delta updates, too (Kornel)
|
||||
* Warning fixes (Brian Bergstrand)
|
||||
* Improvements to release notes view context menu and dark mode (Bi11)
|
||||
|
||||
# 1.21.0
|
||||
|
||||
* Added support EdDSA (ed25519) signatures (Kornel)
|
||||
* DSA signatures are considered outdated, and Apple's `Security.framework` only supports weaker SHA-1-based DSA.
|
||||
* Both old DSA and new EdDSA are still supported (and one app can use both), but new applications should use EdDSA only, and we recommend migrating away from DSA signatures.
|
||||
* `generate_keys` is now a Swift tool that stores EdDSA private keys in the Keychain
|
||||
* Existing apps can continue using their old DSA keys, but we've dropped support for generation of old DSA keys
|
||||
* `sign_update` is now a Swift tool that signs using EdDSA from private keys in the Keychain
|
||||
* The old DSA-based signing script has been moved to `bin/old_dsa_scripts`
|
||||
* The old DSA-based signing script has been fixed to work on pre-10.13 systems (Thomas Tempelmann)
|
||||
* `generate_appcast` has been updated to support EdDSA signatures
|
||||
* It can sign both DSA (if `dsa_priv.pem` file is specified) and EdDSA (from Keychain)
|
||||
* The tool now uses Caches directory and doesn't generate unnecessary delta files
|
||||
* Fixed verification of delta updates on filesystems that change permissions of symlinks
|
||||
* Fixed `NSURLSession` leak (Michael Ehrmann)
|
||||
|
||||
# 1.20.0
|
||||
|
||||
* `generate_appcast` option to read private key directly from the keychain (Tamás Lustyik)
|
||||
* Add delegate callbacks for fininshed download and extraction related events (Csaba Horony)
|
||||
* Don't check for updates if Do Not Disturb is on (Kornel)
|
||||
* Expose `CodesigningVerifier`, add codesign info API (sunuslee)
|
||||
* Threading fixes:
|
||||
* Fix potential hang with `dispatch_sync` to main thread (Brian Bergstrand)
|
||||
* Fix closeCheckingWindow called from background thread (Alexey Martemyanov)
|
||||
* Improve 'read-only' error message (#1192) (Adrian Thomas)
|
||||
* New Spanish localisation (Ken Arroyo Ohori)
|
||||
* Updated Finnish language resources (Jason Pollack)
|
||||
* Hungarian localization (Csaba Horony)
|
||||
* Log more information about authentication requests (Kornel)
|
||||
* Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10. Removed __has_feature(objc_generics) check and use generisc to help silence the warnings. (Kent Sutherland)
|
||||
* Fix binary delta creation on network drives (sagecook)
|
||||
* Fix compilation issues on Xcode 10 with new build system (Leo Natan)
|
||||
|
||||
# 1.19.0
|
||||
|
||||
* Refactoring of downloader code to avoid deprecated methods (Deadpikle)
|
||||
* Changes to which methods run on the main thread.
|
||||
Note: some delegate methods may be called on non-main thread now. (Kornel)
|
||||
* Update Japanese localization (1024jp)
|
||||
* Update Sparkle.strings (Stefan Paychère)
|
||||
* Fix Sparkle clients polling too frequently (Jonathan Bullard)
|
||||
* Handle SecTransformExecute errors (Kornel)
|
||||
* Silence Touch Bar availability warnings on Xcode 9 by using API_AVAILABLE. Disable gnu-zero-variadic-macro-arguments to prevent warnings from use of API_AVAILABLE. (Kent Sutherland)
|
||||
* 10.11 SDK compatibility (David Fuhrmann)
|
||||
|
||||
# 1.18.1
|
||||
|
||||
* Add optional updaterDidRelaunchApplication: method on SUUpdaterDelegate (#1115) (App Tyrant)
|
||||
* Implemented sparkle:os attribute as documented (Memphiz)
|
||||
* Additional termination detection in case kpoll fails. (fujisoft)
|
||||
* Included bin files in CocoaPods installation (Keith Smiley)
|
||||
* Updated Dutch localization (Eitot)
|
||||
* Updated German localization (Eitot)
|
||||
* Updated Japanese translation (1024jp)
|
||||
* Updated Portuguese translation (Victor)
|
||||
* Updated to Xcode 9/Swift 4
|
||||
|
||||
# 1.18.0
|
||||
|
||||
* Name of the host app is used in authorization prompt (the `SPARKLE_RELAUNCH_TOOL_NAME` setting is now obsolete)
|
||||
* More detailed progress bar for package installers (Kornel Lesiński)
|
||||
* Disabled the keyboard shortcut for the install button for scheduled updates to avoid accidental installs. (George Nachman)
|
||||
* generate_appcast tool adds release notes if there's an .html file with the same base name as the archive (Brett Walker)
|
||||
* Added `sparkle:shortVersionString` to the enclosure, #1032 (Brett Walker)
|
||||
* Fixed Japanese localization (1024jp)
|
||||
* Fixed escaping of system profile URLs
|
||||
* Added more logging in various failure cases (Kornel Lesiński)
|
||||
* Better error message for quarantined apps that can't be updated
|
||||
|
||||
# 1.17.0
|
||||
|
||||
* Added Touch Bar support (Bi11)
|
||||
* Upgraded SULog to use logging APIs that Apple provides built-in (Zorg)
|
||||
* Skip buttons are disabled if the update is marked as critical (Kornel Lesiński)
|
||||
* Background updates ask OS for lower-priority networking (Kornel Lesiński)
|
||||
* Refactorings to sync with upcoming 2.0
|
||||
* Added kqueue based termination listener (Zorg)
|
||||
* Added AppKit prevention guards to modules that shouldn't import it (Zorg)
|
||||
* Added Obj-C generics where applicable (Zorg)
|
||||
* Made SUBundleIcon & SUApplicationInfo take SUHost, not NSBundle (Zorg)
|
||||
* Improved -[SUHost objectForInfoDictionaryKey:] (Zorg)
|
||||
* Detect and fail if any two-way dependencies exist in the project (Zorg)
|
||||
* generate_appcast:
|
||||
* fixed handling of multiple directories in an archive
|
||||
* percent encode the filename used in the delta url (Brett Walker)
|
||||
* Update Sparkle.strings (BR Lingo)
|
||||
* Improved handling of non-ASCII names in delta archives (Kornel Lesiński)
|
||||
* Don't touch Info.plist unless git version changes (Václav Slavík)
|
||||
|
||||
# 1.16.0
|
||||
|
||||
* Guided package installs are now the default for updating packages (Zorg)
|
||||
- `pkg` installers won't show any UI. If you require the old behavior of showing a full installer window, rename the `*.pkg` file to `*.sparkle_interactive.pkg`
|
||||
* Previous version of the app is now deleted instead of staying in the trash (Zorg)
|
||||
* Added `generate_appcast` helper tool (Kornel Lesiński)
|
||||
* Made manual check resume pending automatic updates instead of starting a new update (Kornel Lesiński)
|
||||
* Started using `length` value from RSS if HTTP doesn't give one (Zorg)
|
||||
* Hidden automatic updates checkbox for information only updates (Bi11)
|
||||
* Added progressbar for DMG and binary delta extraction (Kornel Lesiński)
|
||||
* Fixed showing of download status if we attempt a 2nd download (Zorg)
|
||||
* Refactorings to sync with upcoming 2.0
|
||||
* Decoupled and simplified installation code using protocols (Zorg)
|
||||
* Added nullability annotations (Zorg)
|
||||
* Allowed delegate methods that return an object to return nil (Zorg)
|
||||
* Decreased responsibility of SUHost and moved code into other components (Zorg)
|
||||
* Removed Sparkle.pch and many file #includes (Zorg)
|
||||
|
||||
# 1.15.0
|
||||
|
||||
* A new icon! Thanks to 1024jp
|
||||
* Show alert when an update is sent over insecure HTTP with no DSA key (Zorg)
|
||||
- If you can't use HTTPS, you must at least sign updates with a DSA key.
|
||||
* Improved binary delta implementation (Zorg)
|
||||
* Added improved -validateMenuItem: as a method in SUUpdater.h for public use (Zorg)
|
||||
* Removed reachability preflight check (Zorg)
|
||||
* Clear update caches directory before downloading new update (Zorg)
|
||||
* Check the bundle's parent directory for writability too (Zorg)
|
||||
* Don't follow symbolic links for file operations (Zorg)
|
||||
* Don't bring up an authorized dialog during cleanup (Zorg)
|
||||
* Made Sparkle look for the highest compatible version regardless of timestamps (Zorg)
|
||||
* Fixed compatibility with 10.7
|
||||
* Fixed crash on 10.7 - subscript operator not available (kleuter)
|
||||
* Fixed warnings caused by -Wpartial-availability (Zorg)
|
||||
* Fixed german l10n. (Sebastian Volland)
|
||||
* Error code for download errors (Kornel Lesiński)
|
||||
* Update last update check date when the update driver finishes (Zorg)
|
||||
* Scale app icon up if needed in Software Update window (Nicholas Riley)
|
||||
* Don't register for termination notifications more than once (Zorg)
|
||||
* Don't terminate the app if we're already terminating (Zorg)
|
||||
* Removed SUEnableAutomaticChecksKeyOld and SUCheckAtStartup constants (Eitot)
|
||||
* Updated Sparkle framework headers to use modules if modules are available (B. Kevin Hardman)
|
||||
* Fixed warnings, fixed uses of SULocalizedString (Jerry Krinock)
|
||||
* Improved signing verifier to take any host and s/application/bundle/ (Zorg)
|
||||
* Improved Spotlight updates after delta extraction (Zorg)
|
||||
|
||||
# 1.14.0 (Mar 11, 2016)
|
||||
|
||||
* Disable javascript by default and make it opt-in (Zorg)
|
||||
* URL-encoding of appcast URLs is preserved (Kornel Lesiński)
|
||||
* Delegate is asked for fallback updates if delta update fails (Kornel Lesiński)
|
||||
* Fixed crash on 10.7 - subscript operator not available (kleuter)
|
||||
* Fixed check of feed URL before delegate had a chance to set it (Kornel Lesiński)
|
||||
* Re-added support for password-protected dmg images (Andrew K. Boyd)
|
||||
* Added warning about ATS blocking (Kornel Lesiński)
|
||||
* Translation fixes for pt-BR. (vitu)
|
||||
* Add some Japanese lozalized strings (1024jp)
|
||||
* Made test app available in all languages #695 (LIU Dongyuan / 柳东原)
|
||||
* Czech localizations update (Frantisek Erben)
|
||||
* Removed a test resource from the framework bundle (Karl Moskowski)
|
||||
* Test if the updated app is the frontmost one (Zorg)
|
||||
* UI Tests for the Test Application (Zorg)
|
||||
|
||||
# 1.13.1 (Jan 31, 2016)
|
||||
|
||||
Important security fixes:
|
||||
|
||||
* Prevent inclusion of local files via file:// XML entities
|
||||
* Disable redirects to non-HTTP URLs in release notes webview
|
||||
|
||||
# 1.13.0 (Dec 18, 2015)
|
||||
|
||||
* Changed framework's bundle ID from `org.andymatuschak.Sparkle` to `org.sparkle-project.Sparkle`.
|
||||
|
||||
# 1.12.0 (Dec 13, 2015)
|
||||
|
||||
* Rewritten file operations for updating an app (Zorg)
|
||||
- Ensuring atomic move operations, robust error handling.
|
||||
- Faster.
|
||||
- Using modern APIs where possible (no FSPathMakeRef, FSGetCatalogInfo, FSFindFolder, etc.)
|
||||
- Strong documentation, easier to read code.
|
||||
* Automatic updates won't be installed if the system is about to shut off (Zorg)
|
||||
* Deprecated serving over HTTP without DSA (Zorg)
|
||||
- Note that Apple has deprecated insecure HTTP in macOS 10.11
|
||||
* Improved Autoupdate application (Zorg)
|
||||
* Do all the installation work after the runloop is set up
|
||||
* TerminationListener only does termination listening now
|
||||
* Handle cases where host path is not installation path and host path is not desired executable path
|
||||
* Don't show Autoupdate dock icon if we shouldn't show UI
|
||||
* Update modification & access time for new update
|
||||
* Added installUpdatesIfAvailable (Ian Langworth)
|
||||
* Removed extensions from shell scripts (Jake Petroules)
|
||||
* Rewritten test app so it works again, and from a local web server (Zorg)
|
||||
* Replaced use of Python with built-in web server (Kevin Wojniak)
|
||||
* Set LD_RUNPATH_SEARCH_PATHS in Podspec (Jake Petroules)
|
||||
* Don't install automatic updates if the system might shut off (Zorg)
|
||||
* Don't show Autoupdate dock icon if we shouldn't show UI (Zorg)
|
||||
* Updated layout constraints when removing release notes (Zorg)
|
||||
* Improved BinaryDelta error handling & logging (Zorg)
|
||||
* Refactored quarantine removal (Zorg)
|
||||
* Fixed German localization (1024jp)
|
||||
* Updated zh_CN translation (LIU Dongyuan / 柳东原)
|
||||
* Updated Mac models list until July 2015 (Gabriel Ulici)
|
||||
* Updated Polish translation (Kornel Lesiński)
|
||||
* Updated Xcode project languages for which we have translations (Jake Petroules)
|
||||
* Updated XIB files (Kornel Lesiński)
|
||||
* Use NSByteCountFormatter if available (Jake Petroules)
|
||||
* Declared protocols on SUUpdateAlert for the 10.11 SDK (Daniel Jalkut)
|
||||
* Silenced warning about casting away const-ness and -Wassign-enum (Daniel Jalkut)
|
||||
* Added script to generate a report comparing the Sparkle.strings files (Kevin Wojniak)
|
||||
* Check for empty strings (as well as nil) in SUHost's -name method (Karl Moskowski)
|
||||
* Don't follow symlinks for checking file existence (Zorg)
|
||||
* Unit tests in Swift (Zorg, Jake Petroules)
|
||||
* Fixed framework imports (Felix Schulze)
|
||||
* Fixed issues with copying files from different mounted drives (Zorg)
|
||||
* Disallowed automatic updates when user can't write to the bundle (Zorg)
|
||||
* Set the task working directories instead of changing the process working directory (Kevin Wojniak)
|
||||
|
||||
# 1.11.1 (Nov 9, 2015)
|
||||
|
||||
* Don't install automatic updates when system is about to shut down
|
||||
|
||||
# 1.11.0 (Aug 24, 2015)
|
||||
|
||||
* Big improvements to code signing and DSA verification
|
||||
- Sparkle now checks not only whether an update is correctly signed, but also whether the updated version will be able to verify future updates. Updates now must either use DSA keys correctly, or not try to use them at all. Same goes for Apple Code Signing.
|
||||
- Rely on code signing and the DSA key in the new app instead of appcast. If the new app has a public DSA key, then the appcast item must have a DSA signature for the app, even if the app is code signed. (Zorg)
|
||||
* More verbose error message when DSA keys don't match (Kornel Lesiński)
|
||||
* Added delegate methods for pre-download and immediately post-failed-download (Isaac Greenspan)
|
||||
* Fix Lucida Grande is always used for release notes (LIU Dongyuan / 柳东原)
|
||||
* Only remove quarantine with setResourceValue: when it's present. Fixes "Unable to quarantine: 93" messages from showing up in the console. (Zorg)
|
||||
* Fixed const and nullability warnings (Jake Petroules, Kornel Lesiński)
|
||||
* Replaced deprecated NSRunAlertPanel/alertWithMessageText (Kevin Wojniak)
|
||||
* Imported the Foundation umbrella header in all the public headers (C.W. Betts)
|
||||
* pt-BR localization update (Victor Figueiredo)
|
||||
* Reject unsupported code-signing xattrs in binary delta (Zorg)
|
||||
* Fixed crash while applying delta update (antonc27)
|
||||
* Added logging of appcast/download URL on error (Kornel Lesiński)
|
||||
* More robust reading of Autoupdate.app path from Sparkle bundle
|
||||
|
||||
# 1.10.0 (Apr 26, 2015)
|
||||
|
||||
* Massive improvements to the BinaryDelta tool (Zorg)
|
||||
- Ability to track file permissions (Zorg)
|
||||
- Nicely formatted log output (Zorg)
|
||||
- Numerous bug fixes in handling of symlinks, empty directories, case-insensitive names, etc. (Zorg)
|
||||
- Refactored and modernized code (Zorg)
|
||||
- libxar is no longer weak-linked (C.W. Betts)
|
||||
* Double-check the code signature of the the app after installation (Isaac Wankerl)
|
||||
* Added headless guided package installation (Graham Miln)
|
||||
* Added ability to inject custom HTTP headers in appcast request (Mattias Gunneras)
|
||||
* Changes to make unarching more reliable (Zorg, Kornel Lesiński)
|
||||
* Have Sparkle build a framework module (C.W. Betts)
|
||||
* Stdout used for non error outputs (JDuquennoy)
|
||||
* French locale update (Kent Sutherland)
|
||||
|
||||
# 1.9.0 (Jan 26, 2015)
|
||||
|
||||
* Added SUUpdater delegate method for failures. (Benjamin Gordon)
|
||||
* Make the error definitions public (C.W. Betts)
|
||||
* Add support for lzma compressed tarballs (Kyle Fuller)
|
||||
* Back to SKIP_INSTALL=YES by default (Tony Arnold)
|
||||
* Properly set install names and rpaths for targets (Jake Petroules)
|
||||
* Use Library/Caches rather than app support directory (Kornel Lesiński)
|
||||
* Check for a modal window being onscreen before trying to put up the Sparkle prompt (Alf Watt)
|
||||
* Fixed crashes on 10.7 (Chris Campbell, Ger Teunis)
|
||||
* Fixed Sparkle tags parsing (Tamás Lustyik)
|
||||
* SULog code cleanups (Kevin Wojniak)
|
||||
* Make sure CFBundleVersion is a semantic version number. (Jake Petroules)
|
||||
* Replace typedef enums with typedef NS_ENUM to make Swift happier (C.W. Betts)
|
||||
* Fix warnings under Xcode 6.1 relating the SUUpdateAlert XIB (Tony Arnold)
|
||||
* Prefer string constants to strings (Jake Petroules)
|
||||
* Use Info.plist keys instead of macros (Jake Petroules)
|
||||
* Only export public symbols. (Jake Petroules)
|
||||
* BinaryDelta: avoid crash with bad paths (Jake Petroules)
|
||||
* Fixing Swedish translations (Erik Vikström)
|
||||
* Turkish localization fixes (Emir)
|
||||
* Proofing of Ukrainian localization (Vera Tkachenko)
|
||||
|
||||
# 1.8.0 (Jul 26, 2014)
|
||||
|
||||
* New SUDSAVerifier based on up-to-date macOS APIs (Zachary Waldowski)
|
||||
* Detailed error log for failed signature checks (Kornel Lesiński)
|
||||
* Converted Sparkle to ARC (C.W. Betts)
|
||||
* Converted ivars to properties. (Jake Petroules)
|
||||
* Cocoapod support (Xhacker Liu)
|
||||
* Quarantine removal on macOS 10.10 (C.W. Betts)
|
||||
* Updated Japanese localization (1024jp)
|
||||
* Added Greek localization
|
||||
|
||||
# 1.7.1 (Jul 2, 2014)
|
||||
|
||||
* Removed option to install unverified updates (Kornel Lesiński)
|
||||
* Added detailed log when code signing verification fails (Sam Deane)
|
||||
* Restored original Sparkle icon. (Jake Petroules)
|
||||
* Switched SUUpdateAlert.xib to AutoLayout (Kornel Lesiński)
|
||||
* Replace references to andymatuschak.org with sparkle-project.org. (Jake Petroules)
|
||||
* Several code cleanups, modernizations, fixed warnings and improved code formatting (Jake Petroules)
|
||||
* Make the repository significantly more organized. (Jake Petroules)
|
||||
* Xcode project: set organization name and class prefix. (Jake Petroules)
|
||||
* Link to Foundation and AppKit instead of Cocoa. (Jake Petroules)
|
||||
* Use new operatingSystemVersion API when available. (Jake Petroules)
|
||||
* Add .clang-format configuration file for source code formatting. (Jake Petroules)
|
||||
* Add a target to build Sparkle API documentation using Doxygen. (Jake Petroules)
|
||||
|
||||
# 1.7.0
|
||||
|
||||
* Dropped support for macOS 10.6. Sparkle now supports 10.7 and newer (including 10.10 Yosemite) on 64-bit Intel Macs (the last 32-bit Mac was released in 2006).
|
||||
* Removed use of deprecated functions (Zachary Waldowski)
|
||||
* Switched to modern Obj-C runtime and new literals syntax
|
||||
* Removed pre-10.7 code. (C.W. Betts)
|
||||
* Use more Blocks/libdispatch code. (C.W. Betts)
|
||||
* Cleaned up and improved security of `generate_keys`/`sign_update` scripts
|
||||
|
||||
# 1.6.1
|
||||
|
||||
* Removed archive password prompt (Kornel Lesiński)
|
||||
* (Re)fixes bug where URLs are naively double escaped (Andrew Madsen)
|
||||
* Fixed typo that caused crashes in BinaryDelta (Tamas Lustyik)
|
||||
* SUStandardVersionComparator.h is public (Vincent CARLIER)
|
||||
* Remove pre-10.6-specific code. (C.W. Betts)
|
||||
* Objective C 2 getters and setters. (C.W. Betts)
|
||||
* Define correct dependencies on locale scripts (Antonin Hildebrand)
|
||||
|
||||
# 1.6.0
|
||||
|
||||
* Cleaned up and deleted redundant strings files (Kornel Lesiński)
|
||||
* Modern Objective C syntax, properties where possible. (C.W. Betts)
|
||||
* Make SUAppcastDelegate a formal protocol. (C.W. Betts)
|
||||
* Fixed default font in release notes WebView (Kornel Lesiński)
|
||||
* Configurable name for finish_installation.app (Kornel Lesiński)
|
||||
* Removed code for 10.4 (Kornel Lesiński)
|
||||
* Convert all strings files to UTF-8 (UTF-16 must die) (Kornel Lesiński)
|
||||
* Removing GC target (Matt Thomas)
|
||||
* finish_installation.app and pkg files will not removed when we use *.pkg installer and restart system in the installer (Takayama Fumihiko)
|
||||
* Select Korean and Slovak for Sparkle.strings localization (Shon Frazier)
|
||||
* Updated the Romanian translation (Gabe)
|
||||
* pt-BR localization polishing (BR Lingo)
|
||||
* update zh_CN (61)
|
||||
* Shut up some warnings & make build with newer Xcode (Uli Kusterer)
|
||||
* Less unsafety with format strings (Uli Kusterer)
|
||||
* New icon (Rick Fillion)
|
||||
* fixed a 'content rectangle not entirely onscreen' warning (Simone Manganelli)
|
||||
* updated sends system profile to use info.plist if user defaults key isn't present (Jamie Pinkham)
|
||||
* Support for notifications on some updater events (Doug Russell)
|
||||
* Allow the delegate to trigger a silent install and relaunch (Matt Stevens)
|
||||
* Support silent relaunches (Matt Stevens)
|
||||
* Increment the sudden termination counter if installing on quit (Matt Stevens)
|
||||
* Prompts the user to update after a week (rather than a day) if he doesn't quit the app (Andy Matuschak)
|
||||
* Adding <sparkle:tags> appcast item element, <sparkle:criticalUpdate /> tag (Andy Matuschak)
|
||||
* We have this check box that says "Automatically download and install updates in the future." But we only download them automatically. We still ask permission again before installing them. (Andy Matuschak)
|
||||
|
||||
# 1.5.0-beta6
|
||||
|
||||
* Important Changes
|
||||
* Sparkle now requires DSA signatures on your updates. Check the documentation for more information on how to set that up if you don't already sign your updates. You can bypass this requirement if you deliver both your appcast and your updates over SSL.
|
||||
* Sparkle will no longer display release notes located at file:// URLs, since Javascript on such a page would be able to read files on your file system.
|
||||
* For security reasons, Sparkle will refuse to install updates which appear to "downgrade" the app.
|
||||
* SUUpdater now implements new keys: "automaticallyDownloadsUpdates", "lastUpdateCheckDate", and "sendsSystemProfile."
|
||||
* Fixed a bug that could prevent SUProbingUpdateDriver from working.
|
||||
* Fixed a bug that prevented the updaterWillRelaunchApplication: delegate method from getting called.
|
||||
* Fixed displaying release notes transmitted "loose" in the <description> key.
|
||||
* Fixed Sparkle compilation on 10.4 systems.
|
||||
* Fixed a bug that could cause window confusion if an app changed its LSUIElement at runtime.
|
||||
* Added support for Sparkle 1.1's behavior of disabling updates when the check interval is 0.
|
||||
* Sparkle can now handle appending parameters to URLs which already have parameters.
|
||||
* If an update's sparkle:shortVersionString is the same as the host's CFBundleShortVersionString, the sparkle:version and CFBundleVersion will be presented in parentheticals.
|
||||
|
||||
# 1.5.0-beta5
|
||||
|
||||
* Important Changes!
|
||||
* Made every Sparkle class private except for SUUpdater, SUAppcast, SUAppcastItem, and the SUVersionComparisonProtocol.
|
||||
* There is now a single SUUpdater singleton for every host bundle; instead of -[SUUpdater setHostBundle], you can use +[SUUpdater updaterForBundle].
|
||||
* Redefined the (entire) delegate protocol accordingly.
|
||||
* Renamed -[SUUpdater updatePreferencesChanged] to -[SUUpdater resetUpdateCycle]. This provides better semantics for non-apps, which need to start the update cycle manually.
|
||||
* -[SUUpdater checkForUpdatesWithDriver] is private. If you were using SUProbingUpdateDriver, you can now use -[SUUpdater checkForUpdateInformation] for a similar effect.
|
||||
* All the user defaults keys are now private; instead, SUUpdater is KVC-compliant for automaticallyChecksForUpdates, updateCheckInterval, and feedURL.
|
||||
* Reduced the size of the English-only framework by 25%.
|
||||
* System profiling information is now only submitted to the server once per week; this will help normalize your statistics across users with different interval preferences.
|
||||
* The feedParamatersForUpdater: delegate method now requires "displayKey" and "displayVersion" keys so that it can inform the user what's being sent.
|
||||
* Added a delegate method called pathToRelaunchForUpdater: which can be used for plugins to provide the path which should be used when relaunching the client after installing an update.
|
||||
* Added support for xml:lang to pick localized nodes in appcasts (for release notes, etc).
|
||||
* Fixed a bug which would cause the "checking for updates" window to not disappear in certain extraordinary error conditions.
|
||||
* Fixed a DSA signature checking bug for .tar.gz archives.
|
||||
* Sparkle now refuses to update on any read-only volume, not just dmgs.
|
||||
* Sparkle will clean up the host app's name and version before sending it as the user agent string; some non-ASCII characters were causing problems.
|
||||
* Added an Italian localization courtesy Michele Longhi.
|
||||
* Added a Swedish localization courtesy Daniel Bergman.
|
||||
* Fixes to the French localization courtesy Ronald Leroux and Yann Ricqueberg.
|
||||
* Fixes to the German localization courtesy Sven-S. Porst.
|
||||
* Fixes to the Russian localization courtesy Alexander Bykov and Anton Sotkov.
|
||||
* Fixed a number of issues related to archive format detection: I reverted back to extensions from UTIs.
|
||||
* Focus behavior fixes for LSUIElement apps.
|
||||
* The status window progress bar now animates even when indeterminate.
|
||||
* Major refactorings to improve functionality for non-app bundles.
|
||||
|
||||
# 1.5.0-beta4
|
||||
|
||||
* Fixed a critical bug which prevented non-.dmgs from unarchiving properly.
|
||||
* Added reporting of 64-bit capability to the profiling system.
|
||||
|
||||
# 1.5.0-beta3
|
||||
|
||||
* Added a new delegate method to SUUpdater.h to allow delegates to specify custom version comparators.
|
||||
* Added a German localization, courtesy the Camino localizer team: Dominik Tobschall, Tobias Stohr, and Friedemann Bochow.
|
||||
* Bug fixes:
|
||||
* Fixed a serious bug which could cause a server to be DDoS'd (or the host app to crash!) if an appcast fails to be parsed.
|
||||
* Fixed .tbz extraction if the archive was made with Stuffit.
|
||||
* Fixed support for .tar.bz2 and .tar.gz; Sparkle has to assume the archive is a tar when it sees "bz2" and "gz"; don't use those without tarring.
|
||||
* Fixed a typo which caused the shouldPromptForPermissionToCheckForUpdatesToHostBundle: method to not work in 1.5b2.
|
||||
* Fixed .zip extraction on Tiger (Apple changed the UTI between releases)
|
||||
* Fixed a crasher on Tiger.
|
||||
* Fixed display of the default app icon when the host app doesn't have an icon.
|
||||
* Sparkle now displays a sensible progress string and uses an indeterminate progress bar when the server doesn't report a file size.
|
||||
* Fixed some memory leaks.
|
||||
|
||||
# 1.5.0-beta2
|
||||
|
||||
* Compatibility Issues:
|
||||
* Most of the delegate method selectors have changed to scale better. See SUUpdater.h for changes; you'll likely have to make changes if you implement any delegate methods.
|
||||
* If you're using .tar.gz or .tar.bz2 archives, name them ".tbz" or ".tgz" instead; Sparkle now uses UTIs for archive detection, and it's not smart about double extensions.
|
||||
* I'm no longer supporting 10.3. This may or may not work on Panther—probably not.
|
||||
* Sparkle's no longer built for ppc64 by default. If you want to ship that, feel free to build your own, but this saves a few hundred k.
|
||||
* Enhancements:
|
||||
* Sparkle now detects if the preferences for automatic update checks or the time interval change mid-cycle.
|
||||
* If your product is a non-.app, you need to clue Sparkle in on the change by calling [[SUUpdater sharedUpdater] updatePreferencesChanged].
|
||||
* Added a cancel to the "checking for updates..." dialog.
|
||||
* Sparkle now cleans up all its litter in /tmp.
|
||||
* Made SUUpdater's delegate an IBOutlet so you can hook it up in IB.
|
||||
* Bug fixes:
|
||||
* Sparkle no longer crashes on non-GC hosts when the user cancels an update's downloads.
|
||||
* Sparkle no longer gets stuck in an inconsistent state or crashes when it can't parse the appcast on scheduled updates.
|
||||
* Added the sharedUpdater method to SUUpdater, as it should have been.
|
||||
* Fixed a bug where the "checking for updates..." window wouldn't go away if an error occurs while checking for updates.
|
||||
* Made the dual-mode build configuration actually use the .xcconfig which builds it with GC support. (oops!)
|
||||
* Fixed relaunching for prefpanes.
|
||||
* Sparkle no longer fails to install updates on Snow Leopard (though there's still an issue with trashing the old version of the app, but it seems to be a 10.6 bug)
|
||||
* Sparkle now handles redirects correctly under Tiger.
|
||||
* Fixed the installation path for non-.app bundles.
|
||||
* Fixed a bug which could crash Sparkle under non-English locales.
|
||||
* Fixed a weird race condition which could cause the relaunch tool to never notice that its target relaunched.
|
||||
* Fixed a bug where if the host app is inactive when an update occurs, the update alert sometimes doesn't become key.
|
||||
* Minor textual fixes.
|
||||
* Localizations:
|
||||
* Dutch: Maarten Van Coile
|
||||
* French: Yann Ricquebourg
|
||||
* Spanish: Ernesto Gomez Cereijo
|
||||
|
||||
# 1.5.0-beta1
|
||||
|
||||
* The most important things to know:
|
||||
* The 10.3 support is untested at best; sketchy at worst. Test with it thoroughly before you use it.
|
||||
* Sparkle now asks for permission to update on second launch; don't be surprised at that. You can change that behavior with a delegate method; read SUUpdater.h for more info.
|
||||
* We no longer distinguish between "check on startup" and "scheduled updates"; everything is scheduled, with the default being every day.
|
||||
* The test application is using the new profiling features, but that's only for demonstration: these are off by default. More on this later.
|
||||
* There are no localizations yet.
|
||||
* New features:
|
||||
* Sparkle now supports .pkgs. Just name the .pkg the name of the app and put in the update archive.
|
||||
* Sparkle now sends optional demographic profiling information; set SUEnableSystemProfiling to YES in your Info.plist and check out the GET data sent to your webserver when fetching the appcast. More on this in the documentation. The test application has this on so you can see the behavior.
|
||||
* Sparkle now supports updating non-.apps. Just call -setHostBundle: on the global SUUpdater to let it know what you're trying to update.
|
||||
* Sparkle now supports garbage collection in the host app. Use "Sparkle-with-GC.framework" for that, but be aware it's 10.5-only.
|
||||
* Sparkle is now 64-bit compatible, compiling both ppc64 and x86_64.
|
||||
* Sparkle now supports a sparkle:minimumSystemVersion key you can set on appcast items. It does what you think it does.
|
||||
* Sparkle now checks to see if the host app is running from a disk image and refuses to update if it is. (10.4+ only)
|
||||
* Added support for entities in enclosure paths.
|
||||
* The file size output is now formatted prettily.
|
||||
* Sparkle now gives visual indication that it's checking for updates when the update's user initiated. ie: it pops up a status controller saying "checking for updates..."
|
||||
* Added support for an SUPublicDSAKeyFile, so people don't have to copy/paste their entire key into their Info.plist. Set this key in your Info.plist to the filename of the key in your Resources directory.
|
||||
* Added an actually maintainable codebase.
|
||||
* Changes:
|
||||
* Sparkle version comparison is now dramatically less stupid and verified by a bunch of unit tests. If something doesn't work the way you think it should, add a test to SUVersionComparisonTest.m
|
||||
* Added a minimum to the check interval so that developers don't accidentally release their apps into the wild with 60-second test check intervals and have DOS-attack-like results. It's an hour now for release mode; feel free to change it.
|
||||
* The relaunching process now uses a separate helper app, which is a much more robust method.
|
||||
* Changed CFBundleShortVersionString behavior: Sparkle no longer uses Apple's about box style of displaying ShortVersionString (CFBundleVersion) when the latter is available.
|
||||
* No more MD5 checking. Use DSA: it's actually secure.
|
||||
* The abomination that was SUStatusChecker is dead. Use SUProbingUpdateDriver instead.
|
||||
* Bugfixes:
|
||||
* Fixed a huge bug with fully-automatic updating: before, if the user chose to relaunch later, the app would be running from the trash for a while. Now the buttons are "install and relaunch" or "install later."
|
||||
* Sparkle forces Spotlight to reindex the updated app so that it won't keep pointing to the one in the trash.
|
||||
* Sparkle trims whitespace from around DSA signatures; this could cause crashes before.
|
||||
* Fixed a bug where the user choosing to skip a version would inhibit future automatic updates until the next launch.
|
||||
* Fixed a bug that could occur when the app has a localized CFBundleName.
|
||||
* .dmgs now work on Leopard.
|
||||
* The status controller's button now sizes appropriately to the localization.
|
||||
* Sparkle now works correctly with LSUIElement apps: it focuses them before displaying the update alert.
|
||||
* Sparkle now deletes failed partial downloads.
|
||||
* The update alert no longer floats above everything in the app.
|
||||
* Fixed varied and sundry memory leaks.
|
||||
* A ton of other things that I've forgotten or were too small to mention!
|
||||
|
||||
# 1.1
|
||||
|
||||
* Optimized framework size: now only 1.4mb with all localizations and 384kb with only English (an English-only version is in the Extras folder).
|
||||
* Added a new SUStatusChecker class for programmatically determining if a new version is available (see the docs); thanks, Evan Schoenberg!
|
||||
* Added support for apps using SIGCHLD; thanks, Augie Fackler!
|
||||
* Added a zh_CN update from JT Lee
|
||||
* Added a Polish update from Piotr Chylinski
|
||||
* Fixed DMG support for images with /Applications symlinks.
|
||||
* Fixed a really stupid interval-checking bug that could cause repeated hits to the appcast.
|
||||
* Fixed a bug where the check interval would be inconsistent if a value of 0 was stored in the user defaults.
|
||||
|
||||
# 1.0
|
||||
|
||||
* Additions:
|
||||
* Added real version comparison courtesy Kevin Ballard: Sparkle now knows that 0.89 < 1.0a3 < 1.0.
|
||||
* Added many localizations courtesy David Kocher's localization team.
|
||||
* Added a much better installation mechanism courtesy Allan Odgaard.
|
||||
* Added a user agent string to the RSS fetch request.
|
||||
* Added support for CFBundleShortVersionString in addition to CFBundleVersion, and support for a sparkle:shortVersionString attribute on the enclosure.
|
||||
* Added support for CFBundleDisplayName if available.
|
||||
* Changes:
|
||||
* Automatic updating is now allowed by default, but only if DSA signing is on.
|
||||
* Pressing Escape or closing the update alert now reminds the user later.
|
||||
* Now when there's a stored check interval, Sparkle doesn't check immediately on startup the first time the app is launched because the user hasn't consented to it yet.
|
||||
* The update alert now remembers its size and floats.
|
||||
* Bug Fixes:
|
||||
* Fixed installation of DMGs with multiple files enclosed.
|
||||
* Fixed a nasty memory leak.
|
||||
* Fixed a bug wherein having no value for allowing automatic updates would display a checkbox for the updates but would not honor it.
|
||||
* Fixed a bug in zip extraction that occurred in Panther.
|
||||
* Fixed release notes caching.
|
||||
* Fixed a bug wherein Sparkle refused to authenticate the installation if the user had cancelled authentication previously in that session.
|
||||
* Fixed a weird bug that would cause a second help menu to appear on first launch.
|
||||
* Fixed a bug that could occur when changing the scheduled check interval.
|
||||
* Fixed a bug wherein the host app could crash if the user clicked Remind Me Later before the release notes finished loading.
|
||||
* Fixed a bug wherein the behavior was undefined if the user manually initiated a check when an automatic one was already taking place.
|
||||
* Fixed wrapping on the description field in the update alert.
|
||||
|
||||
# 1.0-beta3
|
||||
|
||||
* Fixed a nasty crasher that occurred often when the user was not connected to the internet.
|
||||
|
||||
# 1.0-beta2
|
||||
|
||||
* Major Improvements:
|
||||
* Fully automatic updating! (see the Documentation: this is beta and off by default)
|
||||
* Added support for DSA signatures (see the Documentation).
|
||||
* Added support for MD5 sum verification.
|
||||
* Added Security.framework-based authentication for installing to privileged directories.
|
||||
* Huge refactoring of the codebase: there's now a Sparkle Xcode project, Sparkle is now a framework, and everything is modular / abstracted. And no more code-generated interface.
|
||||
* Minor Improvements:
|
||||
* A SUUpdaterWillRestartNotification is sent out before restarting now.
|
||||
* Added key equivalents to alert panel buttons.
|
||||
* Error handling is much prettier now: technical messages are not presented to the user anymore.
|
||||
* There's now a test app for developers to see what Sparkle's like before using it.
|
||||
* Wrote new, pretty, extremely thorough documentation.
|
||||
* Bug Fixes:
|
||||
* Relaunch behavior is much improved and shouldn't fail in huge apps anymore.
|
||||
* Fixed a bug wherein a failing tar command could crash the host app.
|
||||
* Sparkle now looks at InfoPlist.strings in addition to Info.plist.
|
||||
* Fixed some stupid typos.
|
||||
|
||||
# 1.0-beta1
|
||||
|
||||
* Major New Features:
|
||||
* Sparkle now supports scheduled periodic updates—read the Readme for information on how to use it.
|
||||
* Sparkle now supports WebKit-based release notes (for CSS and full HTML), which it displays in the main update alert, not a separate panel. The Readme has much more information. Sparkle will, of course, fall back on NSTextView if the host app does not include WebKit.
|
||||
* Minor New Features:
|
||||
* Added support for .zip update archives.
|
||||
* Added support for .dmg update archives.
|
||||
* Implemented Remind Me Later to replace simple update cancellation.
|
||||
* Implemented Skip This Version functionality.
|
||||
* Added support for multiple feeds via the user defaults SUFeedURL key taking precedent over the one in Info.plist.
|
||||
* Added support for Sparkle's custom XML namespace, which is optional but may prove useful. See the Readme for more information.
|
||||
* Bug Fixes:
|
||||
* Sparkle will no longer enter an inconsistent state if the user tries to update again while one is already in progress.
|
||||
* Sparkle now uses CFBundleName to determine the application's name instead of the app's filename.
|
||||
* Sparkle no longer crashes if the user cancels during extraction.
|
||||
* Lots of code refactoring.
|
||||
|
||||
# 0.1
|
||||
|
||||
* Initial Release
|
||||
@@ -1,74 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at kornel+sparkle@geekhood.net. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
@@ -1 +1,8 @@
|
||||
// BinaryDelta tool only
|
||||
|
||||
PRODUCT_NAME = BinaryDelta
|
||||
GCC_PREFIX_HEADER =
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=i386] = 10.5
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=ppc] = 10.5
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5
|
||||
@@ -1,2 +1,5 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonDebug.xcconfig"
|
||||
#include "ConfigBinaryDelta.xcconfig"
|
||||
|
||||
OTHER_CFLAGS = -DDEBUG
|
||||
@@ -1 +1,3 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigBinaryDelta.xcconfig"
|
||||
@@ -1,99 +1,52 @@
|
||||
// Common
|
||||
|
||||
SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
|
||||
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
|
||||
SPARKLE_FILEOP_TOOL_NAME = fileop
|
||||
|
||||
SPARKLE_APPEND_VERSION_NUMBER = 1
|
||||
|
||||
// Sparkle usually doesn't allow downgrades as they're usually accidental, but
|
||||
// if your app has a downgrade function or URL handler, turn this on
|
||||
SPARKLE_AUTOMATED_DOWNGRADES = 0
|
||||
|
||||
// If your app file on disk is named "MyApp 1.1b4", Sparkle usually updates it
|
||||
// in place, giving you an app named 1.1b4 that is actually 1.2. Turn the
|
||||
// following on to always reset the name back to "MyApp":
|
||||
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
|
||||
|
||||
// If you change any of these version details, you must increase CURRENT_PROJECT_VERSION
|
||||
// These variables must have a space after the '=' too
|
||||
SPARKLE_VERSION_MAJOR = 1
|
||||
SPARKLE_VERSION_MINOR = 27
|
||||
SPARKLE_VERSION_PATCH = 3
|
||||
|
||||
// This should be in SemVer format or empty, ie. "-rc.1"
|
||||
// These variables must have a space after the '=' too
|
||||
SPARKLE_VERSION_SUFFIX =
|
||||
// This is now a monotonically increasing ID number, even across prereleases, but let's keep this below 2.0
|
||||
CURRENT_PROJECT_VERSION = 1.108
|
||||
|
||||
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
|
||||
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
|
||||
ARCHS = $(ARCHS_STANDARD)
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9
|
||||
PRODUCT_NAME = ${TARGET_NAME}
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
GCC_PREPROCESSOR_DEFINITIONS_COMMON = SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=$(SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) SPARKLE_AUTOMATED_DOWNGRADES=$(SPARKLE_AUTOMATED_DOWNGRADES) SPARKLE_APPEND_VERSION_NUMBER=$(SPARKLE_APPEND_VERSION_NUMBER) SPARKLE_BUNDLE_IDENTIFIER=\"$(SPARKLE_BUNDLE_IDENTIFIER)\" MARKETING_VERSION=\"$(MARKETING_VERSION)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" SPARKLE_FILEOP_TOOL_NAME=\"$(SPARKLE_FILEOP_TOOL_NAME)\"
|
||||
|
||||
CODE_SIGN_IDENTITY = -
|
||||
SDKROOT = macosx
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES
|
||||
PREBINDING = NO
|
||||
ZERO_LINK = NO
|
||||
CURRENT_PROJECT_VERSION = 1.5
|
||||
SDKROOT = macosx10.9
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=ppc] = 10.4
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=i386] = 10.4
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.7
|
||||
GCC_C_LANGUAGE_STANDARD = c99
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES
|
||||
GCC_DEBUGGING_SYMBOLS = full
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES
|
||||
GCC_PREFIX_HEADER = $(SDKROOT)/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h
|
||||
GCC_FAST_OBJC_DISPATCH = YES
|
||||
GCC_ENABLE_PASCAL_STRINGS = NO
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
COMBINE_HIDPI_IMAGES = NO;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
|
||||
CLANG_LINK_OBJC_RUNTIME = NO
|
||||
|
||||
// Enable warnings
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
|
||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
|
||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
|
||||
CLANG_ENABLE_MODULES = YES
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
|
||||
CLANG_WARN_ASSIGN_ENUM = YES
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
|
||||
CLANG_WARN_EMPTY_BODY = YES
|
||||
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
|
||||
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES
|
||||
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
|
||||
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES
|
||||
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES
|
||||
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
|
||||
GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
|
||||
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
|
||||
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
|
||||
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
|
||||
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES
|
||||
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
|
||||
GCC_WARN_PEDANTIC = YES
|
||||
GCC_WARN_SHADOW = YES
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
|
||||
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
|
||||
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES
|
||||
GCC_WARN_MISSING_PARENTHESES = YES
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
|
||||
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
|
||||
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
|
||||
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
|
||||
GCC_WARN_SIGN_COMPARE = YES
|
||||
GCC_WARN_STRICT_SELECTOR_MATCH = YES
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES
|
||||
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = YES
|
||||
GCC_WARN_UNUSED_VARIABLE = YES
|
||||
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
|
||||
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
|
||||
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
|
||||
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
|
||||
GCC_WARN_UNUSED_FUNCTION = YES
|
||||
GCC_WARN_UNUSED_LABEL = YES
|
||||
GCC_WARN_UNUSED_VALUE = YES
|
||||
GCC_WARN_UNUSED_PARAMETER = YES
|
||||
GCC_WARN_UNUSED_VARIABLE = YES
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES
|
||||
|
||||
// These should be removed once the conversion to ARC is complete
|
||||
WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties
|
||||
|
||||
// Turn on all warnings, then disable a few which are almost impossible to avoid
|
||||
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments -Wno-format-non-iso $(WARNING_CFLAGS_EXTRA)
|
||||
COMMON_WARNING_FLAGS = -Wall -Wno-unused-parameter -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-format-attribute -Wpacked -Wredundant-decls -Winline -Wdisabled-optimization -Winvalid-pch
|
||||
WARNING_CFLAGS = $(COMMON_WARNING_FLAGS)
|
||||
@@ -1,17 +1,11 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
|
||||
// Debug only
|
||||
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0
|
||||
DEBUG_INFORMATION_FORMAT = dwarf
|
||||
ENABLE_TESTABILITY = YES
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON) DEBUG=1
|
||||
ONLY_ACTIVE_ARCH = YES
|
||||
COPY_PHASE_STRIP = NO
|
||||
SPARKLE_EXTRA_DEBUG_10_5_ONLY = -fstack-protector -D_FORTIFY_SOURCE=2
|
||||
SPARKLE_EXTRA_DEBUG = -DDEBUG
|
||||
OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG)
|
||||
CODE_SIGN_IDENTITY = Mac Developer
|
||||
|
||||
// Add $(SPARKLE_EXTRA_DEBUG_10_5_ONLY) to SPARKLE_EXTRA_DEBUG if your deployment is 10.5 or greater.
|
||||
@@ -0,0 +1,4 @@
|
||||
// Common
|
||||
|
||||
ARCHS = x86_64
|
||||
VALID_ARCHS = x86_64
|
||||
@@ -0,0 +1,4 @@
|
||||
// Common
|
||||
|
||||
ARCHS = ppc i386 x86_64
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
|
||||
// Release only
|
||||
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = s
|
||||
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON)
|
||||
DEAD_CODE_STRIPPING = YES
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES
|
||||
COPY_PHASE_STRIP = NO
|
||||
WARNING_CFLAGS = $(COMMON_WARNING_FLAGS) -Wno-deprecated-declarations
|
||||
CODE_SIGN_IDENTITY = Developer ID Application
|
||||
@@ -1,5 +0,0 @@
|
||||
// Fileop tool only
|
||||
|
||||
PRODUCT_NAME = $(SPARKLE_FILEOP_TOOL_NAME)
|
||||
SKIP_INSTALL = YES
|
||||
CLANG_ENABLE_MODULES = NO
|
||||
@@ -1,13 +1,10 @@
|
||||
// Framework only
|
||||
|
||||
DYLIB_INSTALL_NAME_BASE = @rpath
|
||||
DYLIB_COMPATIBILITY_VERSION = 1.6
|
||||
DYLIB_CURRENT_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
|
||||
INSTALL_PATH = @rpath
|
||||
DYLIB_COMPATIBILITY_VERSION = 2.0
|
||||
DYLIB_CURRENT_VERSION = 2.1.1
|
||||
PRODUCT_NAME = Sparkle
|
||||
WRAPPER_EXTENSION = framework
|
||||
FRAMEWORK_VERSION = A
|
||||
INFOPLIST_FILE = Sparkle/Sparkle-Info.plist
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BUILDING_SPARKLE=1
|
||||
OTHER_LDFLAGS = -Wl,-U,_NSURLQuarantinePropertiesKey
|
||||
SKIP_INSTALL = YES
|
||||
DEFINES_MODULE = YES
|
||||
PRODUCT_BUNDLE_IDENTIFIER = ${SPARKLE_BUNDLE_IDENTIFIER}
|
||||
INFOPLIST_FILE = Info.plist
|
||||
GCC_PREFIX_HEADER = Sparkle.pch
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonDebug.xcconfig"
|
||||
#include "ConfigFramework.xcconfig"
|
||||
|
||||
// Unit tests need access to non-public classes
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO
|
||||
OTHER_CFLAGS = -DDEBUG
|
||||
@@ -1,2 +1,9 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigFramework.xcconfig"
|
||||
|
||||
STRIP_INSTALLED_PRODUCT = YES
|
||||
DEPLOYMENT_POSTPROCESSING = YES
|
||||
STRIPFLAGS = -u -r
|
||||
STRIP_STYLE = non-global
|
||||
SEPARATE_STRIP = YES
|
||||
@@ -0,0 +1,3 @@
|
||||
#include "ConfigFrameworkRelease.xcconfig"
|
||||
|
||||
GCC_ENABLE_OBJC_GC = supported
|
||||
@@ -1,7 +0,0 @@
|
||||
// Generate Appcast only
|
||||
|
||||
#include "ConfigSwift.xcconfig"
|
||||
|
||||
SWIFT_OBJC_BRIDGING_HEADER = generate_appcast/Appcast-Bridging-Header.h
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11
|
||||
PRODUCT_NAME = generate_appcast
|
||||
@@ -1,4 +0,0 @@
|
||||
// Generate Appcast Debug
|
||||
|
||||
#include "ConfigGenerateAppcast.xcconfig"
|
||||
#include "ConfigSwiftDebug.xcconfig"
|
||||
@@ -1,4 +0,0 @@
|
||||
// Generate Appcast Release
|
||||
|
||||
#include "ConfigGenerateAppcast.xcconfig"
|
||||
#include "ConfigSwiftRelease.xcconfig"
|
||||
@@ -1,7 +0,0 @@
|
||||
// Generate Appcast only
|
||||
|
||||
#include "ConfigSwift.xcconfig"
|
||||
|
||||
SWIFT_OBJC_BRIDGING_HEADER = generate_keys/Bridging-Header.h
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11
|
||||
PRODUCT_NAME = generate_keys
|
||||
@@ -1,4 +0,0 @@
|
||||
// Generate Appcast Debug
|
||||
|
||||
#include "ConfigGenerateKeys.xcconfig"
|
||||
#include "ConfigSwiftDebug.xcconfig"
|
||||
@@ -1,4 +0,0 @@
|
||||
// Generate Appcast Release
|
||||
|
||||
#include "ConfigGenerateKeys.xcconfig"
|
||||
#include "ConfigSwiftRelease.xcconfig"
|
||||
@@ -1,8 +1,4 @@
|
||||
// Relaunch Tool only
|
||||
|
||||
INFOPLIST_FILE = Sparkle/Autoupdate/Autoupdate-Info.plist
|
||||
PRODUCT_NAME = $(SPARKLE_RELAUNCH_TOOL_NAME)
|
||||
PRODUCT_NAME = finish_installation
|
||||
SKIP_INSTALL = YES
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
||||
CLANG_ENABLE_MODULES = NO
|
||||
OTHER_LDFLAGS = -Wl,-U,_NSURLQuarantinePropertiesKey
|
||||
@@ -1 +1,5 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonDebug.xcconfig"
|
||||
#include "ConfigRelaunch.xcconfig"
|
||||
|
||||
OTHER_CFLAGS = -DDEBUG
|
||||
@@ -1 +1,3 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigRelaunch.xcconfig"
|
||||
@@ -0,0 +1,10 @@
|
||||
// Sandbox Service only
|
||||
|
||||
WRAPPER_EXTENSION = xpc
|
||||
MACH_O_TYPE = mh_execute
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7
|
||||
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.7
|
||||
|
||||
GCC_WARN_SHADOW = NO
|
||||
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonDebug.xcconfig"
|
||||
#include "ConfigService.xcconfig"
|
||||
|
||||
OTHER_CFLAGS = -DDEBUG
|
||||
@@ -0,0 +1,3 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigService.xcconfig"
|
||||
@@ -1,2 +0,0 @@
|
||||
SWIFT_VERSION = 4.2
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
@@ -1 +0,0 @@
|
||||
SWIFT_OPTIMIZATION_LEVEL = -Onone
|
||||
@@ -1 +0,0 @@
|
||||
SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
|
||||
@@ -1,9 +1,6 @@
|
||||
// Test Application only
|
||||
|
||||
INFOPLIST_FILE = TestApplication/TestApplication-Info.plist
|
||||
INFOPLIST_FILE = Test Application/Test Application-Info.plist
|
||||
PRODUCT_NAME = Sparkle Test App
|
||||
WRAPPER_EXTENSION = app
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
||||
LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.SparkleTestApp
|
||||
ENABLE_HARDENED_RUNTIME = NO
|
||||
CODE_SIGN_IDENTITY = -
|
||||
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
|
||||
@@ -1,2 +1,5 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonDebug.xcconfig"
|
||||
#include "ConfigTestApp.xcconfig"
|
||||
|
||||
OTHER_CFLAGS = -DDEBUG
|
||||
@@ -1 +1,3 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigTestApp.xcconfig"
|
||||
@@ -0,0 +1,3 @@
|
||||
#include "ConfigTestAppRelease.xcconfig"
|
||||
|
||||
GCC_ENABLE_OBJC_GC = required
|
||||
@@ -1,14 +0,0 @@
|
||||
// UI Test only
|
||||
|
||||
#include "ConfigSwift.xcconfig"
|
||||
|
||||
INFOPLIST_FILE = UITests/UITests-Info.plist
|
||||
WRAPPER_EXTENSION = xctest
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11
|
||||
ENABLE_HARDENED_RUNTIME = NO
|
||||
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR)
|
||||
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
|
||||
|
||||
TEST_TARGET_NAME = Sparkle Test App
|
||||
USES_XCTRUNNER = YES
|
||||
@@ -1,2 +0,0 @@
|
||||
#include "ConfigUITest.xcconfig"
|
||||
#include "ConfigSwiftDebug.xcconfig"
|
||||
@@ -1,2 +0,0 @@
|
||||
#include "ConfigUITest.xcconfig"
|
||||
#include "ConfigSwiftRelease.xcconfig"
|
||||
@@ -1,14 +1,11 @@
|
||||
// Unit Test only
|
||||
|
||||
#include "ConfigSwift.xcconfig"
|
||||
|
||||
INFOPLIST_FILE = Tests/SparkleTests-Info.plist
|
||||
WRAPPER_EXTENSION = xctest
|
||||
OTHER_CFLAGS = $(inherited) -iframework"$(DEVELOPER_FRAMEWORKS_DIR)" -iframework"$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO
|
||||
WARNING_CFLAGS = $(inherited) -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR)
|
||||
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9
|
||||
CLANG_ENABLE_MODULES = YES
|
||||
SWIFT_OBJC_BRIDGING_HEADER = Tests/Sparkle Unit Tests-Bridging-Header.h
|
||||
INFOPLIST_FILE = Tests/Sparkle Unit Tests-Info.plist
|
||||
OTHER_LDFLAGS = -framework Cocoa -framework SenTestingKit
|
||||
PRODUCT_NAME = Sparkle Unit Tests
|
||||
WRAPPER_EXTENSION = octest
|
||||
FRAMEWORK_SEARCH_PATHS = $(DEVELOPER_LIBRARY_DIR)/Frameworks
|
||||
GCC_PREFIX_HEADER = $(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES
|
||||
SDKROOT = macosx10.7
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7
|
||||
@@ -1,2 +1,3 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonDebug.xcconfig"
|
||||
#include "ConfigUnitTest.xcconfig"
|
||||
#include "ConfigSwiftDebug.xcconfig"
|
||||
@@ -1,2 +1,3 @@
|
||||
#include "ConfigCommon.xcconfig"
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigUnitTest.xcconfig"
|
||||
#include "ConfigSwiftRelease.xcconfig"
|
||||
@@ -0,0 +1,3 @@
|
||||
#include "ConfigUnitTestRelease.xcconfig"
|
||||
|
||||
GCC_ENABLE_OBJC_GC = required
|
||||
@@ -1,3 +0,0 @@
|
||||
// Copyright © 2019 Sparkle Project. All rights reserved.
|
||||
|
||||
#include "bsdiff-Shared.xcconfig"
|
||||
@@ -1,3 +0,0 @@
|
||||
// Copyright © 2019 Sparkle Project. All rights reserved.
|
||||
|
||||
#include "bsdiff-Shared.xcconfig"
|
||||
@@ -1,14 +0,0 @@
|
||||
// Copyright © 2019 Sparkle Project. All rights reserved.
|
||||
|
||||
// Deployment
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
// Packaging
|
||||
EXECUTABLE_PREFIX = lib
|
||||
PRODUCT_NAME = $(TARGET_NAME)
|
||||
|
||||
// Search Paths
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
|
||||
// Disable Warnings - this is a third-party project, and we'll trust that the maintainers know what they're doing.
|
||||
WARNING_CFLAGS = $(inherited) -Wno-comma
|
||||
@@ -1,3 +0,0 @@
|
||||
// Copyright © 2019 Sparkle Project. All rights reserved.
|
||||
|
||||
#include "ed25519-Shared.xcconfig"
|
||||
@@ -1,3 +0,0 @@
|
||||
// Copyright © 2019 Sparkle Project. All rights reserved.
|
||||
|
||||
#include "ed25519-Shared.xcconfig"
|
||||
@@ -1,14 +0,0 @@
|
||||
// Copyright © 2019 Sparkle Project. All rights reserved.
|
||||
|
||||
// Deployment
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
// Packaging
|
||||
EXECUTABLE_PREFIX = lib
|
||||
PRODUCT_NAME = $(TARGET_NAME)
|
||||
|
||||
// Search Paths
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
|
||||
// Disable Warnings - this is a third-party project, and we'll trust that the maintainers know what they're doing.
|
||||
WARNING_CFLAGS = $(inherited) -Wno-cast-qual -Wno-conversion -Wno-sign-conversion
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os, sys
|
||||
|
||||
# Ignore the first version line starting with # x.y.z..
|
||||
# and print everything until the second version line starting with # x.y.z..
|
||||
|
||||
hit_first_changelog_note = False
|
||||
with open("CHANGELOG", "r") as changelog_file:
|
||||
for line in changelog_file:
|
||||
if line.startswith("#"):
|
||||
if hit_first_changelog_note:
|
||||
# We are done with printing changes
|
||||
break
|
||||
else:
|
||||
# We haven't hit an important changelog line yet, so continue
|
||||
continue
|
||||
|
||||
if not hit_first_changelog_note and len(line.strip()) == 0:
|
||||
continue
|
||||
|
||||
hit_first_changelog_note = True
|
||||
sys.stdout.write(line)
|
||||
@@ -1,147 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Tests the code signing validity of the extracted products within the provided path.
|
||||
# This guards against our archives being corrupt / created incorrectly.
|
||||
function verify_code_signatures() {
|
||||
verification_directory="$1"
|
||||
|
||||
if [[ -z "$verification_directory" ]]; then
|
||||
echo "Provided verification directory does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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}/Sparkle Test App.app"
|
||||
codesign --verify -vvv --deep "${verification_directory}/bin/BinaryDelta"
|
||||
codesign --verify -vvv --deep "${verification_directory}/bin/generate_appcast"
|
||||
codesign --verify -vvv --deep "${verification_directory}/bin/sign_update"
|
||||
codesign --verify -vvv --deep "${verification_directory}/bin/generate_keys"
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "" ] ; then
|
||||
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
|
||||
rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
rm -f "Sparkle-$MARKETING_VERSION.tar.xz"
|
||||
rm -f "Sparkle-$MARKETING_VERSION.tar.bz2"
|
||||
rm -f "Sparkle-for-Swift-Package-Manager.zip"
|
||||
|
||||
mkdir -p "$CONFIGURATION_BUILD_DIR/staging"
|
||||
mkdir -p "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp "$SRCROOT/CHANGELOG" "$SRCROOT/LICENSE" "$SRCROOT/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp "$SRCROOT/CHANGELOG" "$SRCROOT/LICENSE" "$SRCROOT/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
cp -R "$SRCROOT/bin" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp "$CONFIGURATION_BUILD_DIR/BinaryDelta" "$CONFIGURATION_BUILD_DIR/staging/bin"
|
||||
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 -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.framework" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.xcframework" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
|
||||
# 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.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
|
||||
fi
|
||||
cp -R "$CONFIGURATION_BUILD_DIR/staging/bin" "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
|
||||
cd "$CONFIGURATION_BUILD_DIR/staging"
|
||||
|
||||
if [ -x "$(command -v xz)" ]; then
|
||||
XZ_EXISTS=1
|
||||
else
|
||||
XZ_EXISTS=0
|
||||
fi
|
||||
|
||||
rm -rf "/tmp/sparkle-extract"
|
||||
mkdir -p "/tmp/sparkle-extract"
|
||||
|
||||
# Sorted file list groups similar files together, which improves tar compression
|
||||
if [ "$XZ_EXISTS" -eq 1 ] ; then
|
||||
find . \! -type d | rev | sort | rev | tar cv --files-from=- | xz -9 > "../Sparkle-$MARKETING_VERSION.tar.xz"
|
||||
|
||||
# Copy archived distribution for CI
|
||||
cp -f "../Sparkle-$MARKETING_VERSION.tar.xz" "../sparkle-dist.tar.xz"
|
||||
|
||||
# Extract archive for testing binary validity
|
||||
tar -xf "../Sparkle-$MARKETING_VERSION.tar.xz" -C "/tmp/sparkle-extract"
|
||||
else
|
||||
# Fallback to bz2 compression if xz utility is not available
|
||||
find . \! -type d | rev | sort | rev | tar cjvf "../Sparkle-$MARKETING_VERSION.tar.bz2" --files-from=-
|
||||
|
||||
# Extract archive for testing binary validity
|
||||
tar -xf "../Sparkle-$MARKETING_VERSION.tar.bz2" -C "/tmp/sparkle-extract"
|
||||
fi
|
||||
|
||||
# Test code signing validity of the extracted products
|
||||
# This guards against our archives being corrupt / created incorrectly
|
||||
verify_code_signatures "/tmp/sparkle-extract"
|
||||
|
||||
rm -rf "/tmp/sparkle-extract"
|
||||
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
|
||||
|
||||
# Generate zip containing the xcframework for SPM
|
||||
rm -rf "/tmp/sparkle-spm-extract"
|
||||
mkdir -p "/tmp/sparkle-spm-extract"
|
||||
cd "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
# rm -rf "$CONFIGURATION_BUILD_DIR/Sparkle.xcarchive"
|
||||
ditto -c -k --zlibCompressionLevel 9 --rsrc . "../Sparkle-for-Swift-Package-Manager.zip"
|
||||
|
||||
# Test code signing validity of the extracted Swift package
|
||||
# This guards against our archives being corrupt / created incorrectly
|
||||
ditto -x -k "../Sparkle-for-Swift-Package-Manager.zip" "/tmp/sparkle-spm-extract"
|
||||
verify_code_signatures "/tmp/sparkle-spm-extract"
|
||||
|
||||
rm -rf "/tmp/sparkle-spm-extract"
|
||||
rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
|
||||
# Get latest git tag
|
||||
cd "$SRCROOT"
|
||||
latest_git_tag=$(git describe --tags --abbrev=0)
|
||||
|
||||
# Check semantic versioning
|
||||
if [[ $latest_git_tag =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
|
||||
echo "Tag $latest_git_tag follows semantic versioning"
|
||||
else
|
||||
echo "ERROR: Tag $latest_git_tag does not follow semantic versioning! SPM will not be able to resolve the repository" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate new Package manifest and podspec
|
||||
cd "$CONFIGURATION_BUILD_DIR"
|
||||
cp "$SRCROOT/Package.swift" "$CONFIGURATION_BUILD_DIR"
|
||||
cp "$SRCROOT/Sparkle.podspec" "$CONFIGURATION_BUILD_DIR"
|
||||
if [ "$XCODE_VERSION_MAJOR" -ge "1200" ]; then
|
||||
# is equivalent to shasum -a 256 FILE
|
||||
spm_checksum=$(swift package compute-checksum "Sparkle-for-Swift-Package-Manager.zip")
|
||||
rm -rf ".build"
|
||||
sed -E -i '' -e "/let tag/ s/\".+\"/\"$latest_git_tag\"/" -e "/let version/ s/\".+\"/\"$MARKETING_VERSION\"/" -e "/let checksum/ s/[[:xdigit:]]{64}/$spm_checksum/" "Package.swift"
|
||||
cp "Package.swift" "$SRCROOT"
|
||||
echo "Package.swift updated with the following values:"
|
||||
echo "Version: $MARKETING_VERSION"
|
||||
echo "Tag: $latest_git_tag"
|
||||
echo "Checksum: $spm_checksum"
|
||||
|
||||
sed -E -i '' -e "/s\.version.+=/ s/\".+\"/\"$MARKETING_VERSION\"/" "Sparkle.podspec"
|
||||
cp "Sparkle.podspec" "$SRCROOT"
|
||||
echo "Sparkle.podspec updated with following values:"
|
||||
echo "Version: $MARKETING_VERSION"
|
||||
else
|
||||
echo "warning: Xcode version $XCODE_VERSION_ACTUAL does not support computing checksums for Swift Packages. Please update the Package manifest manually."
|
||||
fi
|
||||
|
||||
if [ "$XZ_EXISTS" -ne 1 ] ; then
|
||||
echo "WARNING: xz compression is used for official releases but bz2 is being used instead because xz tool is not installed on your system."
|
||||
fi
|
||||
|
||||
rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
fi
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Convenience script to automatically commit Package.swift after updating the checksum and move the latest tag
|
||||
latest_git_tag=$(git describe --tags --abbrev=0) # gets the latest tag name
|
||||
commits_since_tag=$(git rev-list ${latest_git_tag}.. --count)
|
||||
|
||||
function move_tag() {
|
||||
long_message=$(git tag -n99 -l $latest_git_tag) # gets corresponding message
|
||||
long_message=${long_message/$latest_git_tag} # trims tag name
|
||||
long_message="$(echo -e "${long_message}" | sed -e 's/^[[:space:]]*//')" # trim leading whitespace
|
||||
git add Package.swift Sparkle.podspec
|
||||
git commit -m "Update Package.swift and Sparkle.podspec for version ${latest_git_tag}"
|
||||
git tag -fa $latest_git_tag -m "${long_message}"
|
||||
echo "Package.swift and Sparkle.podspec committed and tag '$latest_git_tag' moved."
|
||||
}
|
||||
|
||||
if [ "$commits_since_tag" -gt 0 ]; then
|
||||
# If there have been commits since the latest tag, it's highly likely that we did not intend to do a full release
|
||||
echo "WARNING: $commits_since_tag commit(s) since tag '$latest_git_tag'. Did you tag a new version?"
|
||||
echo "Package.swift has not been committed and tag has not been moved."
|
||||
elif [ "$CI" == true ]; then
|
||||
move_tag
|
||||
else
|
||||
# TODO: add sanity check to see if version is actually being updated or not?
|
||||
read -p "Do you want to commit changes to Package.swift and Sparkle.podspec, and force move tag '$latest_git_tag'? (required for official release) [Y/n]" -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
move_tag
|
||||
else
|
||||
echo "Package.swift and Sparkle.podspec have not been committed and tag has not been moved."
|
||||
fi
|
||||
fi
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if ! which -s git ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$SRCROOT" ] || \
|
||||
[ -z "$BUILT_PRODUCTS_DIR" ] || \
|
||||
[ -z "$INFOPLIST_PATH" ] || \
|
||||
[ -z "$MARKETING_VERSION" ]; then
|
||||
echo "$0: Must be run from Xcode!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version="$MARKETING_VERSION"
|
||||
|
||||
# Get version in format 1.x.x-commits-hash
|
||||
gitversion=$( cd "$SRCROOT"; git describe --tags --match '[12].*' || true )
|
||||
if [ -z "$gitversion" ] ; then
|
||||
echo "$0: Can't find a Git hash!" 1>&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# remove everything before the second last "-" to keep the hash part only
|
||||
versionsuffix=$( echo "${gitversion}" | sed -E 's/.+((-[^.]+){2})$/\1/' )
|
||||
if [ "$versionsuffix" != "$gitversion" ]; then
|
||||
version="$version$versionsuffix"
|
||||
fi
|
||||
|
||||
# and use it to set the CFBundleShortVersionString value
|
||||
export PATH="$PATH:/usr/libexec"
|
||||
|
||||
if [ -f "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" ] ; then
|
||||
oldversion=$(PlistBuddy -c "Print :CFBundleShortVersionString" "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH")
|
||||
fi
|
||||
if [ "$version" != "$oldversion" ] ; then
|
||||
PlistBuddy -c "Set :CFBundleShortVersionString '$version'" \
|
||||
"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
|
||||
fi
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// DevMateSparkle.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 10/1/14.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef Sparkle_DevMateSparkle_h
|
||||
#define Sparkle_DevMateSparkle_h
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
// If you are using your own copy of Sparkle.framework just define
|
||||
// USED_CUSTOM_SPARKLE_FRAMEWORK macro.
|
||||
#ifndef USED_CUSTOM_SPARKLE_FRAMEWORK
|
||||
|
||||
#define SUUpdater DM_SUUpdater
|
||||
#define SUUpdaterQueue DM_SUUpdaterQueue
|
||||
#define SUAppcast DM_SUAppcast
|
||||
#define SUAppcastItem DM_SUAppcastItem
|
||||
#define SUAppcastDelegate DM_SUAppcastDelegate
|
||||
#define SUUpdaterDelegate_DevMateInteraction DM_SUUpdaterDelegate_DevMateInteraction
|
||||
#define SUUpdaterDelegateInformalProtocol DM_SUUpdaterDelegateInformalProtocol
|
||||
#define SUVersionComparison DM_SUVersionComparison
|
||||
#define SUVersionDisplay DM_SUVersionDisplay
|
||||
|
||||
#import <DevMateSparkle/SUUpdater.h>
|
||||
#import <DevMateSparkle/SUUpdaterQueue.h>
|
||||
|
||||
#import <DevMateSparkle/SUAppcast.h>
|
||||
#import <DevMateSparkle/SUAppcastItem.h>
|
||||
#import <DevMateSparkle/SUVersionComparisonProtocol.h>
|
||||
#import <DevMateSparkle/SUVersionDisplayProtocol.h>
|
||||
|
||||
#endif // USED_CUSTOM_SPARKLE_FRAMEWORK
|
||||
|
||||
#endif // Sparkle_DevMateSparkle_h
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// DevMateSparkle.pch
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 10/1/14.
|
||||
//
|
||||
//
|
||||
|
||||
#define SPARKLE_MAIN_CLASS @"DM_SUUpdater"
|
||||
|
||||
#define SUUpdater DM_SUUpdater
|
||||
#define SUUpdaterQueue DM_SUUpdaterQueue
|
||||
#define SUAppcast DM_SUAppcast
|
||||
#define SUAppcastItem DM_SUAppcastItem
|
||||
#define SUAppcastDelegate DM_SUAppcastDelegate
|
||||
#define SUUpdaterDelegate_DevMateInteraction DM_SUUpdaterDelegate_DevMateInteraction
|
||||
#define SUUpdaterDelegateInformalProtocol DM_SUUpdaterDelegateInformalProtocol
|
||||
#define SUVersionComparison DM_SUVersionComparison
|
||||
#define SUVersionDisplay DM_SUVersionDisplay
|
||||
|
||||
#define SUPackageInstaller DM_SUPackageInstaller
|
||||
#define SUDSAVerifier DM_SUDSAVerifier
|
||||
#define SUUpdateAlert DM_SUUpdateAlert
|
||||
#define SUUIBasedUpdateDriver DM_SUUIBasedUpdateDriver
|
||||
#define SUPasswordPrompt DM_SUPasswordPrompt
|
||||
#define SUStandardVersionComparator DM_SUStandardVersionComparator
|
||||
#define SUSystemProfiler DM_SUSystemProfiler
|
||||
#define SUXPCInstaller DM_SUXPCInstaller
|
||||
#define SUXPCURLDownload DM_SUXPCURLDownload
|
||||
#define SUPlainInstaller DM_SUPlainInstaller
|
||||
#define SUUpdatePermissionPrompt DM_SUUpdatePermissionPrompt
|
||||
#define SUUnarchiver DM_SUUnarchiver
|
||||
#define SUUserInitiatedUpdateDriver DM_SUUserInitiatedUpdateDriver
|
||||
#define SUUpdateDriver DM_SUUpdateDriver
|
||||
#define SUProbingUpdateDriver DM_SUProbingUpdateDriver
|
||||
#define SUAutomaticUpdateAlert DM_SUAutomaticUpdateAlert
|
||||
#define SUBasicUpdateDriver DM_SUBasicUpdateDriver
|
||||
#define SUWindowController DM_SUWindowController
|
||||
#define SUStatusController DM_SUStatusController
|
||||
#define SUHost DM_SUHost
|
||||
#define SUPipedUnarchiver DM_SUPipedUnarchiver
|
||||
#define SUAutomaticUpdateDriver DM_SUAutomaticUpdateDriver
|
||||
#define SUCodeSigningVerifier DM_SUCodeSigningVerifier
|
||||
#define SUBinaryDeltaUnarchiver DM_SUBinaryDeltaUnarchiver
|
||||
#define SUDelegateProxy DM_SUDelegateProxy
|
||||
#define SUInstaller DM_SUInstaller
|
||||
#define SUScheduledUpdateDriver DM_SUScheduledUpdateDriver
|
||||
#define SUDiskImageUnarchiver DM_SUDiskImageUnarchiver
|
||||
#define NTSynchronousTask DM_NTSynchronousTask
|
||||
#define SUUpdaterWorking DM_SUUpdater // Used in SUUpdaterLoader.m file
|
||||
#define SUUpdaterLoader DM_SUUpdaterLoader
|
||||
|
||||
#import "Sparkle.pch"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
html
|
||||
@@ -1,20 +0,0 @@
|
||||
PROJECT_NAME = Sparkle
|
||||
PROJECT_NUMBER = 1.14.0
|
||||
PROJECT_BRIEF = "A software update framework for macOS"
|
||||
PROJECT_LOGO = Resources/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png
|
||||
|
||||
RECURSIVE = YES
|
||||
INPUT = Sparkle
|
||||
OUTPUT_DIRECTORY = Documentation
|
||||
|
||||
GENERATE_HTML = YES
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST = YES
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
QT_AUTOBRIEF = YES
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$ACTION" = "" ] ; then
|
||||
if which -s doxygen ; then
|
||||
doxygen Documentation/Doxyfile
|
||||
else
|
||||
echo "warning: Doxygen not found in PATH"
|
||||
echo "open Terminal and type this command 'brew install doxygen' then click 'enter/return' key. finally build this target again"
|
||||
fi
|
||||
elif [ "$ACTION" = "clean" ] ; then
|
||||
rm -rf "$SRCROOT/Documentation/html"
|
||||
fi
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>XPCService</key>
|
||||
<dict>
|
||||
<key>ServiceType</key>
|
||||
<string>Application</string>
|
||||
<key>JoinExistingSession</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,4 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'Downloading XPC Service' target in the 'Downloading XPC Service' project
|
||||
//
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// SUDSDownloader.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 8/1/13.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define DEBUG_LOGGING_ENABLED defined(DEBUG) && 1
|
||||
|
||||
@class SUDSDownloader;
|
||||
|
||||
typedef void (^SUDSDownloadDidBegin)(SUDSDownloader *downloader);
|
||||
typedef void (^SUDSDownloadDidFinish)(SUDSDownloader *downloader);
|
||||
typedef void (^SUDSDownloadDidFail)(SUDSDownloader *downloader, NSError *error);
|
||||
typedef void (^SUDSDownloadDidReceiveResponse)(SUDSDownloader *downloader, NSURLResponse *response);
|
||||
typedef void (^SUDSDownloadDidReceiveData)(SUDSDownloader *downloader, NSUInteger dataLength);
|
||||
typedef void (^SUDSDownloadDidCreateDestination)(SUDSDownloader *downloader, NSString *destinationPath);
|
||||
typedef BOOL (^SUDSDownloadShouldDecodeSourceData)(SUDSDownloader *downloader, NSString *MIMEType);
|
||||
|
||||
typedef struct SUDSDownloaderCallBacks
|
||||
{
|
||||
SUDSDownloadDidBegin downloadDidBegin;
|
||||
SUDSDownloadDidFinish downloadDidFinish;
|
||||
SUDSDownloadDidFail downloadDidFail;
|
||||
|
||||
SUDSDownloadDidReceiveResponse downloadDidReceiveResponse;
|
||||
SUDSDownloadDidReceiveData downloadDidReceiveData;
|
||||
SUDSDownloadDidCreateDestination downloadDidCreateDestination;
|
||||
|
||||
SUDSDownloadShouldDecodeSourceData downloadShouldDecodeSourceData;
|
||||
} SUDSDownloaderCallBacks;
|
||||
|
||||
FOUNDATION_EXTERN SUDSDownloaderCallBacks SUDSCopyDownloaderCallBacks(SUDSDownloaderCallBacks callBacks);
|
||||
FOUNDATION_EXTERN void SUDSReleaseDownloaderCallBacks(SUDSDownloaderCallBacks callBacks);
|
||||
|
||||
@interface SUDSDownloader : NSObject <NSURLDownloadDelegate>
|
||||
{
|
||||
@private
|
||||
NSURLRequest *_request;
|
||||
NSString *_destFilePath;
|
||||
SUDSDownloaderCallBacks _callBacks;
|
||||
|
||||
NSURLDownload *_download;
|
||||
}
|
||||
|
||||
- (id)initWithURLRequest:(NSURLRequest *)request destinationPath:(NSString *)filePath;
|
||||
+ (id)downloaderWithURLRequest:(NSURLRequest *)request destinationPath:(NSString *)filePath;
|
||||
|
||||
- (NSURLRequest *)request;
|
||||
- (NSString *)destinationPath;
|
||||
- (void)setCallBacks:(SUDSDownloaderCallBacks)callBacks;
|
||||
|
||||
- (void)startDownload;
|
||||
- (void)stopDownload;
|
||||
- (BOOL)isInProgress;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,210 @@
|
||||
//
|
||||
// SUDSDownloader.m
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 8/1/13.
|
||||
//
|
||||
//
|
||||
|
||||
#import "SUDSDownloader.h"
|
||||
|
||||
SUDSDownloaderCallBacks SUDSCopyDownloaderCallBacks(SUDSDownloaderCallBacks callBacks)
|
||||
{
|
||||
SUDSDownloaderCallBacks callBacksCopy = {0};
|
||||
|
||||
if (callBacks.downloadDidBegin)
|
||||
callBacksCopy.downloadDidBegin = Block_copy(callBacks.downloadDidBegin);
|
||||
if (callBacks.downloadDidFinish)
|
||||
callBacksCopy.downloadDidFinish = Block_copy(callBacks.downloadDidFinish);
|
||||
if (callBacks.downloadDidFail)
|
||||
callBacksCopy.downloadDidFail = Block_copy(callBacks.downloadDidFail);
|
||||
if (callBacks.downloadDidReceiveData)
|
||||
callBacksCopy.downloadDidReceiveData = Block_copy(callBacks.downloadDidReceiveData);
|
||||
if (callBacks.downloadDidCreateDestination)
|
||||
callBacksCopy.downloadDidCreateDestination = Block_copy(callBacks.downloadDidCreateDestination);
|
||||
if (callBacks.downloadDidReceiveResponse)
|
||||
callBacksCopy.downloadDidReceiveResponse = Block_copy(callBacks.downloadDidReceiveResponse);
|
||||
if (callBacks.downloadShouldDecodeSourceData)
|
||||
callBacksCopy.downloadShouldDecodeSourceData = Block_copy(callBacks.downloadShouldDecodeSourceData);
|
||||
|
||||
return callBacksCopy;
|
||||
}
|
||||
|
||||
void SUDSReleaseDownloaderCallBacks(SUDSDownloaderCallBacks callBacks)
|
||||
{
|
||||
if (callBacks.downloadDidBegin)
|
||||
Block_release(callBacks.downloadDidBegin);
|
||||
if (callBacks.downloadDidFinish)
|
||||
Block_release(callBacks.downloadDidFinish);
|
||||
if (callBacks.downloadDidFail)
|
||||
Block_release(callBacks.downloadDidFail);
|
||||
if (callBacks.downloadDidReceiveData)
|
||||
Block_release(callBacks.downloadDidReceiveData);
|
||||
if (callBacks.downloadDidCreateDestination)
|
||||
Block_release(callBacks.downloadDidCreateDestination);
|
||||
if (callBacks.downloadDidReceiveResponse)
|
||||
Block_release(callBacks.downloadDidReceiveResponse);
|
||||
if (callBacks.downloadShouldDecodeSourceData)
|
||||
Block_release(callBacks.downloadShouldDecodeSourceData);
|
||||
}
|
||||
|
||||
@implementation SUDSDownloader
|
||||
|
||||
- (id)initWithURLRequest:(NSURLRequest *)request destinationPath:(NSString *)filePath
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
_request = [request retain];
|
||||
_destFilePath = [filePath copy];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (id)downloaderWithURLRequest:(NSURLRequest *)request destinationPath:(NSString *)filePath
|
||||
{
|
||||
return [[[[self class] alloc] initWithURLRequest:request destinationPath:filePath] autorelease];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self stopDownload];
|
||||
|
||||
[_request release];
|
||||
[_destFilePath release];
|
||||
SUDSReleaseDownloaderCallBacks(_callBacks);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSURLRequest *)request
|
||||
{
|
||||
return _request;
|
||||
}
|
||||
|
||||
- (NSString *)destinationPath
|
||||
{
|
||||
return _destFilePath;
|
||||
}
|
||||
|
||||
- (void)setCallBacks:(SUDSDownloaderCallBacks)callBacks
|
||||
{
|
||||
SUDSDownloaderCallBacks oldCallBacks = _callBacks;
|
||||
_callBacks = SUDSCopyDownloaderCallBacks(callBacks);
|
||||
SUDSReleaseDownloaderCallBacks(oldCallBacks);
|
||||
}
|
||||
|
||||
- (void)startDownload
|
||||
{
|
||||
[self stopDownload];
|
||||
|
||||
// to ensure that parent folder exists
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:[_destFilePath stringByDeletingLastPathComponent]
|
||||
withIntermediateDirectories:YES
|
||||
attributes:nil
|
||||
error:NULL];
|
||||
NSURLDownload *urlDownload = [[NSURLDownload alloc] initWithRequest:_request delegate:self];
|
||||
@synchronized (self)
|
||||
{
|
||||
_download = urlDownload;
|
||||
}
|
||||
|
||||
[urlDownload setDestination:_destFilePath allowOverwrite:YES];
|
||||
}
|
||||
|
||||
- (void)stopDownload
|
||||
{
|
||||
@synchronized (self)
|
||||
{
|
||||
[_download cancel];
|
||||
[_download release];
|
||||
_download = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)isInProgress
|
||||
{
|
||||
BOOL result = YES;
|
||||
@synchronized (self)
|
||||
{
|
||||
result = _download != nil;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)downloadDidBegin:(NSURLDownload *)download
|
||||
{
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader did begin process.");
|
||||
#endif
|
||||
if (_callBacks.downloadDidBegin)
|
||||
_callBacks.downloadDidBegin(self);
|
||||
}
|
||||
|
||||
- (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response
|
||||
{
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader did receive response: %@", [response description]);
|
||||
#endif
|
||||
if (_callBacks.downloadDidReceiveResponse)
|
||||
_callBacks.downloadDidReceiveResponse(self, response);
|
||||
}
|
||||
|
||||
- (void)download:(NSURLDownload *)download didCreateDestination:(NSString *)path
|
||||
{
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader did create destination: %@", path);
|
||||
#endif
|
||||
if (_callBacks.downloadDidCreateDestination)
|
||||
_callBacks.downloadDidCreateDestination(self, path);
|
||||
}
|
||||
|
||||
- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length
|
||||
{
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader did receive data of length %ld bytes", (unsigned long)length);
|
||||
#endif
|
||||
if (_callBacks.downloadDidReceiveData)
|
||||
_callBacks.downloadDidReceiveData(self, length);
|
||||
}
|
||||
|
||||
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error
|
||||
{
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader did fail: %@", [error description]);
|
||||
#endif
|
||||
if (_callBacks.downloadDidFail)
|
||||
_callBacks.downloadDidFail(self, error);
|
||||
|
||||
[self stopDownload];
|
||||
}
|
||||
|
||||
- (void)downloadDidFinish:(NSURLDownload *)download
|
||||
{
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader did finish");
|
||||
#endif
|
||||
if (_callBacks.downloadDidFinish)
|
||||
_callBacks.downloadDidFinish(self);
|
||||
|
||||
[self stopDownload];
|
||||
}
|
||||
|
||||
- (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
|
||||
{
|
||||
BOOL shouldDecode = NO;
|
||||
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"XPC Downloader wants decode source data of MIME type: %@", encodingType);
|
||||
#endif
|
||||
if (_callBacks.downloadShouldDecodeSourceData)
|
||||
shouldDecode = _callBacks.downloadShouldDecodeSourceData(self, encodingType);
|
||||
|
||||
return shouldDecode;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// SUDownloadServiceConstants.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 7/29/13.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef Sparkle_SUDownloadServiceConstants_h
|
||||
#define Sparkle_SUDownloadServiceConstants_h
|
||||
|
||||
const char * SUDownloadServiceURLRequestDataKey = "request_data"; // data of archived NSURLRequest
|
||||
const char * SUDownloadServiceDelegateConnectionKey = "connection"; // xpc_connection_t
|
||||
const char * SUDownloadServiceFilePathKey = "file_path"; // c-string
|
||||
|
||||
const char * SUDownloadServiceReceivedDataLengthKey = "received_data_length"; // int64_t
|
||||
const char * SUDownloadServiceReceivedResponseDataKey = "received_response_data"; // data of archived NSURLResponse
|
||||
const char * SUDownloadServiceCreatedDestinationPathKey = "created_destination_path"; // c-string
|
||||
const char * SUDownloadServiceDidBeginDownloadingKey = "did_begin_downloading"; // bool 1
|
||||
const char * SUDownloadServiceDidFinishDownloadingKey = "did_finish_downloading"; // bool 1
|
||||
const char * SUDownloadServiceReceivedFailErrorKey = "received_fail_error"; // data of archived NSError
|
||||
const char * SUDownloadServiceMIMETypeToDecodeKey = "MIME_type_to_decode"; // c-string
|
||||
const char * SUDownloadServiceShouldDecodeMIMETypeKey = "should_decode_MIME_type"; // bool
|
||||
|
||||
const char * SUDownloadServiceErrorCodeKey = "errcode"; // int64_t
|
||||
const char * SUDownloadServiceErrorMessageKey = "errmsg"; // c-string
|
||||
const char * SUDownloadServiceErrorDomainKey = "errdomain"; // c-string
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// SUXPCURLDownload.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Erik Aderstedt on 2012-08-09.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface SUXPCURLDownload : NSObject
|
||||
{
|
||||
@private
|
||||
id <NSURLDownloadDelegate> _delegate; // weak ref
|
||||
xpc_connection_t _connection;
|
||||
xpc_connection_t _delegateConnection;
|
||||
NSURLRequest *_request;
|
||||
NSThread *_startedThread; // weak ref
|
||||
BOOL _isDownloading;
|
||||
|
||||
BOOL _allowOverwrite;
|
||||
NSString *_destination;
|
||||
NSString *_connectionDestination;
|
||||
NSError *_downloadError;
|
||||
}
|
||||
|
||||
- (id <NSURLDownloadDelegate>)delegate;
|
||||
- (void)setDelegate:(id <NSURLDownloadDelegate>)delegate;
|
||||
|
||||
- (id)initWithRequest:(NSURLRequest *)request delegate:(id <NSURLDownloadDelegate>)delegate;
|
||||
- (void)setDestination:(NSString *)path allowOverwrite:(BOOL)allowOverwrite;
|
||||
|
||||
// Delegate methods for this method will be called from another thread.
|
||||
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request delegate:(id <NSURLDownloadDelegate>)delegate;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,448 @@
|
||||
//
|
||||
// SUXPCURLDownload.m
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Erik Aderstedt on 2012-08-09.
|
||||
//
|
||||
//
|
||||
|
||||
#import "SUXPCURLDownload.h"
|
||||
#import "SUDownloadServiceConstants.h"
|
||||
#import "SUConstants.h"
|
||||
#import "SULog.h"
|
||||
|
||||
static NSString * const kSUFetchFolderName = @"fetch.XXXXXXXX";
|
||||
|
||||
@interface SUXPCURLDownload (Private)
|
||||
|
||||
- (void)performBlock:(void (^)(void))block onThread:(NSThread *)thread synchronous:(BOOL)flag;
|
||||
- (void)fireBlock:(void (^)(void))block;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SUXPCURLDownload
|
||||
|
||||
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request delegate:(id <NSURLDownloadDelegate>)delegate
|
||||
{
|
||||
__block SUXPCURLDownload *download = nil;
|
||||
|
||||
static const char *sSynchronousDownloadQueueName = "com.devmate.SynchronousXPCDownloadQueue";
|
||||
dispatch_queue_t queue = dispatch_queue_create(sSynchronousDownloadQueueName, NULL);
|
||||
dispatch_sync(queue, ^{
|
||||
download = [[SUXPCURLDownload alloc] initWithRequest:request delegate:delegate];
|
||||
});
|
||||
|
||||
while (download && download->_isDownloading)
|
||||
{
|
||||
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.5]];
|
||||
}
|
||||
|
||||
NSData *downloadData = (nil == download->_downloadError) ? [NSData dataWithContentsOfFile:download->_destination] : nil;
|
||||
[download release];
|
||||
dispatch_release(queue);
|
||||
|
||||
return downloadData;
|
||||
}
|
||||
|
||||
- (id)initWithRequest:(NSURLRequest *)request delegate:(id <NSURLDownloadDelegate>)delegate
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
_request = [request retain];
|
||||
_delegate = [delegate retain];
|
||||
_startedThread = [NSThread currentThread];
|
||||
|
||||
// Set up a connection.
|
||||
_connection = [self getSandboxXPCService];
|
||||
dispatch_async(dispatch_get_current_queue(), ^{
|
||||
[self startDownload:request];
|
||||
});
|
||||
|
||||
_isDownloading = YES;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self cancel];
|
||||
|
||||
[_request release];
|
||||
[_destination release];
|
||||
[_connectionDestination release];
|
||||
[_downloadError release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSURLRequest *)request
|
||||
{
|
||||
return _request;
|
||||
}
|
||||
|
||||
- (void)startDownload:(NSURLRequest *)urlRequest
|
||||
{
|
||||
// Send a message to download a specific url.
|
||||
if ([_delegate respondsToSelector:@selector(download:decideDestinationWithSuggestedFilename:)] && _destination == nil)
|
||||
{
|
||||
void (^block)(void) = ^{
|
||||
[_delegate download:(NSURLDownload *)self decideDestinationWithSuggestedFilename:[[urlRequest URL] lastPathComponent]];
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:YES];
|
||||
}
|
||||
if (nil == _destination)
|
||||
{
|
||||
_destination = [[[urlRequest URL] lastPathComponent] copy];
|
||||
}
|
||||
|
||||
// ivar 'destination' now contains the destination URL.
|
||||
|
||||
NSURL *tempFolder = [NSURL fileURLWithPath:NSTemporaryDirectory()];
|
||||
NSString *tempFileTemplate = [[tempFolder URLByAppendingPathComponent:kSUFetchFolderName] path];
|
||||
NSString *tempFilePath = [tempFileTemplate stringByAppendingPathComponent:[_destination lastPathComponent]];
|
||||
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
if ([fileManager fileExistsAtPath:tempFilePath])
|
||||
[fileManager removeItemAtPath:tempFilePath error:nil];
|
||||
|
||||
_connectionDestination = [tempFilePath copy];
|
||||
|
||||
NSData *requestData = [NSKeyedArchiver archivedDataWithRootObject:urlRequest];
|
||||
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_data(message, SUDownloadServiceURLRequestDataKey, [requestData bytes], [requestData length]);
|
||||
xpc_dictionary_set_string(message, SUDownloadServiceFilePathKey, [tempFilePath cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
xpc_dictionary_set_connection(message, SUDownloadServiceDelegateConnectionKey, _delegateConnection);
|
||||
xpc_connection_send_message_with_reply(_connection, message, dispatch_get_main_queue(), ^(xpc_object_t object) {
|
||||
xpc_type_t type = xpc_get_type(object);
|
||||
|
||||
if (type == XPC_TYPE_ERROR && nil == _downloadError)
|
||||
{
|
||||
NSString *errMessage = @"";
|
||||
if (object == XPC_ERROR_CONNECTION_INTERRUPTED)
|
||||
{
|
||||
errMessage = @"Got XPC_ERROR_CONNECTION_INTERRUPTED error.";
|
||||
}
|
||||
else if (object == XPC_ERROR_CONNECTION_INVALID)
|
||||
{
|
||||
errMessage = @"Got XPC_ERROR_CONNECTION_INVALID error.";
|
||||
}
|
||||
|
||||
NSDictionary *errInfo = [NSDictionary dictionaryWithObject:errMessage forKey:NSLocalizedDescriptionKey];
|
||||
_downloadError = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errInfo];
|
||||
}
|
||||
else if (type == XPC_TYPE_DICTIONARY && noErr != xpc_dictionary_get_int64(object, SUDownloadServiceErrorCodeKey) && nil == _downloadError)
|
||||
{
|
||||
NSInteger errCode = (NSInteger)xpc_dictionary_get_int64(object, SUDownloadServiceErrorCodeKey);
|
||||
|
||||
const char *errDomainStr = xpc_dictionary_get_string(object, SUDownloadServiceErrorDomainKey);
|
||||
NSString *errDomain = errDomainStr ? [NSString stringWithUTF8String:errDomainStr] : NSCocoaErrorDomain;
|
||||
|
||||
const char *errMessage = xpc_dictionary_get_string(object, SUDownloadServiceErrorMessageKey) ? : "";
|
||||
NSDictionary *errInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:errMessage]
|
||||
forKey:NSLocalizedDescriptionKey];
|
||||
|
||||
_downloadError = [[NSError alloc] initWithDomain:errDomain code:errCode userInfo:errInfo];
|
||||
}
|
||||
|
||||
if (nil != _downloadError)
|
||||
{
|
||||
if ([_delegate respondsToSelector:@selector(download:didFailWithError:)])
|
||||
{
|
||||
void (^block)(void) = ^{
|
||||
[_delegate download:(NSURLDownload *)self didFailWithError:_downloadError];
|
||||
_isDownloading = NO;
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
SULog(@"SUXPCURLDownload: got download error (%d - %@)", [_downloadError code], [_downloadError localizedDescription]);
|
||||
_isDownloading = NO;
|
||||
}
|
||||
}
|
||||
});
|
||||
xpc_release(message);
|
||||
}
|
||||
|
||||
- (id <NSURLDownloadDelegate>)delegate
|
||||
{
|
||||
return _delegate;
|
||||
}
|
||||
|
||||
- (void)setDelegate:(id <NSURLDownloadDelegate>)delegate
|
||||
{
|
||||
_delegate = delegate;
|
||||
}
|
||||
|
||||
- (void)setDestination:(NSString *)path allowOverwrite:(BOOL)allowOverwrite
|
||||
{
|
||||
[_destination release];
|
||||
_destination = [path copy];
|
||||
_allowOverwrite = allowOverwrite;
|
||||
}
|
||||
|
||||
- (void)cancel
|
||||
{
|
||||
if (_connection)
|
||||
{
|
||||
xpc_connection_cancel(_connection);
|
||||
xpc_release(_connection);
|
||||
_connection = NULL;
|
||||
}
|
||||
if (_delegateConnection)
|
||||
{
|
||||
xpc_connection_cancel(_delegateConnection);
|
||||
xpc_release(_delegateConnection);
|
||||
_delegateConnection = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
- (xpc_connection_t)getSandboxXPCService
|
||||
{
|
||||
// Set up two connections, one for instructing the XPC and getting a response,
|
||||
// and another to listen for incoming connections for progress and file creation
|
||||
// notifications.
|
||||
|
||||
_connection = xpc_connection_create("com.devmate.UpdateDownloader", dispatch_get_main_queue());
|
||||
if (!_connection)
|
||||
{
|
||||
NSLog(@"Can't connect to XPC service");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
xpc_connection_set_event_handler(_connection, ^(xpc_object_t event) {
|
||||
xpc_type_t type = xpc_get_type(event);
|
||||
|
||||
if (type == XPC_TYPE_ERROR)
|
||||
{
|
||||
if (event == XPC_ERROR_CONNECTION_INTERRUPTED)
|
||||
{
|
||||
NSLog(@"Got XPC_ERROR_CONNECTION_INTERRUPTED error.");
|
||||
// The service has either cancaled itself, crashed, or been
|
||||
// terminated. The XPC connection is still valid and sending a
|
||||
// message to it will re-launch the service. If the service is
|
||||
// state-full, this is the time to initialize the new service.
|
||||
|
||||
}
|
||||
else if (event == XPC_ERROR_CONNECTION_INVALID)
|
||||
{
|
||||
NSLog(@"Got XPC_ERROR_CONNECTION_INVALID error.");
|
||||
// The service is invalid. Either the service name supplied to
|
||||
// xpc_connection_create() is incorrect or we (this process) have
|
||||
// canceled the service; we can do any cleanup of appliation
|
||||
// state at this point.
|
||||
if (_delegateConnection)
|
||||
{
|
||||
xpc_connection_cancel(_delegateConnection);
|
||||
xpc_release(_delegateConnection);
|
||||
_delegateConnection = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
dispatch_queue_t delegate_queue = dispatch_queue_create("com.devmate.UpdateDownloader.delegate", NULL);
|
||||
assert(delegate_queue != NULL);
|
||||
|
||||
_delegateConnection = xpc_connection_create(NULL, delegate_queue);
|
||||
xpc_connection_set_event_handler(_delegateConnection, ^(xpc_object_t event) {
|
||||
xpc_type_t type = xpc_get_type(event);
|
||||
|
||||
if (type == XPC_TYPE_ERROR)
|
||||
{
|
||||
if (event == XPC_ERROR_TERMINATION_IMMINENT)
|
||||
{
|
||||
NSLog(@"received XPC_ERROR_TERMINATION_IMMINENT");
|
||||
}
|
||||
else if (event == XPC_ERROR_CONNECTION_INVALID)
|
||||
{
|
||||
NSLog(@"progress connection is closed");
|
||||
dispatch_release(delegate_queue);
|
||||
}
|
||||
}
|
||||
else if (type == XPC_TYPE_CONNECTION)
|
||||
{
|
||||
xpc_connection_t peer = (xpc_connection_t)event;
|
||||
// A new anonymous connection, from an XPC service that wants to supply us with updates.
|
||||
char *queue_name = NULL;
|
||||
dispatch_queue_t peer_event_queue = dispatch_queue_create(queue_name, NULL);
|
||||
assert(peer_event_queue != NULL);
|
||||
free(queue_name);
|
||||
|
||||
xpc_connection_set_target_queue(peer, peer_event_queue);
|
||||
xpc_connection_set_event_handler(peer, ^(xpc_object_t nevent) {
|
||||
xpc_type_t ntype = xpc_get_type(nevent);
|
||||
|
||||
if (ntype == XPC_TYPE_ERROR && nevent == XPC_ERROR_CONNECTION_INVALID)
|
||||
dispatch_release(peer_event_queue);
|
||||
if (ntype != XPC_TYPE_DICTIONARY)
|
||||
return;
|
||||
|
||||
__block xpc_object_t answer = xpc_dictionary_create_reply(nevent);
|
||||
|
||||
xpc_dictionary_apply(nevent, ^bool(const char *key, xpc_object_t value) {
|
||||
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
if (0 == strcmp(key, SUDownloadServiceDidBeginDownloadingKey))
|
||||
{
|
||||
if ([_delegate respondsToSelector:@selector(downloadDidBegin:)])
|
||||
{
|
||||
void (^block)(void) = ^ {
|
||||
[_delegate downloadDidBegin:(NSURLDownload *)self];
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:NO];
|
||||
}
|
||||
}
|
||||
else if (0 == strcmp(key, SUDownloadServiceReceivedResponseDataKey))
|
||||
{
|
||||
if ([_delegate respondsToSelector:@selector(download:didReceiveResponse:)])
|
||||
{
|
||||
size_t dataLength = 0;
|
||||
const void * responseDataBytes = xpc_dictionary_get_data(nevent, SUDownloadServiceReceivedResponseDataKey, &dataLength);
|
||||
NSData *responseData = [NSData dataWithBytes:responseDataBytes length:(NSUInteger)dataLength];
|
||||
|
||||
NSURLResponse *response = [NSKeyedUnarchiver unarchiveObjectWithData:responseData];
|
||||
void (^block)(void) = ^ {
|
||||
[_delegate download:(NSURLDownload *)self didReceiveResponse:response];
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:NO];
|
||||
}
|
||||
}
|
||||
else if (0 == strcmp(key, SUDownloadServiceReceivedDataLengthKey))
|
||||
{
|
||||
if ([_delegate respondsToSelector:@selector(download:didReceiveDataOfLength:)])
|
||||
{
|
||||
int64_t dataLength = xpc_dictionary_get_int64(nevent, SUDownloadServiceReceivedDataLengthKey);
|
||||
void (^block)(void) = ^ {
|
||||
[_delegate download:(NSURLDownload *)self didReceiveDataOfLength:(NSUInteger)dataLength];
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:NO];
|
||||
}
|
||||
}
|
||||
else if (0 == strcmp(key, SUDownloadServiceCreatedDestinationPathKey))
|
||||
{
|
||||
[_connectionDestination release];
|
||||
_connectionDestination = [[NSString alloc] initWithCString:xpc_dictionary_get_string(nevent, SUDownloadServiceCreatedDestinationPathKey)
|
||||
encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
else if (0 == strcmp(key, SUDownloadServiceReceivedFailErrorKey))
|
||||
{
|
||||
size_t dataLength = 0;
|
||||
const void * errorDataBytes = xpc_dictionary_get_data(nevent, SUDownloadServiceReceivedFailErrorKey, &dataLength);
|
||||
NSData *errorData = [NSData dataWithBytes:errorDataBytes length:dataLength];
|
||||
|
||||
NSError *error = [NSKeyedUnarchiver unarchiveObjectWithData:errorData];
|
||||
_downloadError = [error retain];
|
||||
}
|
||||
else if (0 == strcmp(key, SUDownloadServiceDidFinishDownloadingKey))
|
||||
{
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
|
||||
NSString *destPath = _destination;
|
||||
if (nil == destPath || [destPath isEqualToString:[destPath lastPathComponent]])
|
||||
{
|
||||
destPath = _connectionDestination;
|
||||
}
|
||||
else if (!_allowOverwrite)
|
||||
{
|
||||
NSUInteger index = 1;
|
||||
NSString *parentFolder = [destPath stringByDeletingLastPathComponent];
|
||||
NSString *initialFileName = [[destPath lastPathComponent] stringByDeletingPathExtension];
|
||||
NSString *fileExtension = [destPath pathExtension];
|
||||
|
||||
while ([fileManager fileExistsAtPath:destPath])
|
||||
{
|
||||
NSString *fileName = [initialFileName stringByAppendingFormat:@"_%ld", index];
|
||||
destPath = [[parentFolder stringByAppendingPathComponent:fileName] stringByAppendingPathExtension:fileExtension];
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
NSError *error = nil;
|
||||
BOOL success = YES;
|
||||
|
||||
if (![destPath isEqualToString:_connectionDestination])
|
||||
{
|
||||
success = success && [fileManager createDirectoryAtPath:[destPath stringByDeletingLastPathComponent]
|
||||
withIntermediateDirectories:YES
|
||||
attributes:nil
|
||||
error:&error];
|
||||
if (success && [fileManager fileExistsAtPath:destPath])
|
||||
success = [fileManager removeItemAtPath:destPath error:&error];
|
||||
success = success && [fileManager moveItemAtPath:_connectionDestination toPath:destPath error:&error];
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
[self setDestination:destPath allowOverwrite:_allowOverwrite];
|
||||
|
||||
void (^block)(void) = ^ {
|
||||
if ([_delegate respondsToSelector:@selector(download:didCreateDestination:)])
|
||||
[_delegate download:(NSURLDownload *)self didCreateDestination:destPath];
|
||||
|
||||
if ([_delegate respondsToSelector:@selector(downloadDidFinish:)])
|
||||
[_delegate downloadDidFinish:(NSURLDownload *)self];
|
||||
|
||||
_isDownloading = NO;
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
_downloadError = [error retain];
|
||||
}
|
||||
}
|
||||
else if (0 == strcmp(key, SUDownloadServiceMIMETypeToDecodeKey))
|
||||
{
|
||||
void (^block)(void) = ^{
|
||||
BOOL shouldDecode = NO;
|
||||
if ([_delegate respondsToSelector:@selector(download:shouldDecodeSourceDataOfMIMEType:)])
|
||||
{
|
||||
NSString *MIMEType = [NSString stringWithCString:xpc_dictionary_get_string(nevent, SUDownloadServiceMIMETypeToDecodeKey)
|
||||
encoding:NSUTF8StringEncoding];
|
||||
shouldDecode = [_delegate download:(NSURLDownload *)self shouldDecodeSourceDataOfMIMEType:MIMEType];
|
||||
}
|
||||
xpc_dictionary_set_bool(answer, SUDownloadServiceShouldDecodeMIMETypeKey, YES);
|
||||
};
|
||||
[self performBlock:block onThread:_startedThread synchronous:YES];
|
||||
}
|
||||
|
||||
[localPool release];
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
xpc_connection_send_message(peer, answer);
|
||||
xpc_release(answer);
|
||||
});
|
||||
xpc_connection_resume(peer);
|
||||
}
|
||||
});
|
||||
|
||||
// Need to resume the service in order for it to process messages.
|
||||
xpc_connection_resume(_delegateConnection);
|
||||
xpc_connection_resume(_connection);
|
||||
return _connection;
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)performBlock:(void (^)(void))block onThread:(NSThread *)thread synchronous:(BOOL)flag
|
||||
{
|
||||
void (^blockCopy)(void) = block != NULL ? Block_copy(block) : NULL;
|
||||
[self performSelector:@selector(fireBlock:) onThread:thread withObject:blockCopy waitUntilDone:flag];
|
||||
}
|
||||
|
||||
- (void)fireBlock:(void (^)(void))block
|
||||
{
|
||||
if (NULL == block)
|
||||
return;
|
||||
|
||||
block();
|
||||
Block_release(block);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,265 @@
|
||||
//
|
||||
// main.m
|
||||
// Downloading XPC Service
|
||||
//
|
||||
// Created by Erik Aderstedt on 2012-08-09.
|
||||
// Based on the Apple sample code 'SandboxedFetch'.
|
||||
//
|
||||
|
||||
#import <xpc/xpc.h>
|
||||
#import <asl.h>
|
||||
#import <assert.h>
|
||||
#import <errno.h>
|
||||
#import <stdio.h>
|
||||
|
||||
#import "SUDownloadServiceConstants.h"
|
||||
#import "SUDSDownloader.h"
|
||||
#import "SUConstants.h"
|
||||
|
||||
static void fetch_process_request(xpc_object_t request, xpc_object_t reply);
|
||||
static void fetch_peer_event_handler(xpc_connection_t peer, xpc_object_t event);
|
||||
static void fetch_event_handler(xpc_connection_t peer);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// Process the XPC request, create a temporary file to hold downloaded,
|
||||
// data, and build/return XPC reply.
|
||||
static void fetch_process_request(xpc_object_t request, xpc_object_t reply)
|
||||
{
|
||||
__block int32_t errcode = 0;
|
||||
__block const char *errmsg = NULL;
|
||||
__block const char *errdomain = NULL;
|
||||
|
||||
xpc_connection_t connection = NULL;
|
||||
|
||||
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
|
||||
do
|
||||
{
|
||||
size_t dataLength = 0;
|
||||
const void *data = xpc_dictionary_get_data(request, SUDownloadServiceURLRequestDataKey, &dataLength);
|
||||
NSData *requestData = [NSData dataWithBytes:data length:dataLength];
|
||||
|
||||
NSURLRequest *urlRequest = [NSKeyedUnarchiver unarchiveObjectWithData:requestData];
|
||||
if (nil == urlRequest)
|
||||
{
|
||||
errcode = SUXPCServiceError;
|
||||
errdomain = [SUSparkleErrorDomain cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
errmsg = "Invalid URL request data";
|
||||
break;
|
||||
}
|
||||
|
||||
// Get the URL and XPC connection from the XPC request
|
||||
connection = xpc_dictionary_create_connection(request, SUDownloadServiceDelegateConnectionKey);
|
||||
if (connection == NULL)
|
||||
{
|
||||
errcode = SUXPCServiceError;
|
||||
errdomain = [SUSparkleErrorDomain cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
errmsg = "Invalid XPC delegate connection";
|
||||
break;
|
||||
}
|
||||
|
||||
// Set up XPC connection endpoint for sending progress reports and receiving cancel notification.
|
||||
__block BOOL shouldStopDownload = NO;
|
||||
xpc_connection_set_event_handler(connection, ^(xpc_object_t event) {
|
||||
xpc_type_t type = xpc_get_type(event);
|
||||
|
||||
// If the remote end of this connection has gone away then stop download
|
||||
if (XPC_TYPE_ERROR == type &&
|
||||
(XPC_ERROR_CONNECTION_INTERRUPTED == event || XPC_ERROR_CONNECTION_INVALID == event))
|
||||
{
|
||||
asl_log(NULL, NULL, ASL_LEVEL_NOTICE, "Stopping download process...\n");
|
||||
shouldStopDownload = YES;
|
||||
}
|
||||
});
|
||||
xpc_connection_resume(connection);
|
||||
|
||||
NSString *destinationPath = [NSString stringWithCString:xpc_dictionary_get_string(request, SUDownloadServiceFilePathKey)
|
||||
encoding:NSUTF8StringEncoding];
|
||||
SUDSDownloader *downloader = [SUDSDownloader downloaderWithURLRequest:urlRequest
|
||||
destinationPath:destinationPath];
|
||||
|
||||
SUDSDownloaderCallBacks callBacks = {0};
|
||||
|
||||
callBacks.downloadDidReceiveData = ^(SUDSDownloader *downloader, NSUInteger dataLength) {
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_int64(message, SUDownloadServiceReceivedDataLengthKey, (int64_t)dataLength);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
xpc_release(answer);
|
||||
};
|
||||
|
||||
callBacks.downloadDidReceiveResponse = ^(SUDSDownloader *downloader, NSURLResponse *response) {
|
||||
NSData *responseData = [NSKeyedArchiver archivedDataWithRootObject:response];
|
||||
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_data(message, SUDownloadServiceReceivedResponseDataKey, [responseData bytes], [responseData length]);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
xpc_release(answer);
|
||||
};
|
||||
|
||||
callBacks.downloadDidCreateDestination = ^(SUDSDownloader *downloader, NSString *destinationPath) {
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_string(message, SUDownloadServiceCreatedDestinationPathKey, [destinationPath cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
xpc_release(answer);
|
||||
};
|
||||
|
||||
callBacks.downloadDidBegin = ^(SUDSDownloader *downloader) {
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_bool(message, SUDownloadServiceDidBeginDownloadingKey, true);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
xpc_release(answer);
|
||||
};
|
||||
|
||||
callBacks.downloadDidFail = ^(SUDSDownloader *downloader, NSError *error) {
|
||||
errcode = (int32_t)[error code];
|
||||
errdomain = [[error domain] cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
errmsg = [[error localizedDescription] cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
NSData *errorData = [NSKeyedArchiver archivedDataWithRootObject:error];
|
||||
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_data(message, SUDownloadServiceReceivedFailErrorKey, [errorData bytes], [errorData length]);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
xpc_release(answer);
|
||||
};
|
||||
|
||||
callBacks.downloadDidFinish = ^(SUDSDownloader *downloader) {
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_bool(message, SUDownloadServiceDidFinishDownloadingKey, true);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
xpc_release(answer);
|
||||
};
|
||||
|
||||
callBacks.downloadShouldDecodeSourceData = ^BOOL(SUDSDownloader *downloader, NSString *MIMEType) {
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_string(message, SUDownloadServiceMIMETypeToDecodeKey, [MIMEType cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
xpc_object_t answer = xpc_connection_send_message_with_reply_sync(connection, message);
|
||||
xpc_release(message);
|
||||
|
||||
BOOL result = NO;
|
||||
if (xpc_get_type(answer) == XPC_TYPE_DICTIONARY)
|
||||
result = (BOOL)xpc_dictionary_get_bool(answer, SUDownloadServiceShouldDecodeMIMETypeKey);
|
||||
xpc_release(answer);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
[downloader setCallBacks:callBacks];
|
||||
|
||||
[downloader startDownload];
|
||||
while ([downloader isInProgress])
|
||||
{
|
||||
if (shouldStopDownload)
|
||||
{
|
||||
[downloader stopDownload];
|
||||
asl_log(NULL, NULL, ASL_LEVEL_NOTICE, "Download process stopped.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, true);
|
||||
}
|
||||
}
|
||||
while (NO);
|
||||
[localPool release];
|
||||
|
||||
#if DEBUG_LOGGING_ENABLED
|
||||
NSLog(@"Download process finished. Will send last message...");
|
||||
#endif
|
||||
// Clean up and add errcode/errmsg to reply
|
||||
if (connection)
|
||||
{
|
||||
xpc_connection_cancel(connection);
|
||||
xpc_release(connection);
|
||||
}
|
||||
|
||||
xpc_dictionary_set_int64(reply, SUDownloadServiceErrorCodeKey, (int64_t)errcode);
|
||||
if (errmsg)
|
||||
{
|
||||
xpc_dictionary_set_string(reply, SUDownloadServiceErrorMessageKey, errmsg);
|
||||
}
|
||||
if (errdomain)
|
||||
{
|
||||
xpc_dictionary_set_string(reply, SUDownloadServiceErrorDomainKey, errdomain);
|
||||
}
|
||||
}
|
||||
|
||||
static void fetch_peer_event_handler(xpc_connection_t peer, xpc_object_t event)
|
||||
{
|
||||
// Get the object type.
|
||||
xpc_type_t type = xpc_get_type(event);
|
||||
if (XPC_TYPE_ERROR == type)
|
||||
{
|
||||
// Handle an error.
|
||||
if (XPC_ERROR_CONNECTION_INVALID == event)
|
||||
{
|
||||
// The client process on the other end of the connection
|
||||
// has either crashed or cancelled the connection.
|
||||
asl_log(NULL, NULL, ASL_LEVEL_NOTICE, "peer(%d) received "
|
||||
"XPC_ERROR_CONNECTION_INVALID",
|
||||
xpc_connection_get_pid(peer));
|
||||
xpc_connection_cancel(peer);
|
||||
}
|
||||
else if (XPC_ERROR_TERMINATION_IMMINENT == event)
|
||||
{
|
||||
// Handle per-connection termination cleanup. This
|
||||
// service is about to exit.
|
||||
asl_log(NULL, NULL, ASL_LEVEL_NOTICE, "peer(%d) received "
|
||||
"XPC_ERROR_TERMINATION_IMMINENT",
|
||||
xpc_connection_get_pid(peer));
|
||||
}
|
||||
}
|
||||
else if (XPC_TYPE_DICTIONARY == type)
|
||||
{
|
||||
xpc_object_t requestMessage = event;
|
||||
xpc_object_t replyMessage = xpc_dictionary_create_reply(requestMessage);
|
||||
assert(replyMessage != NULL);
|
||||
|
||||
// Process request and build a reply message.
|
||||
fetch_process_request(requestMessage, replyMessage);
|
||||
|
||||
xpc_connection_send_message(peer, replyMessage);
|
||||
xpc_release(replyMessage);
|
||||
}
|
||||
}
|
||||
|
||||
static void release_dispatch_queue(void *queue)
|
||||
{
|
||||
dispatch_release(queue);
|
||||
}
|
||||
|
||||
static void fetch_event_handler(xpc_connection_t peer)
|
||||
{
|
||||
// Generate an unique name for the queue to handle messages from
|
||||
// this peer and create a new dispatch queue for it.
|
||||
char *queue_name = NULL;
|
||||
asprintf(&queue_name, "%s-peer-%d", "com.devmate.UpdateDownloader", xpc_connection_get_pid(peer));
|
||||
dispatch_queue_t peer_event_queue = dispatch_queue_create(queue_name, DISPATCH_QUEUE_SERIAL);
|
||||
assert(peer_event_queue != NULL);
|
||||
free(queue_name);
|
||||
|
||||
// Set the target queue for connection.
|
||||
xpc_connection_set_target_queue(peer, peer_event_queue);
|
||||
xpc_connection_set_context(peer, peer_event_queue);
|
||||
xpc_connection_set_finalizer_f(peer, release_dispatch_queue);
|
||||
|
||||
// Set the handler block for connection.
|
||||
xpc_connection_set_event_handler(peer, ^(xpc_object_t event) {
|
||||
fetch_peer_event_handler(peer, event);
|
||||
});
|
||||
|
||||
// Enable the peer connection to receive messages.
|
||||
xpc_connection_resume(peer);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
xpc_main(fetch_event_handler);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
Vendored
BIN
Binary file not shown.
@@ -6,22 +6,22 @@
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.andymatuschak.Sparkle</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MARKETING_VERSION}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<string>${DYLIB_CURRENT_VERSION}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${DYLIB_CURRENT_VERSION}</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// SUInstallServiceConstants.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 8/2/13.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef Sparkle_SUInstallServiceConstants_h
|
||||
#define Sparkle_SUInstallServiceConstants_h
|
||||
|
||||
typedef enum _SUInstallSerciveTask
|
||||
{
|
||||
SUInstallServiceTaskCopyPath = 1LL,
|
||||
SUInstallServiceTaskAuthCopyPath = 2LL,
|
||||
SUInstallServiceTaskLaunchTask = 3LL
|
||||
} SUInstallServiceTask;
|
||||
|
||||
const char * SUInstallServiceTaskTypeKey = "task_type"; // int64_t
|
||||
|
||||
// SUInstallServiceTaskCopyPath & SUInstallServiceTaskAuthCopyPath keys
|
||||
const char * SUInstallServiceSourcePathKey = "source_path"; // c-string
|
||||
const char * SUInstallServiceDestinationPathKey = "destination_path"; // c-string
|
||||
const char * SUInstallServiceTempNameKey = "tmp_name"; // c-string
|
||||
|
||||
// SUInstallServiceTaskLaunchTask keys
|
||||
const char * SUInstallServiceLaunchTaksPathKey = "launch_task_path";
|
||||
const char * SUInstallServiceLaunchTaskArgumentsKey = "launch_task_arguments"; // xpc_array of c-strings
|
||||
const char * SUInstallServiceLaunchTaskEnvironmentKey = "launch_task_environment"; // xpc_dictionary with keys and values of c-strings
|
||||
const char * SUInstallServiceLaunchTaskCurrentDirKey = "launch_task_cur_dir"; // c-string
|
||||
const char * SUInstallServiceLaunchTaskInputDataKey = "launch_task_input_data"; // xpc_data
|
||||
const char * SUInstallServiceLaunchTaskReplyImmediatelyKey = "launch_task_reply_immediately"; // bool
|
||||
|
||||
// Reply keys
|
||||
const char * SUInstallServiceErrorCodeKey = "error_code"; // int64_t
|
||||
const char * SUInstallServiceErrorLocalizedDescriptionKey = "error_localized_description"; // c-string
|
||||
const char * SUInstallServiceLaunchTaskOutputDataKey = "launch_task_output_data"; // xpc_data
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// SUXPCInstaller.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Whitney Young on 3/19/12.
|
||||
// Copyright (c) 2012 FadingRed. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface SUXPCInstaller : NSObject
|
||||
|
||||
+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)tmp error:(NSError **)outError;
|
||||
|
||||
+ (BOOL)copyPathContent:(NSString *)src toDirectory:(NSString *)dstDir error:(NSError **)outError; // dstDir will be created if absent
|
||||
|
||||
+ (void)launchTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
|
||||
|
||||
+ (void)launchTaskWithPath:(NSString *)launchPath
|
||||
arguments:(NSArray *)arguments
|
||||
environment:(NSDictionary *)environment
|
||||
currentDirectoryPath:(NSString *)currentDirPath
|
||||
inputData:(NSData *)inputData
|
||||
waitForTaskResult:(BOOL)waitForTaskResult
|
||||
waitUntilDone:(BOOL)waitUntilDone // for sync/async logic
|
||||
completionHandler:(void (^)(int result, NSData *outputData))completionHandler;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,268 @@
|
||||
//
|
||||
// SUXPCInstaller.m
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Whitney Young on 3/19/12.
|
||||
// Copyright (c) 2012 FadingRed. All rights reserved.
|
||||
//
|
||||
|
||||
#import <xpc/xpc.h>
|
||||
#import "SUXPCInstaller.h"
|
||||
#import "SUInstallServiceConstants.h"
|
||||
|
||||
|
||||
@implementation SUXPCInstaller
|
||||
|
||||
+ (xpc_connection_t)getSandboxXPCService
|
||||
{
|
||||
__block xpc_connection_t serviceConnection = xpc_connection_create("com.devmate.UpdateInstaller", dispatch_get_main_queue());
|
||||
|
||||
if (!serviceConnection)
|
||||
{
|
||||
NSLog(@"Can't connect to XPC service");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
xpc_connection_set_event_handler(serviceConnection, ^(xpc_object_t event) {
|
||||
xpc_type_t type = xpc_get_type(event);
|
||||
|
||||
if (type == XPC_TYPE_ERROR)
|
||||
{
|
||||
if (event == XPC_ERROR_CONNECTION_INVALID)
|
||||
{
|
||||
// The service is invalid. Either the service name supplied to
|
||||
// xpc_connection_create() is incorrect or we (this process) have
|
||||
// canceled the service; we can do any cleanup of appliation
|
||||
// state at this point.
|
||||
xpc_release(serviceConnection);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Need to resume the service in order for it to process messages.
|
||||
xpc_connection_resume(serviceConnection);
|
||||
return (serviceConnection);
|
||||
}
|
||||
|
||||
+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)tmp error:(NSError **)outError
|
||||
{
|
||||
xpc_connection_t connection = [self getSandboxXPCService];
|
||||
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_int64(message, SUInstallServiceTaskTypeKey, (int64_t)SUInstallServiceTaskAuthCopyPath);
|
||||
|
||||
if (src)
|
||||
xpc_dictionary_set_string(message, SUInstallServiceSourcePathKey, [src fileSystemRepresentation]);
|
||||
if (dst)
|
||||
xpc_dictionary_set_string(message, SUInstallServiceDestinationPathKey, [dst fileSystemRepresentation]);
|
||||
if (tmp)
|
||||
xpc_dictionary_set_string(message, SUInstallServiceTempNameKey, [tmp UTF8String]);
|
||||
|
||||
__block BOOL xpcDidReply = NO;
|
||||
__block NSError *error = nil;
|
||||
|
||||
dispatch_queue_t queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
|
||||
xpc_connection_send_message_with_reply(connection, message, queue, ^(xpc_object_t response) {
|
||||
if (XPC_TYPE_ERROR == xpc_get_type(response))
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Internal XPC error."
|
||||
forKey:NSLocalizedDescriptionKey];
|
||||
error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
}
|
||||
else if (XPC_TYPE_DICTIONARY == xpc_get_type(response))
|
||||
{
|
||||
const char *errorString = xpc_dictionary_get_string(response, SUInstallServiceErrorLocalizedDescriptionKey);
|
||||
if (errorString != NULL)
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:[NSString stringWithCString:errorString encoding:NSUTF8StringEncoding]
|
||||
forKey:NSLocalizedDescriptionKey];
|
||||
error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
}
|
||||
}
|
||||
|
||||
xpcDidReply = YES;
|
||||
});
|
||||
|
||||
while (NO == xpcDidReply)
|
||||
{
|
||||
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
|
||||
}
|
||||
|
||||
xpc_release(message);
|
||||
dispatch_release(queue);
|
||||
|
||||
[error autorelease];
|
||||
if (nil != error && NULL != outError)
|
||||
{
|
||||
*outError = error;
|
||||
}
|
||||
|
||||
return (nil == error);
|
||||
}
|
||||
|
||||
+ (BOOL)copyPathContent:(NSString *)src toDirectory:(NSString *)dstDir error:(NSError **)outError
|
||||
{
|
||||
xpc_connection_t connection = [self getSandboxXPCService];
|
||||
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_int64(message, SUInstallServiceTaskTypeKey, (int64_t)SUInstallServiceTaskCopyPath);
|
||||
|
||||
if (src)
|
||||
xpc_dictionary_set_string(message, SUInstallServiceSourcePathKey, [src fileSystemRepresentation]);
|
||||
if (dstDir)
|
||||
xpc_dictionary_set_string(message, SUInstallServiceDestinationPathKey, [dstDir fileSystemRepresentation]);
|
||||
|
||||
__block BOOL xpcDidReply = NO;
|
||||
__block NSError *error = nil;
|
||||
|
||||
dispatch_queue_t queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
|
||||
xpc_connection_send_message_with_reply(connection, message, queue, ^(xpc_object_t response) {
|
||||
if (XPC_TYPE_ERROR == xpc_get_type(response))
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Internal XPC error."
|
||||
forKey:NSLocalizedDescriptionKey];
|
||||
error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
}
|
||||
else if (XPC_TYPE_DICTIONARY == xpc_get_type(response))
|
||||
{
|
||||
const char *errorString = xpc_dictionary_get_string(response, SUInstallServiceErrorLocalizedDescriptionKey);
|
||||
if (errorString != NULL)
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:[NSString stringWithCString:errorString encoding:NSUTF8StringEncoding]
|
||||
forKey:NSLocalizedDescriptionKey];
|
||||
error = [[NSError alloc] initWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
}
|
||||
}
|
||||
|
||||
xpcDidReply = YES;
|
||||
});
|
||||
|
||||
while (NO == xpcDidReply)
|
||||
{
|
||||
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
|
||||
}
|
||||
|
||||
xpc_release(message);
|
||||
dispatch_release(queue);
|
||||
|
||||
[error autorelease];
|
||||
if (nil != error && NULL != outError)
|
||||
{
|
||||
*outError = error;
|
||||
}
|
||||
|
||||
return (nil == error);
|
||||
}
|
||||
|
||||
+ (void)launchTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments
|
||||
{
|
||||
[self launchTaskWithPath:path
|
||||
arguments:arguments
|
||||
environment:nil
|
||||
currentDirectoryPath:nil
|
||||
inputData:nil
|
||||
waitForTaskResult:NO
|
||||
waitUntilDone:YES
|
||||
completionHandler:nil];
|
||||
}
|
||||
|
||||
+ (void)launchTaskWithPath:(NSString *)launchPath
|
||||
arguments:(NSArray *)arguments
|
||||
environment:(NSDictionary *)environment
|
||||
currentDirectoryPath:(NSString *)currentDirPath
|
||||
inputData:(NSData *)inputData
|
||||
waitForTaskResult:(BOOL)waitForTaskResult
|
||||
waitUntilDone:(BOOL)waitUntilDone
|
||||
completionHandler:(void (^)(int result, NSData *outputData))completionHandler
|
||||
{
|
||||
xpc_connection_t connection = [self getSandboxXPCService];
|
||||
|
||||
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
|
||||
xpc_dictionary_set_int64(message, SUInstallServiceTaskTypeKey, (int64_t)SUInstallServiceTaskLaunchTask);
|
||||
|
||||
if ([launchPath length])
|
||||
{
|
||||
xpc_dictionary_set_string(message, SUInstallServiceLaunchTaksPathKey, [launchPath fileSystemRepresentation]);
|
||||
}
|
||||
|
||||
if ([arguments count])
|
||||
{
|
||||
xpc_object_t array = xpc_array_create(NULL, 0);
|
||||
for (NSString *argument in arguments)
|
||||
{
|
||||
if (![argument isKindOfClass:[NSString class]])
|
||||
argument = [argument description];
|
||||
|
||||
xpc_array_set_string(array, XPC_ARRAY_APPEND, [argument UTF8String]);
|
||||
}
|
||||
xpc_dictionary_set_value(message, SUInstallServiceLaunchTaskArgumentsKey, array);
|
||||
xpc_release(array);
|
||||
}
|
||||
|
||||
if ([environment count])
|
||||
{
|
||||
__block xpc_object_t dict = xpc_dictionary_create(NULL, NULL, 0);
|
||||
[environment enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
|
||||
NSString *xpc_key = [key isKindOfClass:[NSString class]] ? key : [key description];
|
||||
NSString *xpc_value = [obj isKindOfClass:[NSString class]] ? obj : [obj description];
|
||||
|
||||
xpc_dictionary_set_string(dict, [xpc_key UTF8String], [xpc_value UTF8String]);
|
||||
}];
|
||||
|
||||
xpc_dictionary_set_value(message, SUInstallServiceLaunchTaskEnvironmentKey, dict);
|
||||
xpc_release(dict);
|
||||
}
|
||||
|
||||
if ([currentDirPath length])
|
||||
{
|
||||
xpc_dictionary_set_string(message, SUInstallServiceLaunchTaskCurrentDirKey, [currentDirPath fileSystemRepresentation]);
|
||||
}
|
||||
|
||||
if ([inputData length])
|
||||
{
|
||||
xpc_dictionary_set_data(message, SUInstallServiceLaunchTaskInputDataKey, [inputData bytes], [inputData length]);
|
||||
}
|
||||
|
||||
xpc_dictionary_set_bool(message, SUInstallServiceLaunchTaskReplyImmediatelyKey, waitForTaskResult ? false : true);
|
||||
|
||||
__block BOOL xpcTaskDidReply = NO;
|
||||
xpc_connection_send_message_with_reply(connection, message, dispatch_get_current_queue(), ^(xpc_object_t response) {
|
||||
int taskResult = 0;
|
||||
NSData *outputData = nil;
|
||||
|
||||
if (completionHandler != NULL)
|
||||
{
|
||||
xpc_type_t type = xpc_get_type(response);
|
||||
if (type == XPC_TYPE_ERROR)
|
||||
{
|
||||
taskResult = SUXPCServiceError;
|
||||
}
|
||||
else if (type == XPC_TYPE_DICTIONARY)
|
||||
{
|
||||
taskResult = (int)xpc_dictionary_get_int64(response, SUInstallServiceErrorCodeKey);
|
||||
|
||||
size_t bytesLen = 0;
|
||||
const void *bytes = xpc_dictionary_get_data(response, SUInstallServiceLaunchTaskOutputDataKey, &bytesLen);
|
||||
if (NULL != bytes)
|
||||
{
|
||||
outputData = [NSData dataWithBytes:bytes length:bytesLen];
|
||||
}
|
||||
}
|
||||
|
||||
completionHandler(taskResult, outputData);
|
||||
}
|
||||
|
||||
xpcTaskDidReply = YES;
|
||||
});
|
||||
xpc_release(message);
|
||||
|
||||
if (waitUntilDone)
|
||||
{
|
||||
while (NO == xpcTaskDidReply)
|
||||
{
|
||||
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>XPCService</key>
|
||||
<dict>
|
||||
<key>ServiceType</key>
|
||||
<string>Application</string>
|
||||
<key>JoinExistingSession</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,377 @@
|
||||
//
|
||||
// main.m
|
||||
// Update
|
||||
//
|
||||
// Created by Whitney Young on 3/19/12.
|
||||
// Copyright (c) 2012 FadingRed. All rights reserved.
|
||||
//
|
||||
|
||||
#include <xpc/xpc.h>
|
||||
#include <asl.h>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SUPlainInstallerInternals.h"
|
||||
#import "SUInstallServiceConstants.h"
|
||||
#import "SULog.h"
|
||||
#import "SUConstants.h"
|
||||
|
||||
static xpc_object_t SUSICopyPathContent(xpc_object_t message)
|
||||
{
|
||||
if (NULL == message)
|
||||
return NULL;
|
||||
|
||||
const char *src = xpc_dictionary_get_string(message, SUInstallServiceSourcePathKey);
|
||||
const char *dst = xpc_dictionary_get_string(message, SUInstallServiceDestinationPathKey);
|
||||
|
||||
NSFileManager *manager = [NSFileManager defaultManager];
|
||||
NSString *sourcePath = src ? [manager stringWithFileSystemRepresentation:src length:strlen(src)] : nil;
|
||||
NSString *targetPath = dst ? [manager stringWithFileSystemRepresentation:dst length:strlen(dst)] : nil;
|
||||
|
||||
NSError *error = nil;
|
||||
do
|
||||
{
|
||||
if (nil == sourcePath)
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Source path is absent." forKey:NSLocalizedDescriptionKey];
|
||||
error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
break;
|
||||
}
|
||||
|
||||
if (nil == targetPath)
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Destination path is absent." forKey:NSLocalizedDescriptionKey];
|
||||
error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
break;
|
||||
}
|
||||
|
||||
NSArray *contents = nil;
|
||||
|
||||
BOOL isSrcDirectory = NO;
|
||||
BOOL isSrcExist = [manager fileExistsAtPath:sourcePath isDirectory:&isSrcDirectory];
|
||||
isSrcDirectory = isSrcDirectory && ![[NSWorkspace sharedWorkspace] isFilePackageAtPath:sourcePath];
|
||||
if (isSrcExist && isSrcDirectory)
|
||||
{
|
||||
contents = [manager contentsOfDirectoryAtPath:sourcePath error:&error];
|
||||
}
|
||||
else if (isSrcExist)
|
||||
{
|
||||
contents = [NSArray arrayWithObject:@""];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObject:@"Source does not exist on disk." forKey:NSLocalizedDescriptionKey];
|
||||
error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUXPCServiceError userInfo:errorInfo];
|
||||
}
|
||||
|
||||
if (nil != error)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
BOOL isDstDirectory = NO;
|
||||
BOOL isDstExist = [manager fileExistsAtPath:targetPath isDirectory:&isDstDirectory];
|
||||
if (isSrcDirectory && (!isDstExist || !isDstDirectory))
|
||||
{
|
||||
if (isDstExist)
|
||||
[manager removeItemAtPath:targetPath error:&error];
|
||||
[manager createDirectoryAtPath:targetPath withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
}
|
||||
else if (!isSrcDirectory)
|
||||
{
|
||||
if (isDstExist && !isDstDirectory)
|
||||
[manager removeItemAtPath:targetPath error:&error];
|
||||
[manager createDirectoryAtPath:targetPath withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
}
|
||||
|
||||
if (nil != error)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
for (NSString *item in contents)
|
||||
{
|
||||
NSString *fromPath = [item length] ? [sourcePath stringByAppendingPathComponent:item] : sourcePath;
|
||||
NSString *toPath = [item length] ? [targetPath stringByAppendingPathComponent:item] : [targetPath stringByAppendingPathComponent:[sourcePath lastPathComponent]];
|
||||
|
||||
if (![manager isReadableFileAtPath:fromPath])
|
||||
{
|
||||
SULog(@"XPC Install Service: will skip \"%@\"", fromPath);
|
||||
continue;
|
||||
}
|
||||
|
||||
SULog(@"XPC Install Service: will copy \"%@\" to \"%@\"", fromPath, toPath);
|
||||
|
||||
if ([manager fileExistsAtPath:toPath])
|
||||
[manager removeItemAtPath:toPath error:&error];
|
||||
|
||||
if (![manager copyItemAtPath:fromPath toPath:toPath error:&error])
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (NO);
|
||||
|
||||
xpc_object_t reply = xpc_dictionary_create_reply(message);
|
||||
if (nil != error)
|
||||
{
|
||||
xpc_dictionary_set_int64(reply, SUInstallServiceErrorCodeKey, (int64_t)[error code]);
|
||||
const char *errorMsg = [[error localizedDescription] length] ? [[error localizedDescription] UTF8String] : "";
|
||||
xpc_dictionary_set_string(reply, SUInstallServiceErrorLocalizedDescriptionKey, errorMsg);
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static xpc_object_t SUISCopyPathWithAuthentication(xpc_object_t message)
|
||||
{
|
||||
if (NULL == message)
|
||||
return NULL;
|
||||
|
||||
const char *src = xpc_dictionary_get_string(message, SUInstallServiceSourcePathKey);
|
||||
const char *dst = xpc_dictionary_get_string(message, SUInstallServiceDestinationPathKey);
|
||||
const char *tmp = xpc_dictionary_get_string(message, SUInstallServiceTempNameKey);
|
||||
|
||||
NSFileManager *manager = [NSFileManager defaultManager];
|
||||
NSString *relaunchPathToCopy = src ? [manager stringWithFileSystemRepresentation:src length:strlen(src)] : nil;
|
||||
NSString *targetPath = dst ? [manager stringWithFileSystemRepresentation:dst length:strlen(dst)] : nil;
|
||||
NSString *temporaryName = tmp ? [NSString stringWithUTF8String:tmp] : nil;
|
||||
NSError *error = nil;
|
||||
BOOL result = [SUPlainInstaller copyPathWithAuthentication:relaunchPathToCopy overPath:targetPath temporaryName:temporaryName error:&error];
|
||||
|
||||
// send response to indicate ok
|
||||
xpc_object_t reply = xpc_dictionary_create_reply(message);
|
||||
if (!result && error != nil)
|
||||
{
|
||||
xpc_dictionary_set_int64(reply, SUInstallServiceErrorCodeKey, (int64_t)[error code]);
|
||||
const char *errorMsg = [[error localizedDescription] length] ? [[error localizedDescription] UTF8String] : "";
|
||||
xpc_dictionary_set_string(reply, SUInstallServiceErrorLocalizedDescriptionKey, errorMsg);
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static xpc_object_t SUISLaunchTask(xpc_object_t message)
|
||||
{
|
||||
if (NULL == message)
|
||||
return NULL;
|
||||
|
||||
const char *path = xpc_dictionary_get_string(message, SUInstallServiceLaunchTaksPathKey);
|
||||
NSString *launchPath = path ? [[NSFileManager defaultManager] stringWithFileSystemRepresentation:path length:strlen(path)] : nil;
|
||||
|
||||
xpc_object_t array = xpc_dictionary_get_value(message, SUInstallServiceLaunchTaskArgumentsKey);
|
||||
NSArray *arguments = nil;
|
||||
if (NULL != array)
|
||||
{
|
||||
size_t count = xpc_array_get_count(array);
|
||||
NSMutableArray *mutableArgs = [NSMutableArray arrayWithCapacity:count];
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
[mutableArgs addObject:[NSString stringWithUTF8String:xpc_array_get_string(array, i)]];
|
||||
}
|
||||
|
||||
arguments = mutableArgs;
|
||||
}
|
||||
|
||||
xpc_object_t dict = xpc_dictionary_get_value(message, SUInstallServiceLaunchTaskEnvironmentKey);
|
||||
NSDictionary *environment = nil;
|
||||
if (NULL != dict)
|
||||
{
|
||||
size_t count = xpc_dictionary_get_count(dict);
|
||||
__block NSMutableDictionary *mutableEnv = [NSMutableDictionary dictionaryWithCapacity:count];
|
||||
|
||||
xpc_dictionary_apply(dict, ^bool(const char *key, xpc_object_t value) {
|
||||
NSString *envKey = [NSString stringWithUTF8String:key];
|
||||
NSString *envValue = [NSString stringWithUTF8String:value];
|
||||
[mutableEnv setObject:envValue forKey:envKey];
|
||||
return true;
|
||||
});
|
||||
|
||||
environment = mutableEnv;
|
||||
}
|
||||
|
||||
path = xpc_dictionary_get_string(message, SUInstallServiceLaunchTaskCurrentDirKey);
|
||||
NSString *currentDirPath = path ? [[NSFileManager defaultManager] stringWithFileSystemRepresentation:path length:strlen(path)] : nil;
|
||||
|
||||
size_t bytesLen = 0;
|
||||
const void *bytes = xpc_dictionary_get_data(message, SUInstallServiceLaunchTaskInputDataKey, &bytesLen);
|
||||
NSData *inputData = bytes ? [NSData dataWithBytes:bytes length:bytesLen] : nil;
|
||||
|
||||
bool shouldReplyImmediatly = xpc_dictionary_get_bool(message, SUInstallServiceLaunchTaskReplyImmediatelyKey);
|
||||
|
||||
// prepare NSTask
|
||||
NSTask *task = [[[NSTask alloc] init] autorelease];
|
||||
NSPipe *inputPipe = [NSPipe pipe];
|
||||
NSPipe *outputPipe = [NSPipe pipe];
|
||||
|
||||
[task setStandardInput:inputPipe];
|
||||
[task setStandardOutput:outputPipe];
|
||||
[task setStandardError:outputPipe];
|
||||
|
||||
if (launchPath != nil)
|
||||
[task setLaunchPath:launchPath];
|
||||
if ([arguments count])
|
||||
[task setArguments:arguments];
|
||||
if ([environment count])
|
||||
[task setEnvironment:environment];
|
||||
if (currentDirPath != nil)
|
||||
[task setCurrentDirectoryPath:currentDirPath];
|
||||
|
||||
__block NSData *outputData = nil;
|
||||
__block int taskResult = 0;
|
||||
__block BOOL isTaskRunning = YES;
|
||||
|
||||
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
|
||||
NSArray *notificationObjects = nil;
|
||||
|
||||
if (!shouldReplyImmediatly)
|
||||
{
|
||||
id object1 = [notificationCenter addObserverForName:NSFileHandleReadToEndOfFileCompletionNotification
|
||||
object:[outputPipe fileHandleForReading]
|
||||
queue:[NSOperationQueue mainQueue]
|
||||
usingBlock:^(NSNotification *note) {
|
||||
outputData = [[[note userInfo] objectForKey:NSFileHandleNotificationDataItem] retain];
|
||||
isTaskRunning = NO;
|
||||
}];
|
||||
|
||||
id object2 = [notificationCenter addObserverForName:NSTaskDidTerminateNotification
|
||||
object:task
|
||||
queue:[NSOperationQueue mainQueue]
|
||||
usingBlock:^(NSNotification *note) {
|
||||
taskResult = [task terminationStatus];
|
||||
}];
|
||||
|
||||
notificationObjects = [NSArray arrayWithObjects:object1, object2, nil];
|
||||
}
|
||||
|
||||
[[outputPipe fileHandleForReading] readToEndOfFileInBackgroundAndNotifyForModes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
|
||||
|
||||
@try
|
||||
{
|
||||
[task launch];
|
||||
|
||||
if ([inputData length])
|
||||
{
|
||||
[[inputPipe fileHandleForWriting] writeData:inputData];
|
||||
[[inputPipe fileHandleForWriting] closeFile];
|
||||
}
|
||||
|
||||
if (!shouldReplyImmediatly)
|
||||
{
|
||||
// loop until we are done receiving the data
|
||||
while (YES == isTaskRunning)
|
||||
{
|
||||
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@catch (...)
|
||||
{
|
||||
taskResult = SUXPCServiceError;
|
||||
}
|
||||
|
||||
// send response to indicate ok
|
||||
xpc_object_t reply = xpc_dictionary_create_reply(message);
|
||||
xpc_dictionary_set_int64(reply, SUInstallServiceErrorCodeKey, (int64_t)taskResult);
|
||||
if (outputData != nil)
|
||||
{
|
||||
xpc_dictionary_set_data(reply, SUInstallServiceLaunchTaskOutputDataKey, [outputData bytes], [outputData length]);
|
||||
}
|
||||
|
||||
for (id object in notificationObjects)
|
||||
{
|
||||
[notificationCenter removeObserver:object];
|
||||
}
|
||||
[outputData release];
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
static void peer_event_handler(xpc_connection_t peer, xpc_object_t event)
|
||||
{
|
||||
xpc_type_t type = xpc_get_type(event);
|
||||
if (type == XPC_TYPE_ERROR)
|
||||
{
|
||||
if (event == XPC_ERROR_CONNECTION_INVALID)
|
||||
{
|
||||
// The client process on the other end of the connection has either
|
||||
// crashed or cancelled the connection. After receiving this error,
|
||||
// the connection is in an invalid state, and you do not need to
|
||||
// call xpc_connection_cancel(). Just tear down any associated state
|
||||
// here.
|
||||
}
|
||||
else if (event == XPC_ERROR_TERMINATION_IMMINENT)
|
||||
{
|
||||
// Handle per-connection termination cleanup.
|
||||
}
|
||||
}
|
||||
else if (type == XPC_TYPE_DICTIONARY)
|
||||
{
|
||||
// Handle the message.
|
||||
SUInstallServiceTask task = (SUInstallServiceTask)xpc_dictionary_get_int64(event, SUInstallServiceTaskTypeKey);
|
||||
|
||||
NSLog(@"XPC Installer: should start task with id = %lld", (int64_t)task);
|
||||
|
||||
xpc_object_t reply = NULL;
|
||||
|
||||
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
|
||||
switch (task)
|
||||
{
|
||||
case SUInstallServiceTaskCopyPath:
|
||||
{
|
||||
reply = SUSICopyPathContent(event);
|
||||
break;
|
||||
}
|
||||
|
||||
case SUInstallServiceTaskAuthCopyPath:
|
||||
{
|
||||
reply = SUISCopyPathWithAuthentication(event);
|
||||
break;
|
||||
}
|
||||
|
||||
case SUInstallServiceTaskLaunchTask:
|
||||
{
|
||||
reply = SUISLaunchTask(event);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
SULog(@"XPC Install Service: Unknown XPC service task %lld", (int64_t)task);
|
||||
|
||||
reply = xpc_dictionary_create_reply(event);
|
||||
xpc_dictionary_set_int64(reply, SUInstallServiceErrorCodeKey, (int64_t)SUXPCServiceError);
|
||||
xpc_dictionary_set_string(reply, SUInstallServiceErrorLocalizedDescriptionKey, "Unknown install cervice task.");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
[localPool release];
|
||||
|
||||
if (NULL == reply)
|
||||
{
|
||||
reply = xpc_dictionary_create_reply(event);
|
||||
}
|
||||
|
||||
xpc_connection_send_message(peer, reply);
|
||||
xpc_release(reply);
|
||||
}
|
||||
}
|
||||
|
||||
static void event_handler(xpc_connection_t peer)
|
||||
{
|
||||
// By defaults, new connections will target the default dispatch
|
||||
// concurrent queue.
|
||||
xpc_connection_set_event_handler(peer, ^(xpc_object_t event) {
|
||||
peer_event_handler(peer, event);
|
||||
});
|
||||
|
||||
// This will tell the connection to begin listening for events. If you
|
||||
// have some other initialization that must be done asynchronously, then
|
||||
// you can defer this call until after that initialization is done.
|
||||
xpc_connection_resume(peer);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
xpc_main(event_handler);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// install_service.pch
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Dmytro Tretiakov on 4/25/14.
|
||||
//
|
||||
//
|
||||
|
||||
#define SPARKLE_BUNDLE [NSBundle mainBundle]
|
||||
#define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", SPARKLE_BUNDLE, comment)
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
Copyright (c) 2006-2013 Andy Matuschak.
|
||||
Copyright (c) 2009-2013 Elgato Systems GmbH.
|
||||
Copyright (c) 2011-2014 Kornel Lesiński.
|
||||
Copyright (c) 2015-2017 Mayur Pawashe.
|
||||
Copyright (c) 2014 C.W. Betts.
|
||||
Copyright (c) 2014 Petroules Corporation.
|
||||
Copyright (c) 2014 Big Nerd Ranch.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
=================
|
||||
EXTERNAL LICENSES
|
||||
=================
|
||||
|
||||
bspatch.c and bsdiff.c, from bsdiff 4.3 <http://www.daemonology.net/bsdiff/>:
|
||||
Copyright (c) 2003-2005 Colin Percival.
|
||||
|
||||
sais.c and sais.c, from sais-lite (2010/08/07) <https://sites.google.com/site/yuta256/sais>:
|
||||
Copyright (c) 2008-2010 Yuta Mori.
|
||||
|
||||
SUDSAVerifier.m:
|
||||
Copyright (c) 2011 Mark Hamlin.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted providing that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
Copyright (c) 2006 Andy Matuschak
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
=================
|
||||
EXTERNAL LICENSES
|
||||
=================
|
||||
|
||||
License for bspatch.c and bsdiff.c, from bsdiff 4.3 (<http://www.daemonology.net/bsdiff/>:
|
||||
/*-
|
||||
* Copyright 2003-2005 Colin Percival
|
||||
* All rights reserved
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted providing that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
@@ -1,47 +1,7 @@
|
||||
.PHONY: all localizable-strings release build test ci
|
||||
|
||||
all: build
|
||||
|
||||
ifndef BUILDDIR
|
||||
BUILDDIR := $(shell mktemp -d "$(TMPDIR)/Sparkle.XXXXXX")
|
||||
endif
|
||||
.PHONY: all localizable-strings
|
||||
|
||||
localizable-strings:
|
||||
rm -f Sparkle/en.lproj/Sparkle.strings
|
||||
genstrings -o Sparkle/en.lproj -s SULocalizedString Sparkle/*.m Sparkle/*.h
|
||||
iconv -f UTF-16 -t UTF-8 < Sparkle/en.lproj/Localizable.strings > Sparkle/en.lproj/Sparkle.strings
|
||||
rm Sparkle/en.lproj/Localizable.strings
|
||||
rm en.lproj/Sparkle.strings || TRUE
|
||||
genstrings -o en.lproj -s SULocalizedString *.m *.h
|
||||
mv en.lproj/Localizable.strings en.lproj/Sparkle.strings
|
||||
|
||||
release:
|
||||
xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)" build
|
||||
./Configurations/release-move-tag.sh
|
||||
open "$(BUILDDIR)/Build/Products/Release/"
|
||||
cat Sparkle.podspec
|
||||
@echo "Don't forget to update CocoaPods! pod trunk push"
|
||||
@echo "Don't forget to upload Sparkle-for-Swift-Package-Manager.zip!"
|
||||
|
||||
build:
|
||||
xcodebuild clean build
|
||||
|
||||
test:
|
||||
xcodebuild -scheme Distribution -configuration Debug test
|
||||
./objc_dep/objc_dep.py -t .
|
||||
|
||||
uitest:
|
||||
xcodebuild -scheme UITests -configuration Debug test
|
||||
|
||||
ci:
|
||||
for i in {7..9} ; do \
|
||||
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
|
||||
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build ) || exit 1 ; \
|
||||
fi ; \
|
||||
done
|
||||
for i in {10..12} ; do \
|
||||
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
|
||||
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build test ) || exit 1 ; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
check-localizations:
|
||||
./Sparkle/CheckLocalizations.swift -root . -htmlPath "$(TMPDIR)/LocalizationsReport.htm"
|
||||
open "$(TMPDIR)/LocalizationsReport.htm"
|
||||
@@ -1,24 +0,0 @@
|
||||
# To update the icon run make -f Makefile-icon
|
||||
# Requires:
|
||||
# autoconf, automake, libtool, pkg-config, pngquant
|
||||
|
||||
ICONDIR=./Resources/Images.xcassets/AppIcon.appiconset
|
||||
OPTIMIZEDICONS=$(ICONDIR)/optimized_16x16.png $(ICONDIR)/optimized_32x32.png $(ICONDIR)/optimized_128x128.png $(ICONDIR)/optimized_512x512.png
|
||||
DESTICON=Resources/AppIcon.icns
|
||||
|
||||
all: $(DESTICON)
|
||||
|
||||
libicns:
|
||||
git clone https://github.com/pornel/libicns.git
|
||||
|
||||
libicns/Makefile: libicns
|
||||
( cd libicns && autoreconf -vif && ./configure )
|
||||
|
||||
libicns/icnsutils/png2icns: libicns/Makefile
|
||||
( cd libicns && make -j8 )
|
||||
|
||||
optimized_%.png: icon_%.png
|
||||
pngquant -s1 -f -o $@ $<
|
||||
|
||||
$(DESTICON): libicns/icnsutils/png2icns $(OPTIMIZEDICONS)
|
||||
./libicns/icnsutils/png2icns $@ $(OPTIMIZEDICONS)
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// NTSynchronousTask.h
|
||||
// CocoatechCore
|
||||
//
|
||||
// Created by Steve Gehrman on 9/29/05.
|
||||
// Copyright 2005 Steve Gehrman. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef NTSYNCHRONOUSTASK_H
|
||||
#define NTSYNCHRONOUSTASK_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NTSynchronousTask : NSObject
|
||||
{
|
||||
@private
|
||||
NSTask *mv_task;
|
||||
NSPipe *mv_outputPipe;
|
||||
NSPipe *mv_inputPipe;
|
||||
|
||||
NSData* mv_output;
|
||||
BOOL mv_done;
|
||||
int mv_result;
|
||||
}
|
||||
|
||||
// pass nil for directory if not needed
|
||||
// returns the result
|
||||
+ (int)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input output:(NSData**)outData;
|
||||
|
||||
+ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input;
|
||||
|
||||
- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input;
|
||||
- (int)result;
|
||||
- (NSData *)output;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,264 @@
|
||||
//
|
||||
// NTSynchronousTask.m
|
||||
// CocoatechCore
|
||||
//
|
||||
// Created by Steve Gehrman on 9/29/05.
|
||||
// Copyright 2005 Steve Gehrman. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NTSynchronousTask.h"
|
||||
#import <AppKit/NSApplication.h>
|
||||
|
||||
@implementation NTSynchronousTask
|
||||
|
||||
//----------------------------------------------------------
|
||||
// task
|
||||
//----------------------------------------------------------
|
||||
- (NSTask *)task
|
||||
{
|
||||
return mv_task;
|
||||
}
|
||||
|
||||
- (void)setTask:(NSTask *)theTask
|
||||
{
|
||||
if (mv_task != theTask) {
|
||||
[mv_task release];
|
||||
mv_task = [theTask retain];
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// outputPipe
|
||||
//----------------------------------------------------------
|
||||
- (NSPipe *)outputPipe
|
||||
{
|
||||
return mv_outputPipe;
|
||||
}
|
||||
|
||||
- (void)setOutputPipe:(NSPipe *)theOutputPipe
|
||||
{
|
||||
if (mv_outputPipe != theOutputPipe) {
|
||||
[mv_outputPipe release];
|
||||
mv_outputPipe = [theOutputPipe retain];
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// inputPipe
|
||||
//----------------------------------------------------------
|
||||
- (NSPipe *)inputPipe
|
||||
{
|
||||
return mv_inputPipe;
|
||||
}
|
||||
|
||||
- (void)setInputPipe:(NSPipe *)theInputPipe
|
||||
{
|
||||
if (mv_inputPipe != theInputPipe) {
|
||||
[mv_inputPipe release];
|
||||
mv_inputPipe = [theInputPipe retain];
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// output
|
||||
//----------------------------------------------------------
|
||||
- (NSData *)output
|
||||
{
|
||||
return mv_output;
|
||||
}
|
||||
|
||||
- (void)setOutput:(NSData *)theOutput
|
||||
{
|
||||
if (mv_output != theOutput) {
|
||||
[mv_output release];
|
||||
mv_output = [theOutput retain];
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// done
|
||||
//----------------------------------------------------------
|
||||
- (BOOL)done
|
||||
{
|
||||
return mv_done;
|
||||
}
|
||||
|
||||
- (void)setDone:(BOOL)flag
|
||||
{
|
||||
mv_done = flag;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// result
|
||||
//----------------------------------------------------------
|
||||
- (int)result
|
||||
{
|
||||
return mv_result;
|
||||
}
|
||||
|
||||
- (void)setResult:(int)theResult
|
||||
{
|
||||
mv_result = theResult;
|
||||
}
|
||||
|
||||
- (void)taskOutputAvailable:(NSNotification*)note
|
||||
{
|
||||
[self setOutput:[[note userInfo] objectForKey:NSFileHandleNotificationDataItem]];
|
||||
|
||||
[self setDone:YES];
|
||||
}
|
||||
|
||||
- (void)taskDidTerminate:(NSNotification*)note
|
||||
{
|
||||
[self setResult:[[self task] terminationStatus]];
|
||||
}
|
||||
|
||||
- (id)init;
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[self setTask:[[[NSTask alloc] init] autorelease]];
|
||||
[self setOutputPipe:[[[NSPipe alloc] init] autorelease]];
|
||||
[self setInputPipe:[[[NSPipe alloc] init] autorelease]];
|
||||
|
||||
[[self task] setStandardInput:[self inputPipe]];
|
||||
[[self task] setStandardOutput:[self outputPipe]];
|
||||
[[self task] setStandardError:[self outputPipe]];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// dealloc
|
||||
//----------------------------------------------------------
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[mv_task release];
|
||||
[mv_outputPipe release];
|
||||
[mv_inputPipe release];
|
||||
[mv_output release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input
|
||||
{
|
||||
BOOL success = NO;
|
||||
|
||||
if (currentDirectory)
|
||||
[[self task] setCurrentDirectoryPath: currentDirectory];
|
||||
|
||||
[[self task] setLaunchPath:toolPath];
|
||||
[[self task] setArguments:args];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(taskOutputAvailable:)
|
||||
name:NSFileHandleReadToEndOfFileCompletionNotification
|
||||
object:[[self outputPipe] fileHandleForReading]];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(taskDidTerminate:)
|
||||
name:NSTaskDidTerminateNotification
|
||||
object:[self task]];
|
||||
|
||||
[[[self outputPipe] fileHandleForReading] readToEndOfFileInBackgroundAndNotifyForModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode, nil]];
|
||||
|
||||
@try
|
||||
{
|
||||
[[self task] launch];
|
||||
success = YES;
|
||||
}
|
||||
@catch (NSException *localException) { }
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (input)
|
||||
{
|
||||
// feed the running task our input
|
||||
[[[self inputPipe] fileHandleForWriting] writeData:input];
|
||||
[[[self inputPipe] fileHandleForWriting] closeFile];
|
||||
}
|
||||
|
||||
// loop until we are done receiving the data
|
||||
if (![self done])
|
||||
{
|
||||
double resolution = 1;
|
||||
BOOL isRunning;
|
||||
NSDate* next;
|
||||
|
||||
do {
|
||||
next = [NSDate dateWithTimeIntervalSinceNow:resolution];
|
||||
|
||||
isRunning = [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
|
||||
beforeDate:next];
|
||||
} while (isRunning && ![self done]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input
|
||||
{
|
||||
// we need this wacky pool here, otherwise we run out of pipes, the pipes are internally autoreleased
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSData* result=nil;
|
||||
|
||||
@try
|
||||
{
|
||||
NTSynchronousTask* task = [[NTSynchronousTask alloc] init];
|
||||
|
||||
[task run:toolPath directory:currentDirectory withArgs:args input:input];
|
||||
|
||||
if ([task result] == 0)
|
||||
result = [[task output] retain];
|
||||
|
||||
[task release];
|
||||
}
|
||||
@catch (NSException *localException) { }
|
||||
|
||||
[pool drain];
|
||||
|
||||
// retained above
|
||||
[result autorelease];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+ (int)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input output:(NSData**)outData
|
||||
{
|
||||
// we need this wacky pool here, otherwise we run out of pipes, the pipes are internally autoreleased
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
int taskResult = 0;
|
||||
if( outData )
|
||||
*outData = nil;
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
NTSynchronousTask* task = [[NTSynchronousTask alloc] init];
|
||||
|
||||
[task run:toolPath directory:currentDirectory withArgs:args input:input];
|
||||
|
||||
taskResult = [task result];
|
||||
if( outData )
|
||||
*outData = [[task output] retain];
|
||||
|
||||
[task release];
|
||||
}
|
||||
NS_HANDLER;
|
||||
taskResult = errCppGeneral;
|
||||
NS_ENDHANDLER;
|
||||
|
||||
[pool drain];
|
||||
|
||||
// retained above
|
||||
if( outData )
|
||||
[*outData autorelease];
|
||||
|
||||
return taskResult;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,27 +0,0 @@
|
||||
// swift-tools-version:5.3
|
||||
import PackageDescription
|
||||
|
||||
// Version is technically not required here, SPM doesn't check
|
||||
let version = "1.27.3"
|
||||
// Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it.
|
||||
let tag = "1.27.3"
|
||||
let checksum = "f0c6b4e6ffc6269a67b0d4ff254e3e8acfc6b3852db7b9957d4c0a5b39044446"
|
||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
|
||||
|
||||
let package = Package(
|
||||
name: "Sparkle",
|
||||
platforms: [.macOS(.v10_11)],
|
||||
products: [
|
||||
.library(
|
||||
name: "Sparkle",
|
||||
targets: ["Sparkle"])
|
||||
],
|
||||
targets: [
|
||||
.binaryTarget(
|
||||
name: "Sparkle",
|
||||
url: url,
|
||||
checksum: checksum
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
Binary file not shown.
+21
-49
@@ -1,68 +1,40 @@
|
||||
# Sparkle 1.x  [](https://github.com/Carthage/Carthage) []() <a href="https://www.stackpath.com/?utm_source=sparkle-github&utm_medium=badge&utm_campaign=readme"><img src="https://img.shields.io/badge/sponsored%20by-StackPath-orange.svg" alt="sponsored by: StackPath"></a>
|
||||
# Sparkle
|
||||
is an easy-to-use software update framework for Cocoa developers.
|
||||
|
||||
Secure and reliable software update framework for Cocoa developers.
|
||||
* True self-updating--no work required from the user.
|
||||
|
||||
<img src="Resources/Screenshot.png" width="732" alt="Sparkle shows familiar update window with release notes">
|
||||
* Displays release notes to the user via WebKit.
|
||||
|
||||
This branch is the production ready, battle-tested version of Sparkle used by thousands of Mac apps.
|
||||
The upcoming Sparkle 2 (currently in beta) can be found in the [2.x branch](https://github.com/sparkle-project/Sparkle/tree/2.x).
|
||||
* Displays a detailed progress window to the user.
|
||||
|
||||
## Features
|
||||
* Supports authentication for installing in secure locations.
|
||||
|
||||
* Seamless. There's no mention of Sparkle; your icons and app name are used.
|
||||
* Secure. Updates are verified using EdDSA signatures and Apple Code Signing.
|
||||
* Fast. Supports delta updates which only patch files that have changed.
|
||||
* Easy to install. Sparkle requires no code in your app, and only needs static files on a web server.
|
||||
* Supports bundles, preference panes, plugins, and other non-.app software. Can install .pkg files for more complicated products.
|
||||
* Handles permissions, quarantine and automatically asks for authentication if needed.
|
||||
* Uses RSS-based appcasts for release information. Appcasts are a de-facto standard supported by 3rd party update-tracking programs and websites.
|
||||
* Stays hidden until second launch for better first impressions.
|
||||
* Truly self-updating — the user can choose to automatically download and install all updates in the background.
|
||||
* Ability to mark updates as critical.
|
||||
* Progress and status notifications for the host app.
|
||||
* Really, really easy to install.
|
||||
|
||||
## Requirements
|
||||
* Uses appcasts for release information.
|
||||
|
||||
* Runtime: macOS 10.9 or greater
|
||||
* Build: Latest major Xcode (stable or beta, whichever is latest) and one major version less; at least Xcode 12 if using Swift Package Manager.
|
||||
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
|
||||
* No sandboxing. Sparkle 1.x can't update sandboxed apps. However, [Sparkle 2.x](https://github.com/sparkle-project/Sparkle/tree/2.x) can.
|
||||
* The user can choose to automatically download and install all updates.
|
||||
|
||||
## Usage
|
||||
* Seamless integration—there's no mention of Sparkle; your icons and app name are used.
|
||||
|
||||
See [getting started guide](https://sparkle-project.org/documentation/). No code is necessary, but a bit of Xcode configuration is required.
|
||||
* Supports DSA signatures for ultra-secure updates.
|
||||
|
||||
## Development
|
||||
* Sparkle requires no code in your app, so it's trivial to upgrade or remove the module.
|
||||
|
||||
This repository uses git submodules, and will not build unless you clone recursively. Also, GitHub-provided ZIP/tar archives are broken due to GitHub not supporting git submodules properly.
|
||||
## New in Sparkle 1.5:
|
||||
|
||||
git clone --recursive https://github.com/sparkle-project/Sparkle
|
||||
* Optionally sends user demographic information to the server when checking for updates.
|
||||
|
||||
### Troubleshooting
|
||||
* Dual-mode garbage collection support for any memory management style.
|
||||
|
||||
* Please check **Console.app**. Sparkle prints detailed information there about all problems it encounters. It often also suggests solutions to the problems, so please read Sparkle's log messages carefully.
|
||||
* Sparkle doesn't bug the user until second launch for better first impressions.
|
||||
|
||||
* Use the `generate_appcast` tool which creates appcast files, correct signatures, and delta updates automatically.
|
||||
* Sparkle can install .pkg files for more complicated products.
|
||||
|
||||
* Make sure the URL specified in [`SUFeedURL`](https://sparkle-project.org/documentation/customization/) is valid (typos/404s are a common error!), and that it uses modern TLS ([test it](https://www.ssllabs.com/ssltest/)).
|
||||
* Supports bundles, preference panes, plugins, and other non-.app software.
|
||||
|
||||
* Delete your app's preferences (in `~/Library/Preferences/<your bundle id>`) if you've set another feed URL programmatically via Sparkle's Objective-C interface.
|
||||
* Supports branches due to minimum OS version requirements.
|
||||
|
||||
### API symbols
|
||||
* Deep delegate support to make Sparkle work exactly as you need.
|
||||
|
||||
Sparkle is built with `-fvisibility=hidden -fvisibility-inlines-hidden` which means no symbols are exported by default.
|
||||
If you are adding a symbol to the public API you must decorate the declaration with the `SU_EXPORT` macro (grep the source code for examples).
|
||||
|
||||
### Building the distribution package
|
||||
|
||||
`cd` to the root of the Sparkle source tree and run `make release`. Sparkle-*VERSION*.tar.bz2 will be created in a temporary directory and revealed in Finder after the build has completed.
|
||||
|
||||
Alternatively, build the Distribution scheme in the Xcode UI.
|
||||
|
||||
### Code of Conduct
|
||||
|
||||
We pledge to have an open and welcoming environment. See our [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
## Project Sponsor
|
||||
|
||||
[StackPath](https://www.stackpath.com/?utm_source=sparkle-github&utm_medium=link&utm_campaign=readme-footer)
|
||||
* Tons of other stuff! [Read more about what's new.](http://andymatuschak.org/articles/2008/05/31/sparkle-15b1-now-available/ "Sparkle 1.5b1: now available!")
|
||||
@@ -3,22 +3,22 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.andymatuschak.Sparkle.relaunch</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.5</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSUIElement</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,40 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;\red38\green38\blue38;}
|
||||
\margl1440\margr1440\vieww17920\viewh13460\viewkind0
|
||||
\deftab720
|
||||
\pard\pardeftab720
|
||||
|
||||
\f0\b\fs26 \cf2 Version 2.1.1
|
||||
\b0 \
|
||||
\pard\pardeftab720\sl380
|
||||
\cf2 \'96 Fixed crash on launch with no internet connection.
|
||||
\fs24 \cf0 \
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
|
||||
\cf0 \
|
||||
\pard\pardeftab720
|
||||
|
||||
\b\fs26 \cf2 Version 2.1\
|
||||
\pard\pardeftab720\sl380
|
||||
|
||||
\b0 \cf2 \'96 SUFeedURL inside Info.plist file is now optional and can be automatically generated by DevMate\
|
||||
\'96 Added an updater state check to avoid initiating duplicate installation processes\
|
||||
\'96 Added a SUUpdaterQueue class\
|
||||
\'96 Added additional delegate methods.\
|
||||
|
||||
\b \
|
||||
\pard\pardeftab720
|
||||
\cf2 Version 2.0.1\
|
||||
\pard\pardeftab720\sl380
|
||||
|
||||
\b0 \cf2 \'96 Bug fixing for the application updates in Sandboxed environment.\
|
||||
\pard\pardeftab720
|
||||
\cf2 \
|
||||
\pard\pardeftab720
|
||||
|
||||
\b \cf2 Version 2.0\
|
||||
\pard\pardeftab720\sl380
|
||||
|
||||
\b0 \cf2 \'96 Works correctly with Sandboxed environment\
|
||||
\'96 Added simple integration of beta updates check and test mode\
|
||||
\'96 Integrated with DevMate service (sends additional info for statistics)}
|
||||
Binary file not shown.
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_16x16.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_16x16@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_32x32.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_32x32@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_128x128.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_128x128@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_256x256.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_256x256@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_512x512.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "icon_512x512@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 662 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
Loaded 100 of 759 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user