Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
021950a5b2 | ||
|
|
2ff0da4f15 | ||
|
|
945968a0ef | ||
|
|
1e4f126f7e | ||
|
|
f47115d81f | ||
|
|
49781561f3 | ||
|
|
1587dd1dc3 | ||
|
|
c0b9eaaa0e | ||
|
|
91ac90ffcf | ||
|
|
8375922755 | ||
|
|
9dec304f64 | ||
|
|
8acd915b7b | ||
|
|
eb36100388 | ||
|
|
fb22a01a08 | ||
|
|
9a32766aeb | ||
|
|
fc468771c1 | ||
|
|
42dbf94738 | ||
|
|
86a0ca3883 | ||
|
|
ddb53f330d | ||
|
|
9dbaae64f1 | ||
|
|
d2f4687333 | ||
|
|
143045d673 | ||
|
|
d67351cb62 | ||
|
|
07d2897250 | ||
|
|
625c942561 | ||
|
|
bb299d075b | ||
|
|
73229f84f7 | ||
|
|
8152516b7f | ||
|
|
96baf2b2ce | ||
|
|
ed5dca3423 | ||
|
|
3a5c620b60 | ||
|
|
23ae527b96 | ||
|
|
2268f96759 | ||
|
|
898e063b4f | ||
|
|
e8f88bf0f1 | ||
|
|
a3407a2dbf | ||
|
|
88933a1e65 | ||
|
|
c3d8e4bbc5 | ||
|
|
f70c2a15b1 | ||
|
|
4eb518de7e | ||
|
|
5b2ce958bd | ||
|
|
077c64419f | ||
|
|
1195d4b5d2 | ||
|
|
c7a7704f3b | ||
|
|
64af6d04c2 | ||
|
|
0af27ea783 | ||
|
|
c36413ce46 | ||
|
|
13b9081873 | ||
|
|
3dccca8044 | ||
|
|
e28c62244a | ||
|
|
fec76fee12 | ||
|
|
ed3eab64d2 | ||
|
|
ee257c4070 | ||
|
|
bfec7a82c0 | ||
|
|
4cd472abe6 | ||
|
|
39268a13e5 | ||
|
|
4864dfb5aa | ||
|
|
71125e3d16 | ||
|
|
779d16e5a7 | ||
|
|
ee2e7fb46b | ||
|
|
d350cf33e0 | ||
|
|
20be93e96b | ||
|
|
668e258cff | ||
|
|
20f90f1544 | ||
|
|
6dbb0d9988 | ||
|
|
f700c96e47 | ||
|
|
626d2c96f5 | ||
|
|
5db4e1505b | ||
|
|
115686cd07 | ||
|
|
e2fc8b4258 | ||
|
|
99f34299f1 | ||
|
|
fdf79bc3a6 | ||
|
|
eb810c7d8f | ||
|
|
38af7cd8cd | ||
|
|
09889d01b1 | ||
|
|
5f2ebb8edf | ||
|
|
ac4ef7d9a0 | ||
|
|
cc7c0ae052 | ||
|
|
b8dc5b3f3d | ||
|
|
43e96f7ee8 | ||
|
|
dbff23ea9d | ||
|
|
ed97e6cb75 | ||
|
|
492664c611 | ||
|
|
fdf07644d0 | ||
|
|
092feba9f9 | ||
|
|
91c813b6ab | ||
|
|
1ced9c428a | ||
|
|
16de00d81d | ||
|
|
3f637c9674 | ||
|
|
4a4dc3629f | ||
|
|
6437e0448a | ||
|
|
c77cd49036 | ||
|
|
9d7e4d676d | ||
|
|
1aa0ee8152 | ||
|
|
9944f2496c | ||
|
|
33907ec4ed | ||
|
|
7892e41b27 | ||
|
|
53983d9452 | ||
|
|
f3a151d473 | ||
|
|
bb624ffa59 | ||
|
|
2963f788e1 | ||
|
|
9017962ab9 | ||
|
|
dd0805c05b | ||
|
|
e4c3c29a85 | ||
|
|
be1e86174a | ||
|
|
8b56fba39b | ||
|
|
db232a263b | ||
|
|
4d952e9961 | ||
|
|
64fd27d918 | ||
|
|
666e86b0bb | ||
|
|
601b4a7a7f | ||
|
|
1316707136 | ||
|
|
e485baf8b8 | ||
|
|
d71fe4a17d | ||
|
|
f990f5fcfc | ||
|
|
07ac154e2e | ||
|
|
48eb25fbf3 | ||
|
|
914bf9e333 | ||
|
|
271b7a1daf | ||
|
|
c11c660f22 | ||
|
|
0e2fe68399 | ||
|
|
852965d824 | ||
|
|
e2c60be805 | ||
|
|
71e15f4b1d | ||
|
|
8a4e4aea2c | ||
|
|
8fea6670c2 | ||
|
|
19fcca11f0 | ||
|
|
fd082a93d4 | ||
|
|
b9e8830f60 | ||
|
|
8576eb7cad | ||
|
|
cf4c02f1b0 | ||
|
|
8e57ca9284 | ||
|
|
3c2f24c340 | ||
|
|
7a9ff3de48 | ||
|
|
a3d4d9fac4 | ||
|
|
a937fa0a17 | ||
|
|
99be33d83b | ||
|
|
0132377a2a | ||
|
|
7fdedad68e | ||
|
|
aa7c46ba4f | ||
|
|
d263bf4fd0 | ||
|
|
bdb3dd8c36 | ||
|
|
c8ff1c0453 | ||
|
|
bb40663d37 | ||
|
|
b8588543cf | ||
|
|
cc332de4d1 | ||
|
|
d6b1c7de54 | ||
|
|
3a3f46f2c1 | ||
|
|
1ae0999082 | ||
|
|
c265e3f7bf | ||
|
|
2faf8ccdd2 | ||
|
|
2f724659a7 | ||
|
|
8cca51d08b | ||
|
|
c9fa1142c9 | ||
|
|
445cc55794 | ||
|
|
013e60204d | ||
|
|
b8fecf1f36 | ||
|
|
b319fb50f9 | ||
|
|
698e737b56 | ||
|
|
0be862708f | ||
|
|
1c8d54166b | ||
|
|
77511c8f19 | ||
|
|
d9a3afb869 | ||
|
|
34a78d59fc | ||
|
|
b95008e248 | ||
|
|
317423ae78 | ||
|
|
27cb8e66fe | ||
|
|
28e8a1fdaf | ||
|
|
f43c284f14 | ||
|
|
cd3d7d9f98 | ||
|
|
864044e44e | ||
|
|
48f18d000c | ||
|
|
d0adc0af39 | ||
|
|
64d95bb36f | ||
|
|
a52cbc38a1 | ||
|
|
530a90cb73 | ||
|
|
168c769eb0 | ||
|
|
5b3577c14c | ||
|
|
b9c664687d | ||
|
|
2a3e88bf96 | ||
|
|
004ac3f9ae | ||
|
|
8a04cc726f | ||
|
|
9f2604b888 | ||
|
|
0171ab2d84 | ||
|
|
c3ffd7f739 | ||
|
|
91e929cbf9 | ||
|
|
9671f7f52d | ||
|
|
2668d18266 | ||
|
|
a4bdbb7ab3 | ||
|
|
a11b1209a9 | ||
|
|
625f229a65 | ||
|
|
0d52e27968 | ||
|
|
674b2238b8 | ||
|
|
4eb2e9af00 | ||
|
|
b64cee8055 | ||
|
|
3163b6a729 | ||
|
|
7b61cdd8f8 | ||
|
|
b29bbdd14b | ||
|
|
5b79151690 | ||
|
|
c315a66151 | ||
|
|
b1d7c3ade9 | ||
|
|
682de21978 | ||
|
|
b5b1e3d51d | ||
|
|
efd94e2de0 | ||
|
|
b3dbb5db1f | ||
|
|
b795f56842 | ||
|
|
c0bda0c372 | ||
|
|
2a693e62bf | ||
|
|
eb3d962526 | ||
|
|
f90700e830 | ||
|
|
2b7f61f2a2 | ||
|
|
ffa449742d | ||
|
|
b40a4eefde | ||
|
|
4e60a61036 | ||
|
|
b3835717ab | ||
|
|
e05b397a00 | ||
|
|
7c48061b85 | ||
|
|
03ca628eef | ||
|
|
7aad8d3586 | ||
|
|
1e89891577 | ||
|
|
dd77e6bc5d | ||
|
|
0fe520f95b | ||
|
|
a6e9c8aff6 | ||
|
|
70f6929ac7 | ||
|
|
a360e60f76 | ||
|
|
2c6941e975 | ||
|
|
2afc553e03 | ||
|
|
5ed9c2615c | ||
|
|
ca22a43e46 | ||
|
|
d157a6fb2a | ||
|
|
503faf49e1 | ||
|
|
45f597cd2a | ||
|
|
26fd1b168a | ||
|
|
a9a0fe54b8 | ||
|
|
1c976de2b7 | ||
|
|
00ea872b76 | ||
|
|
836c0848cc | ||
|
|
95372134c8 | ||
|
|
27ce4ee92c | ||
|
|
6889b9b080 | ||
|
|
c81d190908 | ||
|
|
06826d426d | ||
|
|
62afa6b9a9 | ||
|
|
14839e4ab5 | ||
|
|
58003a8501 | ||
|
|
698fa40647 | ||
|
|
5fe3ee1300 | ||
|
|
b83f4c30f2 | ||
|
|
e3d89ec3db | ||
|
|
27f00c04b0 | ||
|
|
30a72a1bd6 | ||
|
|
254ae41759 | ||
|
|
aa11a9e934 | ||
|
|
0abe9ad994 | ||
|
|
452ff64740 | ||
|
|
47c1761137 | ||
|
|
4f88994cf0 |
No files matched your search
@@ -28,6 +28,13 @@ Icon
|
|||||||
.Spotlight-V100
|
.Spotlight-V100
|
||||||
.Trashes
|
.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
|
# Directories potentially created on remote AFP share
|
||||||
.AppleDB
|
.AppleDB
|
||||||
.AppleDesktop
|
.AppleDesktop
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
language: objective-c
|
language: objective-c
|
||||||
osx_image: xcode7
|
osx_image: xcode8
|
||||||
before_install:
|
before_install:
|
||||||
- brew update
|
- brew update
|
||||||
- brew install macmade/tap/xcode-coveralls
|
|
||||||
script: make ci
|
script: make ci
|
||||||
after_success: xcode-coveralls --exclude /Applications --exclude Tests --exclude Vendor build/Build/Intermediates/Sparkle.build/Coverage/Sparkle.build/Objects-normal/x86_64
|
|
||||||
@@ -1,9 +1,60 @@
|
|||||||
|
# 1.15.0
|
||||||
|
|
||||||
# 1.13.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`.
|
* Changed framework's bundle ID from `org.andymatuschak.Sparkle` to `org.sparkle-project.Sparkle`.
|
||||||
|
|
||||||
# 1.12.0
|
# 1.12.0 (Dec 13, 2015)
|
||||||
|
|
||||||
* Rewritten file operations for updating an app (Zorg)
|
* Rewritten file operations for updating an app (Zorg)
|
||||||
- Ensuring atomic move operations, robust error handling.
|
- Ensuring atomic move operations, robust error handling.
|
||||||
@@ -12,7 +63,7 @@
|
|||||||
- Strong documentation, easier to read code.
|
- Strong documentation, easier to read code.
|
||||||
* Automatic updates won't be installed if the system is about to shut off (Zorg)
|
* Automatic updates won't be installed if the system is about to shut off (Zorg)
|
||||||
* Deprecated serving over HTTP without DSA (Zorg)
|
* Deprecated serving over HTTP without DSA (Zorg)
|
||||||
- Note that Apple has deprecated insecure HTTP in OS X 10.11
|
- Note that Apple has deprecated insecure HTTP in macOS 10.11
|
||||||
* Improved Autoupdate application (Zorg)
|
* Improved Autoupdate application (Zorg)
|
||||||
* Do all the installation work after the runloop is set up
|
* Do all the installation work after the runloop is set up
|
||||||
* TerminationListener only does termination listening now
|
* TerminationListener only does termination listening now
|
||||||
@@ -47,11 +98,11 @@
|
|||||||
* Disallowed automatic updates when user can't write to the bundle (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)
|
* Set the task working directories instead of changing the process working directory (Kevin Wojniak)
|
||||||
|
|
||||||
# 1.11.1
|
# 1.11.1 (Nov 9, 2015)
|
||||||
|
|
||||||
* Don't install automatic updates when system is about to shut down
|
* Don't install automatic updates when system is about to shut down
|
||||||
|
|
||||||
# 1.11.0
|
# 1.11.0 (Aug 24, 2015)
|
||||||
|
|
||||||
* Big improvements to code signing and DSA verification
|
* 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.
|
- 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.
|
||||||
@@ -69,7 +120,7 @@
|
|||||||
* Added logging of appcast/download URL on error (Kornel Lesiński)
|
* Added logging of appcast/download URL on error (Kornel Lesiński)
|
||||||
* More robust reading of Autoupdate.app path from Sparkle bundle
|
* More robust reading of Autoupdate.app path from Sparkle bundle
|
||||||
|
|
||||||
# 1.10.0
|
# 1.10.0 (Apr 26, 2015)
|
||||||
|
|
||||||
* Massive improvements to the BinaryDelta tool (Zorg)
|
* Massive improvements to the BinaryDelta tool (Zorg)
|
||||||
- Ability to track file permissions (Zorg)
|
- Ability to track file permissions (Zorg)
|
||||||
@@ -85,7 +136,7 @@
|
|||||||
* Stdout used for non error outputs (JDuquennoy)
|
* Stdout used for non error outputs (JDuquennoy)
|
||||||
* French locale update (Kent Sutherland)
|
* French locale update (Kent Sutherland)
|
||||||
|
|
||||||
# 1.9.0
|
# 1.9.0 (Jan 26, 2015)
|
||||||
|
|
||||||
* Added SUUpdater delegate method for failures. (Benjamin Gordon)
|
* Added SUUpdater delegate method for failures. (Benjamin Gordon)
|
||||||
* Make the error definitions public (C.W. Betts)
|
* Make the error definitions public (C.W. Betts)
|
||||||
@@ -95,7 +146,7 @@
|
|||||||
* Use Library/Caches rather than app support directory (Kornel Lesiński)
|
* 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)
|
* 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 crashes on 10.7 (Chris Campbell, Ger Teunis)
|
||||||
* Fixed Sparkle tags parsing (Tamás Lustyik)
|
* Fixed Sparkle tags parsing (Tamás Lustyik)
|
||||||
* SULog code cleanups (Kevin Wojniak)
|
* SULog code cleanups (Kevin Wojniak)
|
||||||
* Make sure CFBundleVersion is a semantic version number. (Jake Petroules)
|
* Make sure CFBundleVersion is a semantic version number. (Jake Petroules)
|
||||||
* Replace typedef enums with typedef NS_ENUM to make Swift happier (C.W. Betts)
|
* Replace typedef enums with typedef NS_ENUM to make Swift happier (C.W. Betts)
|
||||||
@@ -108,18 +159,18 @@
|
|||||||
* Turkish localization fixes (Emir)
|
* Turkish localization fixes (Emir)
|
||||||
* Proofing of Ukrainian localization (Vera Tkachenko)
|
* Proofing of Ukrainian localization (Vera Tkachenko)
|
||||||
|
|
||||||
# 1.8.0
|
# 1.8.0 (Jul 26, 2014)
|
||||||
|
|
||||||
* New SUDSAVerifier based on up-to-date OS X APIs (Zachary Waldowski)
|
* New SUDSAVerifier based on up-to-date macOS APIs (Zachary Waldowski)
|
||||||
* Detailed error log for failed signature checks (Kornel Lesiński)
|
* Detailed error log for failed signature checks (Kornel Lesiński)
|
||||||
* Converted Sparkle to ARC (C.W. Betts)
|
* Converted Sparkle to ARC (C.W. Betts)
|
||||||
* Converted ivars to properties. (Jake Petroules)
|
* Converted ivars to properties. (Jake Petroules)
|
||||||
* Cocoapod support (Xhacker Liu)
|
* Cocoapod support (Xhacker Liu)
|
||||||
* Quarantine removal on OS X 10.10 (C.W. Betts)
|
* Quarantine removal on macOS 10.10 (C.W. Betts)
|
||||||
* Updated Japanese localization (1024jp)
|
* Updated Japanese localization (1024jp)
|
||||||
* Added Greek localization
|
* Added Greek localization
|
||||||
|
|
||||||
# 1.7.1
|
# 1.7.1 (Jul 2, 2014)
|
||||||
|
|
||||||
* Removed option to install unverified updates (Kornel Lesiński)
|
* Removed option to install unverified updates (Kornel Lesiński)
|
||||||
* Added detailed log when code signing verification fails (Sam Deane)
|
* Added detailed log when code signing verification fails (Sam Deane)
|
||||||
@@ -136,7 +187,7 @@
|
|||||||
|
|
||||||
# 1.7.0
|
# 1.7.0
|
||||||
|
|
||||||
* Dropped support for OS X 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).
|
* 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)
|
* Removed use of deprecated functions (Zachary Waldowski)
|
||||||
* Switched to modern Obj-C runtime and new literals syntax
|
* Switched to modern Obj-C runtime and new literals syntax
|
||||||
* Removed pre-10.7 code. (C.W. Betts)
|
* Removed pre-10.7 code. (C.W. Betts)
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
# 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/
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
|
SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
|
||||||
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
|
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
|
||||||
|
SPARKLE_FILEOP_TOOL_NAME = fileop
|
||||||
|
|
||||||
SPARKLE_APPEND_VERSION_NUMBER = 1
|
SPARKLE_APPEND_VERSION_NUMBER = 1
|
||||||
|
|
||||||
@@ -15,8 +16,8 @@ SPARKLE_AUTOMATED_DOWNGRADES = 0
|
|||||||
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
|
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
|
||||||
|
|
||||||
SPARKLE_VERSION_MAJOR = 1
|
SPARKLE_VERSION_MAJOR = 1
|
||||||
SPARKLE_VERSION_MINOR = 13
|
SPARKLE_VERSION_MINOR = 15
|
||||||
SPARKLE_VERSION_PATCH = 0
|
SPARKLE_VERSION_PATCH = 1
|
||||||
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
|
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
|
||||||
|
|
||||||
CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION)
|
CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION)
|
||||||
@@ -31,12 +32,15 @@ MACOSX_DEPLOYMENT_TARGET = 10.7
|
|||||||
PRODUCT_NAME = ${TARGET_NAME}
|
PRODUCT_NAME = ${TARGET_NAME}
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}
|
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)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\"
|
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)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" SPARKLE_FILEOP_TOOL_NAME=\"$(SPARKLE_FILEOP_TOOL_NAME)\"
|
||||||
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES
|
CLANG_ENABLE_OBJC_ARC = YES
|
||||||
GCC_ENABLE_PASCAL_STRINGS = NO
|
GCC_ENABLE_PASCAL_STRINGS = NO
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
COMBINE_HIDPI_IMAGES = NO;
|
||||||
|
|
||||||
// Enable warnings
|
// Enable warnings
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
|
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
|
||||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
|
||||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
|
||||||
@@ -51,7 +55,6 @@ CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES
|
|||||||
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
|
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
|
||||||
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES
|
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES
|
||||||
CLANG_WARN_OBJC_RECEIVER_WEAK = YES
|
|
||||||
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
|
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
|
||||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
|
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES
|
CLANG_WARN_UNREACHABLE_CODE = YES
|
||||||
@@ -87,4 +90,4 @@ CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO
|
|||||||
WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties
|
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
|
// 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-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wno-auto-import $(WARNING_CFLAGS_EXTRA)
|
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import $(WARNING_CFLAGS_EXTRA)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// Fileop tool only
|
||||||
|
|
||||||
|
PRODUCT_NAME = $(SPARKLE_FILEOP_TOOL_NAME)
|
||||||
|
SKIP_INSTALL = YES
|
||||||
|
CLANG_ENABLE_MODULES = NO
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SWIFT_VERSION = 3.0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SWIFT_OPTIMIZATION_LEVEL = -Onone
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SWIFT_OPTIMIZATION_LEVEL = -Ofast
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// UI Test only
|
||||||
|
|
||||||
|
#include "ConfigSwift.xcconfig"
|
||||||
|
|
||||||
|
INFOPLIST_FILE = UITests/UITests-Info.plist
|
||||||
|
WRAPPER_EXTENSION = xctest
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.11
|
||||||
|
|
||||||
|
FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR)
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
|
||||||
|
|
||||||
|
TEST_TARGET_NAME = Sparkle Test App
|
||||||
|
USES_XCTRUNNER = YES
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#include "ConfigUITest.xcconfig"
|
||||||
|
|
||||||
|
GCC_GENERATE_TEST_COVERAGE_FILES = NO
|
||||||
|
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "ConfigUITest.xcconfig"
|
||||||
|
#include "ConfigSwiftDebug.xcconfig"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "ConfigUITest.xcconfig"
|
||||||
|
#include "ConfigSwiftRelease.xcconfig"
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
// Unit Test only
|
// Unit Test only
|
||||||
|
|
||||||
|
#include "ConfigSwift.xcconfig"
|
||||||
|
|
||||||
INFOPLIST_FILE = Tests/SparkleTests-Info.plist
|
INFOPLIST_FILE = Tests/SparkleTests-Info.plist
|
||||||
WRAPPER_EXTENSION = xctest
|
WRAPPER_EXTENSION = xctest
|
||||||
OTHER_CFLAGS = $(inherited) -iframework"$(DEVELOPER_FRAMEWORKS_DIR)" -iframework"$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
OTHER_CFLAGS = $(inherited) -iframework"$(DEVELOPER_FRAMEWORKS_DIR)" -iframework"$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
#include "ConfigUnitTest.xcconfig"
|
#include "ConfigUnitTest.xcconfig"
|
||||||
|
#include "ConfigSwiftDebug.xcconfig"
|
||||||
@@ -1 +1,2 @@
|
|||||||
#include "ConfigUnitTest.xcconfig"
|
#include "ConfigUnitTest.xcconfig"
|
||||||
|
#include "ConfigSwiftRelease.xcconfig"
|
||||||
@@ -2,6 +2,13 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$ACTION" = "" ] ; then
|
if [ "$ACTION" = "" ] ; then
|
||||||
|
# Sanity check that the Podspec version matches the Sparkle version
|
||||||
|
spec_version=$(printf "require 'cocoapods'\nspec = %s\nprint spec.version" "$(cat "$SRCROOT/Sparkle.podspec")" | LANG=en_US.UTF-8 ruby)
|
||||||
|
if [ "$spec_version" != "$CURRENT_PROJECT_VERSION" ] ; then
|
||||||
|
echo "podspec version '$spec_version' does not match the current project version '$CURRENT_PROJECT_VERSION'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
|
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
|
||||||
rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2"
|
rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2"
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,20 @@ if [ -z "$SRCROOT" ] || \
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the current Git master hash
|
version="$CURRENT_PROJECT_VERSION"
|
||||||
version=$(cd "$SRCROOT" ; git show-ref --abbrev heads/master | awk '{print $1}')
|
|
||||||
if [ -z "$version" ] ; then
|
# Get version in format 1.x.x-commits-hash
|
||||||
echo "$0: Can't find a Git hash!" 1>&2
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
version="$CURRENT_PROJECT_VERSION git-$version"
|
# remove everything before the first "-" to keep the hash part only
|
||||||
|
versionsuffix=${gitversion#*-};
|
||||||
|
if [ "$versionsuffix" != "$gitversion" ]; then
|
||||||
|
version="$version $versionsuffix"
|
||||||
|
fi
|
||||||
|
|
||||||
# and use it to set the CFBundleShortVersionString value
|
# and use it to set the CFBundleShortVersionString value
|
||||||
export PATH="$PATH:/usr/libexec"
|
export PATH="$PATH:/usr/libexec"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
PROJECT_NAME = Sparkle
|
PROJECT_NAME = Sparkle
|
||||||
PROJECT_NUMBER = 1.7.1
|
PROJECT_NUMBER = 1.14.0
|
||||||
PROJECT_BRIEF = "A software update framework for OS X"
|
PROJECT_BRIEF = "A software update framework for macOS"
|
||||||
PROJECT_LOGO = Resources/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png
|
PROJECT_LOGO = Resources/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png
|
||||||
|
|
||||||
RECURSIVE = YES
|
RECURSIVE = YES
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ localizable-strings:
|
|||||||
release:
|
release:
|
||||||
xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)" build
|
xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)" build
|
||||||
open -R "$(BUILDDIR)/Build/Products/Release/Sparkle-"*.tar.bz2
|
open -R "$(BUILDDIR)/Build/Products/Release/Sparkle-"*.tar.bz2
|
||||||
|
cat Sparkle.podspec
|
||||||
|
@echo "Don't forget to update CocoaPods! pod trunk push"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
xcodebuild clean build
|
xcodebuild clean build
|
||||||
@@ -20,6 +22,9 @@ build:
|
|||||||
test:
|
test:
|
||||||
xcodebuild -scheme Distribution -configuration Debug test
|
xcodebuild -scheme Distribution -configuration Debug test
|
||||||
|
|
||||||
|
uitest:
|
||||||
|
xcodebuild -scheme UITests -configuration Debug test
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
for i in {7..9} ; do \
|
for i in {7..9} ; do \
|
||||||
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
|
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# 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)
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
# Sparkle [](https://travis-ci.org/sparkle-project/Sparkle) [](https://coveralls.io/github/sparkle-project/Sparkle?branch=master) <a href="https://www.bandwidthhog.com/?utm_source=sparkle-github&utm_medium=badge&utm_campaign=readme"><img src="https://img.shields.io/badge/sponsored%20by-Bandwidth%20Hog-orange.svg" alt="sponsored by: bandwidth hog"></a>
|
# Sparkle [](https://travis-ci.org/sparkle-project/Sparkle) [](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>
|
||||||
|
|
||||||
An easy-to-use software update framework for Cocoa developers.
|
An easy-to-use software update framework for Cocoa developers.
|
||||||
|
|
||||||
<img src="Resources/Screenshot.png" width="715" alt="Sparkle shows familiar update window with release notes">
|
<img src="Resources/Screenshot.png" width="732" alt="Sparkle shows familiar update window with release notes">
|
||||||
|
|
||||||
## Changes since 1.5b
|
## Changes since 1.5b
|
||||||
|
|
||||||
* Up-to-date with 10.11 SDK and Xcode 7. Supports OS X 10.7+.
|
* Up-to-date with 10.11 SDK and Xcode 7. Supports macOS 10.7+.
|
||||||
|
* Important security fixes.
|
||||||
* Cleaned up and modernized code, using ARC and Autolayout.
|
* Cleaned up and modernized code, using ARC and Autolayout.
|
||||||
* Merged bugfixes, security fixes and some features from multiple Sparkle forks.
|
|
||||||
* Truly automatic background updates (no UI at all) when user agreed to "Automatically download and install updates in the future."
|
* Truly automatic background updates (no UI at all) when user agreed to "Automatically download and install updates in the future."
|
||||||
* Ability to mark updates as critical.
|
* Ability to mark updates as critical.
|
||||||
* Progress and status notifications for the host app.
|
* Progress and status notifications for the host app.
|
||||||
@@ -17,15 +17,15 @@ An easy-to-use software update framework for Cocoa developers.
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
* Seamless integration—there's no mention of Sparkle; your icons and app name are used.
|
||||||
* True self-updating—the user can choose to automatically download and install all updates.
|
* True self-updating—the user can choose to automatically download and install all updates.
|
||||||
* Displays a detailed progress window to the user.
|
* Displays a detailed progress window to the user.
|
||||||
* Supports authentication for installing in secure locations.
|
* Supports authentication for installing in secure locations.
|
||||||
* Supports Apple Code Signing and DSA signatures for ultra-secure updates.
|
* Supports Apple Code Signing and DSA signatures for ultra-secure updates.
|
||||||
* Easy to install. Sparkle requires no code in your app, so it's trivial to upgrade or remove the framework.
|
* Easy to install. Sparkle requires no code in your app, so it's trivial to upgrade or remove the framework.
|
||||||
* Uses appcasts for release information. Appcasts are supported by 3rd party update-tracking programs and websites.
|
* Uses RSS-based appcasts for release information. Appcasts are supported by 3rd party update-tracking programs and websites.
|
||||||
* Displays release notes to the user via WebKit.
|
* Displays release notes to the user via WebKit.
|
||||||
* Sparkle doesn't bug the user until second launch for better first impressions.
|
* Sparkle doesn't bug the user until second launch for better first impressions.
|
||||||
* Seamless integration—there's no mention of Sparkle; your icons and app name are used.
|
|
||||||
* Deep delegate support to make Sparkle work exactly as you need.
|
* Deep delegate support to make Sparkle work exactly as you need.
|
||||||
* Optionally sends system information to the server when checking for updates.
|
* Optionally sends system information to the server when checking for updates.
|
||||||
* Supports bundles, preference panes, plugins, and other non-.app software. Can install .pkg files for more complicated products.
|
* Supports bundles, preference panes, plugins, and other non-.app software. Can install .pkg files for more complicated products.
|
||||||
@@ -33,7 +33,7 @@ An easy-to-use software update framework for Cocoa developers.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* Runtime: OS X 10.7 or greater
|
* Runtime: macOS 10.7 or greater
|
||||||
* Build: Xcode 5 and 10.8 SDK or greater
|
* Build: Xcode 5 and 10.8 SDK or greater
|
||||||
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
|
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
|
||||||
|
|
||||||
@@ -48,7 +48,10 @@ If you are adding a symbol to the public API you must decorate the declaration w
|
|||||||
|
|
||||||
Alternatively, build the Distribution scheme in the Xcode UI.
|
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
|
## Project Sponsor
|
||||||
|
|
||||||
[Bandwidth Hog](https://www.bandwidthhog.com/?utm_source=sparkle-github&utm_medium=link&utm_campaign=readme-footer) is a service from MaxCDN
|
[StackPath](https://www.stackpath.com/?utm_source=sparkle-github&utm_medium=link&utm_campaign=readme-footer)
|
||||||
that allows you to push software updates to your customers for only 1¢ a gigabyte. Best part is there are no contracts, it is all Pay-as-you-Go.
|
|
||||||
@@ -43,18 +43,21 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
|
||||||
"size" : "256x256",
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "icon_256x256@2x.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
|
||||||
"size" : "512x512",
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "icon_512x512.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "mac",
|
|
||||||
"size" : "512x512",
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "icon_512x512@2x.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 827 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 368 KiB |
@@ -2,7 +2,6 @@
|
|||||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
<channel>
|
<channel>
|
||||||
<title>Your Great App's Changelog</title>
|
<title>Your Great App's Changelog</title>
|
||||||
<link>http://you.com/app/appcast.xml</link>
|
|
||||||
<description>Most recent changes with links to updates.</description>
|
<description>Most recent changes with links to updates.</description>
|
||||||
<language>en</language>
|
<language>en</language>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,7 +1,7 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = "Sparkle"
|
s.name = "Sparkle"
|
||||||
s.version = "1.11.1"
|
s.version = "1.15.1"
|
||||||
s.summary = "A software update framework for OS X"
|
s.summary = "A software update framework for macOS"
|
||||||
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
|
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
|
||||||
s.homepage = "http://sparkle-project.org"
|
s.homepage = "http://sparkle-project.org"
|
||||||
s.documentation_url = "http://sparkle-project.org/documentation/"
|
s.documentation_url = "http://sparkle-project.org/documentation/"
|
||||||
@@ -11,15 +11,16 @@ Pod::Spec.new do |s|
|
|||||||
:file => 'LICENSE'
|
:file => 'LICENSE'
|
||||||
}
|
}
|
||||||
s.authors = {
|
s.authors = {
|
||||||
'Andy Matuschak' => 'andy@andymatuschak.org',
|
|
||||||
'Kornel Lesiński' => 'pornel@pornel.net',
|
|
||||||
'C.W. Betts' => 'computers57@hotmail.com',
|
|
||||||
'Jake Petroules' => 'jake.petroules@petroules.com',
|
|
||||||
'Mayur Pawashe' => 'zorgiepoo@gmail.com',
|
'Mayur Pawashe' => 'zorgiepoo@gmail.com',
|
||||||
|
'Kornel Lesiński' => 'pornel@pornel.net',
|
||||||
|
'Jake Petroules' => 'jake.petroules@petroules.com',
|
||||||
|
'C.W. Betts' => 'computers57@hotmail.com',
|
||||||
|
'Andy Matuschak' => 'andy@andymatuschak.org',
|
||||||
}
|
}
|
||||||
|
|
||||||
s.platform = :osx, '10.7'
|
s.platform = :osx, '10.7'
|
||||||
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.bz2" }
|
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.bz2" }
|
||||||
|
s.source_files = 'Sparkle.framework/Versions/A/Headers/*.h'
|
||||||
|
|
||||||
s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h'
|
s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h'
|
||||||
s.vendored_frameworks = 'Sparkle.framework'
|
s.vendored_frameworks = 'Sparkle.framework'
|
||||||
|
|||||||
@@ -26,14 +26,13 @@
|
|||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1420DF50196247F900203BB0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1420DF4F196247F900203BB0 /* Images.xcassets */; };
|
1420DF50196247F900203BB0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1420DF4F196247F900203BB0 /* Images.xcassets */; };
|
||||||
1420DF51196247F900203BB0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1420DF4F196247F900203BB0 /* Images.xcassets */; };
|
|
||||||
142E0E0019A6954400E4312B /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
142E0E0019A6954400E4312B /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||||
142E0E0219A6A14700E4312B /* Sparkle.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
142E0E0219A6A14700E4312B /* Sparkle.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||||
142E0E0419A6A26F00E4312B /* Autoupdate.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55C14BB7136EEF1500649790 /* Autoupdate.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
142E0E0419A6A26F00E4312B /* Autoupdate.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55C14BB7136EEF1500649790 /* Autoupdate.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||||
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 142E0E0819A83AAC00E4312B /* SUBinaryDeltaTest.m */; };
|
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 142E0E0819A83AAC00E4312B /* SUBinaryDeltaTest.m */; };
|
||||||
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E20FD68CC7005AE3F6 /* SUBinaryDeltaCommon.m */; };
|
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E20FD68CC7005AE3F6 /* SUBinaryDeltaCommon.m */; };
|
||||||
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E00FD68CC7005AE3F6 /* SUBinaryDeltaApply.m */; };
|
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E00FD68CC7005AE3F6 /* SUBinaryDeltaApply.m */; };
|
||||||
14652F7E19A9728A00959E44 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
14652F7E19A9728A00959E44 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; };
|
||||||
14652F8019A9740F00959E44 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
14652F8019A9740F00959E44 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
||||||
14652F8219A9746000959E44 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
|
14652F8219A9746000959E44 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
|
||||||
14652F8419A978C200959E44 /* SUExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 14652F8319A9759F00959E44 /* SUExport.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
14652F8419A978C200959E44 /* SUExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 14652F8319A9759F00959E44 /* SUExport.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
@@ -72,14 +71,19 @@
|
|||||||
55C14F9A136F045400649790 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
55C14F9A136F045400649790 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
||||||
55C14FC7136F05E100649790 /* Sparkle.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61AAE8220A321A7F00D8810D /* Sparkle.strings */; };
|
55C14FC7136F05E100649790 /* Sparkle.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61AAE8220A321A7F00D8810D /* Sparkle.strings */; };
|
||||||
55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 55E6F33219EC9F6C00005E76 /* SUErrors.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 55E6F33219EC9F6C00005E76 /* SUErrors.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
5A4094481C74EA5200983BE0 /* SUAppcastTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA4DCD01C73E5510078F128 /* SUAppcastTest.swift */; };
|
||||||
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||||
5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
|
5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
|
||||||
|
5AD0FA7F1C73F2E2004BCEFF /* testappcast.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */; };
|
||||||
|
5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 14950074195FDF5900BC5B5B /* SUUpdaterTest.m */; };
|
||||||
|
5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */; };
|
||||||
|
5AE7E1111DC81AD3009C2C12 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */; };
|
||||||
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */; };
|
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */ = {isa = PBXBuildFile; fileRef = 5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */; };
|
||||||
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */; };
|
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */; };
|
||||||
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */; };
|
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */; };
|
||||||
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; };
|
||||||
5D06E8EA0FD68CDB005AE3F6 /* SUBinaryDeltaTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E30FD68CC7005AE3F6 /* SUBinaryDeltaTool.m */; };
|
5D06E8EA0FD68CDB005AE3F6 /* SUBinaryDeltaTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E30FD68CC7005AE3F6 /* SUBinaryDeltaTool.m */; };
|
||||||
5D06E8EB0FD68CE4005AE3F6 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
5D06E8EB0FD68CE4005AE3F6 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; };
|
||||||
5D06E8EC0FD68CE4005AE3F6 /* SUBinaryDeltaApply.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E00FD68CC7005AE3F6 /* SUBinaryDeltaApply.m */; };
|
5D06E8EC0FD68CE4005AE3F6 /* SUBinaryDeltaApply.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E00FD68CC7005AE3F6 /* SUBinaryDeltaApply.m */; };
|
||||||
5D06E8ED0FD68CE4005AE3F6 /* SUBinaryDeltaCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E20FD68CC7005AE3F6 /* SUBinaryDeltaCommon.m */; };
|
5D06E8ED0FD68CE4005AE3F6 /* SUBinaryDeltaCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8E20FD68CC7005AE3F6 /* SUBinaryDeltaCommon.m */; };
|
||||||
5D06E8FD0FD68D6B005AE3F6 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D06E8FB0FD68D61005AE3F6 /* libbz2.dylib */; };
|
5D06E8FD0FD68D6B005AE3F6 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D06E8FB0FD68D61005AE3F6 /* libbz2.dylib */; };
|
||||||
@@ -92,6 +96,7 @@
|
|||||||
5D1AF5900FD767AD0065DB48 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF58F0FD767AD0065DB48 /* libxml2.dylib */; };
|
5D1AF5900FD767AD0065DB48 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF58F0FD767AD0065DB48 /* libxml2.dylib */; };
|
||||||
5D1AF59A0FD767E50065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; };
|
5D1AF59A0FD767E50065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; };
|
||||||
5D1AF82B0FD768180065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; };
|
5D1AF82B0FD768180065DB48 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5990FD767E50065DB48 /* libz.dylib */; };
|
||||||
|
5F1510A21C96E591006E1629 /* testnamespaces.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5F1510A11C96E591006E1629 /* testnamespaces.xml */; };
|
||||||
610134730DD250470049ACDF /* SUUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134710DD250470049ACDF /* SUUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
610134730DD250470049ACDF /* SUUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134710DD250470049ACDF /* SUUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
610134740DD250470049ACDF /* SUUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 610134720DD250470049ACDF /* SUUpdateDriver.m */; };
|
610134740DD250470049ACDF /* SUUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 610134720DD250470049ACDF /* SUUpdateDriver.m */; };
|
||||||
6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
6101347B0DD2541A0049ACDF /* SUProbingUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
@@ -100,7 +105,6 @@
|
|||||||
6102FE4A0E07803800F85D09 /* SUDiskImageUnarchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6102FE480E07803800F85D09 /* SUDiskImageUnarchiver.h */; settings = {ATTRIBUTES = (); }; };
|
6102FE4A0E07803800F85D09 /* SUDiskImageUnarchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6102FE480E07803800F85D09 /* SUDiskImageUnarchiver.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
6102FE4B0E07803800F85D09 /* SUDiskImageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */; };
|
6102FE4B0E07803800F85D09 /* SUDiskImageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */; };
|
||||||
6102FE5B0E08C7EC00F85D09 /* SUUnarchiver_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 6102FE590E08C7EC00F85D09 /* SUUnarchiver_Private.h */; settings = {ATTRIBUTES = (); }; };
|
6102FE5B0E08C7EC00F85D09 /* SUUnarchiver_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 6102FE590E08C7EC00F85D09 /* SUUnarchiver_Private.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
610EC1E00CF3A5FE00AE239E /* NTSynchronousTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 610EC1BF0CF3914D00AE239E /* NTSynchronousTask.m */; };
|
|
||||||
611142E910FB1BE5009810AA /* bspatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 611142E810FB1BE5009810AA /* bspatch.h */; };
|
611142E910FB1BE5009810AA /* bspatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 611142E810FB1BE5009810AA /* bspatch.h */; };
|
||||||
61177A1F0D1112E900749C97 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6117796E0D1112E000749C97 /* IOKit.framework */; };
|
61177A1F0D1112E900749C97 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6117796E0D1112E000749C97 /* IOKit.framework */; };
|
||||||
61180BCA0D64138900B4E0D1 /* SUWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 61180BC80D64138900B4E0D1 /* SUWindowController.h */; settings = {ATTRIBUTES = (); }; };
|
61180BCA0D64138900B4E0D1 /* SUWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 61180BC80D64138900B4E0D1 /* SUWindowController.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
@@ -118,7 +122,6 @@
|
|||||||
612DCBB00D488BC60015DBEA /* SUUpdatePermissionPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */; };
|
612DCBB00D488BC60015DBEA /* SUUpdatePermissionPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */; };
|
||||||
6158A1C5137904B300487EC1 /* SUUpdater_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 6158A1C4137904B300487EC1 /* SUUpdater_Private.h */; };
|
6158A1C5137904B300487EC1 /* SUUpdater_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 6158A1C4137904B300487EC1 /* SUUpdater_Private.h */; };
|
||||||
615AE3D00D64DC40001CA7BD /* SUModelTranslation.plist in Resources */ = {isa = PBXBuildFile; fileRef = 615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */; };
|
615AE3D00D64DC40001CA7BD /* SUModelTranslation.plist in Resources */ = {isa = PBXBuildFile; fileRef = 615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */; };
|
||||||
6160E7E10D3B4A8800E9CD71 /* NTSynchronousTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 610EC1C00CF3914D00AE239E /* NTSynchronousTask.h */; settings = {ATTRIBUTES = (); }; };
|
|
||||||
618FA5010DAE88B40026945C /* SUInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 618FA4FF0DAE88B40026945C /* SUInstaller.h */; settings = {ATTRIBUTES = (); }; };
|
618FA5010DAE88B40026945C /* SUInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 618FA4FF0DAE88B40026945C /* SUInstaller.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5000DAE88B40026945C /* SUInstaller.m */; };
|
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 618FA5000DAE88B40026945C /* SUInstaller.m */; };
|
||||||
618FA5050DAE8AB80026945C /* SUPlainInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 618FA5030DAE8AB80026945C /* SUPlainInstaller.h */; settings = {ATTRIBUTES = (); }; };
|
618FA5050DAE8AB80026945C /* SUPlainInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 618FA5030DAE8AB80026945C /* SUPlainInstaller.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
@@ -164,13 +167,33 @@
|
|||||||
61F83F720DBFE140006FDD30 /* SUBasicUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F83F700DBFE137006FDD30 /* SUBasicUpdateDriver.m */; };
|
61F83F720DBFE140006FDD30 /* SUBasicUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F83F700DBFE137006FDD30 /* SUBasicUpdateDriver.m */; };
|
||||||
61F83F740DBFE141006FDD30 /* SUBasicUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 61F83F6F0DBFE137006FDD30 /* SUBasicUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
61F83F740DBFE141006FDD30 /* SUBasicUpdateDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 61F83F6F0DBFE137006FDD30 /* SUBasicUpdateDriver.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
61FA52880E2D9EA400EF58AD /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
61FA52880E2D9EA400EF58AD /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Sparkle.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||||
|
720B16451C66433D006985FB /* SUTestApplicationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720B16431C66433D006985FB /* SUTestApplicationTest.swift */; };
|
||||||
7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */; };
|
7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */; };
|
||||||
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
721BC2111D1DFF05002BC71E /* SUFileOperationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */; };
|
||||||
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */; };
|
||||||
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */; };
|
||||||
|
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; };
|
||||||
721CF1AA1AD7647000D9AC09 /* libxar.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5890FD7678C0065DB48 /* libxar.1.dylib */; };
|
721CF1AA1AD7647000D9AC09 /* libxar.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D1AF5890FD7678C0065DB48 /* libxar.1.dylib */; };
|
||||||
721CF1AB1AD764EB00D9AC09 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D06E8FB0FD68D61005AE3F6 /* libbz2.dylib */; };
|
721CF1AB1AD764EB00D9AC09 /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D06E8FB0FD68D61005AE3F6 /* libbz2.dylib */; };
|
||||||
7223E7631AD1AEFF008E3161 /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; };
|
7223E7631AD1AEFF008E3161 /* sais.c in Sources */ = {isa = PBXBuildFile; fileRef = 7223E7611AD1AEFF008E3161 /* sais.c */; };
|
||||||
|
722954B71D04ADAF00ECF9CA /* fileop.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954B61D04ADAF00ECF9CA /* fileop.m */; };
|
||||||
|
722954BC1D04AE1100ECF9CA /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||||
|
722954BD1D04AE3800ECF9CA /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
|
||||||
|
722954C11D04D9ED00ECF9CA /* fileop in Copy fileop */ = {isa = PBXBuildFile; fileRef = 722954B41D04ADAF00ECF9CA /* fileop */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||||
|
722954C41D04E66F00ECF9CA /* SUFileOperationConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 722954C21D04E66F00ECF9CA /* SUFileOperationConstants.h */; };
|
||||||
|
722954C51D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */; };
|
||||||
|
722954C61D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */; };
|
||||||
|
722954C71D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */; };
|
||||||
|
722954C91D04EA5C00ECF9CA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; };
|
||||||
|
722954CA1D04EA6000ECF9CA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; };
|
||||||
|
722954CB1D04EA6900ECF9CA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B5F8F609C4CEB300B25A18 /* Security.framework */; };
|
||||||
|
722954CC1D04EA7000ECF9CA /* SUOperatingSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */; };
|
||||||
|
723A920E1D722438004A9DED /* SUSpotlightImporterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 723A920D1D722438004A9DED /* SUSpotlightImporterTest.swift */; };
|
||||||
|
723B252D1CEAB3A600909873 /* bscommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 723B252B1CEAB3A600909873 /* bscommon.c */; };
|
||||||
|
723B252E1CEAB3A600909873 /* bscommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 723B252B1CEAB3A600909873 /* bscommon.c */; };
|
||||||
|
723B252F1CEAB3A600909873 /* bscommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 723B252B1CEAB3A600909873 /* bscommon.c */; };
|
||||||
|
723B25301CEAB3A600909873 /* bscommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 723B252C1CEAB3A600909873 /* bscommon.h */; };
|
||||||
|
72544FFC1D0991A4000CFB2C /* SUFileOperationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */; };
|
||||||
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
|
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
|
||||||
726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||||
726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */; };
|
726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */; };
|
||||||
@@ -182,8 +205,9 @@
|
|||||||
7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */; };
|
7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */; };
|
||||||
7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||||
7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
||||||
|
729924731DF3478A00DBCDF5 /* SUUpdateValidator.h in Headers */ = {isa = PBXBuildFile; fileRef = 729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */; };
|
||||||
|
729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = 729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */; };
|
||||||
72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */; };
|
72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */; };
|
||||||
72A4A2411BB656FA00E7820D /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; };
|
|
||||||
72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */; };
|
72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */; };
|
||||||
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */; };
|
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */; };
|
||||||
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; };
|
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; };
|
||||||
@@ -196,10 +220,12 @@
|
|||||||
72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFB1B641961005C701A /* sparkletestcast.xml */; };
|
72E45CFC1B641961005C701A /* sparkletestcast.xml in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFB1B641961005C701A /* sparkletestcast.xml */; };
|
||||||
72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */; };
|
72E45CFE1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem in Resources */ = {isa = PBXBuildFile; fileRef = 72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */; };
|
||||||
72E45DDD1B65C3BD005C701A /* sign_update in Resources */ = {isa = PBXBuildFile; fileRef = 72E45DDC1B65C3BD005C701A /* sign_update */; };
|
72E45DDD1B65C3BD005C701A /* sign_update in Resources */ = {isa = PBXBuildFile; fileRef = 72E45DDC1B65C3BD005C701A /* sign_update */; };
|
||||||
|
72E641801D08D754000404CA /* fileop in Resources */ = {isa = PBXBuildFile; fileRef = 722954B41D04ADAF00ECF9CA /* fileop */; };
|
||||||
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */; };
|
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 767B61AA1972D488004E0C3C /* SUGuidedPackageInstaller.h */; };
|
||||||
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
|
767B61AD1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
|
||||||
767B61AE1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
|
767B61AE1972D488004E0C3C /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 767B61AB1972D488004E0C3C /* SUGuidedPackageInstaller.m */; };
|
||||||
A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */; };
|
A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */; };
|
||||||
|
C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */ = {isa = PBXBuildFile; fileRef = C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */; };
|
||||||
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */; };
|
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */; };
|
||||||
F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */ = {isa = PBXBuildFile; fileRef = F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */; };
|
F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */ = {isa = PBXBuildFile; fileRef = F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */; };
|
||||||
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; };
|
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; };
|
||||||
@@ -297,6 +323,20 @@
|
|||||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||||
remoteInfo = Sparkle;
|
remoteInfo = Sparkle;
|
||||||
};
|
};
|
||||||
|
722954BE1D04D9CB00ECF9CA /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 722954B31D04ADAF00ECF9CA;
|
||||||
|
remoteInfo = fileop;
|
||||||
|
};
|
||||||
|
726B2B621C645FC900388755 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 61B5F90109C4CEE200B25A18;
|
||||||
|
remoteInfo = "Sparkle Test App";
|
||||||
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
@@ -332,6 +372,26 @@
|
|||||||
name = "Copy Frameworks";
|
name = "Copy Frameworks";
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
722954B21D04ADAF00ECF9CA /* CopyFiles */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = /usr/share/man/man1/;
|
||||||
|
dstSubfolderSpec = 0;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 1;
|
||||||
|
};
|
||||||
|
722954C01D04D9D600ECF9CA /* Copy fileop */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 6;
|
||||||
|
files = (
|
||||||
|
722954C11D04D9ED00ECF9CA /* fileop in Copy fileop */,
|
||||||
|
);
|
||||||
|
name = "Copy fileop";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
@@ -371,6 +431,40 @@
|
|||||||
14958C6C19AEBC610061B14F /* test-pubkey.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "test-pubkey.pem"; sourceTree = "<group>"; };
|
14958C6C19AEBC610061B14F /* test-pubkey.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "test-pubkey.pem"; sourceTree = "<group>"; };
|
||||||
149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigCommonCoverage.xcconfig; sourceTree = "<group>"; };
|
149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigCommonCoverage.xcconfig; sourceTree = "<group>"; };
|
||||||
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUnitTestCoverage.xcconfig; sourceTree = "<group>"; };
|
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUnitTestCoverage.xcconfig; sourceTree = "<group>"; };
|
||||||
|
1A985A321C5C329C0001163A /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A331C5C329D0001163A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A341C5C329E0001163A /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A351C5C329E0001163A /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||||
|
1A985A361C5C32A20001163A /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A371C5C32A30001163A /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A381C5C32A40001163A /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A391C5C32A40001163A /* cy */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cy; path = cy.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A3A1C5C32A50001163A /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A3B1C5C32A60001163A /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A3C1C5C32A70001163A /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A3D1C5C32A80001163A /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A3E1C5C32A90001163A /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A3F1C5C32AA0001163A /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A401C5C32AA0001163A /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A411C5C32AB0001163A /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A421C5C32AC0001163A /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A431C5C32AD0001163A /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A441C5C32AE0001163A /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A451C5C32AF0001163A /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A461C5C32B00001163A /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A471C5C32B10001163A /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A481C5C32B10001163A /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A491C5C32B20001163A /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A4A1C5C32B50001163A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||||
|
1A985A4B1C5C32B60001163A /* fr-CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "fr-CA.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||||
|
1A985A4C1C5C32B70001163A /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||||
|
1A985A4D1C5C32B70001163A /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||||
|
1A985A4E1C5C32B80001163A /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A4F1C5C32B90001163A /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A501C5C32BA0001163A /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A511C5C32BB0001163A /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A521C5C32BC0001163A /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
1A985A531C5C32BD0001163A /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUVersionDisplayProtocol.h; sourceTree = "<group>"; };
|
3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUVersionDisplayProtocol.h; sourceTree = "<group>"; };
|
||||||
4607BEA21948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
4607BEA21948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||||
4607BEA31948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nb; path = nb.lproj/SUAutomaticUpdateAlert.xib; sourceTree = "<group>"; };
|
4607BEA31948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nb; path = nb.lproj/SUAutomaticUpdateAlert.xib; sourceTree = "<group>"; };
|
||||||
@@ -443,6 +537,9 @@
|
|||||||
55C14F05136EF6DB00649790 /* SULog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SULog.m; sourceTree = "<group>"; };
|
55C14F05136EF6DB00649790 /* SULog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SULog.m; sourceTree = "<group>"; };
|
||||||
55C14F31136EFC2400649790 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
55C14F31136EFC2400649790 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||||
55E6F33219EC9F6C00005E76 /* SUErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUErrors.h; sourceTree = "<group>"; };
|
55E6F33219EC9F6C00005E76 /* SUErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUErrors.h; sourceTree = "<group>"; };
|
||||||
|
5AA4DCD01C73E5510078F128 /* SUAppcastTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUAppcastTest.swift; sourceTree = "<group>"; };
|
||||||
|
5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testappcast.xml; sourceTree = "<group>"; };
|
||||||
|
5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = AppIcon.icns; sourceTree = "<group>"; };
|
||||||
5AEF45D9189D1CC90030D7DC /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
5AEF45D9189D1CC90030D7DC /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||||
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUInstallerTest.m; sourceTree = "<group>"; };
|
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUInstallerTest.m; sourceTree = "<group>"; };
|
||||||
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.sparkle_guided.pkg; sourceTree = "<group>"; };
|
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.sparkle_guided.pkg; sourceTree = "<group>"; };
|
||||||
@@ -464,6 +561,7 @@
|
|||||||
5D1AF5890FD7678C0065DB48 /* libxar.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxar.1.dylib; path = usr/lib/libxar.1.dylib; sourceTree = SDKROOT; };
|
5D1AF5890FD7678C0065DB48 /* libxar.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxar.1.dylib; path = usr/lib/libxar.1.dylib; sourceTree = SDKROOT; };
|
||||||
5D1AF58F0FD767AD0065DB48 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
|
5D1AF58F0FD767AD0065DB48 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
|
||||||
5D1AF5990FD767E50065DB48 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
5D1AF5990FD767E50065DB48 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||||
|
5F1510A11C96E591006E1629 /* testnamespaces.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testnamespaces.xml; sourceTree = "<group>"; };
|
||||||
610134710DD250470049ACDF /* SUUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateDriver.h; sourceTree = "<group>"; };
|
610134710DD250470049ACDF /* SUUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateDriver.h; sourceTree = "<group>"; };
|
||||||
610134720DD250470049ACDF /* SUUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateDriver.m; sourceTree = "<group>"; };
|
610134720DD250470049ACDF /* SUUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateDriver.m; sourceTree = "<group>"; };
|
||||||
610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUProbingUpdateDriver.h; sourceTree = "<group>"; };
|
610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUProbingUpdateDriver.h; sourceTree = "<group>"; };
|
||||||
@@ -472,8 +570,6 @@
|
|||||||
6102FE480E07803800F85D09 /* SUDiskImageUnarchiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUDiskImageUnarchiver.h; sourceTree = "<group>"; };
|
6102FE480E07803800F85D09 /* SUDiskImageUnarchiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUDiskImageUnarchiver.h; sourceTree = "<group>"; };
|
||||||
6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDiskImageUnarchiver.m; sourceTree = "<group>"; };
|
6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDiskImageUnarchiver.m; sourceTree = "<group>"; };
|
||||||
6102FE590E08C7EC00F85D09 /* SUUnarchiver_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUnarchiver_Private.h; sourceTree = "<group>"; };
|
6102FE590E08C7EC00F85D09 /* SUUnarchiver_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUnarchiver_Private.h; sourceTree = "<group>"; };
|
||||||
610EC1BF0CF3914D00AE239E /* NTSynchronousTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTSynchronousTask.m; sourceTree = "<group>"; };
|
|
||||||
610EC1C00CF3914D00AE239E /* NTSynchronousTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTSynchronousTask.h; sourceTree = "<group>"; };
|
|
||||||
611142E810FB1BE5009810AA /* bspatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bspatch.h; sourceTree = "<group>"; };
|
611142E810FB1BE5009810AA /* bspatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bspatch.h; sourceTree = "<group>"; };
|
||||||
61131A050F846CE600E97AF6 /* da */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
61131A050F846CE600E97AF6 /* da */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||||
61131A090F846D0A00E97AF6 /* zh_CN */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
61131A090F846D0A00E97AF6 /* zh_CN */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||||
@@ -574,15 +670,35 @@
|
|||||||
61F614540E24A12D009F47E7 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
61F614540E24A12D009F47E7 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Sparkle.strings; sourceTree = "<group>"; };
|
||||||
61F83F6F0DBFE137006FDD30 /* SUBasicUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBasicUpdateDriver.h; sourceTree = "<group>"; };
|
61F83F6F0DBFE137006FDD30 /* SUBasicUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBasicUpdateDriver.h; sourceTree = "<group>"; };
|
||||||
61F83F700DBFE137006FDD30 /* SUBasicUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUBasicUpdateDriver.m; sourceTree = "<group>"; };
|
61F83F700DBFE137006FDD30 /* SUBasicUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUBasicUpdateDriver.m; sourceTree = "<group>"; };
|
||||||
|
720B16421C66433D006985FB /* UITests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UITests-Info.plist"; path = "UITests/UITests-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||||
|
720B16431C66433D006985FB /* SUTestApplicationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SUTestApplicationTest.swift; path = UITests/SUTestApplicationTest.swift; sourceTree = SOURCE_ROOT; };
|
||||||
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUUnarchiverTest.swift; sourceTree = "<group>"; };
|
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUUnarchiverTest.swift; sourceTree = "<group>"; };
|
||||||
7223E7611AD1AEFF008E3161 /* sais.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sais.c; sourceTree = "<group>"; };
|
7223E7611AD1AEFF008E3161 /* sais.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sais.c; sourceTree = "<group>"; };
|
||||||
7223E7621AD1AEFF008E3161 /* sais.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sais.h; sourceTree = "<group>"; };
|
7223E7621AD1AEFF008E3161 /* sais.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sais.h; sourceTree = "<group>"; };
|
||||||
|
722954B41D04ADAF00ECF9CA /* fileop */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fileop; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
722954B61D04ADAF00ECF9CA /* fileop.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = fileop.m; sourceTree = "<group>"; };
|
||||||
|
722954C21D04E66F00ECF9CA /* SUFileOperationConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFileOperationConstants.h; sourceTree = "<group>"; };
|
||||||
|
722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUFileOperationConstants.m; sourceTree = "<group>"; };
|
||||||
|
722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigFileop.xcconfig; sourceTree = "<group>"; };
|
||||||
|
722FB7471DD51331001D40CE /* ConfigSwift.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwift.xcconfig; sourceTree = "<group>"; };
|
||||||
|
722FB7481DD51350001D40CE /* ConfigSwiftDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwiftDebug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
722FB7491DD51350001D40CE /* ConfigSwiftRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwiftRelease.xcconfig; sourceTree = "<group>"; };
|
||||||
|
723A920D1D722438004A9DED /* SUSpotlightImporterTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUSpotlightImporterTest.swift; sourceTree = "<group>"; };
|
||||||
|
723B252B1CEAB3A600909873 /* bscommon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bscommon.c; sourceTree = "<group>"; };
|
||||||
|
723B252C1CEAB3A600909873 /* bscommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bscommon.h; sourceTree = "<group>"; };
|
||||||
7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUBinaryDeltaCreate.m; sourceTree = "<group>"; };
|
7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUBinaryDeltaCreate.m; sourceTree = "<group>"; };
|
||||||
7268AC641AD634E400C3E0C1 /* SUBinaryDeltaCreate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBinaryDeltaCreate.h; sourceTree = "<group>"; };
|
7268AC641AD634E400C3E0C1 /* SUBinaryDeltaCreate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUBinaryDeltaCreate.h; sourceTree = "<group>"; };
|
||||||
|
726B2B5D1C645FC900388755 /* UI Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UI Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUOperatingSystem.h; sourceTree = "<group>"; };
|
726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUOperatingSystem.h; sourceTree = "<group>"; };
|
||||||
726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUOperatingSystem.m; sourceTree = "<group>"; };
|
726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUOperatingSystem.m; sourceTree = "<group>"; };
|
||||||
7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFileManager.h; sourceTree = "<group>"; };
|
7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFileManager.h; sourceTree = "<group>"; };
|
||||||
7275F9C01B5F1F2900B1D19E /* SUFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUFileManager.m; sourceTree = "<group>"; };
|
7275F9C01B5F1F2900B1D19E /* SUFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUFileManager.m; sourceTree = "<group>"; };
|
||||||
|
729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateValidator.h; sourceTree = "<group>"; };
|
||||||
|
729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateValidator.m; sourceTree = "<group>"; };
|
||||||
|
729F10FD1C65A9B500DFCCC5 /* ConfigUITest.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITest.xcconfig; sourceTree = "<group>"; };
|
||||||
|
729F10FE1C65A9B500DFCCC5 /* ConfigUITestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestCoverage.xcconfig; sourceTree = "<group>"; };
|
||||||
|
729F10FF1C65A9B500DFCCC5 /* ConfigUITestDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestDebug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
729F11001C65A9B500DFCCC5 /* ConfigUITestRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestRelease.xcconfig; sourceTree = "<group>"; };
|
||||||
72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUFileManagerTest.swift; sourceTree = "<group>"; };
|
72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUFileManagerTest.swift; sourceTree = "<group>"; };
|
||||||
72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = SparkleTestCodeSignApp.tar.gz; sourceTree = "<group>"; };
|
72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = SparkleTestCodeSignApp.tar.gz; sourceTree = "<group>"; };
|
||||||
72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */ = {isa = PBXFileReference; lastKnownFileType = archive.tar; path = SparkleTestCodeSignApp.tar; sourceTree = "<group>"; };
|
72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */ = {isa = PBXFileReference; lastKnownFileType = archive.tar; path = SparkleTestCodeSignApp.tar; sourceTree = "<group>"; };
|
||||||
@@ -604,6 +720,7 @@
|
|||||||
8DC2EF5B0486A6940098B216 /* Sparkle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
8DC2EF5B0486A6940098B216 /* Sparkle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTestWebServer.h; sourceTree = "<group>"; };
|
A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTestWebServer.h; sourceTree = "<group>"; };
|
||||||
A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTestWebServer.m; sourceTree = "<group>"; };
|
A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTestWebServer.m; sourceTree = "<group>"; };
|
||||||
|
C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */ = {isa = PBXFileReference; lastKnownFileType = file; path = SparkleTestCodeSignApp.enc.dmg; sourceTree = "<group>"; };
|
||||||
F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUCodeSigningVerifierTest.m; sourceTree = "<group>"; };
|
F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUCodeSigningVerifierTest.m; sourceTree = "<group>"; };
|
||||||
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SparkleTestCodeSignApp.zip; sourceTree = "<group>"; };
|
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SparkleTestCodeSignApp.zip; sourceTree = "<group>"; };
|
||||||
FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkDebug.xcconfig; sourceTree = "<group>"; };
|
FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkDebug.xcconfig; sourceTree = "<group>"; };
|
||||||
@@ -672,6 +789,23 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
722954B11D04ADAF00ECF9CA /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
722954CB1D04EA6900ECF9CA /* Security.framework in Frameworks */,
|
||||||
|
722954CA1D04EA6000ECF9CA /* AppKit.framework in Frameworks */,
|
||||||
|
722954C91D04EA5C00ECF9CA /* Foundation.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
726B2B5A1C645FC900388755 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
8DC2EF560486A6940098B216 /* Frameworks */ = {
|
8DC2EF560486A6940098B216 /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -699,6 +833,8 @@
|
|||||||
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */,
|
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */,
|
||||||
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */,
|
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */,
|
||||||
8DC2EF5B0486A6940098B216 /* Sparkle.framework */,
|
8DC2EF5B0486A6940098B216 /* Sparkle.framework */,
|
||||||
|
726B2B5D1C645FC900388755 /* UI Tests.xctest */,
|
||||||
|
722954B41D04ADAF00ECF9CA /* fileop */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -713,6 +849,7 @@
|
|||||||
14732BB51960ECBA00593899 /* Third Party */,
|
14732BB51960ECBA00593899 /* Third Party */,
|
||||||
1420DE391962322200203BB0 /* Documentation */,
|
1420DE391962322200203BB0 /* Documentation */,
|
||||||
FA1941C40D94A6EA00DD942E /* Configurations */,
|
FA1941C40D94A6EA00DD942E /* Configurations */,
|
||||||
|
726B2B5E1C645FC900388755 /* UI Tests */,
|
||||||
0867D69AFE84028FC02AAC07 /* Frameworks */,
|
0867D69AFE84028FC02AAC07 /* Frameworks */,
|
||||||
034768DFFF38A50411DB9C8B /* Products */,
|
034768DFFF38A50411DB9C8B /* Products */,
|
||||||
);
|
);
|
||||||
@@ -765,7 +902,6 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
14732BB61960ECE800593899 /* bsdiff */,
|
14732BB61960ECE800593899 /* bsdiff */,
|
||||||
14732BB71960ECF000593899 /* CocoatechCore */,
|
|
||||||
);
|
);
|
||||||
name = "Third Party";
|
name = "Third Party";
|
||||||
path = Vendor;
|
path = Vendor;
|
||||||
@@ -774,6 +910,8 @@
|
|||||||
14732BB61960ECE800593899 /* bsdiff */ = {
|
14732BB61960ECE800593899 /* bsdiff */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
723B252B1CEAB3A600909873 /* bscommon.c */,
|
||||||
|
723B252C1CEAB3A600909873 /* bscommon.h */,
|
||||||
5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */,
|
5D06E8DB0FD68CB9005AE3F6 /* bsdiff.c */,
|
||||||
5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */,
|
5D06E8DC0FD68CB9005AE3F6 /* bspatch.c */,
|
||||||
611142E810FB1BE5009810AA /* bspatch.h */,
|
611142E810FB1BE5009810AA /* bspatch.h */,
|
||||||
@@ -783,15 +921,6 @@
|
|||||||
path = bsdiff;
|
path = bsdiff;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
14732BB71960ECF000593899 /* CocoatechCore */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
610EC1C00CF3914D00AE239E /* NTSynchronousTask.h */,
|
|
||||||
610EC1BF0CF3914D00AE239E /* NTSynchronousTask.m */,
|
|
||||||
);
|
|
||||||
path = CocoatechCore;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
14732BB81960EEB600593899 /* Resources */ = {
|
14732BB81960EEB600593899 /* Resources */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -803,6 +932,7 @@
|
|||||||
1420DF4F196247F900203BB0 /* Images.xcassets */,
|
1420DF4F196247F900203BB0 /* Images.xcassets */,
|
||||||
14732BBC1960EFB500593899 /* README.markdown */,
|
14732BBC1960EFB500593899 /* README.markdown */,
|
||||||
14732BB91960EEEE00593899 /* SampleAppcast.xml */,
|
14732BB91960EEEE00593899 /* SampleAppcast.xml */,
|
||||||
|
5AE7E10E1DC81ACA009C2C12 /* AppIcon.icns */,
|
||||||
615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */,
|
615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */,
|
||||||
);
|
);
|
||||||
path = Resources;
|
path = Resources;
|
||||||
@@ -837,6 +967,7 @@
|
|||||||
children = (
|
children = (
|
||||||
14958C6B19AEBC530061B14F /* signed-test-file.txt */,
|
14958C6B19AEBC530061B14F /* signed-test-file.txt */,
|
||||||
72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */,
|
72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */,
|
||||||
|
C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */,
|
||||||
72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */,
|
72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */,
|
||||||
72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */,
|
72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */,
|
||||||
72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */,
|
72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */,
|
||||||
@@ -844,6 +975,8 @@
|
|||||||
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */,
|
F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */,
|
||||||
14958C6C19AEBC610061B14F /* test-pubkey.pem */,
|
14958C6C19AEBC610061B14F /* test-pubkey.pem */,
|
||||||
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */,
|
5AF6C74E1AEA46D10014A3AB /* test.sparkle_guided.pkg */,
|
||||||
|
5AD0FA7E1C73F2E2004BCEFF /* testappcast.xml */,
|
||||||
|
5F1510A11C96E591006E1629 /* testnamespaces.xml */,
|
||||||
);
|
);
|
||||||
path = Resources;
|
path = Resources;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -851,6 +984,7 @@
|
|||||||
55C14BD5136EEFD000649790 /* Autoupdate */ = {
|
55C14BD5136EEFD000649790 /* Autoupdate */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
722954B51D04ADAF00ECF9CA /* fileop */,
|
||||||
55C14BB9136EEF1500649790 /* Autoupdate-Info.plist */,
|
55C14BB9136EEF1500649790 /* Autoupdate-Info.plist */,
|
||||||
55C14BD3136EEFCE00649790 /* Autoupdate.m */,
|
55C14BD3136EEFCE00649790 /* Autoupdate.m */,
|
||||||
);
|
);
|
||||||
@@ -894,11 +1028,13 @@
|
|||||||
14958C7019AEBE350061B14F /* Resources */,
|
14958C7019AEBE350061B14F /* Resources */,
|
||||||
72AFC6121B9A944200F6B565 /* Sparkle Unit Tests-Bridging-Header.h */,
|
72AFC6121B9A944200F6B565 /* Sparkle Unit Tests-Bridging-Header.h */,
|
||||||
612279DA0DB5470200AB99EA /* SparkleTests-Info.plist */,
|
612279DA0DB5470200AB99EA /* SparkleTests-Info.plist */,
|
||||||
|
5AA4DCD01C73E5510078F128 /* SUAppcastTest.swift */,
|
||||||
142E0E0819A83AAC00E4312B /* SUBinaryDeltaTest.m */,
|
142E0E0819A83AAC00E4312B /* SUBinaryDeltaTest.m */,
|
||||||
F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */,
|
F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */,
|
||||||
5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */,
|
5AF9DC3B1981DBEE001EA135 /* SUDSAVerifierTest.m */,
|
||||||
72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */,
|
72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */,
|
||||||
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */,
|
5AF6C74C1AEA40760014A3AB /* SUInstallerTest.m */,
|
||||||
|
723A920D1D722438004A9DED /* SUSpotlightImporterTest.swift */,
|
||||||
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */,
|
7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */,
|
||||||
14950074195FDF5900BC5B5B /* SUUpdaterTest.m */,
|
14950074195FDF5900BC5B5B /* SUUpdaterTest.m */,
|
||||||
61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */,
|
61227A150DB548B800AB99EA /* SUVersionComparisonTest.m */,
|
||||||
@@ -968,10 +1104,10 @@
|
|||||||
14652F8319A9759F00959E44 /* SUExport.h */,
|
14652F8319A9759F00959E44 /* SUExport.h */,
|
||||||
61EF67580E25C5B400F754E0 /* SUHost.h */,
|
61EF67580E25C5B400F754E0 /* SUHost.h */,
|
||||||
61EF67550E25B58D00F754E0 /* SUHost.m */,
|
61EF67550E25B58D00F754E0 /* SUHost.m */,
|
||||||
726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */,
|
|
||||||
726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */,
|
|
||||||
55C14F04136EF6DB00649790 /* SULog.h */,
|
55C14F04136EF6DB00649790 /* SULog.h */,
|
||||||
55C14F05136EF6DB00649790 /* SULog.m */,
|
55C14F05136EF6DB00649790 /* SULog.m */,
|
||||||
|
726F2CE31BC9C33D001971A4 /* SUOperatingSystem.h */,
|
||||||
|
726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */,
|
||||||
);
|
);
|
||||||
includeInIndex = 1;
|
includeInIndex = 1;
|
||||||
name = "Other Sources";
|
name = "Other Sources";
|
||||||
@@ -987,10 +1123,10 @@
|
|||||||
72E45CFB1B641961005C701A /* sparkletestcast.xml */,
|
72E45CFB1B641961005C701A /* sparkletestcast.xml */,
|
||||||
72E45CF11B640CDD005C701A /* SUTestApplicationDelegate.h */,
|
72E45CF11B640CDD005C701A /* SUTestApplicationDelegate.h */,
|
||||||
72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */,
|
72E45CF21B640CDD005C701A /* SUTestApplicationDelegate.m */,
|
||||||
72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */,
|
|
||||||
72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */,
|
|
||||||
A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */,
|
A5BF4F1B1BC7668B007A052A /* SUTestWebServer.h */,
|
||||||
A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */,
|
A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */,
|
||||||
|
72E45CF41B640DAE005C701A /* SUUpdateSettingsWindowController.h */,
|
||||||
|
72E45CF51B640DAE005C701A /* SUUpdateSettingsWindowController.m */,
|
||||||
72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */,
|
72E45CF61B640DAE005C701A /* SUUpdateSettingsWindowController.xib */,
|
||||||
72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */,
|
72E45CFD1B641D0D005C701A /* test_app_only_dsa_priv_dont_ever_do_this_for_real.pem */,
|
||||||
14732BBF1960F0AC00593899 /* test_app_only_dsa_pub.pem */,
|
14732BBF1960F0AC00593899 /* test_app_only_dsa_pub.pem */,
|
||||||
@@ -1003,6 +1139,8 @@
|
|||||||
61CFB2C10E384958007A1735 /* Support */ = {
|
61CFB2C10E384958007A1735 /* Support */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */,
|
||||||
|
729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */,
|
||||||
61B078CC15A5FB6100600039 /* SUCodeSigningVerifier.h */,
|
61B078CC15A5FB6100600039 /* SUCodeSigningVerifier.h */,
|
||||||
61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */,
|
61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */,
|
||||||
61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */,
|
61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */,
|
||||||
@@ -1044,6 +1182,26 @@
|
|||||||
name = "Update Control";
|
name = "Update Control";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
722954B51D04ADAF00ECF9CA /* fileop */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
722954B61D04ADAF00ECF9CA /* fileop.m */,
|
||||||
|
722954C21D04E66F00ECF9CA /* SUFileOperationConstants.h */,
|
||||||
|
722954C31D04E66F00ECF9CA /* SUFileOperationConstants.m */,
|
||||||
|
);
|
||||||
|
name = fileop;
|
||||||
|
path = ../../fileop;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
726B2B5E1C645FC900388755 /* UI Tests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
720B16431C66433D006985FB /* SUTestApplicationTest.swift */,
|
||||||
|
720B16421C66433D006985FB /* UITests-Info.plist */,
|
||||||
|
);
|
||||||
|
path = "UI Tests";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
FA1941C40D94A6EA00DD942E /* Configurations */ = {
|
FA1941C40D94A6EA00DD942E /* Configurations */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -1061,6 +1219,7 @@
|
|||||||
FA1941CE0D94A70100DD942E /* ConfigRelaunch.xcconfig */,
|
FA1941CE0D94A70100DD942E /* ConfigRelaunch.xcconfig */,
|
||||||
FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */,
|
FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */,
|
||||||
FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */,
|
FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */,
|
||||||
|
722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */,
|
||||||
FA1941CD0D94A70100DD942E /* ConfigTestApp.xcconfig */,
|
FA1941CD0D94A70100DD942E /* ConfigTestApp.xcconfig */,
|
||||||
FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */,
|
FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */,
|
||||||
FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */,
|
FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */,
|
||||||
@@ -1068,6 +1227,13 @@
|
|||||||
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */,
|
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */,
|
||||||
FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */,
|
FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */,
|
||||||
FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */,
|
FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */,
|
||||||
|
729F10FD1C65A9B500DFCCC5 /* ConfigUITest.xcconfig */,
|
||||||
|
729F10FE1C65A9B500DFCCC5 /* ConfigUITestCoverage.xcconfig */,
|
||||||
|
729F10FF1C65A9B500DFCCC5 /* ConfigUITestDebug.xcconfig */,
|
||||||
|
729F11001C65A9B500DFCCC5 /* ConfigUITestRelease.xcconfig */,
|
||||||
|
722FB7471DD51331001D40CE /* ConfigSwift.xcconfig */,
|
||||||
|
722FB7481DD51350001D40CE /* ConfigSwiftDebug.xcconfig */,
|
||||||
|
722FB7491DD51350001D40CE /* ConfigSwiftRelease.xcconfig */,
|
||||||
14732BC91960F70A00593899 /* make-release-package.sh */,
|
14732BC91960F70A00593899 /* make-release-package.sh */,
|
||||||
14652F7919A93E5F00959E44 /* set-git-version-info.sh */,
|
14652F7919A93E5F00959E44 /* set-git-version-info.sh */,
|
||||||
146EC84E19A68CF8004A50C5 /* Sparkle.podspec */,
|
146EC84E19A68CF8004A50C5 /* Sparkle.podspec */,
|
||||||
@@ -1083,7 +1249,6 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
611142E910FB1BE5009810AA /* bspatch.h in Headers */,
|
611142E910FB1BE5009810AA /* bspatch.h in Headers */,
|
||||||
6160E7E10D3B4A8800E9CD71 /* NTSynchronousTask.h in Headers */,
|
|
||||||
61299B3609CB04E000B7442F /* Sparkle.h in Headers */,
|
61299B3609CB04E000B7442F /* Sparkle.h in Headers */,
|
||||||
61CFB3290E385186007A1735 /* Sparkle.pch in Headers */,
|
61CFB3290E385186007A1735 /* Sparkle.pch in Headers */,
|
||||||
61B5FC0D09C4FC8200B25A18 /* SUAppcast.h in Headers */,
|
61B5FC0D09C4FC8200B25A18 /* SUAppcast.h in Headers */,
|
||||||
@@ -1101,6 +1266,8 @@
|
|||||||
7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */,
|
7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */,
|
||||||
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */,
|
767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */,
|
||||||
61EF67590E25C5B400F754E0 /* SUHost.h in Headers */,
|
61EF67590E25C5B400F754E0 /* SUHost.h in Headers */,
|
||||||
|
729924731DF3478A00DBCDF5 /* SUUpdateValidator.h in Headers */,
|
||||||
|
723B25301CEAB3A600909873 /* bscommon.h in Headers */,
|
||||||
618FA5010DAE88B40026945C /* SUInstaller.h in Headers */,
|
618FA5010DAE88B40026945C /* SUInstaller.h in Headers */,
|
||||||
55C14F06136EF6DB00649790 /* SULog.h in Headers */,
|
55C14F06136EF6DB00649790 /* SULog.h in Headers */,
|
||||||
726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */,
|
726F2CE51BC9C33D001971A4 /* SUOperatingSystem.h in Headers */,
|
||||||
@@ -1123,6 +1290,7 @@
|
|||||||
61A354550DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.h in Headers */,
|
61A354550DF113C70076ECB1 /* SUUserInitiatedUpdateDriver.h in Headers */,
|
||||||
61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */,
|
61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */,
|
||||||
3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */,
|
3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */,
|
||||||
|
722954C41D04E66F00ECF9CA /* SUFileOperationConstants.h in Headers */,
|
||||||
61180BCA0D64138900B4E0D1 /* SUWindowController.h in Headers */,
|
61180BCA0D64138900B4E0D1 /* SUWindowController.h in Headers */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -1173,10 +1341,12 @@
|
|||||||
55C14BB4136EEF1500649790 /* Sources */,
|
55C14BB4136EEF1500649790 /* Sources */,
|
||||||
55C14BB5136EEF1500649790 /* Frameworks */,
|
55C14BB5136EEF1500649790 /* Frameworks */,
|
||||||
14652F7B19A945D600959E44 /* Run Script: Set Git Version Info */,
|
14652F7B19A945D600959E44 /* Run Script: Set Git Version Info */,
|
||||||
|
722954C01D04D9D600ECF9CA /* Copy fileop */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
|
722954BF1D04D9CB00ECF9CA /* PBXTargetDependency */,
|
||||||
);
|
);
|
||||||
name = Autoupdate;
|
name = Autoupdate;
|
||||||
productName = Autoupdate;
|
productName = Autoupdate;
|
||||||
@@ -1238,6 +1408,41 @@
|
|||||||
productReference = 61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */;
|
productReference = 61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
|
722954B31D04ADAF00ECF9CA /* fileop */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 722954BB1D04ADAF00ECF9CA /* Build configuration list for PBXNativeTarget "fileop" */;
|
||||||
|
buildPhases = (
|
||||||
|
722954B01D04ADAF00ECF9CA /* Sources */,
|
||||||
|
722954B11D04ADAF00ECF9CA /* Frameworks */,
|
||||||
|
722954B21D04ADAF00ECF9CA /* CopyFiles */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = fileop;
|
||||||
|
productName = fileop;
|
||||||
|
productReference = 722954B41D04ADAF00ECF9CA /* fileop */;
|
||||||
|
productType = "com.apple.product-type.tool";
|
||||||
|
};
|
||||||
|
726B2B5C1C645FC900388755 /* UI Tests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 726B2B671C645FC900388755 /* Build configuration list for PBXNativeTarget "UI Tests" */;
|
||||||
|
buildPhases = (
|
||||||
|
726B2B591C645FC900388755 /* Sources */,
|
||||||
|
726B2B5A1C645FC900388755 /* Frameworks */,
|
||||||
|
726B2B5B1C645FC900388755 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
726B2B631C645FC900388755 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = "UI Tests";
|
||||||
|
productName = "UI Tests";
|
||||||
|
productReference = 726B2B5D1C645FC900388755 /* UI Tests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.ui-testing";
|
||||||
|
};
|
||||||
8DC2EF4F0486A6940098B216 /* Sparkle */ = {
|
8DC2EF4F0486A6940098B216 /* Sparkle */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Sparkle" */;
|
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Sparkle" */;
|
||||||
@@ -1269,13 +1474,22 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
CLASSPREFIX = SU;
|
CLASSPREFIX = SU;
|
||||||
LastSwiftUpdateCheck = 0700;
|
LastSwiftUpdateCheck = 0720;
|
||||||
LastUpgradeCheck = 0710;
|
LastUpgradeCheck = 0800;
|
||||||
ORGANIZATIONNAME = "Sparkle Project";
|
ORGANIZATIONNAME = "Sparkle Project";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
612279D80DB5470200AB99EA = {
|
612279D80DB5470200AB99EA = {
|
||||||
|
LastSwiftMigration = 0800;
|
||||||
TestTargetID = 8DC2EF4F0486A6940098B216;
|
TestTargetID = 8DC2EF4F0486A6940098B216;
|
||||||
};
|
};
|
||||||
|
722954B31D04ADAF00ECF9CA = {
|
||||||
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
|
};
|
||||||
|
726B2B5C1C645FC900388755 = {
|
||||||
|
CreatedOnToolsVersion = 7.2.1;
|
||||||
|
LastSwiftMigration = 0800;
|
||||||
|
TestTargetID = 61B5F90109C4CEE200B25A18;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Sparkle" */;
|
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Sparkle" */;
|
||||||
@@ -1324,6 +1538,11 @@
|
|||||||
ar,
|
ar,
|
||||||
nb,
|
nb,
|
||||||
el,
|
el,
|
||||||
|
"zh-Hans",
|
||||||
|
"zh-Hant",
|
||||||
|
"fr-CA",
|
||||||
|
"pt-PT",
|
||||||
|
"pt-BR",
|
||||||
);
|
);
|
||||||
mainGroup = 0867D691FE84028FC02AAC07 /* Sparkle */;
|
mainGroup = 0867D691FE84028FC02AAC07 /* Sparkle */;
|
||||||
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
|
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
|
||||||
@@ -1338,6 +1557,8 @@
|
|||||||
14732BC51960F69300593899 /* Distribution */,
|
14732BC51960F69300593899 /* Distribution */,
|
||||||
1420DF491962329200203BB0 /* Documentation */,
|
1420DF491962329200203BB0 /* Documentation */,
|
||||||
1495005F195FB89400BC5B5B /* All */,
|
1495005F195FB89400BC5B5B /* All */,
|
||||||
|
726B2B5C1C645FC900388755 /* UI Tests */,
|
||||||
|
722954B31D04ADAF00ECF9CA /* fileop */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@@ -1347,8 +1568,11 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
72E641801D08D754000404CA /* fileop in Resources */,
|
||||||
14958C6E19AEBC950061B14F /* signed-test-file.txt in Resources */,
|
14958C6E19AEBC950061B14F /* signed-test-file.txt in Resources */,
|
||||||
|
5F1510A21C96E591006E1629 /* testnamespaces.xml in Resources */,
|
||||||
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */,
|
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */,
|
||||||
|
C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */,
|
||||||
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */,
|
72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */,
|
||||||
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */,
|
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */,
|
||||||
72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */,
|
72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */,
|
||||||
@@ -1356,6 +1580,7 @@
|
|||||||
F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */,
|
F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */,
|
||||||
14958C6F19AEBC980061B14F /* test-pubkey.pem in Resources */,
|
14958C6F19AEBC980061B14F /* test-pubkey.pem in Resources */,
|
||||||
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */,
|
5AF6C74F1AEA46D10014A3AB /* test.sparkle_guided.pkg in Resources */,
|
||||||
|
5AD0FA7F1C73F2E2004BCEFF /* testappcast.xml in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -1363,7 +1588,7 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
1420DF51196247F900203BB0 /* Images.xcassets in Resources */,
|
5AE7E1111DC81AD3009C2C12 /* AppIcon.icns in Resources */,
|
||||||
55C14FC7136F05E100649790 /* Sparkle.strings in Resources */,
|
55C14FC7136F05E100649790 /* Sparkle.strings in Resources */,
|
||||||
55C14BD9136EF00C00649790 /* SUStatus.xib in Resources */,
|
55C14BD9136EF00C00649790 /* SUStatus.xib in Resources */,
|
||||||
);
|
);
|
||||||
@@ -1384,6 +1609,13 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
726B2B5B1C645FC900388755 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
8DC2EF520486A6940098B216 /* Resources */ = {
|
8DC2EF520486A6940098B216 /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -1471,7 +1703,6 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */,
|
|
||||||
55C14BD4136EEFCE00649790 /* Autoupdate.m in Sources */,
|
55C14BD4136EEFCE00649790 /* Autoupdate.m in Sources */,
|
||||||
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */,
|
F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */,
|
||||||
55C14F00136EF6B700649790 /* SUConstants.m in Sources */,
|
55C14F00136EF6B700649790 /* SUConstants.m in Sources */,
|
||||||
@@ -1480,8 +1711,10 @@
|
|||||||
55C14F0C136EF6EA00649790 /* SUHost.m in Sources */,
|
55C14F0C136EF6EA00649790 /* SUHost.m in Sources */,
|
||||||
55C14F0D136EF6F200649790 /* SUInstaller.m in Sources */,
|
55C14F0D136EF6F200649790 /* SUInstaller.m in Sources */,
|
||||||
55C14F08136EF6DB00649790 /* SULog.m in Sources */,
|
55C14F08136EF6DB00649790 /* SULog.m in Sources */,
|
||||||
|
726F2CE71BC9C3E2001971A4 /* SUOperatingSystem.m in Sources */,
|
||||||
55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */,
|
55C14F24136EF86F00649790 /* SUPackageInstaller.m in Sources */,
|
||||||
55C14F21136EF84D00649790 /* SUPlainInstaller.m in Sources */,
|
55C14F21136EF84D00649790 /* SUPlainInstaller.m in Sources */,
|
||||||
|
722954C61D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
|
||||||
55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */,
|
55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */,
|
||||||
55C14F20136EF84300649790 /* SUStatusController.m in Sources */,
|
55C14F20136EF84300649790 /* SUStatusController.m in Sources */,
|
||||||
55C14F23136EF86700649790 /* SUSystemProfiler.m in Sources */,
|
55C14F23136EF86700649790 /* SUSystemProfiler.m in Sources */,
|
||||||
@@ -1493,16 +1726,18 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */,
|
72544FFC1D0991A4000CFB2C /* SUFileOperationConstants.m in Sources */,
|
||||||
726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */,
|
|
||||||
726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */,
|
|
||||||
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */,
|
5D06E8E90FD68CDB005AE3F6 /* bsdiff.c in Sources */,
|
||||||
14652F7E19A9728A00959E44 /* bspatch.c in Sources */,
|
14652F7E19A9728A00959E44 /* bspatch.c in Sources */,
|
||||||
7223E7631AD1AEFF008E3161 /* sais.c in Sources */,
|
7223E7631AD1AEFF008E3161 /* sais.c in Sources */,
|
||||||
|
723B252F1CEAB3A600909873 /* bscommon.c in Sources */,
|
||||||
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */,
|
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */,
|
||||||
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */,
|
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */,
|
||||||
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */,
|
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */,
|
||||||
5D06E8EA0FD68CDB005AE3F6 /* SUBinaryDeltaTool.m in Sources */,
|
5D06E8EA0FD68CDB005AE3F6 /* SUBinaryDeltaTool.m in Sources */,
|
||||||
|
726F2CE81BC9C48F001971A4 /* SUConstants.m in Sources */,
|
||||||
|
726F2CDE1BC9BE5B001971A4 /* SUFileManager.m in Sources */,
|
||||||
|
726F2CE91BC9C499001971A4 /* SUOperatingSystem.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -1510,18 +1745,22 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
723A920E1D722438004A9DED /* SUSpotlightImporterTest.swift in Sources */,
|
||||||
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */,
|
721CF1A71AD7643600D9AC09 /* bsdiff.c in Sources */,
|
||||||
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */,
|
721CF1A81AD7644100D9AC09 /* bspatch.c in Sources */,
|
||||||
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */,
|
721CF1A91AD7644C00D9AC09 /* sais.c in Sources */,
|
||||||
|
5A4094481C74EA5200983BE0 /* SUAppcastTest.swift in Sources */,
|
||||||
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */,
|
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */,
|
||||||
|
723B252E1CEAB3A600909873 /* bscommon.c in Sources */,
|
||||||
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */,
|
142E0E0919A83AAC00E4312B /* SUBinaryDeltaTest.m in Sources */,
|
||||||
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */,
|
F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */,
|
||||||
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */,
|
5AF9DC3C1981DBEE001EA135 /* SUDSAVerifierTest.m in Sources */,
|
||||||
72A4A2411BB656FA00E7820D /* SUFileManager.m in Sources */,
|
|
||||||
72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */,
|
72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */,
|
||||||
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */,
|
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */,
|
||||||
14652F8219A9746000959E44 /* SULog.m in Sources */,
|
14652F8219A9746000959E44 /* SULog.m in Sources */,
|
||||||
7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */,
|
7210C7681B9A9A1500EB90AC /* SUUnarchiverTest.swift in Sources */,
|
||||||
|
5AE459001C34118500E3BB47 /* SUUpdaterTest.m in Sources */,
|
||||||
|
5AE459021C34118500E3BB47 /* SUVersionComparisonTest.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -1529,22 +1768,43 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */,
|
|
||||||
5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */,
|
|
||||||
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */,
|
|
||||||
61B5F93009C4CFDC00B25A18 /* main.m in Sources */,
|
61B5F93009C4CFDC00B25A18 /* main.m in Sources */,
|
||||||
A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */,
|
726F2CEB1BC9C733001971A4 /* SUConstants.m in Sources */,
|
||||||
|
5A6D31EE1BF53245009C5157 /* SUFileManager.m in Sources */,
|
||||||
|
721BC2111D1DFF05002BC71E /* SUFileOperationConstants.m in Sources */,
|
||||||
|
5A6D31EF1BF5325F009C5157 /* SUOperatingSystem.m in Sources */,
|
||||||
72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */,
|
72E45CF31B640CDD005C701A /* SUTestApplicationDelegate.m in Sources */,
|
||||||
|
A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */,
|
||||||
72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */,
|
72E45CF71B640DAE005C701A /* SUUpdateSettingsWindowController.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
722954B01D04ADAF00ECF9CA /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
722954CC1D04EA7000ECF9CA /* SUOperatingSystem.m in Sources */,
|
||||||
|
722954BD1D04AE3800ECF9CA /* SUConstants.m in Sources */,
|
||||||
|
722954BC1D04AE1100ECF9CA /* SUFileManager.m in Sources */,
|
||||||
|
722954B71D04ADAF00ECF9CA /* fileop.m in Sources */,
|
||||||
|
722954C71D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
726B2B591C645FC900388755 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
720B16451C66433D006985FB /* SUTestApplicationTest.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
8DC2EF540486A6940098B216 /* Sources */ = {
|
8DC2EF540486A6940098B216 /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
5D06E8EB0FD68CE4005AE3F6 /* bspatch.c in Sources */,
|
5D06E8EB0FD68CE4005AE3F6 /* bspatch.c in Sources */,
|
||||||
610EC1E00CF3A5FE00AE239E /* NTSynchronousTask.m in Sources */,
|
722954C51D04E66F00ECF9CA /* SUFileOperationConstants.m in Sources */,
|
||||||
61B5FBB709C4FAFF00B25A18 /* SUAppcast.m in Sources */,
|
61B5FBB709C4FAFF00B25A18 /* SUAppcast.m in Sources */,
|
||||||
61B5FC6F09C51F4900B25A18 /* SUAppcastItem.m in Sources */,
|
61B5FC6F09C51F4900B25A18 /* SUAppcastItem.m in Sources */,
|
||||||
6120721309CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m in Sources */,
|
6120721309CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m in Sources */,
|
||||||
@@ -1562,12 +1822,14 @@
|
|||||||
61EF67560E25B58D00F754E0 /* SUHost.m in Sources */,
|
61EF67560E25B58D00F754E0 /* SUHost.m in Sources */,
|
||||||
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */,
|
618FA5020DAE88B40026945C /* SUInstaller.m in Sources */,
|
||||||
55C14F07136EF6DB00649790 /* SULog.m in Sources */,
|
55C14F07136EF6DB00649790 /* SULog.m in Sources */,
|
||||||
|
729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */,
|
||||||
|
723B252D1CEAB3A600909873 /* bscommon.c in Sources */,
|
||||||
|
726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */,
|
||||||
618FA5230DAE8E8A0026945C /* SUPackageInstaller.m in Sources */,
|
618FA5230DAE8E8A0026945C /* SUPackageInstaller.m in Sources */,
|
||||||
61D85D6D0E10B2ED00F9B4A9 /* SUPipedUnarchiver.m in Sources */,
|
61D85D6D0E10B2ED00F9B4A9 /* SUPipedUnarchiver.m in Sources */,
|
||||||
618FA5060DAE8AB80026945C /* SUPlainInstaller.m in Sources */,
|
618FA5060DAE8AB80026945C /* SUPlainInstaller.m in Sources */,
|
||||||
6101347C0DD2541A0049ACDF /* SUProbingUpdateDriver.m in Sources */,
|
6101347C0DD2541A0049ACDF /* SUProbingUpdateDriver.m in Sources */,
|
||||||
61B93C0A0DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m in Sources */,
|
61B93C0A0DD112FF00DCD2F8 /* SUScheduledUpdateDriver.m in Sources */,
|
||||||
726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */,
|
|
||||||
61A225A50D1C4AC000430CCD /* SUStandardVersionComparator.m in Sources */,
|
61A225A50D1C4AC000430CCD /* SUStandardVersionComparator.m in Sources */,
|
||||||
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */,
|
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */,
|
||||||
61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */,
|
61A2279D0D1CEE7600430CCD /* SUSystemProfiler.m in Sources */,
|
||||||
@@ -1650,6 +1912,16 @@
|
|||||||
target = 8DC2EF4F0486A6940098B216 /* Sparkle */;
|
target = 8DC2EF4F0486A6940098B216 /* Sparkle */;
|
||||||
targetProxy = 61FA528C0E2D9EB200EF58AD /* PBXContainerItemProxy */;
|
targetProxy = 61FA528C0E2D9EB200EF58AD /* PBXContainerItemProxy */;
|
||||||
};
|
};
|
||||||
|
722954BF1D04D9CB00ECF9CA /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 722954B31D04ADAF00ECF9CA /* fileop */;
|
||||||
|
targetProxy = 722954BE1D04D9CB00ECF9CA /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
726B2B631C645FC900388755 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 61B5F90109C4CEE200B25A18 /* Sparkle Test App */;
|
||||||
|
targetProxy = 726B2B621C645FC900388755 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
/* End PBXTargetDependency section */
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
/* Begin PBXVariantGroup section */
|
||||||
@@ -1796,6 +2068,40 @@
|
|||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
61B5F92B09C4CFD800B25A18 /* English */,
|
61B5F92B09C4CFD800B25A18 /* English */,
|
||||||
|
1A985A321C5C329C0001163A /* ja */,
|
||||||
|
1A985A331C5C329D0001163A /* fr */,
|
||||||
|
1A985A341C5C329E0001163A /* de */,
|
||||||
|
1A985A351C5C329E0001163A /* zh-Hant */,
|
||||||
|
1A985A361C5C32A20001163A /* it */,
|
||||||
|
1A985A371C5C32A30001163A /* ca */,
|
||||||
|
1A985A381C5C32A40001163A /* cs */,
|
||||||
|
1A985A391C5C32A40001163A /* cy */,
|
||||||
|
1A985A3A1C5C32A50001163A /* da */,
|
||||||
|
1A985A3B1C5C32A60001163A /* es */,
|
||||||
|
1A985A3C1C5C32A70001163A /* fi */,
|
||||||
|
1A985A3D1C5C32A80001163A /* he */,
|
||||||
|
1A985A3E1C5C32A90001163A /* hu */,
|
||||||
|
1A985A3F1C5C32AA0001163A /* id */,
|
||||||
|
1A985A401C5C32AA0001163A /* is */,
|
||||||
|
1A985A411C5C32AB0001163A /* ko */,
|
||||||
|
1A985A421C5C32AC0001163A /* nb */,
|
||||||
|
1A985A431C5C32AD0001163A /* nl */,
|
||||||
|
1A985A441C5C32AE0001163A /* pl */,
|
||||||
|
1A985A451C5C32AF0001163A /* ru */,
|
||||||
|
1A985A461C5C32B00001163A /* sk */,
|
||||||
|
1A985A471C5C32B10001163A /* sv */,
|
||||||
|
1A985A481C5C32B10001163A /* th */,
|
||||||
|
1A985A491C5C32B20001163A /* tr */,
|
||||||
|
1A985A4A1C5C32B50001163A /* zh-Hans */,
|
||||||
|
1A985A4B1C5C32B60001163A /* fr-CA */,
|
||||||
|
1A985A4C1C5C32B70001163A /* pt-PT */,
|
||||||
|
1A985A4D1C5C32B70001163A /* pt-BR */,
|
||||||
|
1A985A4E1C5C32B80001163A /* pt */,
|
||||||
|
1A985A4F1C5C32B90001163A /* sl */,
|
||||||
|
1A985A501C5C32BA0001163A /* ro */,
|
||||||
|
1A985A511C5C32BB0001163A /* uk */,
|
||||||
|
1A985A521C5C32BC0001163A /* ar */,
|
||||||
|
1A985A531C5C32BD0001163A /* el */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -1991,6 +2297,54 @@
|
|||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
722954B81D04ADAF00ECF9CA /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
722954B91D04ADAF00ECF9CA /* Coverage */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Coverage;
|
||||||
|
};
|
||||||
|
722954BA1D04ADAF00ECF9CA /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 722954C81D04E89500ECF9CA /* ConfigFileop.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
726B2B641C645FC900388755 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 729F10FF1C65A9B500DFCCC5 /* ConfigUITestDebug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
726B2B651C645FC900388755 /* Coverage */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 729F10FE1C65A9B500DFCCC5 /* ConfigUITestCoverage.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Coverage;
|
||||||
|
};
|
||||||
|
726B2B661C645FC900388755 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 729F11001C65A9B500DFCCC5 /* ConfigUITestRelease.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
@@ -2084,6 +2438,26 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
|
722954BB1D04ADAF00ECF9CA /* Build configuration list for PBXNativeTarget "fileop" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
722954B81D04ADAF00ECF9CA /* Debug */,
|
||||||
|
722954B91D04ADAF00ECF9CA /* Coverage */,
|
||||||
|
722954BA1D04ADAF00ECF9CA /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
726B2B671C645FC900388755 /* Build configuration list for PBXNativeTarget "UI Tests" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
726B2B641C645FC900388755 /* Debug */,
|
||||||
|
726B2B651C645FC900388755 /* Coverage */,
|
||||||
|
726B2B661C645FC900388755 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
};
|
};
|
||||||
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0710"
|
LastUpgradeVersion = "0800"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0710"
|
LastUpgradeVersion = "0800"
|
||||||
version = "2.0">
|
version = "2.0">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0800"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "726B2B5C1C645FC900388755"
|
||||||
|
BuildableName = "UI Tests.xctest"
|
||||||
|
BlueprintName = "UI Tests"
|
||||||
|
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -28,5 +28,7 @@
|
|||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>${ASSETCATALOG_COMPILER_APPICON_NAME}.icns</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -166,18 +166,28 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
|
|||||||
[self.statusController showWindow:self];
|
[self.statusController showWindow:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSString *fileOperationToolPath = [[[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@""SPARKLE_FILEOP_TOOL_NAME];
|
||||||
|
|
||||||
|
if (![[NSFileManager defaultManager] fileExistsAtPath:fileOperationToolPath]) {
|
||||||
|
SULog(@"Potential Installation Error: File operation tool path %@ is not found", fileOperationToolPath);
|
||||||
|
}
|
||||||
|
|
||||||
[SUInstaller installFromUpdateFolder:self.updateFolderPath
|
[SUInstaller installFromUpdateFolder:self.updateFolderPath
|
||||||
overHost:host
|
overHost:host
|
||||||
installationPath:installationPath
|
installationPath:installationPath
|
||||||
|
fileOperationToolPath:fileOperationToolPath
|
||||||
versionComparator:[SUStandardVersionComparator defaultComparator]
|
versionComparator:[SUStandardVersionComparator defaultComparator]
|
||||||
completionHandler:^(NSError *error) {
|
completionHandler:^(NSError *error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
SULog(@"Installation Error: %@", error);
|
NSError *underlyingError = [error.userInfo objectForKey:NSUnderlyingErrorKey];
|
||||||
if (self.shouldShowUI) {
|
if (underlyingError == nil || underlyingError.code != SUInstallationCancelledError) {
|
||||||
NSAlert *alert = [[NSAlert alloc] init];
|
SULog(@"Installation Error: %@", error);
|
||||||
alert.messageText = @"";
|
if (self.shouldShowUI) {
|
||||||
alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]];
|
NSAlert *alert = [[NSAlert alloc] init];
|
||||||
[alert runModal];
|
alert.messageText = @"";
|
||||||
|
alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]];
|
||||||
|
[alert runModal];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
@@ -247,16 +257,16 @@ int main(int __unused argc, const char __unused *argv[])
|
|||||||
|
|
||||||
NSApplication *application = [NSApplication sharedApplication];
|
NSApplication *application = [NSApplication sharedApplication];
|
||||||
|
|
||||||
BOOL shouldShowUI = (args.count > 6) ? [args[6] boolValue] : YES;
|
BOOL shouldShowUI = (args.count > 6) ? [[args objectAtIndex:6] boolValue] : YES;
|
||||||
if (shouldShowUI) {
|
if (shouldShowUI) {
|
||||||
[application activateIgnoringOtherApps:YES];
|
[application activateIgnoringOtherApps:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:args[1]
|
AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:[args objectAtIndex:1]
|
||||||
relaunchPath:args[2]
|
relaunchPath:[args objectAtIndex:2]
|
||||||
parentProcessId:[args[3] intValue]
|
parentProcessId:[[args objectAtIndex:3] intValue]
|
||||||
updateFolderPath:args[4]
|
updateFolderPath:[args objectAtIndex:4]
|
||||||
shouldRelaunch:(args.count > 5) ? [args[5] boolValue] : YES
|
shouldRelaunch:(args.count > 5) ? [[args objectAtIndex:5] boolValue] : YES
|
||||||
shouldShowUI:shouldShowUI];
|
shouldShowUI:shouldShowUI];
|
||||||
[application setDelegate:appInstaller];
|
[application setDelegate:appInstaller];
|
||||||
[application run];
|
[application run];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
func die(msg: String) {
|
func die(msg: String) {
|
||||||
println("ERROR: \(msg)")
|
print("ERROR: \(msg)")
|
||||||
exit(1)
|
exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,8 +28,8 @@ if enStringsDict == nil {
|
|||||||
}
|
}
|
||||||
let enStringsDictKeys = enStringsDict!.allKeys
|
let enStringsDictKeys = enStringsDict!.allKeys
|
||||||
|
|
||||||
let dirPath = sparkleRoot! + "/Sparkle"
|
let dirPath = NSString(string: sparkleRoot! + "/Sparkle")
|
||||||
let dirContents = NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath, error: nil) as! [String]
|
let dirContents = try! NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath as String)
|
||||||
let css =
|
let css =
|
||||||
"body { font-family: sans-serif; font-size: 10pt; }" +
|
"body { font-family: sans-serif; font-size: 10pt; }" +
|
||||||
"h1 { font-size: 12pt; }" +
|
"h1 { font-size: 12pt; }" +
|
||||||
@@ -51,14 +51,14 @@ head.addChild(NSXMLElement(name: "style", stringValue: css))
|
|||||||
|
|
||||||
let locale = NSLocale.currentLocale()
|
let locale = NSLocale.currentLocale()
|
||||||
for dirEntry in dirContents {
|
for dirEntry in dirContents {
|
||||||
if dirEntry.pathExtension != "lproj" || dirEntry == "en.lproj" {
|
if NSString(string: dirEntry).pathExtension != "lproj" || dirEntry == "en.lproj" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: dirEntry.stringByDeletingPathExtension)
|
let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: NSString(string: dirEntry).stringByDeletingPathExtension)
|
||||||
body.addChild(NSXMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))"))
|
body.addChild(NSXMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))"))
|
||||||
|
|
||||||
let stringsPath = dirPath.stringByAppendingPathComponent(dirEntry).stringByAppendingPathComponent("Sparkle.strings")
|
let stringsPath = NSString(string: dirPath.stringByAppendingPathComponent(dirEntry)).stringByAppendingPathComponent("Sparkle.strings")
|
||||||
let stringsDict = NSDictionary(contentsOfFile: stringsPath)
|
let stringsDict = NSDictionary(contentsOfFile: stringsPath)
|
||||||
if stringsDict == nil {
|
if stringsDict == nil {
|
||||||
die("Invalid strings file \(dirEntry)")
|
die("Invalid strings file \(dirEntry)")
|
||||||
@@ -90,12 +90,12 @@ for dirEntry in dirContents {
|
|||||||
let sorter = { (s1: String, s2: String) -> Bool in
|
let sorter = { (s1: String, s2: String) -> Bool in
|
||||||
return s1 < s2
|
return s1 < s2
|
||||||
}
|
}
|
||||||
missing.sort(sorter)
|
missing.sortInPlace(sorter)
|
||||||
unlocalized.sort(sorter)
|
unlocalized.sortInPlace(sorter)
|
||||||
unused.sort(sorter)
|
unused.sortInPlace(sorter)
|
||||||
|
|
||||||
let addRow = { (prefix: String, cssClass: String, key: String) -> Void in
|
let addRow = { (prefix: String, cssClass: String, key: String) -> Void in
|
||||||
body.addChild(NSXMLElement(name: "span", attributes: ["class": cssClass], stringValue: " ".join([prefix, key]) + "\n"))
|
body.addChild(NSXMLElement(name: "span", attributes: ["class": cssClass], stringValue: [prefix, key].joinWithSeparator(" ") + "\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
for key in missing {
|
for key in missing {
|
||||||
|
|||||||
@@ -9,7 +9,11 @@
|
|||||||
#ifndef SUAPPCAST_H
|
#ifndef SUAPPCAST_H
|
||||||
#define SUAPPCAST_H
|
#define SUAPPCAST_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Foundation;
|
||||||
|
#else
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
|
|
||||||
@class SUAppcastItem;
|
@class SUAppcastItem;
|
||||||
@@ -19,6 +23,7 @@ SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>
|
|||||||
@property (copy) NSDictionary *httpHeaders;
|
@property (copy) NSDictionary *httpHeaders;
|
||||||
|
|
||||||
- (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *))err;
|
- (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *))err;
|
||||||
|
- (SUAppcast *)copyWithoutDeltaUpdates;
|
||||||
|
|
||||||
@property (readonly, copy) NSArray *items;
|
@property (readonly, copy) NSArray *items;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -30,7 +30,10 @@
|
|||||||
if (!attrName) {
|
if (!attrName) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dictionary[attrName] = [attribute stringValue];
|
NSString *attributeStringValue = [attribute stringValue];
|
||||||
|
if (attributeStringValue != nil) {
|
||||||
|
[dictionary setObject:attributeStringValue forKey:attrName];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return dictionary;
|
return dictionary;
|
||||||
}
|
}
|
||||||
@@ -93,147 +96,166 @@
|
|||||||
- (void)downloadDidFinish:(NSURLDownload *)__unused aDownload
|
- (void)downloadDidFinish:(NSURLDownload *)__unused aDownload
|
||||||
{
|
{
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
|
NSArray *appcastItems = [self parseAppcastItemsFromXMLFile:[NSURL fileURLWithPath:self.downloadFilename] error:&error];
|
||||||
|
|
||||||
NSXMLDocument *document = nil;
|
[[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:nil];
|
||||||
BOOL failed = NO;
|
self.downloadFilename = nil;
|
||||||
NSArray *xmlItems = nil;
|
|
||||||
NSMutableArray *appcastItems = [NSMutableArray array];
|
|
||||||
|
|
||||||
if (self.downloadFilename)
|
if (appcastItems) {
|
||||||
{
|
self.items = appcastItems;
|
||||||
NSUInteger options = 0;
|
self.completionBlock(nil);
|
||||||
options = NSXMLNodeLoadExternalEntitiesSameOriginOnly;
|
self.completionBlock = nil;
|
||||||
document = [[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:self.downloadFilename] options:options error:&error];
|
} else {
|
||||||
|
NSMutableDictionary *userInfo = [NSMutableDictionary
|
||||||
[[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:nil];
|
dictionaryWithObject: SULocalizedString(@"An error occurred while parsing the update feed.", nil)
|
||||||
self.downloadFilename = nil;
|
forKey: NSLocalizedDescriptionKey];
|
||||||
}
|
if (error) {
|
||||||
else
|
[userInfo setObject:error forKey:NSUnderlyingErrorKey];
|
||||||
{
|
}
|
||||||
failed = YES;
|
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain
|
||||||
|
code:SUAppcastParseError
|
||||||
|
userInfo:userInfo]];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (nil == document)
|
- (NSDictionary *)attributesOfNode:(NSXMLElement *)node
|
||||||
{
|
{
|
||||||
failed = YES;
|
NSEnumerator *attributeEnum = [[node attributes] objectEnumerator];
|
||||||
}
|
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
|
||||||
else
|
|
||||||
{
|
for (NSXMLNode *attribute in attributeEnum) {
|
||||||
xmlItems = [document nodesForXPath:@"/rss/channel/item" error:&error];
|
NSString *attrName = [self sparkleNamespacedNameOfNode:attribute];
|
||||||
if (nil == xmlItems)
|
if (!attrName) {
|
||||||
{
|
continue;
|
||||||
failed = YES;
|
}
|
||||||
|
NSString *stringValue = [attribute stringValue];
|
||||||
|
if (stringValue) {
|
||||||
|
[dictionary setObject:stringValue forKey:attrName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return dictionary;
|
||||||
|
}
|
||||||
|
|
||||||
if (failed == NO)
|
-(NSString *)sparkleNamespacedNameOfNode:(NSXMLNode *)node {
|
||||||
{
|
// XML namespace prefix is semantically meaningless, so compare namespace URI
|
||||||
|
// NS URI isn't used to fetch anything, and must match exactly, so we look for http:// not https://
|
||||||
|
if ([[node URI] isEqualToString:@"http://www.andymatuschak.org/xml-namespaces/sparkle"]) {
|
||||||
|
NSString *localName = [node localName];
|
||||||
|
assert(localName);
|
||||||
|
return [@"sparkle:" stringByAppendingString:localName];
|
||||||
|
} else {
|
||||||
|
return [node name]; // Backwards compatibility
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NSEnumerator *nodeEnum = [xmlItems objectEnumerator];
|
-(NSArray *)parseAppcastItemsFromXMLFile:(NSURL *)appcastFile error:(NSError *__autoreleasing*)errorp {
|
||||||
NSXMLNode *node;
|
if (errorp) {
|
||||||
|
*errorp = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!appcastFile) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSUInteger options = NSXMLNodeLoadExternalEntitiesNever; // Prevent inclusion from file://
|
||||||
|
NSXMLDocument *document = [[NSXMLDocument alloc] initWithContentsOfURL:appcastFile options:options error:errorp];
|
||||||
|
if (nil == document) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSArray *xmlItems = [document nodesForXPath:@"/rss/channel/item" error:errorp];
|
||||||
|
if (nil == xmlItems) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSMutableArray *appcastItems = [NSMutableArray array];
|
||||||
|
NSEnumerator *nodeEnum = [xmlItems objectEnumerator];
|
||||||
|
NSXMLNode *node;
|
||||||
|
|
||||||
|
while((node = [nodeEnum nextObject])) {
|
||||||
NSMutableDictionary *nodesDict = [NSMutableDictionary dictionary];
|
NSMutableDictionary *nodesDict = [NSMutableDictionary dictionary];
|
||||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||||
|
|
||||||
while (failed == NO && (node = [nodeEnum nextObject]))
|
// First, we'll "index" all the first-level children of this appcast item so we can pick them out by language later.
|
||||||
{
|
if ([[node children] count]) {
|
||||||
// First, we'll "index" all the first-level children of this appcast item so we can pick them out by language later.
|
node = [node childAtIndex:0];
|
||||||
if ([[node children] count])
|
while (nil != node) {
|
||||||
{
|
NSString *name = [self sparkleNamespacedNameOfNode:node];
|
||||||
node = [node childAtIndex:0];
|
if (name) {
|
||||||
while (nil != node)
|
NSMutableArray *nodes = [nodesDict objectForKey:name];
|
||||||
{
|
if (nodes == nil) {
|
||||||
NSString *name = [node name];
|
nodes = [NSMutableArray array];
|
||||||
if (name)
|
[nodesDict setObject:nodes forKey:name];
|
||||||
{
|
|
||||||
NSMutableArray *nodes = nodesDict[name];
|
|
||||||
if (nodes == nil)
|
|
||||||
{
|
|
||||||
nodes = [NSMutableArray array];
|
|
||||||
nodesDict[name] = nodes;
|
|
||||||
}
|
|
||||||
[nodes addObject:node];
|
|
||||||
}
|
}
|
||||||
node = [node nextSibling];
|
[nodes addObject:node];
|
||||||
}
|
}
|
||||||
|
node = [node nextSibling];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (NSString *name in nodesDict)
|
for (NSString *name in nodesDict) {
|
||||||
{
|
node = [self bestNodeInNodes:[nodesDict objectForKey:name]];
|
||||||
node = [self bestNodeInNodes:nodesDict[name]];
|
if ([name isEqualToString:SURSSElementEnclosure]) {
|
||||||
if ([name isEqualToString:SURSSElementEnclosure])
|
// enclosure is flattened as a separate dictionary for some reason
|
||||||
{
|
NSDictionary *encDict = [self attributesOfNode:(NSXMLElement *)node];
|
||||||
// enclosure is flattened as a separate dictionary for some reason
|
[dict setObject:encDict forKey:name];
|
||||||
NSDictionary *encDict = [(NSXMLElement *)node attributesAsDictionary];
|
|
||||||
dict[name] = encDict;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if ([name isEqualToString:SURSSElementPubDate])
|
|
||||||
{
|
|
||||||
// pubDate is expected to be an NSDate by SUAppcastItem, but the RSS class was returning an NSString
|
|
||||||
NSString *string = node.stringValue;
|
|
||||||
if (string) {
|
|
||||||
NSDate *date = [NSDate dateWithNaturalLanguageString:string];
|
|
||||||
if (date)
|
|
||||||
dict[name] = date;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ([name isEqualToString:SUAppcastElementDeltas])
|
|
||||||
{
|
|
||||||
NSMutableArray *deltas = [NSMutableArray array];
|
|
||||||
NSEnumerator *childEnum = [[node children] objectEnumerator];
|
|
||||||
for (NSXMLNode *child in childEnum) {
|
|
||||||
if ([[child name] isEqualToString:SURSSElementEnclosure])
|
|
||||||
[deltas addObject:[(NSXMLElement *)child attributesAsDictionary]];
|
|
||||||
}
|
|
||||||
dict[name] = deltas;
|
|
||||||
}
|
|
||||||
else if ([name isEqualToString:SUAppcastElementTags]) {
|
|
||||||
NSMutableArray *tags = [NSMutableArray array];
|
|
||||||
NSEnumerator *childEnum = [[node children] objectEnumerator];
|
|
||||||
for (NSXMLNode *child in childEnum) {
|
|
||||||
NSString *childName = child.name;
|
|
||||||
if (childName)
|
|
||||||
[tags addObject:childName];
|
|
||||||
}
|
|
||||||
dict[name] = tags;
|
|
||||||
}
|
|
||||||
else if (name != nil)
|
|
||||||
{
|
|
||||||
// add all other values as strings
|
|
||||||
NSString *theValue = [[node stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
|
||||||
if (theValue != nil) {
|
|
||||||
dict[name] = theValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NSString *errString;
|
|
||||||
SUAppcastItem *anItem = [[SUAppcastItem alloc] initWithDictionary:dict failureReason:&errString];
|
|
||||||
if (anItem)
|
|
||||||
{
|
|
||||||
[appcastItems addObject:anItem];
|
|
||||||
}
|
}
|
||||||
else
|
else if ([name isEqualToString:SURSSElementPubDate]) {
|
||||||
{
|
// We don't want to parse and create a NSDate instance -
|
||||||
SULog(@"Sparkle Updater: Failed to parse appcast item: %@.\nAppcast dictionary was: %@", errString, dict);
|
// that's a risk we can avoid. We don't use the date anywhere other
|
||||||
|
// than it being accessible from SUAppcastItem
|
||||||
|
NSString *dateString = node.stringValue;
|
||||||
|
if (dateString) {
|
||||||
|
[dict setObject:dateString forKey:name];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ([name isEqualToString:SUAppcastElementDeltas]) {
|
||||||
|
NSMutableArray *deltas = [NSMutableArray array];
|
||||||
|
NSEnumerator *childEnum = [[node children] objectEnumerator];
|
||||||
|
for (NSXMLNode *child in childEnum) {
|
||||||
|
if ([[child name] isEqualToString:SURSSElementEnclosure]) {
|
||||||
|
[deltas addObject:[self attributesOfNode:(NSXMLElement *)child]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[dict setObject:deltas forKey:name];
|
||||||
|
}
|
||||||
|
else if ([name isEqualToString:SUAppcastElementTags]) {
|
||||||
|
NSMutableArray *tags = [NSMutableArray array];
|
||||||
|
NSEnumerator *childEnum = [[node children] objectEnumerator];
|
||||||
|
for (NSXMLNode *child in childEnum) {
|
||||||
|
NSString *childName = child.name;
|
||||||
|
if (childName) {
|
||||||
|
[tags addObject:childName];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[dict setObject:tags forKey:name];
|
||||||
}
|
}
|
||||||
[nodesDict removeAllObjects];
|
else if (name != nil) {
|
||||||
[dict removeAllObjects];
|
// add all other values as strings
|
||||||
|
NSString *theValue = [[node stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||||
|
if (theValue != nil) {
|
||||||
|
[dict setObject:theValue forKey:name];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *errString;
|
||||||
|
SUAppcastItem *anItem = [[SUAppcastItem alloc] initWithDictionary:dict failureReason:&errString];
|
||||||
|
if (anItem) {
|
||||||
|
[appcastItems addObject:anItem];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SULog(@"Sparkle Updater: Failed to parse appcast item: %@.\nAppcast dictionary was: %@", errString, dict);
|
||||||
|
if (errorp) *errorp = [NSError errorWithDomain:SUSparkleErrorDomain
|
||||||
|
code:SUAppcastParseError
|
||||||
|
userInfo:@{NSLocalizedDescriptionKey: errString}];
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.items = appcastItems;
|
||||||
|
|
||||||
if ([appcastItems count]) {
|
return appcastItems;
|
||||||
NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"date" ascending:NO];
|
|
||||||
[appcastItems sortUsingDescriptors:@[sort]];
|
|
||||||
self.items = appcastItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (failed) {
|
|
||||||
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastParseError userInfo:@{ NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while parsing the update feed.", nil) }]];
|
|
||||||
} else {
|
|
||||||
self.completionBlock(nil);
|
|
||||||
self.completionBlock = nil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)download:(NSURLDownload *)__unused aDownload didFailWithError:(NSError *)error
|
- (void)download:(NSURLDownload *)__unused aDownload didFailWithError:(NSError *)error
|
||||||
@@ -253,14 +275,18 @@
|
|||||||
|
|
||||||
- (void)reportError:(NSError *)error
|
- (void)reportError:(NSError *)error
|
||||||
{
|
{
|
||||||
NSURL *failingUrl = error.userInfo[NSURLErrorFailingURLErrorKey];
|
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||||
|
|
||||||
self.completionBlock([NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastError userInfo:@{
|
|
||||||
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred in retrieving update information. Please try again later.", nil),
|
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred in retrieving update information. Please try again later.", nil),
|
||||||
NSLocalizedFailureReasonErrorKey: [error localizedDescription],
|
NSLocalizedFailureReasonErrorKey: [error localizedDescription],
|
||||||
NSUnderlyingErrorKey: error,
|
NSUnderlyingErrorKey: error,
|
||||||
NSURLErrorFailingURLErrorKey: failingUrl ? failingUrl : [NSNull null],
|
}];
|
||||||
}]);
|
|
||||||
|
NSURL *failingUrl = [error.userInfo objectForKey:NSURLErrorFailingURLErrorKey];
|
||||||
|
if (failingUrl) {
|
||||||
|
[userInfo setObject:failingUrl forKey:NSURLErrorFailingURLErrorKey];
|
||||||
|
}
|
||||||
|
|
||||||
|
self.completionBlock([NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastError userInfo:userInfo]);
|
||||||
self.completionBlock = nil;
|
self.completionBlock = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +294,7 @@
|
|||||||
{
|
{
|
||||||
// We use this method to pick out the localized version of a node when one's available.
|
// We use this method to pick out the localized version of a node when one's available.
|
||||||
if ([nodes count] == 1)
|
if ([nodes count] == 1)
|
||||||
return nodes[0];
|
return [nodes objectAtIndex:0];
|
||||||
else if ([nodes count] == 0)
|
else if ([nodes count] == 0)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
@@ -279,12 +305,24 @@
|
|||||||
lang = [[node attributeForName:@"xml:lang"] stringValue];
|
lang = [[node attributeForName:@"xml:lang"] stringValue];
|
||||||
[languages addObject:(lang ? lang : @"")];
|
[languages addObject:(lang ? lang : @"")];
|
||||||
}
|
}
|
||||||
lang = [NSBundle preferredLocalizationsFromArray:languages][0];
|
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
|
||||||
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
|
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
|
||||||
if (i == NSNotFound) {
|
if (i == NSNotFound) {
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
return nodes[i];
|
return [nodes objectAtIndex:i];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (SUAppcast *)copyWithoutDeltaUpdates {
|
||||||
|
SUAppcast *other = [SUAppcast new];
|
||||||
|
NSMutableArray *nonDeltaItems = [NSMutableArray new];
|
||||||
|
|
||||||
|
for(SUAppcastItem *item in self.items) {
|
||||||
|
if (![item isDeltaUpdate]) [nonDeltaItems addObject:item];
|
||||||
|
}
|
||||||
|
|
||||||
|
other.items = nonDeltaItems;
|
||||||
|
return other;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -9,12 +9,16 @@
|
|||||||
#ifndef SUAPPCASTITEM_H
|
#ifndef SUAPPCASTITEM_H
|
||||||
#define SUAPPCASTITEM_H
|
#define SUAPPCASTITEM_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Foundation;
|
||||||
|
#else
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
|
|
||||||
SU_EXPORT @interface SUAppcastItem : NSObject
|
SU_EXPORT @interface SUAppcastItem : NSObject
|
||||||
@property (copy, readonly) NSString *title;
|
@property (copy, readonly) NSString *title;
|
||||||
@property (copy, readonly) NSDate *date;
|
@property (copy, readonly) NSString *dateString;
|
||||||
@property (copy, readonly) NSString *itemDescription;
|
@property (copy, readonly) NSString *itemDescription;
|
||||||
@property (strong, readonly) NSURL *releaseNotesURL;
|
@property (strong, readonly) NSURL *releaseNotesURL;
|
||||||
@property (copy, readonly) NSString *DSASignature;
|
@property (copy, readonly) NSString *DSASignature;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
@interface SUAppcastItem ()
|
@interface SUAppcastItem ()
|
||||||
@property (copy, readwrite) NSString *title;
|
@property (copy, readwrite) NSString *title;
|
||||||
@property (copy, readwrite) NSDate *date;
|
@property (copy, readwrite) NSString *dateString;
|
||||||
@property (copy, readwrite) NSString *itemDescription;
|
@property (copy, readwrite) NSString *itemDescription;
|
||||||
@property (strong, readwrite) NSURL *releaseNotesURL;
|
@property (strong, readwrite) NSURL *releaseNotesURL;
|
||||||
@property (copy, readwrite) NSString *DSASignature;
|
@property (copy, readwrite) NSString *DSASignature;
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation SUAppcastItem
|
@implementation SUAppcastItem
|
||||||
@synthesize date;
|
@synthesize dateString;
|
||||||
@synthesize deltaUpdates;
|
@synthesize deltaUpdates;
|
||||||
@synthesize displayVersionString;
|
@synthesize displayVersionString;
|
||||||
@synthesize DSASignature;
|
@synthesize DSASignature;
|
||||||
@@ -47,12 +47,13 @@
|
|||||||
|
|
||||||
- (BOOL)isDeltaUpdate
|
- (BOOL)isDeltaUpdate
|
||||||
{
|
{
|
||||||
return self.propertiesDictionary[SURSSElementEnclosure][SUAppcastAttributeDeltaFrom] != nil;
|
NSDictionary *rssElementEnclosure = [self.propertiesDictionary objectForKey:SURSSElementEnclosure];
|
||||||
|
return [rssElementEnclosure objectForKey:SUAppcastAttributeDeltaFrom] != nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isCriticalUpdate
|
- (BOOL)isCriticalUpdate
|
||||||
{
|
{
|
||||||
return [self.propertiesDictionary[SUAppcastElementTags] containsObject:SUAppcastElementCriticalUpdate];
|
return [[self.propertiesDictionary objectForKey:SUAppcastElementTags] containsObject:SUAppcastElementCriticalUpdate];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isInformationOnlyUpdate
|
- (BOOL)isInformationOnlyUpdate
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
id enclosure = dict[SURSSElementEnclosure];
|
NSDictionary *enclosure = [dict objectForKey:SURSSElementEnclosure];
|
||||||
|
|
||||||
// Try to find a version string.
|
// Try to find a version string.
|
||||||
// Finding the new version number from the RSS feed is a little bit hacky. There are two ways:
|
// Finding the new version number from the RSS feed is a little bit hacky. There are two ways:
|
||||||
@@ -79,17 +80,17 @@
|
|||||||
// underscore and the last period as the version number. So name your packages like this: APPNAME_VERSION.extension.
|
// underscore and the last period as the version number. So name your packages like this: APPNAME_VERSION.extension.
|
||||||
// The big caveat with this is that you can't have underscores in your version strings, as that'll confuse Sparkle.
|
// The big caveat with this is that you can't have underscores in your version strings, as that'll confuse Sparkle.
|
||||||
// Feel free to change the separator string to a hyphen or something more suited to your needs if you like.
|
// Feel free to change the separator string to a hyphen or something more suited to your needs if you like.
|
||||||
NSString *newVersion = enclosure[SUAppcastAttributeVersion];
|
NSString *newVersion = [enclosure objectForKey:SUAppcastAttributeVersion];
|
||||||
if (newVersion == nil) {
|
if (newVersion == nil) {
|
||||||
newVersion = dict[SUAppcastAttributeVersion]; // Get version from the item, in case it's a download-less item (i.e. paid upgrade).
|
newVersion = [dict objectForKey:SUAppcastAttributeVersion]; // Get version from the item, in case it's a download-less item (i.e. paid upgrade).
|
||||||
}
|
}
|
||||||
if (newVersion == nil) // no sparkle:version attribute anywhere?
|
if (newVersion == nil) // no sparkle:version attribute anywhere?
|
||||||
{
|
{
|
||||||
SULog(@"warning: <%@> for URL '%@' is missing %@ attribute. Version comparison may be unreliable. Please always specify %@", SURSSElementEnclosure, enclosure[SURSSAttributeURL], SUAppcastAttributeVersion, SUAppcastAttributeVersion);
|
SULog(@"warning: <%@> for URL '%@' is missing %@ attribute. Version comparison may be unreliable. Please always specify %@", SURSSElementEnclosure, [enclosure objectForKey:SURSSAttributeURL], SUAppcastAttributeVersion, SUAppcastAttributeVersion);
|
||||||
|
|
||||||
// Separate the url by underscores and take the last component, as that'll be closest to the end,
|
// Separate the url by underscores and take the last component, as that'll be closest to the end,
|
||||||
// then we remove the extension. Hopefully, this will be the version.
|
// then we remove the extension. Hopefully, this will be the version.
|
||||||
NSArray *fileComponents = [enclosure[SURSSAttributeURL] componentsSeparatedByString:@"_"];
|
NSArray *fileComponents = [[enclosure objectForKey:SURSSAttributeURL] componentsSeparatedByString:@"_"];
|
||||||
if ([fileComponents count] > 1) {
|
if ([fileComponents count] > 1) {
|
||||||
newVersion = [[fileComponents lastObject] stringByDeletingPathExtension];
|
newVersion = [[fileComponents lastObject] stringByDeletingPathExtension];
|
||||||
}
|
}
|
||||||
@@ -103,11 +104,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
propertiesDictionary = [[NSMutableDictionary alloc] initWithDictionary:dict];
|
propertiesDictionary = [[NSMutableDictionary alloc] initWithDictionary:dict];
|
||||||
self.title = dict[SURSSElementTitle];
|
self.title = [dict objectForKey:SURSSElementTitle];
|
||||||
self.date = dict[SURSSElementPubDate];
|
self.dateString = [dict objectForKey:SURSSElementPubDate];
|
||||||
self.itemDescription = dict[SURSSElementDescription];
|
self.itemDescription = [dict objectForKey:SURSSElementDescription];
|
||||||
|
|
||||||
NSString *theInfoURL = dict[SURSSElementLink];
|
NSString *theInfoURL = [dict objectForKey:SURSSElementLink];
|
||||||
if (theInfoURL) {
|
if (theInfoURL) {
|
||||||
if (![theInfoURL isKindOfClass:[NSString class]]) {
|
if (![theInfoURL isKindOfClass:[NSString class]]) {
|
||||||
SULog(@"%@ -%@ Info URL is not of valid type.", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
|
SULog(@"%@ -%@ Info URL is not of valid type.", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
|
||||||
@@ -125,7 +126,7 @@
|
|||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *enclosureURLString = enclosure[SURSSAttributeURL];
|
NSString *enclosureURLString = [enclosure objectForKey:SURSSAttributeURL];
|
||||||
if (!enclosureURLString && !theInfoURL) {
|
if (!enclosureURLString && !theInfoURL) {
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = @"Feed item's enclosure lacks URL";
|
*error = @"Feed item's enclosure lacks URL";
|
||||||
@@ -134,20 +135,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (enclosureURLString) {
|
if (enclosureURLString) {
|
||||||
NSString *fileURLString = [[enclosureURLString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
// Sparkle used to always URL-encode, so for backwards compatibility spaces in URLs must be forgiven.
|
||||||
|
NSString *fileURLString = [enclosureURLString stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
|
||||||
self.fileURL = [NSURL URLWithString:fileURLString];
|
self.fileURL = [NSURL URLWithString:fileURLString];
|
||||||
}
|
}
|
||||||
if (enclosure) {
|
if (enclosure) {
|
||||||
self.DSASignature = enclosure[SUAppcastAttributeDSASignature];
|
self.DSASignature = [enclosure objectForKey:SUAppcastAttributeDSASignature];
|
||||||
}
|
}
|
||||||
|
|
||||||
self.versionString = newVersion;
|
self.versionString = newVersion;
|
||||||
self.minimumSystemVersion = dict[SUAppcastElementMinimumSystemVersion];
|
self.minimumSystemVersion = [dict objectForKey:SUAppcastElementMinimumSystemVersion];
|
||||||
self.maximumSystemVersion = dict[SUAppcastElementMaximumSystemVersion];
|
self.maximumSystemVersion = [dict objectForKey:SUAppcastElementMaximumSystemVersion];
|
||||||
|
|
||||||
NSString *shortVersionString = enclosure[SUAppcastAttributeShortVersionString];
|
NSString *shortVersionString = [enclosure objectForKey:SUAppcastAttributeShortVersionString];
|
||||||
if (nil == shortVersionString) {
|
if (nil == shortVersionString) {
|
||||||
shortVersionString = dict[SUAppcastAttributeShortVersionString]; // fall back on the <item>
|
shortVersionString = [dict objectForKey:SUAppcastAttributeShortVersionString]; // fall back on the <item>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shortVersionString) {
|
if (shortVersionString) {
|
||||||
@@ -157,28 +159,33 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the appropriate release notes URL.
|
// Find the appropriate release notes URL.
|
||||||
NSString *releaseNotesString = dict[SUAppcastElementReleaseNotesLink];
|
NSString *releaseNotesString = [dict objectForKey:SUAppcastElementReleaseNotesLink];
|
||||||
if (releaseNotesString) {
|
if (releaseNotesString) {
|
||||||
self.releaseNotesURL = [NSURL URLWithString:releaseNotesString];
|
NSURL *url = [NSURL URLWithString:releaseNotesString];
|
||||||
|
if ([url isFileURL]) {
|
||||||
|
SULog(@"Release notes with file:// URLs are not supported");
|
||||||
|
} else {
|
||||||
|
self.releaseNotesURL = url;
|
||||||
|
}
|
||||||
} else if ([self.itemDescription hasPrefix:@"http://"] || [self.itemDescription hasPrefix:@"https://"]) { // if the description starts with http:// or https:// use that.
|
} else if ([self.itemDescription hasPrefix:@"http://"] || [self.itemDescription hasPrefix:@"https://"]) { // if the description starts with http:// or https:// use that.
|
||||||
self.releaseNotesURL = [NSURL URLWithString:self.itemDescription];
|
self.releaseNotesURL = [NSURL URLWithString:self.itemDescription];
|
||||||
} else {
|
} else {
|
||||||
self.releaseNotesURL = nil;
|
self.releaseNotesURL = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSArray *deltaDictionaries = dict[SUAppcastElementDeltas];
|
NSArray *deltaDictionaries = [dict objectForKey:SUAppcastElementDeltas];
|
||||||
if (deltaDictionaries) {
|
if (deltaDictionaries) {
|
||||||
NSMutableDictionary *deltas = [NSMutableDictionary dictionary];
|
NSMutableDictionary *deltas = [NSMutableDictionary dictionary];
|
||||||
for (NSDictionary *deltaDictionary in deltaDictionaries) {
|
for (NSDictionary *deltaDictionary in deltaDictionaries) {
|
||||||
NSString *deltaFrom = deltaDictionary[SUAppcastAttributeDeltaFrom];
|
NSString *deltaFrom = [deltaDictionary objectForKey:SUAppcastAttributeDeltaFrom];
|
||||||
if (!deltaFrom) continue;
|
if (!deltaFrom) continue;
|
||||||
|
|
||||||
NSMutableDictionary *fakeAppCastDict = [dict mutableCopy];
|
NSMutableDictionary *fakeAppCastDict = [dict mutableCopy];
|
||||||
[fakeAppCastDict removeObjectForKey:SUAppcastElementDeltas];
|
[fakeAppCastDict removeObjectForKey:SUAppcastElementDeltas];
|
||||||
fakeAppCastDict[SURSSElementEnclosure] = deltaDictionary;
|
[fakeAppCastDict setObject:deltaDictionary forKey:SURSSElementEnclosure];
|
||||||
SUAppcastItem *deltaItem = [[SUAppcastItem alloc] initWithDictionary:fakeAppCastDict];
|
SUAppcastItem *deltaItem = [[SUAppcastItem alloc] initWithDictionary:fakeAppCastDict];
|
||||||
|
|
||||||
deltas[deltaFrom] = deltaItem;
|
[deltas setObject:deltaItem forKey:deltaFrom];
|
||||||
}
|
}
|
||||||
self.deltaUpdates = deltas;
|
self.deltaUpdates = deltas;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
|||||||
@property (assign) BOOL postponingInstallation;
|
@property (assign) BOOL postponingInstallation;
|
||||||
@property (assign) BOOL showErrors;
|
@property (assign) BOOL showErrors;
|
||||||
@property (assign) BOOL willUpdateOnTermination;
|
@property (assign) BOOL willUpdateOnTermination;
|
||||||
|
@property (assign) BOOL isTerminating;
|
||||||
@property (strong) SUAutomaticUpdateAlert *alert;
|
@property (strong) SUAutomaticUpdateAlert *alert;
|
||||||
@property (strong) NSTimer *showUpdateAlertTimer;
|
@property (strong) NSTimer *showUpdateAlertTimer;
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
|||||||
@synthesize postponingInstallation;
|
@synthesize postponingInstallation;
|
||||||
@synthesize showErrors;
|
@synthesize showErrors;
|
||||||
@synthesize willUpdateOnTermination;
|
@synthesize willUpdateOnTermination;
|
||||||
|
@synthesize isTerminating;
|
||||||
@synthesize alert;
|
@synthesize alert;
|
||||||
@synthesize showUpdateAlertTimer;
|
@synthesize showUpdateAlertTimer;
|
||||||
|
|
||||||
@@ -131,6 +133,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
|||||||
|
|
||||||
- (void)abortUpdate
|
- (void)abortUpdate
|
||||||
{
|
{
|
||||||
|
self.isTerminating = NO;
|
||||||
[self stopUpdatingOnTermination];
|
[self stopUpdatingOnTermination];
|
||||||
[self invalidateShowUpdateAlertTimer];
|
[self invalidateShowUpdateAlertTimer];
|
||||||
[super abortUpdate];
|
[super abortUpdate];
|
||||||
@@ -153,8 +156,6 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
|||||||
|
|
||||||
case SUInstallLaterChoice:
|
case SUInstallLaterChoice:
|
||||||
self.postponingInstallation = YES;
|
self.postponingInstallation = YES;
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
|
|
||||||
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(systemWillPowerOff:) name:NSWorkspaceWillPowerOffNotification object:nil];
|
|
||||||
// We're already waiting on quit, just indicate that we're idle.
|
// We're already waiting on quit, just indicate that we're idle.
|
||||||
self.interruptible = YES;
|
self.interruptible = YES;
|
||||||
break;
|
break;
|
||||||
@@ -166,6 +167,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI
|
- (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI
|
||||||
{
|
{
|
||||||
if (relaunch) {
|
if (relaunch) {
|
||||||
@@ -185,9 +187,22 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
|||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification *)__unused note
|
- (void)applicationWillTerminate:(NSNotification *)__unused note
|
||||||
{
|
{
|
||||||
|
// We don't want to terminate the app if the user or someone else initiated a termination
|
||||||
|
// Use a property instead of passing an argument to installWithToolAndRelaunch:
|
||||||
|
// because we give the delegate an invocation to our install methods and
|
||||||
|
// this code was added later :|
|
||||||
|
self.isTerminating = YES;
|
||||||
|
|
||||||
[self installWithToolAndRelaunch:NO];
|
[self installWithToolAndRelaunch:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)terminateApp
|
||||||
|
{
|
||||||
|
if (!self.isTerminating) {
|
||||||
|
[super terminateApp];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)abortUpdateWithError:(NSError *)error
|
- (void)abortUpdateWithError:(NSError *)error
|
||||||
{
|
{
|
||||||
if (self.showErrors) {
|
if (self.showErrors) {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host;
|
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host;
|
||||||
|
|
||||||
- (BOOL)isItemNewer:(SUAppcastItem *)ui;
|
- (BOOL)isItemNewer:(SUAppcastItem *)ui;
|
||||||
- (BOOL)hostSupportsItem:(SUAppcastItem *)ui;
|
+ (BOOL)hostSupportsItem:(SUAppcastItem *)ui;
|
||||||
- (BOOL)itemContainsSkippedVersion:(SUAppcastItem *)ui;
|
- (BOOL)itemContainsSkippedVersion:(SUAppcastItem *)ui;
|
||||||
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui;
|
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui;
|
||||||
- (void)appcastDidFinishLoading:(SUAppcast *)ac;
|
- (void)appcastDidFinishLoading:(SUAppcast *)ac;
|
||||||
|
|||||||
@@ -10,16 +10,14 @@
|
|||||||
|
|
||||||
#import "SUHost.h"
|
#import "SUHost.h"
|
||||||
#import "SUOperatingSystem.h"
|
#import "SUOperatingSystem.h"
|
||||||
#import "SUDSAVerifier.h"
|
|
||||||
#import "SUInstaller.h"
|
|
||||||
#import "SUStandardVersionComparator.h"
|
#import "SUStandardVersionComparator.h"
|
||||||
#import "SUUnarchiver.h"
|
#import "SUUnarchiver.h"
|
||||||
#import "SUConstants.h"
|
#import "SUConstants.h"
|
||||||
#import "SULog.h"
|
#import "SULog.h"
|
||||||
#import "SUBinaryDeltaCommon.h"
|
#import "SUBinaryDeltaCommon.h"
|
||||||
#import "SUCodeSigningVerifier.h"
|
|
||||||
#import "SUUpdater_Private.h"
|
#import "SUUpdater_Private.h"
|
||||||
#import "SUFileManager.h"
|
#import "SUFileManager.h"
|
||||||
|
#import "SUUpdateValidator.h"
|
||||||
|
|
||||||
@interface SUBasicUpdateDriver ()
|
@interface SUBasicUpdateDriver ()
|
||||||
|
|
||||||
@@ -31,6 +29,8 @@
|
|||||||
@property (copy) NSString *tempDir;
|
@property (copy) NSString *tempDir;
|
||||||
@property (copy) NSString *relaunchPath;
|
@property (copy) NSString *relaunchPath;
|
||||||
|
|
||||||
|
@property (nonatomic) SUUpdateValidator *updateValidator;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation SUBasicUpdateDriver
|
@implementation SUBasicUpdateDriver
|
||||||
@@ -43,6 +43,8 @@
|
|||||||
@synthesize tempDir;
|
@synthesize tempDir;
|
||||||
@synthesize relaunchPath;
|
@synthesize relaunchPath;
|
||||||
|
|
||||||
|
@synthesize updateValidator = _updateValidator;
|
||||||
|
|
||||||
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost
|
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost
|
||||||
{
|
{
|
||||||
[super checkForUpdatesAtURL:URL host:aHost];
|
[super checkForUpdatesAtURL:URL host:aHost];
|
||||||
@@ -82,12 +84,28 @@
|
|||||||
return comparator;
|
return comparator;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isItemNewer:(SUAppcastItem *)ui
|
+ (SUAppcastItem *)bestItemFromAppcastItems:(NSArray *)appcastItems getDeltaItem:(SUAppcastItem * __autoreleasing *)deltaItem withHostVersion:(NSString *)hostVersion comparator:(id<SUVersionComparison>)comparator
|
||||||
{
|
{
|
||||||
return [[self versionComparator] compareVersion:[self.host version] toVersion:[ui versionString]] == NSOrderedAscending;
|
SUAppcastItem *item = nil;
|
||||||
|
for(SUAppcastItem *candidate in appcastItems) {
|
||||||
|
if ([[self class] hostSupportsItem:candidate]) {
|
||||||
|
if (!item || [comparator compareVersion:item.versionString toVersion:candidate.versionString] == NSOrderedAscending) {
|
||||||
|
item = candidate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item && deltaItem) {
|
||||||
|
SUAppcastItem *deltaUpdateItem = [[item deltaUpdates] objectForKey:hostVersion];
|
||||||
|
if (deltaUpdateItem && [[self class] hostSupportsItem:deltaUpdateItem]) {
|
||||||
|
*deltaItem = deltaUpdateItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)hostSupportsItem:(SUAppcastItem *)ui
|
+ (BOOL)hostSupportsItem:(SUAppcastItem *)ui
|
||||||
{
|
{
|
||||||
if (([ui minimumSystemVersion] == nil || [[ui minimumSystemVersion] isEqualToString:@""]) &&
|
if (([ui minimumSystemVersion] == nil || [[ui minimumSystemVersion] isEqualToString:@""]) &&
|
||||||
([ui maximumSystemVersion] == nil || [[ui maximumSystemVersion] isEqualToString:@""])) { return YES; }
|
([ui maximumSystemVersion] == nil || [[ui maximumSystemVersion] isEqualToString:@""])) { return YES; }
|
||||||
@@ -106,6 +124,11 @@
|
|||||||
return minimumVersionOK && maximumVersionOK;
|
return minimumVersionOK && maximumVersionOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)isItemNewer:(SUAppcastItem *)ui
|
||||||
|
{
|
||||||
|
return [[self versionComparator] compareVersion:[self.host version] toVersion:[ui versionString]] == NSOrderedAscending;
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL)itemContainsSkippedVersion:(SUAppcastItem *)ui
|
- (BOOL)itemContainsSkippedVersion:(SUAppcastItem *)ui
|
||||||
{
|
{
|
||||||
NSString *skippedVersion = [self.host objectForUserDefaultsKey:SUSkippedVersionKey];
|
NSString *skippedVersion = [self.host objectForUserDefaultsKey:SUSkippedVersionKey];
|
||||||
@@ -115,7 +138,7 @@
|
|||||||
|
|
||||||
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui
|
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui
|
||||||
{
|
{
|
||||||
return ui && [self hostSupportsItem:ui] && [self isItemNewer:ui] && ![self itemContainsSkippedVersion:ui];
|
return ui && [[self class] hostSupportsItem:ui] && [self isItemNewer:ui] && ![self itemContainsSkippedVersion:ui];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)appcastDidFinishLoading:(SUAppcast *)ac
|
- (void)appcastDidFinishLoading:(SUAppcast *)ac
|
||||||
@@ -133,17 +156,17 @@
|
|||||||
if ([[self.updater delegate] respondsToSelector:@selector(bestValidUpdateInAppcast:forUpdater:)]) // Does the delegate want to handle it?
|
if ([[self.updater delegate] respondsToSelector:@selector(bestValidUpdateInAppcast:forUpdater:)]) // Does the delegate want to handle it?
|
||||||
{
|
{
|
||||||
item = [[self.updater delegate] bestValidUpdateInAppcast:ac forUpdater:self.updater];
|
item = [[self.updater delegate] bestValidUpdateInAppcast:ac forUpdater:self.updater];
|
||||||
|
if ([item isDeltaUpdate]) {
|
||||||
|
self.nonDeltaUpdateItem = [[self.updater delegate] bestValidUpdateInAppcast:[ac copyWithoutDeltaUpdates] forUpdater:self.updater];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // If not, we'll take care of it ourselves.
|
else // If not, we'll take care of it ourselves.
|
||||||
{
|
{
|
||||||
// Find the first update we can actually use.
|
// Find the best supported update
|
||||||
NSEnumerator *updateEnumerator = [[ac items] objectEnumerator];
|
SUAppcastItem *deltaUpdateItem = nil;
|
||||||
do {
|
item = [[self class] bestItemFromAppcastItems:ac.items getDeltaItem:&deltaUpdateItem withHostVersion:self.host.version comparator:[self versionComparator]];
|
||||||
item = [updateEnumerator nextObject];
|
|
||||||
} while (item && ![self hostSupportsItem:item]);
|
if (item && deltaUpdateItem) {
|
||||||
|
|
||||||
SUAppcastItem *deltaUpdateItem = [item deltaUpdates][[self.host version]];
|
|
||||||
if (deltaUpdateItem && [self hostSupportsItem:deltaUpdateItem]) {
|
|
||||||
self.nonDeltaUpdateItem = item;
|
self.nonDeltaUpdateItem = item;
|
||||||
item = deltaUpdateItem;
|
item = deltaUpdateItem;
|
||||||
}
|
}
|
||||||
@@ -187,8 +210,36 @@
|
|||||||
}]];
|
}]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *)appCachePath
|
||||||
|
{
|
||||||
|
NSArray *cachePaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||||
|
NSString *cachePath = nil;
|
||||||
|
if ([cachePaths count]) {
|
||||||
|
cachePath = [cachePaths objectAtIndex:0];
|
||||||
|
}
|
||||||
|
if (!cachePath) {
|
||||||
|
SULog(@"Failed to find user's cache directory! Using system default");
|
||||||
|
cachePath = NSTemporaryDirectory();
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *name = [self.host.bundle bundleIdentifier];
|
||||||
|
if (!name) {
|
||||||
|
name = [self.host name];
|
||||||
|
}
|
||||||
|
|
||||||
|
cachePath = [cachePath stringByAppendingPathComponent:name];
|
||||||
|
cachePath = [cachePath stringByAppendingPathComponent:@SPARKLE_BUNDLE_IDENTIFIER];
|
||||||
|
return cachePath;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)downloadUpdate
|
- (void)downloadUpdate
|
||||||
{
|
{
|
||||||
|
// Clear cache directory so that downloads can't possibly accumulate inside
|
||||||
|
NSString *appCachePath = [self appCachePath];
|
||||||
|
if ([[NSFileManager defaultManager] fileExistsAtPath:appCachePath]) {
|
||||||
|
[[NSFileManager defaultManager] removeItemAtPath:appCachePath error:NULL];
|
||||||
|
}
|
||||||
|
|
||||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[self.updateItem fileURL]];
|
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[self.updateItem fileURL]];
|
||||||
[request setValue:[self.updater userAgentString] forHTTPHeaderField:@"User-Agent"];
|
[request setValue:[self.updater userAgentString] forHTTPHeaderField:@"User-Agent"];
|
||||||
if ([[self.updater delegate] respondsToSelector:@selector(updater:willDownloadUpdate:withRequest:)]) {
|
if ([[self.updater delegate] respondsToSelector:@selector(updater:willDownloadUpdate:withRequest:)]) {
|
||||||
@@ -202,13 +253,14 @@
|
|||||||
- (void)download:(NSURLDownload *)__unused d decideDestinationWithSuggestedFilename:(NSString *)name
|
- (void)download:(NSURLDownload *)__unused d decideDestinationWithSuggestedFilename:(NSString *)name
|
||||||
{
|
{
|
||||||
NSString *downloadFileName = [NSString stringWithFormat:@"%@ %@", [self.host name], [self.updateItem versionString]];
|
NSString *downloadFileName = [NSString stringWithFormat:@"%@ %@", [self.host name], [self.updateItem versionString]];
|
||||||
|
|
||||||
|
NSString *appCachePath = [self appCachePath];
|
||||||
self.tempDir = [self.host.appCachePath stringByAppendingPathComponent:downloadFileName];
|
|
||||||
|
self.tempDir = [appCachePath stringByAppendingPathComponent:downloadFileName];
|
||||||
int cnt = 1;
|
int cnt = 1;
|
||||||
while ([[NSFileManager defaultManager] fileExistsAtPath:self.tempDir] && cnt <= 999)
|
while ([[NSFileManager defaultManager] fileExistsAtPath:self.tempDir] && cnt <= 999)
|
||||||
{
|
{
|
||||||
self.tempDir = [self.host.appCachePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %d", downloadFileName, cnt++]];
|
self.tempDir = [appCachePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %d", downloadFileName, cnt++]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the temporary directory if necessary.
|
// Create the temporary directory if necessary.
|
||||||
@@ -224,87 +276,6 @@
|
|||||||
[self.download setDestination:self.downloadPath allowOverwrite:YES];
|
[self.download setDestination:self.downloadPath allowOverwrite:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If the update is a package, then it must be signed using DSA. No other verification is done.
|
|
||||||
*
|
|
||||||
* If the update is a bundle, then it must meet any one of:
|
|
||||||
*
|
|
||||||
* * old and new DSA public keys are the same and valid (it allows change of Code Signing identity), or
|
|
||||||
*
|
|
||||||
* * old and new Code Signing identity are the same and valid
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
- (BOOL)validateUpdateDownloadedToPath:(NSString *)downloadedPath extractedToPath:(NSString *)extractedPath DSASignature:(NSString *)DSASignature publicDSAKey:(NSString *)publicDSAKey
|
|
||||||
{
|
|
||||||
BOOL isPackage = NO;
|
|
||||||
NSString *installSourcePath = [SUInstaller installSourcePathInUpdateFolder:extractedPath forHost:self.host isPackage:&isPackage isGuided:NULL];
|
|
||||||
if (installSourcePath == nil) {
|
|
||||||
SULog(@"No suitable install is found in the update. The update will be rejected.");
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Modern packages are not distributed as bundles and are code signed differently than regular applications
|
|
||||||
if (isPackage) {
|
|
||||||
if (nil == publicDSAKey) {
|
|
||||||
SULog(@"The existing app bundle does not have a DSA key, so it can't verify installer packages.");
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL packageValidated = [SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey];
|
|
||||||
|
|
||||||
if (!packageValidated) {
|
|
||||||
SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return packageValidated;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSBundle *newBundle = [NSBundle bundleWithPath:installSourcePath];
|
|
||||||
if (newBundle == nil) {
|
|
||||||
SULog(@"No suitable bundle is found in the update. The update will be rejected.");
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
SUHost *newHost = [[SUHost alloc] initWithBundle:newBundle];
|
|
||||||
NSString *newPublicDSAKey = newHost.publicDSAKey;
|
|
||||||
|
|
||||||
BOOL dsaKeysMatch = (publicDSAKey == nil || newPublicDSAKey == nil) ? NO : [publicDSAKey isEqualToString:newPublicDSAKey];
|
|
||||||
|
|
||||||
if (newPublicDSAKey != nil) {
|
|
||||||
if (![SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:newPublicDSAKey]) {
|
|
||||||
SULog(@"DSA signature validation failed. The update has a public DSA key and is signed with a DSA key, but the %@ doesn't match the signature. The update will be rejected.",
|
|
||||||
dsaKeysMatch ? @"public key" : @"new public key shipped with the update");
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL updateIsCodeSigned = [SUCodeSigningVerifier applicationAtPathIsCodeSigned:installSourcePath];
|
|
||||||
|
|
||||||
if (dsaKeysMatch) {
|
|
||||||
NSError *error = nil;
|
|
||||||
if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtPath:installSourcePath error:&error]) {
|
|
||||||
SULog(@"The update archive has a valid DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error);
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
BOOL hostIsCodeSigned = [SUCodeSigningVerifier hostApplicationIsCodeSigned];
|
|
||||||
|
|
||||||
NSString *dsaStatus = newPublicDSAKey ? @"has a new DSA key that doesn't match the previous one" : (publicDSAKey ? @"removes the DSA key" : @"isn't signed with a DSA key");
|
|
||||||
if (!hostIsCodeSigned || !updateIsCodeSigned) {
|
|
||||||
NSString *acsStatus = !hostIsCodeSigned ? @"old app hasn't been signed with app Code Signing" : @"new app isn't signed with app Code Signing";
|
|
||||||
SULog(@"The update archive %@, and the %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, acsStatus);
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSError *error = nil;
|
|
||||||
if (![SUCodeSigningVerifier codeSignatureMatchesHostAndIsValidAtPath:installSourcePath error:&error]) {
|
|
||||||
SULog(@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error);
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)downloadDidFinish:(NSURLDownload *)__unused d
|
- (void)downloadDidFinish:(NSURLDownload *)__unused d
|
||||||
{
|
{
|
||||||
assert(self.updateItem);
|
assert(self.updateItem);
|
||||||
@@ -314,22 +285,26 @@
|
|||||||
|
|
||||||
- (void)download:(NSURLDownload *)__unused download didFailWithError:(NSError *)error
|
- (void)download:(NSURLDownload *)__unused download didFailWithError:(NSError *)error
|
||||||
{
|
{
|
||||||
NSURL *failingUrl = error.userInfo[NSURLErrorFailingURLErrorKey];
|
NSURL *failingUrl = [error.userInfo objectForKey:NSURLErrorFailingURLErrorKey];
|
||||||
if (!failingUrl) {
|
if (!failingUrl) {
|
||||||
failingUrl = [self.updateItem fileURL];
|
failingUrl = [self.updateItem fileURL];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([[self.updater delegate] respondsToSelector:@selector(updater:failedToDownloadUpdate:error:)]) {
|
if ([[self.updater delegate] respondsToSelector:@selector(updater:failedToDownloadUpdate:error:)]) {
|
||||||
[[self.updater delegate] updater:self.updater
|
[[self.updater delegate] updater:self.updater
|
||||||
failedToDownloadUpdate:self.updateItem
|
failedToDownloadUpdate:self.updateItem
|
||||||
error:error];
|
error:error];
|
||||||
}
|
}
|
||||||
|
|
||||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{
|
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||||
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while downloading the update. Please try again later.", nil),
|
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while downloading the update. Please try again later.", nil),
|
||||||
NSUnderlyingErrorKey: error,
|
NSUnderlyingErrorKey: error,
|
||||||
NSURLErrorFailingURLErrorKey: failingUrl ? failingUrl : [NSNull null],
|
}];
|
||||||
}]];
|
if (failingUrl) {
|
||||||
|
[userInfo setObject:failingUrl forKey:NSURLErrorFailingURLErrorKey];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUDownloadError userInfo:userInfo]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)download:(NSURLDownload *)__unused download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
|
- (BOOL)download:(NSURLDownload *)__unused download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
|
||||||
@@ -341,14 +316,28 @@
|
|||||||
|
|
||||||
- (void)extractUpdate
|
- (void)extractUpdate
|
||||||
{
|
{
|
||||||
SUUnarchiver *unarchiver = [SUUnarchiver unarchiverForPath:self.downloadPath updatingHostBundlePath:[[self.host bundle] bundlePath]];
|
SUUnarchiver *unarchiver = [SUUnarchiver unarchiverForPath:self.downloadPath updatingHostBundlePath:self.host.bundlePath withPassword:self.updater.decryptionPassword];
|
||||||
|
|
||||||
|
BOOL success;
|
||||||
if (!unarchiver) {
|
if (!unarchiver) {
|
||||||
SULog(@"Error: No valid unarchiver for %@!", self.downloadPath);
|
SULog(@"Error: No valid unarchiver for %@!", self.downloadPath);
|
||||||
[self unarchiverDidFail:nil];
|
|
||||||
return;
|
success = NO;
|
||||||
|
} else {
|
||||||
|
// Currently unsafe archives are the only case where we can prevalidate before extraction, but that could change in the future
|
||||||
|
BOOL needsPrevalidation = [[unarchiver class] unsafeIfArchiveIsNotValidated];
|
||||||
|
|
||||||
|
self.updateValidator = [[SUUpdateValidator alloc] initWithDownloadPath:self.downloadPath dsaSignature:self.updateItem.DSASignature host:self.host performingPrevalidation:needsPrevalidation];
|
||||||
|
|
||||||
|
success = self.updateValidator.canValidate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
[self unarchiverDidFail:nil];
|
||||||
|
} else {
|
||||||
|
unarchiver.delegate = self;
|
||||||
|
[unarchiver start];
|
||||||
}
|
}
|
||||||
unarchiver.delegate = self;
|
|
||||||
[unarchiver start];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)failedToApplyDeltaUpdate
|
- (void)failedToApplyDeltaUpdate
|
||||||
@@ -369,6 +358,9 @@
|
|||||||
|
|
||||||
- (void)unarchiverDidFail:(SUUnarchiver *)__unused ua
|
- (void)unarchiverDidFail:(SUUnarchiver *)__unused ua
|
||||||
{
|
{
|
||||||
|
// No longer needed
|
||||||
|
self.updateValidator = nil;
|
||||||
|
|
||||||
if ([self.updateItem isDeltaUpdate]) {
|
if ([self.updateItem isDeltaUpdate]) {
|
||||||
[self failedToApplyDeltaUpdate];
|
[self failedToApplyDeltaUpdate];
|
||||||
return;
|
return;
|
||||||
@@ -411,13 +403,14 @@
|
|||||||
- (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI
|
- (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI
|
||||||
{
|
{
|
||||||
assert(self.updateItem);
|
assert(self.updateItem);
|
||||||
|
assert(self.updateValidator);
|
||||||
if (![self validateUpdateDownloadedToPath:self.downloadPath extractedToPath:self.tempDir DSASignature:self.updateItem.DSASignature publicDSAKey:self.host.publicDSAKey])
|
|
||||||
{
|
BOOL validationCheckSuccess = [self.updateValidator validateWithUpdateDirectory:self.tempDir];
|
||||||
|
if (!validationCheckSuccess) {
|
||||||
NSDictionary *userInfo = @{
|
NSDictionary *userInfo = @{
|
||||||
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil),
|
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil),
|
||||||
NSLocalizedFailureReasonErrorKey: SULocalizedString(@"The update is improperly signed.", nil),
|
NSLocalizedFailureReasonErrorKey: SULocalizedString(@"The update is improperly signed.", nil),
|
||||||
};
|
};
|
||||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUSignatureError userInfo:userInfo]];
|
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUSignatureError userInfo:userInfo]];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -453,34 +446,43 @@
|
|||||||
// Copy the relauncher into a temporary directory so we can get to it after the new version's installed.
|
// Copy the relauncher into a temporary directory so we can get to it after the new version's installed.
|
||||||
// Only the paranoid survive: if there's already a stray copy of relaunch there, we would have problems.
|
// Only the paranoid survive: if there's already a stray copy of relaunch there, we would have problems.
|
||||||
NSString *const relaunchToolName = @"" SPARKLE_RELAUNCH_TOOL_NAME;
|
NSString *const relaunchToolName = @"" SPARKLE_RELAUNCH_TOOL_NAME;
|
||||||
NSString *const relaunchPathToCopy = [sparkleBundle pathForResource:relaunchToolName ofType:@"app"];
|
NSString *const relaunchToolSourcePath = [sparkleBundle pathForResource:relaunchToolName ofType:@"app"];
|
||||||
if (relaunchPathToCopy != nil) {
|
NSString *relaunchCopyTargetPath = nil;
|
||||||
NSString *targetPath = [self.host.appCachePath stringByAppendingPathComponent:[relaunchPathToCopy lastPathComponent]];
|
NSError *error = nil;
|
||||||
|
BOOL copiedRelaunchPath = NO;
|
||||||
SUFileManager *fileManager = [SUFileManager fileManagerAllowingAuthorization:NO];
|
|
||||||
NSError *error = nil;
|
if (relaunchToolSourcePath) {
|
||||||
|
relaunchCopyTargetPath = [[self appCachePath] stringByAppendingPathComponent:[relaunchToolSourcePath lastPathComponent]];
|
||||||
NSURL *relaunchURLToCopy = [NSURL fileURLWithPath:relaunchPathToCopy];
|
|
||||||
NSURL *targetURL = [NSURL fileURLWithPath:targetPath];
|
SUFileManager *fileManager = [SUFileManager defaultManager];
|
||||||
|
|
||||||
|
NSURL *relaunchToolSourceURL = [NSURL fileURLWithPath:relaunchToolSourcePath];
|
||||||
|
NSURL *relaunchCopyTargetURL = [NSURL fileURLWithPath:relaunchCopyTargetPath];
|
||||||
|
|
||||||
// We only need to run our copy of the app by spawning a task
|
// We only need to run our copy of the app by spawning a task
|
||||||
// Since we are copying the app to a directory that is write-accessible, we don't need to muck with owner/group IDs
|
// Since we are copying the app to a directory that is write-accessible, we don't need to muck with owner/group IDs
|
||||||
if ([self preparePathForRelaunchTool:targetPath error:&error] && [fileManager copyItemAtURL:relaunchURLToCopy toURL:targetURL error:&error]) {
|
if ([self preparePathForRelaunchTool:relaunchCopyTargetPath error:&error] && [fileManager copyItemAtURL:relaunchToolSourceURL toURL:relaunchCopyTargetURL error:&error]) {
|
||||||
|
copiedRelaunchPath = YES;
|
||||||
|
|
||||||
// We probably don't need to release the quarantine, but we'll do it just in case it's necessary.
|
// We probably don't need to release the quarantine, but we'll do it just in case it's necessary.
|
||||||
// Perhaps in a sandboxed environment this matters more. Note that this may not be a fatal error.
|
// Perhaps in a sandboxed environment this matters more. Note that this may not be a fatal error.
|
||||||
NSError *quarantineError = nil;
|
NSError *quarantineError = nil;
|
||||||
if (![fileManager releaseItemFromQuarantineAtRootURL:targetURL error:&quarantineError]) {
|
if (![fileManager releaseItemFromQuarantineAtRootURL:relaunchCopyTargetURL error:&quarantineError]) {
|
||||||
SULog(@"Failed to release quarantine on %@ with error %@", targetPath, quarantineError);
|
SULog(@"Failed to release quarantine on %@ with error %@", relaunchCopyTargetPath, quarantineError);
|
||||||
}
|
}
|
||||||
self.relaunchPath = targetPath;
|
|
||||||
} else {
|
|
||||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{
|
|
||||||
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil),
|
|
||||||
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Couldn't copy relauncher (%@) to temporary path (%@)! %@", relaunchPathToCopy, targetPath, (error ? [error localizedDescription] : @"")]
|
|
||||||
}]];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!copiedRelaunchPath) {
|
||||||
|
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{
|
||||||
|
NSLocalizedDescriptionKey: [NSString stringWithFormat:SULocalizedString(@"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@.", nil), [self.host name]],
|
||||||
|
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Couldn't copy relauncher (%@) to temporary path (%@)! %@",
|
||||||
|
relaunchToolSourcePath, relaunchCopyTargetPath, (error ? [error localizedDescription] : @"")],
|
||||||
|
}]];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.relaunchPath = relaunchCopyTargetPath; // Set for backwards compatibility, in case any delegates modify it
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterWillRestartNotification object:self];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterWillRestartNotification object:self];
|
||||||
if ([updaterDelegate respondsToSelector:@selector(updaterWillRelaunchApplication:)])
|
if ([updaterDelegate respondsToSelector:@selector(updaterWillRelaunchApplication:)])
|
||||||
[updaterDelegate updaterWillRelaunchApplication:self.updater];
|
[updaterDelegate updaterWillRelaunchApplication:self.updater];
|
||||||
@@ -490,9 +492,8 @@
|
|||||||
// Note that we explicitly use the host app's name here, since updating plugin for Mail relaunches Mail, not just the plugin.
|
// Note that we explicitly use the host app's name here, since updating plugin for Mail relaunches Mail, not just the plugin.
|
||||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{
|
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:@{
|
||||||
NSLocalizedDescriptionKey: [NSString stringWithFormat:SULocalizedString(@"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@.", nil), [self.host name]],
|
NSLocalizedDescriptionKey: [NSString stringWithFormat:SULocalizedString(@"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@.", nil), [self.host name]],
|
||||||
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Couldn't find the relauncher (expected to find it at %@)", self.relaunchPath]
|
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Couldn't find the relauncher (expected to find it at %@ and %@)", relaunchToolSourcePath, self.relaunchPath],
|
||||||
}]];
|
}]];
|
||||||
// We intentionally don't abandon the update here so that the host won't initiate another.
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,6 +501,7 @@
|
|||||||
if ([updaterDelegate respondsToSelector:@selector(pathToRelaunchForUpdater:)]) {
|
if ([updaterDelegate respondsToSelector:@selector(pathToRelaunchForUpdater:)]) {
|
||||||
pathToRelaunch = [updaterDelegate pathToRelaunchForUpdater:self.updater];
|
pathToRelaunch = [updaterDelegate pathToRelaunchForUpdater:self.updater];
|
||||||
}
|
}
|
||||||
|
|
||||||
[NSTask launchedTaskWithLaunchPath:relaunchToolPath arguments:@[[self.host bundlePath],
|
[NSTask launchedTaskWithLaunchPath:relaunchToolPath arguments:@[[self.host bundlePath],
|
||||||
pathToRelaunch,
|
pathToRelaunch,
|
||||||
[NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]],
|
[NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]],
|
||||||
@@ -509,6 +511,7 @@
|
|||||||
[self terminateApp];
|
[self terminateApp];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: this is overridden by the automatic update driver to not terminate in some cases
|
||||||
- (void)terminateApp
|
- (void)terminateApp
|
||||||
{
|
{
|
||||||
[NSApp terminate:self];
|
[NSApp terminate:self];
|
||||||
@@ -551,7 +554,12 @@
|
|||||||
- (void)abortUpdateWithError:(NSError *)error
|
- (void)abortUpdateWithError:(NSError *)error
|
||||||
{
|
{
|
||||||
if ([error code] != SUNoUpdateError) { // Let's not bother logging this.
|
if ([error code] != SUNoUpdateError) { // Let's not bother logging this.
|
||||||
SULog(@"Error: %@ %@ (URL %@)", error.localizedDescription, error.localizedFailureReason, error.userInfo[NSURLErrorFailingURLErrorKey]);
|
NSError *errorToDisplay = error;
|
||||||
|
int finiteRecursion=5;
|
||||||
|
do {
|
||||||
|
SULog(@"Error: %@ %@ (URL %@)", errorToDisplay.localizedDescription, errorToDisplay.localizedFailureReason, [errorToDisplay.userInfo objectForKey:NSURLErrorFailingURLErrorKey]);
|
||||||
|
errorToDisplay = [errorToDisplay.userInfo objectForKey:NSUnderlyingErrorKey];
|
||||||
|
} while(--finiteRecursion && errorToDisplay);
|
||||||
}
|
}
|
||||||
if (self.download) {
|
if (self.download) {
|
||||||
[self.download cancel];
|
[self.download cancel];
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ BOOL removeTree(NSString *path)
|
|||||||
|
|
||||||
BOOL copyTree(NSString *source, NSString *dest)
|
BOOL copyTree(NSString *source, NSString *dest)
|
||||||
{
|
{
|
||||||
return [[SUFileManager fileManagerAllowingAuthorization:NO] copyItemAtURL:[NSURL fileURLWithPath:source] toURL:[NSURL fileURLWithPath:dest] error:NULL];
|
return [[SUFileManager defaultManager] copyItemAtURL:[NSURL fileURLWithPath:source] toURL:[NSURL fileURLWithPath:dest] error:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL modifyPermissions(NSString *path, mode_t desiredPermissions)
|
BOOL modifyPermissions(NSString *path, mode_t desiredPermissions)
|
||||||
@@ -231,12 +231,12 @@ BOOL modifyPermissions(NSString *path, mode_t desiredPermissions)
|
|||||||
if (!attributes) {
|
if (!attributes) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
NSNumber *permissions = attributes[NSFilePosixPermissions];
|
NSNumber *permissions = [attributes objectForKey:NSFilePosixPermissions];
|
||||||
if (!permissions) {
|
if (!permissions) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
mode_t newMode = ([permissions unsignedShortValue] & ~PERMISSION_FLAGS) | desiredPermissions;
|
mode_t newMode = ([permissions unsignedShortValue] & ~PERMISSION_FLAGS) | desiredPermissions;
|
||||||
int (*changeModeFunc)(const char *, mode_t) = [attributes[NSFileType] isEqualToString:NSFileTypeSymbolicLink] ? lchmod : chmod;
|
int (*changeModeFunc)(const char *, mode_t) = [[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeSymbolicLink] ? lchmod : chmod;
|
||||||
if (changeModeFunc([path fileSystemRepresentation], newMode) != 0) {
|
if (changeModeFunc([path fileSystemRepresentation], newMode) != 0) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static NSDictionary *infoForFile(FTSENT *ent)
|
|||||||
|
|
||||||
static bool aclExists(const FTSENT *ent)
|
static bool aclExists(const FTSENT *ent)
|
||||||
{
|
{
|
||||||
// OS X does not currently support ACLs for symlinks
|
// macOS does not currently support ACLs for symlinks
|
||||||
if (ent->fts_info == FTS_SL) {
|
if (ent->fts_info == FTS_SL) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
#import "SUBinaryDeltaUnarchiver.h"
|
#import "SUBinaryDeltaUnarchiver.h"
|
||||||
#import "SUBinaryDeltaApply.h"
|
#import "SUBinaryDeltaApply.h"
|
||||||
#import "SUUnarchiver_Private.h"
|
#import "SUUnarchiver_Private.h"
|
||||||
|
#import "SUFileManager.h"
|
||||||
#import "SUHost.h"
|
#import "SUHost.h"
|
||||||
#import "SULog.h"
|
#import "SULog.h"
|
||||||
#import "NTSynchronousTask.h"
|
|
||||||
|
|
||||||
@implementation SUBinaryDeltaUnarchiver
|
@implementation SUBinaryDeltaUnarchiver
|
||||||
|
|
||||||
@@ -21,6 +21,46 @@
|
|||||||
return [[path pathExtension] isEqualToString:@"delta"];
|
return [[path pathExtension] isEqualToString:@"delta"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
// According to https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/MDImporters/Concepts/Troubleshooting.html
|
||||||
|
// We should make sure mdimporter bundles have an up to date time in the event they were delta updated.
|
||||||
|
// We used to invoke mdimport on the bundle but this is not a very good approach.
|
||||||
|
// There's no need to do that for non-delta updates and for updates that contain no mdimporters.
|
||||||
|
// Moreover, updating the timestamp on the mdimporter bundles is what developers have to do anyway when shipping their new update outside of Sparkle
|
||||||
|
+ (void)updateSpotlightImportersAtBundlePath:(NSString *)targetPath
|
||||||
|
{
|
||||||
|
NSURL *targetURL = [NSURL fileURLWithPath:targetPath];
|
||||||
|
// Only recurse if it's actually a directory. Don't recurse into a
|
||||||
|
// root-level symbolic link.
|
||||||
|
NSDictionary *rootAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:targetPath error:nil];
|
||||||
|
NSString *rootType = [rootAttributes objectForKey:NSFileType];
|
||||||
|
|
||||||
|
if ([rootType isEqualToString:NSFileTypeDirectory]) {
|
||||||
|
// The NSDirectoryEnumerator will avoid recursing into any contained
|
||||||
|
// symbolic links, so no further type checks are needed.
|
||||||
|
NSDirectoryEnumerator *directoryEnumerator = [[NSFileManager defaultManager] enumeratorAtURL:targetURL includingPropertiesForKeys:nil options:(NSDirectoryEnumerationOptions)0 errorHandler:nil];
|
||||||
|
|
||||||
|
NSMutableArray *filesToUpdate = [[NSMutableArray alloc] init];
|
||||||
|
for (NSURL *file in directoryEnumerator) {
|
||||||
|
if ([file.pathExtension isEqualToString:@"mdimporter"]) {
|
||||||
|
[filesToUpdate addObject:file];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SUFileManager *fileManager = [SUFileManager defaultManager];
|
||||||
|
for (NSURL *file in filesToUpdate) {
|
||||||
|
NSError *error = nil;
|
||||||
|
if (![fileManager updateModificationAndAccessTimeOfItemAtURL:file error:&error]) {
|
||||||
|
SULog(@"Error: During delta unarchiving, failed to touch %@", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)applyBinaryDelta
|
- (void)applyBinaryDelta
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
@@ -30,6 +70,8 @@
|
|||||||
NSError *applyDiffError = nil;
|
NSError *applyDiffError = nil;
|
||||||
BOOL success = applyBinaryDelta(sourcePath, targetPath, self.archivePath, NO, &applyDiffError);
|
BOOL success = applyBinaryDelta(sourcePath, targetPath, self.archivePath, NO, &applyDiffError);
|
||||||
if (success) {
|
if (success) {
|
||||||
|
[[self class] updateSpotlightImportersAtBundlePath:targetPath];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self notifyDelegateOfSuccess];
|
[self notifyDelegateOfSuccess];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,10 +12,9 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface SUCodeSigningVerifier : NSObject
|
@interface SUCodeSigningVerifier : NSObject
|
||||||
+ (BOOL)codeSignatureMatchesHostAndIsValidAtPath:(NSString *)applicationPath error:(NSError **)error;
|
+ (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundlePath matchesSignatureAtBundleURL:(NSURL *)newBundlePath error:(NSError **)error;
|
||||||
+ (BOOL)codeSignatureIsValidAtPath:(NSString *)applicationPath error:(NSError **)error;
|
+ (BOOL)codeSignatureIsValidAtBundleURL:(NSURL *)bundlePath error:(NSError **)error;
|
||||||
+ (BOOL)hostApplicationIsCodeSigned;
|
+ (BOOL)bundleAtURLIsCodeSigned:(NSURL *)bundlePath;
|
||||||
+ (BOOL)applicationAtPathIsCodeSigned:(NSString *)applicationPath;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -13,53 +13,46 @@
|
|||||||
|
|
||||||
@implementation SUCodeSigningVerifier
|
@implementation SUCodeSigningVerifier
|
||||||
|
|
||||||
+ (BOOL)codeSignatureMatchesHostAndIsValidAtPath:(NSString *)applicationPath error:(NSError *__autoreleasing *)error
|
+ (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundleURL matchesSignatureAtBundleURL:(NSURL *)newBundleURL error:(NSError *__autoreleasing *)error
|
||||||
{
|
{
|
||||||
OSStatus result;
|
OSStatus result;
|
||||||
SecRequirementRef requirement = NULL;
|
SecRequirementRef requirement = NULL;
|
||||||
SecStaticCodeRef staticCode = NULL;
|
SecStaticCodeRef staticCode = NULL;
|
||||||
SecCodeRef hostCode = NULL;
|
SecStaticCodeRef oldCode = NULL;
|
||||||
NSBundle *newBundle;
|
|
||||||
CFErrorRef cfError = NULL;
|
CFErrorRef cfError = NULL;
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = nil;
|
*error = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = SecCodeCopySelf(kSecCSDefaultFlags, &hostCode);
|
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)oldBundleURL, kSecCSDefaultFlags, &oldCode);
|
||||||
if (result != noErr) {
|
if (result == errSecCSUnsigned) {
|
||||||
SULog(@"Failed to copy host code %d", result);
|
return NO;
|
||||||
goto finally;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = SecCodeCopyDesignatedRequirement(hostCode, kSecCSDefaultFlags, &requirement);
|
result = SecCodeCopyDesignatedRequirement(oldCode, kSecCSDefaultFlags, &requirement);
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
SULog(@"Failed to copy designated requirement. Code Signing OSStatus code: %d", result);
|
SULog(@"Failed to copy designated requirement. Code Signing OSStatus code: %d", result);
|
||||||
goto finally;
|
goto finally;
|
||||||
}
|
}
|
||||||
|
|
||||||
newBundle = [NSBundle bundleWithPath:applicationPath];
|
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)newBundleURL, kSecCSDefaultFlags, &staticCode);
|
||||||
if (!newBundle) {
|
|
||||||
SULog(@"Failed to load NSBundle for update");
|
|
||||||
result = -1;
|
|
||||||
goto finally;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)[newBundle bundleURL], kSecCSDefaultFlags, &staticCode);
|
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
SULog(@"Failed to get static code %d", result);
|
SULog(@"Failed to get static code %d", result);
|
||||||
goto finally;
|
goto finally;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing.
|
// Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing.
|
||||||
// See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206
|
// See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206
|
||||||
SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures);
|
// Aditionally, there are several reasons to stay away from deep verification and to prefer DSA signing the download archive instead.
|
||||||
|
// See https://github.com/sparkle-project/Sparkle/pull/523#commitcomment-17549302 and https://github.com/sparkle-project/Sparkle/issues/543
|
||||||
|
SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures);
|
||||||
result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, requirement, &cfError);
|
result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, requirement, &cfError);
|
||||||
|
|
||||||
if (cfError) {
|
if (cfError) {
|
||||||
NSError *tmpError = CFBridgingRelease(cfError);
|
NSError *tmpError = CFBridgingRelease(cfError);
|
||||||
if (error) *error = tmpError;
|
if (error) *error = tmpError;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
if (result == errSecCSUnsigned) {
|
if (result == errSecCSUnsigned) {
|
||||||
SULog(@"The host app is signed, but the new version of the app is not signed using Apple Code Signing. Please ensure that the new app is signed and that archiving did not corrupt the signature.");
|
SULog(@"The host app is signed, but the new version of the app is not signed using Apple Code Signing. Please ensure that the new app is signed and that archiving did not corrupt the signature.");
|
||||||
@@ -70,61 +63,52 @@
|
|||||||
SULog(@"Code signature of the new version doesn't match the old version: %@. Please ensure that old and new app is signed using exactly the same certificate.", requirementString);
|
SULog(@"Code signature of the new version doesn't match the old version: %@. Please ensure that old and new app is signed using exactly the same certificate.", requirementString);
|
||||||
CFRelease(requirementString);
|
CFRelease(requirementString);
|
||||||
}
|
}
|
||||||
|
|
||||||
[self logSigningInfoForCode:hostCode label:@"host info"];
|
[self logSigningInfoForCode:oldCode label:@"old info"];
|
||||||
[self logSigningInfoForCode:staticCode label:@"new info"];
|
[self logSigningInfoForCode:staticCode label:@"new info"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if (hostCode) CFRelease(hostCode);
|
if (oldCode) CFRelease(oldCode);
|
||||||
if (staticCode) CFRelease(staticCode);
|
if (staticCode) CFRelease(staticCode);
|
||||||
if (requirement) CFRelease(requirement);
|
if (requirement) CFRelease(requirement);
|
||||||
return (result == noErr);
|
return (result == noErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL)codeSignatureIsValidAtPath:(NSString *)applicationPath error:(NSError *__autoreleasing *)error
|
+ (BOOL)codeSignatureIsValidAtBundleURL:(NSURL *)bundleURL error:(NSError *__autoreleasing *)error
|
||||||
{
|
{
|
||||||
OSStatus result;
|
OSStatus result;
|
||||||
SecStaticCodeRef staticCode = NULL;
|
SecStaticCodeRef staticCode = NULL;
|
||||||
NSBundle *newBundle;
|
|
||||||
CFErrorRef cfError = NULL;
|
CFErrorRef cfError = NULL;
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = nil;
|
*error = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
newBundle = [NSBundle bundleWithPath:applicationPath];
|
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)bundleURL, kSecCSDefaultFlags, &staticCode);
|
||||||
if (!newBundle) {
|
|
||||||
SULog(@"Failed to load NSBundle");
|
|
||||||
result = -1;
|
|
||||||
goto finally;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)[newBundle bundleURL], kSecCSDefaultFlags, &staticCode);
|
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
SULog(@"Failed to get static code %d", result);
|
SULog(@"Failed to get static code %d", result);
|
||||||
goto finally;
|
goto finally;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing.
|
// See in -codeSignatureAtBundleURL:matchesSignatureAtBundleURL:error: for why kSecCSCheckNestedCode is not passed
|
||||||
// See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206
|
SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures);
|
||||||
SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures);
|
|
||||||
result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, NULL, &cfError);
|
result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, NULL, &cfError);
|
||||||
|
|
||||||
if (cfError) {
|
if (cfError) {
|
||||||
NSError *tmpError = CFBridgingRelease(cfError);
|
NSError *tmpError = CFBridgingRelease(cfError);
|
||||||
if (error) *error = tmpError;
|
if (error) *error = tmpError;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != noErr) {
|
if (result != noErr) {
|
||||||
if (result == errSecCSUnsigned) {
|
if (result == errSecCSUnsigned) {
|
||||||
SULog(@"Error: The app is not signed using Apple Code Signing. %@", applicationPath);
|
SULog(@"Error: The app is not signed using Apple Code Signing. %@", bundleURL);
|
||||||
}
|
}
|
||||||
if (result == errSecCSReqFailed) {
|
if (result == errSecCSReqFailed) {
|
||||||
[self logSigningInfoForCode:staticCode label:@"new info"];
|
[self logSigningInfoForCode:staticCode label:@"new info"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if (staticCode) CFRelease(staticCode);
|
if (staticCode) CFRelease(staticCode);
|
||||||
return (result == noErr);
|
return (result == noErr);
|
||||||
@@ -141,44 +125,23 @@ static id valueOrNSNull(id value) {
|
|||||||
NSDictionary *signingDict = CFBridgingRelease(signingInfo);
|
NSDictionary *signingDict = CFBridgingRelease(signingInfo);
|
||||||
NSMutableDictionary *relevantInfo = [NSMutableDictionary dictionary];
|
NSMutableDictionary *relevantInfo = [NSMutableDictionary dictionary];
|
||||||
for (NSString *key in @[@"format", @"identifier", @"requirements", @"teamid", @"signing-time"]) {
|
for (NSString *key in @[@"format", @"identifier", @"requirements", @"teamid", @"signing-time"]) {
|
||||||
relevantInfo[key] = valueOrNSNull(signingDict[key]);
|
[relevantInfo setObject:valueOrNSNull([signingDict objectForKey:key]) forKey:key];
|
||||||
}
|
}
|
||||||
NSDictionary *infoPlist = signingDict[@"info-plist"];
|
NSDictionary *infoPlist = [signingDict objectForKey:@"info-plist"];
|
||||||
relevantInfo[@"version"] = valueOrNSNull(infoPlist[@"CFBundleShortVersionString"]);
|
[relevantInfo setObject:valueOrNSNull([infoPlist objectForKey:@"CFBundleShortVersionString"]) forKey:@"version"];
|
||||||
relevantInfo[@"build"] = valueOrNSNull(infoPlist[(__bridge NSString *)kCFBundleVersionKey]);
|
[relevantInfo setObject:valueOrNSNull([infoPlist objectForKey:(__bridge NSString *)kCFBundleVersionKey]) forKey:@"build"];
|
||||||
SULog(@"%@: %@", label, relevantInfo);
|
SULog(@"%@: %@", label, relevantInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL)hostApplicationIsCodeSigned
|
+ (BOOL)bundleAtURLIsCodeSigned:(NSURL *)bundleURL
|
||||||
{
|
|
||||||
OSStatus result;
|
|
||||||
SecCodeRef hostCode = NULL;
|
|
||||||
result = SecCodeCopySelf(kSecCSDefaultFlags, &hostCode);
|
|
||||||
if (result != 0) return NO;
|
|
||||||
|
|
||||||
SecRequirementRef requirement = NULL;
|
|
||||||
result = SecCodeCopyDesignatedRequirement(hostCode, kSecCSDefaultFlags, &requirement);
|
|
||||||
if (hostCode) CFRelease(hostCode);
|
|
||||||
if (requirement) CFRelease(requirement);
|
|
||||||
return (result == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (BOOL)applicationAtPathIsCodeSigned:(NSString *)applicationPath
|
|
||||||
{
|
{
|
||||||
OSStatus result;
|
OSStatus result;
|
||||||
SecStaticCodeRef staticCode = NULL;
|
SecStaticCodeRef staticCode = NULL;
|
||||||
NSBundle *newBundle;
|
|
||||||
|
|
||||||
newBundle = [NSBundle bundleWithPath:applicationPath];
|
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)bundleURL, kSecCSDefaultFlags, &staticCode);
|
||||||
if (!newBundle) {
|
|
||||||
SULog(@"Failed to load NSBundle");
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)[newBundle bundleURL], kSecCSDefaultFlags, &staticCode);
|
|
||||||
if (result == errSecCSUnsigned) {
|
if (result == errSecCSUnsigned) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
SecRequirementRef requirement = NULL;
|
SecRequirementRef requirement = NULL;
|
||||||
@@ -190,7 +153,7 @@ static id valueOrNSNull(id value) {
|
|||||||
CFRelease(requirement);
|
CFRelease(requirement);
|
||||||
}
|
}
|
||||||
if (result == errSecCSUnsigned) {
|
if (result == errSecCSUnsigned) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
return (result == 0);
|
return (result == 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ extern NSString *const SUPublicDSAKeyFileKey;
|
|||||||
extern NSString *const SUAutomaticallyUpdateKey;
|
extern NSString *const SUAutomaticallyUpdateKey;
|
||||||
extern NSString *const SUAllowsAutomaticUpdatesKey;
|
extern NSString *const SUAllowsAutomaticUpdatesKey;
|
||||||
extern NSString *const SUEnableAutomaticChecksKey;
|
extern NSString *const SUEnableAutomaticChecksKey;
|
||||||
extern NSString *const SUEnableAutomaticChecksKeyOld;
|
|
||||||
extern NSString *const SUEnableSystemProfilingKey;
|
extern NSString *const SUEnableSystemProfilingKey;
|
||||||
extern NSString *const SUSendProfileInfoKey;
|
extern NSString *const SUSendProfileInfoKey;
|
||||||
extern NSString *const SULastProfileSubmitDateKey;
|
extern NSString *const SULastProfileSubmitDateKey;
|
||||||
extern NSString *const SUPromptUserOnFirstLaunchKey;
|
extern NSString *const SUPromptUserOnFirstLaunchKey;
|
||||||
extern NSString *const SUKeepDownloadOnFailedInstallKey;
|
extern NSString *const SUKeepDownloadOnFailedInstallKey;
|
||||||
extern NSString *const SUDefaultsDomainKey;
|
extern NSString *const SUDefaultsDomainKey;
|
||||||
|
extern NSString *const SUEnableJavaScriptKey;
|
||||||
extern NSString *const SUFixedHTMLDisplaySizeKey __attribute__((deprecated("This key is obsolete and has no effect.")));
|
extern NSString *const SUFixedHTMLDisplaySizeKey __attribute__((deprecated("This key is obsolete and has no effect.")));
|
||||||
extern NSString *const SUAppendVersionNumberKey __attribute__((deprecated("This key is obsolete. See SPARKLE_APPEND_VERSION_NUMBER.")));
|
extern NSString *const SUAppendVersionNumberKey __attribute__((deprecated("This key is obsolete. See SPARKLE_APPEND_VERSION_NUMBER.")));
|
||||||
extern NSString *const SUEnableAutomatedDowngradesKey __attribute__((deprecated("This key is obsolete. See SPARKLE_AUTOMATED_DOWNGRADES.")));
|
extern NSString *const SUEnableAutomatedDowngradesKey __attribute__((deprecated("This key is obsolete. See SPARKLE_AUTOMATED_DOWNGRADES.")));
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ NSString *const SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate";
|
|||||||
NSString *const SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates";
|
NSString *const SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates";
|
||||||
NSString *const SUEnableSystemProfilingKey = @"SUEnableSystemProfiling";
|
NSString *const SUEnableSystemProfilingKey = @"SUEnableSystemProfiling";
|
||||||
NSString *const SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
|
NSString *const SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
|
||||||
NSString *const SUEnableAutomaticChecksKeyOld = @"SUCheckAtStartup";
|
|
||||||
NSString *const SUSendProfileInfoKey = @"SUSendProfileInfo";
|
NSString *const SUSendProfileInfoKey = @"SUSendProfileInfo";
|
||||||
NSString *const SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate";
|
NSString *const SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate";
|
||||||
NSString *const SUPromptUserOnFirstLaunchKey = @"SUPromptUserOnFirstLaunch";
|
NSString *const SUPromptUserOnFirstLaunchKey = @"SUPromptUserOnFirstLaunch";
|
||||||
|
NSString *const SUEnableJavaScriptKey = @"SUEnableJavaScript";
|
||||||
NSString *const SUFixedHTMLDisplaySizeKey = @"SUFixedHTMLDisplaySize";
|
NSString *const SUFixedHTMLDisplaySizeKey = @"SUFixedHTMLDisplaySize";
|
||||||
NSString *const SUKeepDownloadOnFailedInstallKey = @"SUKeepDownloadOnFailedInstall";
|
NSString *const SUKeepDownloadOnFailedInstallKey = @"SUKeepDownloadOnFailedInstall";
|
||||||
NSString *const SUDefaultsDomainKey = @"SUDefaultsDomain";
|
NSString *const SUDefaultsDomainKey = @"SUDefaultsDomain";
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#import "SUDiskImageUnarchiver.h"
|
#import "SUDiskImageUnarchiver.h"
|
||||||
#import "SUUnarchiver_Private.h"
|
#import "SUUnarchiver_Private.h"
|
||||||
#import "NTSynchronousTask.h"
|
|
||||||
#import "SULog.h"
|
#import "SULog.h"
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
|
|
||||||
@@ -19,6 +18,11 @@
|
|||||||
return [[path pathExtension] isEqualToString:@"dmg"];
|
return [[path pathExtension] isEqualToString:@"dmg"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
// Called on a non-main thread.
|
// Called on a non-main thread.
|
||||||
- (void)extractDMG
|
- (void)extractDMG
|
||||||
{
|
{
|
||||||
@@ -70,18 +74,46 @@
|
|||||||
NSData *promptData = nil;
|
NSData *promptData = nil;
|
||||||
promptData = [NSData dataWithBytes:"yes\n" length:4];
|
promptData = [NSData dataWithBytes:"yes\n" length:4];
|
||||||
|
|
||||||
NSArray *arguments = @[@"attach", self.archivePath, @"-mountpoint", mountPoint, /*@"-noverify",*/ @"-nobrowse", @"-noautoopen"];
|
NSMutableArray *arguments = [@[@"attach", self.archivePath, @"-mountpoint", mountPoint, /*@"-noverify",*/ @"-nobrowse", @"-noautoopen"] mutableCopy];
|
||||||
|
|
||||||
|
if (self.decryptionPassword) {
|
||||||
|
NSMutableData *passwordData = [[self.decryptionPassword dataUsingEncoding:NSUTF8StringEncoding] mutableCopy];
|
||||||
|
// From the hdiutil docs:
|
||||||
|
// read a null-terminated passphrase from standard input
|
||||||
|
//
|
||||||
|
// Add the null terminator, then the newline
|
||||||
|
[passwordData appendData:[NSData dataWithBytes:"\0" length:1]];
|
||||||
|
[passwordData appendData:promptData];
|
||||||
|
promptData = passwordData;
|
||||||
|
|
||||||
|
[arguments addObject:@"-stdinpass"];
|
||||||
|
}
|
||||||
|
|
||||||
NSData *output = nil;
|
NSData *output = nil;
|
||||||
NSInteger taskResult = -1;
|
NSInteger taskResult = -1;
|
||||||
@try
|
@try
|
||||||
{
|
{
|
||||||
NTSynchronousTask *task = [[NTSynchronousTask alloc] init];
|
NSTask *task = [[NSTask alloc] init];
|
||||||
|
task.launchPath = @"/usr/bin/hdiutil";
|
||||||
[task run:@"/usr/bin/hdiutil" directory:@"/" withArgs:arguments input:promptData];
|
task.currentDirectoryPath = @"/";
|
||||||
|
task.arguments = arguments;
|
||||||
taskResult = [task result];
|
|
||||||
output = [[task output] copy];
|
NSPipe *inputPipe = [NSPipe pipe];
|
||||||
|
NSPipe *outputPipe = [NSPipe pipe];
|
||||||
|
|
||||||
|
task.standardInput = inputPipe;
|
||||||
|
task.standardOutput = outputPipe;
|
||||||
|
|
||||||
|
[task launch];
|
||||||
|
|
||||||
|
[inputPipe.fileHandleForWriting writeData:promptData];
|
||||||
|
[inputPipe.fileHandleForWriting closeFile];
|
||||||
|
|
||||||
|
// Read data to end *before* waiting until the task ends so we don't deadlock if the stdout buffer becomes full if we haven't consumed from it
|
||||||
|
output = [outputPipe.fileHandleForReading readDataToEndOfFile];
|
||||||
|
|
||||||
|
[task waitUntilExit];
|
||||||
|
taskResult = task.terminationStatus;
|
||||||
}
|
}
|
||||||
@catch (NSException *)
|
@catch (NSException *)
|
||||||
{
|
{
|
||||||
@@ -131,10 +163,16 @@
|
|||||||
dispatch_async(dispatch_get_main_queue(), delegateFailure);
|
dispatch_async(dispatch_get_main_queue(), delegateFailure);
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if (mountedSuccessfully)
|
if (mountedSuccessfully) {
|
||||||
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/hdiutil" arguments:@[@"detach", mountPoint, @"-force"]];
|
@try {
|
||||||
else
|
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/hdiutil" arguments:@[@"detach", mountPoint, @"-force"]];
|
||||||
|
} @catch (NSException *exception) {
|
||||||
|
SULog(@"Failed to unmount %@", mountPoint);
|
||||||
|
SULog(@"Exception: %@", exception);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
SULog(@"Can't mount DMG %@", self.archivePath);
|
SULog(@"Can't mount DMG %@", self.archivePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,11 @@
|
|||||||
#ifndef SUERRORS_H
|
#ifndef SUERRORS_H
|
||||||
#define SUERRORS_H
|
#define SUERRORS_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Foundation;
|
||||||
|
#else
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,10 +27,11 @@ typedef NS_ENUM(OSStatus, SUError) {
|
|||||||
SUNoUpdateError = 1001,
|
SUNoUpdateError = 1001,
|
||||||
SUAppcastError = 1002,
|
SUAppcastError = 1002,
|
||||||
SURunningFromDiskImageError = 1003,
|
SURunningFromDiskImageError = 1003,
|
||||||
|
|
||||||
// Downlaod phase errors.
|
// Download phase errors.
|
||||||
SUTemporaryDirectoryError = 2000,
|
SUTemporaryDirectoryError = 2000,
|
||||||
|
SUDownloadError = 2001,
|
||||||
|
|
||||||
// Extraction phase errors.
|
// Extraction phase errors.
|
||||||
SUUnarchivingError = 3000,
|
SUUnarchivingError = 3000,
|
||||||
SUSignatureError = 3001,
|
SUSignatureError = 3001,
|
||||||
@@ -39,6 +44,7 @@ typedef NS_ENUM(OSStatus, SUError) {
|
|||||||
SURelaunchError = 4004,
|
SURelaunchError = 4004,
|
||||||
SUInstallationError = 4005,
|
SUInstallationError = 4005,
|
||||||
SUDowngradeError = 4006,
|
SUDowngradeError = 4006,
|
||||||
|
SUInstallationCancelledError = 4007,
|
||||||
|
|
||||||
// System phase errors
|
// System phase errors
|
||||||
SUSystemPowerOffError = 5000
|
SUSystemPowerOffError = 5000
|
||||||
|
|||||||
@@ -9,21 +9,36 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class used for performing file operations that may also perform authentication if allowed and if permission is denied when trying to
|
* A class used for performing file operations that may also perform authorization if allowed and if permission is denied when trying to
|
||||||
* perform them normally as the running user. All operations on this class may be used on thread other than the main thread.
|
* perform them normally as the running user. All operations on this class may be used on thread other than the main thread.
|
||||||
* This class provides basic file operations and stays away from including much application-level logic.
|
* This class provides basic file operations and stays away from including much application-level logic.
|
||||||
*/
|
*/
|
||||||
@interface SUFileManager : NSObject
|
@interface SUFileManager : NSObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a file manager that allows or disallows authorizing for file operations
|
* Creates a file manager that will not authorize for file operations
|
||||||
* @param allowsAuthorization Specifies whether operations invoked on this instance are allowed to acquire authorization in order
|
* @return A new file manager instance
|
||||||
* to perform file operations when read or write access is denied
|
*/
|
||||||
|
+ (instancetype)defaultManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a file manager that allows authorizing for file operations
|
||||||
|
* @param authorizationToolPath Specifies the path to the tool that can perform file operations and be run as root.
|
||||||
|
* This tool will be invoked when read or write access is denied when attempting ordinary file operations. See the `fileop` tool included in Sparkle.
|
||||||
* @return A new file manager instance
|
* @return A new file manager instance
|
||||||
*
|
*
|
||||||
* This method just creates the file manager. It doesn't acquire authorization immediately if allowsAuthorization is YES
|
* This method just creates the file manager. It doesn't acquire authorization immediately or if it doesn't need to.
|
||||||
*/
|
*/
|
||||||
+ (instancetype)fileManagerAllowingAuthorization:(BOOL)allowsAuthorization;
|
+ (instancetype)fileManagerWithAuthorizationToolPath:(NSString *)authorizationToolPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a file manager that allows or disallows authorizing for file operations based on the current file manager
|
||||||
|
* @return A file manager instance that can perform authorized operations if the current file manager has already performed them.
|
||||||
|
* If the current file manager instance hasn't yet performed authorized operations, then neither can the instance returned by this method
|
||||||
|
*
|
||||||
|
* This may return a newly created file manager or re-use the existing file manager depending on the current authorization rights.
|
||||||
|
*/
|
||||||
|
- (instancetype)fileManagerByPreservingAuthorizationRights;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a temporary directory on the same volume as a provided URL
|
* Creates a temporary directory on the same volume as a provided URL
|
||||||
@@ -37,6 +52,16 @@
|
|||||||
*/
|
*/
|
||||||
- (NSURL *)makeTemporaryDirectoryWithPreferredName:(NSString *)preferredName appropriateForDirectoryURL:(NSURL *)appropriateURL error:(NSError **)error;
|
- (NSURL *)makeTemporaryDirectoryWithPreferredName:(NSString *)preferredName appropriateForDirectoryURL:(NSURL *)appropriateURL error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a directory at the target URL
|
||||||
|
* @param targetURL A URL pointing to the directory to create. The item at this URL must not exist, and the parent directory of this URL must already exist.
|
||||||
|
* @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
|
||||||
|
* @return YES if the item was created successfully, otherwise NO along with a populated error object
|
||||||
|
*
|
||||||
|
* This is an atomic operation.
|
||||||
|
*/
|
||||||
|
- (BOOL)makeDirectoryAtURL:(NSURL *)targetURL error:(NSError **)error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves an item from a source to a destination
|
* Moves an item from a source to a destination
|
||||||
* @param sourceURL A URL pointing to the item to move. The item at this URL must exist.
|
* @param sourceURL A URL pointing to the item to move. The item at this URL must exist.
|
||||||
@@ -120,8 +145,8 @@
|
|||||||
* @return YES if all the items at the target could be released from quarantine, otherwise NO if any items couldn't along with a populated error object
|
* @return YES if all the items at the target could be released from quarantine, otherwise NO if any items couldn't along with a populated error object
|
||||||
*
|
*
|
||||||
* This method removes quarantine attributes from an item, ideally an application, so that when the user launches a new application themselves, they
|
* This method removes quarantine attributes from an item, ideally an application, so that when the user launches a new application themselves, they
|
||||||
* don't have to witness the OS X dialog alerting them that they downloaded an application from the internet and asking if they want to continue.
|
* don't have to witness the system dialog alerting them that they downloaded an application from the internet and asking if they want to continue.
|
||||||
* Note that this may not exactly mimic OS X's behavior when a user opens an application for the first time (i.e, the xattr isn't deleted),
|
* Note that this may not exactly mimic the system behavior when a user opens an application for the first time (i.e, the xattr isn't deleted),
|
||||||
* but this should be sufficient enough for our purposes.
|
* but this should be sufficient enough for our purposes.
|
||||||
*
|
*
|
||||||
* This method may return NO even if some items do get released from quarantine if the target URL is pointing to a directory.
|
* This method may return NO even if some items do get released from quarantine if the target URL is pointing to a directory.
|
||||||
@@ -131,4 +156,16 @@
|
|||||||
*/
|
*/
|
||||||
- (BOOL)releaseItemFromQuarantineAtRootURL:(NSURL *)rootURL error:(NSError **)error;
|
- (BOOL)releaseItemFromQuarantineAtRootURL:(NSURL *)rootURL error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs an installer package (pkg) in a headless mode using /usr/sbin/installer
|
||||||
|
* @param packageURL A URL pointing to the package to execute. The item at this URL must exist.
|
||||||
|
* @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
|
||||||
|
* @return YES if the installer ran the package successfully, otherwise NO with a populated error object
|
||||||
|
*
|
||||||
|
* This method uses the system wide installer tool to run the provided package. This process does not show any UI, except for
|
||||||
|
* an initial authorization prompt if the calling process does not have root privileges. In other words, root privileges are required to use this method, and the file manager instance must have been created by allowing authorization.
|
||||||
|
* An error can occur if the package is unable to be ran by the installer, or if the installer reports a non-zero exit status code.
|
||||||
|
*/
|
||||||
|
- (BOOL)executePackageAtURL:(NSURL *)packageURL error:(NSError **)error;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#import "SUFileManager.h"
|
#import "SUFileManager.h"
|
||||||
#import "SUOperatingSystem.h"
|
#import "SUOperatingSystem.h"
|
||||||
|
#import "SUFileOperationConstants.h"
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
@@ -15,30 +16,6 @@
|
|||||||
|
|
||||||
static char SUAppleQuarantineIdentifier[] = "com.apple.quarantine";
|
static char SUAppleQuarantineIdentifier[] = "com.apple.quarantine";
|
||||||
|
|
||||||
// Authorization code based on generous contribution from Allan Odgaard. Thanks, Allan!
|
|
||||||
static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authorization, const char *executablePath, AuthorizationFlags options, char *const *arguments)
|
|
||||||
{
|
|
||||||
sig_t oldSigChildHandler = signal(SIGCHLD, SIG_DFL);
|
|
||||||
BOOL returnValue = YES;
|
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
// In the future, we may have to look at SMJobBless API to avoid deprecation. See issue #558
|
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
if (AuthorizationExecuteWithPrivileges(authorization, executablePath, options, arguments, NULL) == errAuthorizationSuccess)
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
{
|
|
||||||
int status;
|
|
||||||
pid_t pid = wait(&status);
|
|
||||||
if (pid == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0)
|
|
||||||
returnValue = NO;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
returnValue = NO;
|
|
||||||
|
|
||||||
signal(SIGCHLD, oldSigChildHandler);
|
|
||||||
return returnValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||||
|
|
||||||
char path[PATH_MAX] = {0};
|
char path[PATH_MAX] = {0};
|
||||||
@@ -75,26 +52,37 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
{
|
{
|
||||||
AuthorizationRef _auth;
|
AuthorizationRef _auth;
|
||||||
NSFileManager *_fileManager;
|
NSFileManager *_fileManager;
|
||||||
BOOL _allowsAuthorization;
|
NSString *_authorizationToolPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initAllowingAuthorization:(BOOL)allowsAuthorization
|
- (instancetype)initWithAuthorizationToolPath:(NSString *)authorizationToolPath
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self != nil) {
|
if (self != nil) {
|
||||||
_fileManager = [[NSFileManager alloc] init];
|
_fileManager = [[NSFileManager alloc] init];
|
||||||
_allowsAuthorization = allowsAuthorization;
|
_authorizationToolPath = [authorizationToolPath copy];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (instancetype)defaultManager
|
||||||
+ (instancetype)fileManagerAllowingAuthorization:(BOOL)allowsAuthorization
|
|
||||||
{
|
{
|
||||||
return [[self alloc] initAllowingAuthorization:allowsAuthorization];
|
return [[self alloc] initWithAuthorizationToolPath:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Acquires an authorization reference which is intended to be used for future authorized file operations
|
+ (instancetype)fileManagerWithAuthorizationToolPath:(NSString *)authorizationToolPath
|
||||||
|
{
|
||||||
|
return [[self alloc] initWithAuthorizationToolPath:authorizationToolPath];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)fileManagerByPreservingAuthorizationRights
|
||||||
|
{
|
||||||
|
// Check if we don't allow authorization, or that we haven't needed to authorize yet, to create or re-use a
|
||||||
|
// file manager instance with these restrictions
|
||||||
|
return (_authorizationToolPath != nil && _auth != NULL) ? self : [SUFileManager defaultManager];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Acquires an authorization reference with root privileges which is intended to be used for authorized file operations
|
||||||
- (BOOL)_acquireAuthorizationWithError:(NSError *__autoreleasing *)error
|
- (BOOL)_acquireAuthorizationWithError:(NSError *__autoreleasing *)error
|
||||||
{
|
{
|
||||||
// No need to continue if we already acquired an authorization reference
|
// No need to continue if we already acquired an authorization reference
|
||||||
@@ -102,21 +90,112 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_allowsAuthorization) {
|
if (_authorizationToolPath == nil) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: @"Unable to grant authorization to perform action because it is explicitly turned off" }];
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: @"Unable to grant authorization to perform action because it is explicitly turned off" }];
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &_auth);
|
OSStatus createStatus = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &_auth);
|
||||||
if (status != errAuthorizationSuccess) {
|
if (createStatus != errAuthorizationSuccess) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed creating authorization reference with status code %d.", status] }];
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed creating authorization reference with status code %d.", createStatus] }];
|
||||||
}
|
}
|
||||||
_auth = NULL;
|
_auth = NULL;
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AuthorizationItem rightItems[] = {
|
||||||
|
// The right that allows us to run tools as root user
|
||||||
|
{.name = kAuthorizationRightExecute, .valueLength = 0, .value = NULL, .flags = 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuthorizationRights rights = {
|
||||||
|
.count = sizeof(rightItems) / sizeof(*rightItems),
|
||||||
|
.items = rightItems
|
||||||
|
};
|
||||||
|
|
||||||
|
AuthorizationFlags flags =
|
||||||
|
(AuthorizationFlags)(kAuthorizationFlagDefaults | kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights | kAuthorizationFlagPreAuthorize);
|
||||||
|
|
||||||
|
// This will test if we can gain authorization for running utlities as root
|
||||||
|
OSStatus copyStatus = AuthorizationCopyRights(_auth, &rights, kAuthorizationEmptyEnvironment, flags, NULL);
|
||||||
|
if (copyStatus != errAuthorizationSuccess) {
|
||||||
|
if (error != NULL) {
|
||||||
|
if (copyStatus == errAuthorizationCanceled) {
|
||||||
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationCancelledError userInfo:@{ NSLocalizedDescriptionKey: @"Authorization access was cancelled by the user." }];
|
||||||
|
} else {
|
||||||
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed granting authorization rights with status code %d.", copyStatus] }];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AuthorizationFree(_auth, kAuthorizationFlagDefaults);
|
||||||
|
_auth = NULL;
|
||||||
|
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)_authorizeAndExecuteCommand:(char *)command sourcePath:(char *)sourcePath destinationPath:(char *)destinationPath error:(NSError * __autoreleasing *)error
|
||||||
|
{
|
||||||
|
NSError *acquireError = nil;
|
||||||
|
if (![self _acquireAuthorizationWithError:&acquireError]) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = acquireError;
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *arguments[] = { command, sourcePath, destinationPath, NULL };
|
||||||
|
|
||||||
|
char toolPath[PATH_MAX] = {0};
|
||||||
|
if (![_authorizationToolPath getFileSystemRepresentation:toolPath maxLength:sizeof(toolPath)]) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Authorization tool (%@) cannot be represented as a valid file name.", _authorizationToolPath.lastPathComponent] }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE *pipe = NULL;
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
if (AuthorizationExecuteWithPrivileges(_auth, toolPath, kAuthorizationFlagDefaults, arguments, &pipe) != errAuthorizationSuccess) {
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:@"Failed to run authorization tool." }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t pidData = 0;
|
||||||
|
if (fread(&pidData, sizeof(pidData), 1, pipe) < 1) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:@"Failed to retrieve authorized executable process identifier." }];
|
||||||
|
}
|
||||||
|
fclose(pipe);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
pid_t childPid = (int32_t)CFSwapInt32LittleToHost(pidData);
|
||||||
|
int status = 0;
|
||||||
|
|
||||||
|
pid_t waitResult;
|
||||||
|
do {
|
||||||
|
waitResult = waitpid(childPid, &status, 0);
|
||||||
|
} while (waitResult == -1 && errno == EINTR);
|
||||||
|
|
||||||
|
fclose(pipe);
|
||||||
|
|
||||||
|
if (waitResult == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Failed to execute authorized executable with result %d and status (%d, %d, %d).", waitResult, status, WIFEXITED(status), WEXITSTATUS(status)] }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +230,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isDirectory != NULL) {
|
if (isDirectory != NULL) {
|
||||||
*isDirectory = [attributes[NSFileType] isEqualToString:NSFileTypeDirectory];
|
*isDirectory = [[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeDirectory];
|
||||||
}
|
}
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
@@ -183,7 +262,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
|
|
||||||
#define XATTR_UTILITY_PATH "/usr/bin/xattr"
|
#define XATTR_UTILITY_PATH "/usr/bin/xattr"
|
||||||
// Recursively remove an xattr at a specified root URL with authentication
|
// Recursively remove an xattr at a specified root URL with authentication
|
||||||
- (BOOL)_removeXAttrWithAuthentication:(char *__nonnull)xattrName fromRootURL:(NSURL *)rootURL error:(NSError *__autoreleasing *)error
|
- (BOOL)_removeQuarantineWithAuthenticationAtRootURL:(NSURL *)rootURL error:(NSError *__autoreleasing *)error
|
||||||
{
|
{
|
||||||
// Because this is a system utility, it's fine to follow the symbolic link if one exists
|
// Because this is a system utility, it's fine to follow the symbolic link if one exists
|
||||||
if (![_fileManager fileExistsAtPath:@(XATTR_UTILITY_PATH)]) {
|
if (![_fileManager fileExistsAtPath:@(XATTR_UTILITY_PATH)]) {
|
||||||
@@ -200,16 +279,11 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
NSError *executeError = nil;
|
||||||
return NO;
|
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpRemoveQuarantineCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||||
}
|
|
||||||
|
|
||||||
BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, XATTR_UTILITY_PATH, kAuthorizationFlagDefaults, (char *[]){ "-s", "-r", "-d", xattrName, path, NULL });
|
|
||||||
|
|
||||||
if (!success && error != NULL) {
|
if (!success && error != NULL) {
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Authenticated extended attribute deletion for %@ failed on %@.", [NSString stringWithUTF8String:xattrName], rootURL.path.lastPathComponent];
|
*error = executeError;
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage }];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
@@ -234,7 +308,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
removedQuarantine = YES;
|
removedQuarantine = YES;
|
||||||
} else {
|
} else {
|
||||||
if (isAccessError(removalError)) {
|
if (isAccessError(removalError)) {
|
||||||
removedQuarantine = [self _removeXAttrWithAuthentication:SUAppleQuarantineIdentifier fromRootURL:rootURL error:error];
|
removedQuarantine = [self _removeQuarantineWithAuthenticationAtRootURL:rootURL error:error];
|
||||||
attemptedAuthentication = YES;
|
attemptedAuthentication = YES;
|
||||||
} else {
|
} else {
|
||||||
if (success != NULL) {
|
if (success != NULL) {
|
||||||
@@ -267,7 +341,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
// root-level symbolic link.
|
// root-level symbolic link.
|
||||||
NSString *rootURLPath = rootURL.path;
|
NSString *rootURLPath = rootURL.path;
|
||||||
NSDictionary *rootAttributes = [_fileManager attributesOfItemAtPath:rootURLPath error:nil];
|
NSDictionary *rootAttributes = [_fileManager attributesOfItemAtPath:rootURLPath error:nil];
|
||||||
NSString *rootType = rootAttributes[NSFileType];
|
NSString *rootType = [rootAttributes objectForKey:NSFileType]; // 10.7 can't subscript this
|
||||||
|
|
||||||
if ([rootType isEqualToString:NSFileTypeDirectory]) {
|
if ([rootType isEqualToString:NSFileTypeDirectory]) {
|
||||||
// The NSDirectoryEnumerator will avoid recursing into any contained
|
// The NSDirectoryEnumerator will avoid recursing into any contained
|
||||||
@@ -286,7 +360,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Removes the directory tree rooted at |root| from the file quarantine.
|
// Removes the directory tree rooted at |root| from the file quarantine.
|
||||||
// The quarantine was introduced on OS X 10.5 and is described at:
|
// The quarantine was introduced on macOS 10.5 and is described at:
|
||||||
//
|
//
|
||||||
// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html#apple_ref/doc/uid/TP40001369-DontLinkElementID_2
|
// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html#apple_ref/doc/uid/TP40001369-DontLinkElementID_2
|
||||||
//
|
//
|
||||||
@@ -388,11 +462,6 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char sourcePath[PATH_MAX] = {0};
|
char sourcePath[PATH_MAX] = {0};
|
||||||
if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
|
if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
@@ -408,11 +477,11 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/cp", kAuthorizationFlagDefaults, (char *[]){ "-Rf", "--", sourcePath, destinationPath, NULL })) {
|
NSError *executeError = nil;
|
||||||
|
if (![self _authorizeAndExecuteCommand:SUFileOpCopyCommand sourcePath:sourcePath destinationPath:destinationPath error:&executeError]) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Failed to perform authenticated file copy for %@.", sourceURL.lastPathComponent];
|
*error = executeError;
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage }];
|
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
@@ -501,10 +570,6 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
char sourcePath[PATH_MAX] = {0};
|
char sourcePath[PATH_MAX] = {0};
|
||||||
if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
|
if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
@@ -520,11 +585,12 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/mv", kAuthorizationFlagDefaults, (char *[]){ "-f", "--", sourcePath, destinationPath, NULL })) {
|
NSError *executeError = nil;
|
||||||
|
if (![self _authorizeAndExecuteCommand:SUFileOpMoveCommand sourcePath:sourcePath destinationPath:destinationPath error:&executeError]) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Failed to perform authenticated file move for %@.", sourceURL.lastPathComponent];
|
NSString *errorMessage = [NSString stringWithFormat:@"Failed to perform authorized file move for %@.", sourceURL.lastPathComponent];
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage }];
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey:errorMessage, NSUnderlyingErrorKey: executeError }];
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
@@ -542,7 +608,19 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chown(path, ownerID.unsignedIntValue, groupID.unsignedIntValue) != 0) {
|
int fileDescriptor = open(path, O_RDONLY | O_SYMLINK);
|
||||||
|
if (fileDescriptor == -1) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to open file descriptor to %@", targetURL.path.lastPathComponent] }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We use fchown instead of chown because the latter can follow symbolic links
|
||||||
|
BOOL success = fchown(fileDescriptor, ownerID.unsignedIntValue, groupID.unsignedIntValue) == 0;
|
||||||
|
close(fileDescriptor);
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
if (errno == EPERM) {
|
if (errno == EPERM) {
|
||||||
if (needsAuth != NULL) {
|
if (needsAuth != NULL) {
|
||||||
*needsAuth = YES;
|
*needsAuth = YES;
|
||||||
@@ -595,7 +673,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSNumber *ownerID = matchFileAttributes[NSFileOwnerAccountID];
|
NSNumber *ownerID = [matchFileAttributes objectForKey:NSFileOwnerAccountID];
|
||||||
if (ownerID == nil) {
|
if (ownerID == nil) {
|
||||||
// shouldn't be possible to error here, but just in case
|
// shouldn't be possible to error here, but just in case
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
@@ -604,7 +682,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSNumber *groupID = matchFileAttributes[NSFileGroupOwnerAccountID];
|
NSNumber *groupID = [matchFileAttributes objectForKey:NSFileGroupOwnerAccountID];
|
||||||
if (groupID == nil) {
|
if (groupID == nil) {
|
||||||
// shouldn't be possible to error here, but just in case
|
// shouldn't be possible to error here, but just in case
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
@@ -613,8 +691,8 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSNumber *targetOwnerID = targetFileAttributes[NSFileOwnerAccountID];
|
NSNumber *targetOwnerID = [targetFileAttributes objectForKey:NSFileOwnerAccountID];
|
||||||
NSNumber *targetGroupID = targetFileAttributes[NSFileGroupOwnerAccountID];
|
NSNumber *targetGroupID = [targetFileAttributes objectForKey:NSFileGroupOwnerAccountID];
|
||||||
|
|
||||||
if ((targetOwnerID != nil && [ownerID isEqualToNumber:targetOwnerID]) && (targetGroupID != nil && [groupID isEqualToNumber:targetGroupID])) {
|
if ((targetOwnerID != nil && [ownerID isEqualToNumber:targetOwnerID]) && (targetGroupID != nil && [groupID isEqualToNumber:targetGroupID])) {
|
||||||
// Assume they're the same even if we don't check every file recursively
|
// Assume they're the same even if we don't check every file recursively
|
||||||
@@ -652,21 +730,20 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
char userAndGroup[100];
|
char matchPath[PATH_MAX] = {0};
|
||||||
int written = snprintf(userAndGroup, sizeof(userAndGroup), "%u:%u", ownerID.unsignedIntValue, groupID.unsignedIntValue);
|
if (![matchURLPath getFileSystemRepresentation:matchPath maxLength:sizeof(matchPath)]) {
|
||||||
if (written < 0 || written >= 100) {
|
if (error != NULL) {
|
||||||
return NO; // No custom error, because it's too unlikely to ever happen
|
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Match file (%@) cannot be represented as a valid file name.", matchURL.path.lastPathComponent] }];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/usr/sbin/chown", kAuthorizationFlagDefaults, (char *[]){ "-R", userAndGroup, targetPath, NULL });
|
NSError *executeError = nil;
|
||||||
|
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpChangeOwnerAndGroupCommand sourcePath:targetPath destinationPath:matchPath error:&executeError];
|
||||||
if (!success && error != NULL) {
|
if (!success && error != NULL) {
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Failed to change owner:group %@ on %@ with authentication.", [NSString stringWithUTF8String:userAndGroup], targetURL.path.lastPathComponent];
|
NSString *errorMessage = [NSString stringWithFormat:@"Failed to change owner & group on %@ to match %@ with authorization.", targetURL.path.lastPathComponent, matchURLPath.lastPathComponent];
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage, NSUnderlyingErrorKey: executeError }];
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
@@ -695,7 +772,20 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (utimes(path, NULL) == 0) {
|
int fileDescriptor = open(path, O_RDONLY | O_SYMLINK);
|
||||||
|
if (fileDescriptor == -1) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to open file descriptor to %@", targetURL.path.lastPathComponent] }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Using futimes() because utimes() follows symbolic links
|
||||||
|
BOOL updatedTime = (futimes(fileDescriptor, NULL) == 0);
|
||||||
|
|
||||||
|
close(fileDescriptor);
|
||||||
|
|
||||||
|
if (updatedTime) {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,15 +795,12 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
NSError *executeError = nil;
|
||||||
return NO;
|
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpUpdateModificationAndAccessTimeCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||||
}
|
|
||||||
|
|
||||||
BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/usr/bin/touch", kAuthorizationFlagDefaults, (char *[]){ "--", path, NULL });
|
|
||||||
if (!success && error != NULL) {
|
if (!success && error != NULL) {
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Failed to update modification & access time on %@ with authentication.", targetURL.path.lastPathComponent];
|
NSString *errorMessage = [NSString stringWithFormat:@"Failed to update modification & access time on %@ with authorization.", targetURL.path.lastPathComponent];
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage, NSUnderlyingErrorKey: executeError }];
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
@@ -721,7 +808,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
|
|
||||||
// Creates a directory at the item pointed by url
|
// Creates a directory at the item pointed by url
|
||||||
// An item cannot already exist at the url, but the parent must be a directory that exists
|
// An item cannot already exist at the url, but the parent must be a directory that exists
|
||||||
- (BOOL)_makeDirectoryAtURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
- (BOOL)makeDirectoryAtURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
if ([self _itemExistsAtURL:url]) {
|
if ([self _itemExistsAtURL:url]) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
@@ -758,16 +845,16 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
NSError *executeError = nil;
|
||||||
return NO;
|
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpMakeDirectoryCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||||
}
|
if (!success) {
|
||||||
|
if (error != NULL) {
|
||||||
BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/mkdir", kAuthorizationFlagDefaults, (char *[]){ "--", path, NULL });
|
NSString *errorMessage = [NSString stringWithFormat:@"Failed to make directory %@ with authorization.", url.path.lastPathComponent];
|
||||||
if (!success && error != NULL) {
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage, NSUnderlyingErrorKey: executeError }];
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Failed to make directory %@ with authentication.", url.path.lastPathComponent];
|
}
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -789,7 +876,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
desiredURL = [directoryURL URLByAppendingPathComponent:[preferredName stringByAppendingFormat:@" (%lu)", (unsigned long)++tagIndex]];
|
desiredURL = [directoryURL URLByAppendingPathComponent:[preferredName stringByAppendingFormat:@" (%lu)", (unsigned long)++tagIndex]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [self _makeDirectoryAtURL:desiredURL error:error] ? desiredURL : nil;
|
return [self makeDirectoryAtURL:desiredURL error:error] ? desiredURL : nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)removeItemAtURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
- (BOOL)removeItemAtURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
||||||
@@ -813,10 +900,6 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self _acquireAuthorizationWithError:error]) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
char path[PATH_MAX] = {0};
|
char path[PATH_MAX] = {0};
|
||||||
if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
|
if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
@@ -824,11 +907,14 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSError *executeError = nil;
|
||||||
|
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpRemoveCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||||
|
|
||||||
BOOL success = AuthorizationExecuteWithPrivilegesAndWait(_auth, "/bin/rm", kAuthorizationFlagDefaults, (char *[]){ "-rf", "--", path, NULL });
|
|
||||||
if (!success && error != NULL) {
|
if (!success && error != NULL) {
|
||||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to remove %@ with authentication.", url.path.lastPathComponent] }];
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to remove %@ with authentication.", url.path.lastPathComponent], NSUnderlyingErrorKey: executeError }];
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,7 +989,10 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
|
|
||||||
if (canUseNewTrashAPI) {
|
if (canUseNewTrashAPI) {
|
||||||
NSError *trashError = nil;
|
NSError *trashError = nil;
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||||
success = [_fileManager trashItemAtURL:tempItemURL resultingItemURL:NULL error:&trashError];
|
success = [_fileManager trashItemAtURL:tempItemURL resultingItemURL:NULL error:&trashError];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
if (!success && error != NULL) {
|
if (!success && error != NULL) {
|
||||||
*error = trashError;
|
*error = trashError;
|
||||||
}
|
}
|
||||||
@@ -914,6 +1003,34 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unlike other methods, authorization is required to execute this method successfully
|
||||||
|
- (BOOL)executePackageAtURL:(NSURL *)packageURL error:(NSError * __autoreleasing *)error
|
||||||
|
{
|
||||||
|
if (![self _itemExistsAtURL:packageURL]) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to execute package %@ because the file does not exist.", packageURL.path.lastPathComponent] }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
char path[PATH_MAX] = {0};
|
||||||
|
if (![packageURL.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
|
||||||
|
if (error != NULL) {
|
||||||
|
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Package to execute (%@) cannot be represented as a valid file name.", packageURL.path.lastPathComponent] }];
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSError *executeError = nil;
|
||||||
|
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpInstallCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||||
|
|
||||||
|
if (!success && error != NULL) {
|
||||||
|
NSString* errorMessage = @"Failed to execute package installer.";
|
||||||
|
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{NSLocalizedDescriptionKey: errorMessage, NSUnderlyingErrorKey: executeError}];
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
A guided installation allows Sparkle to download and install a package (pkg) or multi-package (mpkg) without user interaction.
|
A guided installation allows Sparkle to download and install a package (pkg) or multi-package (mpkg) without user interaction.
|
||||||
|
|
||||||
The installer package is installed using Mac OS X's built-in command line installer, `/usr/sbin/installer`. No installation interface is shown to the user.
|
The installer package is installed using macOS's built-in command line installer, `/usr/sbin/installer`. No installation interface is shown to the user.
|
||||||
|
|
||||||
A guided installation can be started by applications other than the application being replaced. This is particularly useful where helper applications or agents are used.
|
A guided installation can be started by applications other than the application being replaced. This is particularly useful where helper applications or agents are used.
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ A guided installation can be started by applications other than the application
|
|||||||
@interface SUGuidedPackageInstaller : SUInstaller
|
@interface SUGuidedPackageInstaller : SUInstaller
|
||||||
|
|
||||||
/*! Perform the guided installation */
|
/*! Perform the guided installation */
|
||||||
+ (void)performInstallationToPath:(NSString *)path fromPath:(NSString *)installerGuide host:(SUHost *)host versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
|
+ (void)performInstallationToPath:(NSString *)path fromPath:(NSString *)installerGuide host:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -6,137 +6,27 @@
|
|||||||
// Copyright 2010 Dragon Systems Software Limited. All rights reserved.
|
// Copyright 2010 Dragon Systems Software Limited. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <sys/stat.h>
|
|
||||||
#import <Security/Security.h>
|
|
||||||
|
|
||||||
#import "SUGuidedPackageInstaller.h"
|
#import "SUGuidedPackageInstaller.h"
|
||||||
|
#import "SUFileManager.h"
|
||||||
static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authorization, const char* executablePath, AuthorizationFlags options, char* const* arguments)
|
|
||||||
{
|
|
||||||
sig_t oldSigChildHandler = signal(SIGCHLD, SIG_DFL);
|
|
||||||
BOOL returnValue = YES;
|
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
/* AuthorizationExecuteWithPrivileges used to support 10.4+; should be replaced with XPC or external process */
|
|
||||||
if (AuthorizationExecuteWithPrivileges(authorization, executablePath, options, arguments, NULL) == errAuthorizationSuccess)
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
{
|
|
||||||
int status = 0;
|
|
||||||
pid_t pid = wait(&status);
|
|
||||||
if (pid == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0)
|
|
||||||
returnValue = NO;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
returnValue = NO;
|
|
||||||
|
|
||||||
signal(SIGCHLD, oldSigChildHandler);
|
|
||||||
return returnValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
@implementation SUGuidedPackageInstaller (SUGuidedPackageInstallerAuthentication)
|
|
||||||
|
|
||||||
+ (AuthorizationRef)authorizationForExecutable:(NSString*)executablePath
|
|
||||||
{
|
|
||||||
SUParameterAssert(executablePath);
|
|
||||||
|
|
||||||
// Get authorization using advice in Apple's Technical Q&A1172
|
|
||||||
|
|
||||||
// ...create authorization without specific rights
|
|
||||||
AuthorizationRef auth = NULL;
|
|
||||||
OSStatus validAuth = AuthorizationCreate(NULL,
|
|
||||||
kAuthorizationEmptyEnvironment,
|
|
||||||
kAuthorizationFlagDefaults,
|
|
||||||
&auth);
|
|
||||||
// ...then extend authorization with desired rights
|
|
||||||
if ((validAuth == errAuthorizationSuccess) &&
|
|
||||||
(auth != NULL))
|
|
||||||
{
|
|
||||||
char executableFileSystemRepresentation[PATH_MAX];
|
|
||||||
[executablePath getFileSystemRepresentation:executableFileSystemRepresentation maxLength:sizeof(executableFileSystemRepresentation)];
|
|
||||||
|
|
||||||
// Prepare a right allowing script to execute with privileges
|
|
||||||
AuthorizationItem right = {
|
|
||||||
.name = kAuthorizationRightExecute,
|
|
||||||
.value = executableFileSystemRepresentation,
|
|
||||||
.valueLength = strlen(executableFileSystemRepresentation),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Package up the single right
|
|
||||||
AuthorizationRights rights;
|
|
||||||
memset(&rights,0,sizeof(rights));
|
|
||||||
rights.count = 1;
|
|
||||||
rights.items = &right;
|
|
||||||
|
|
||||||
// Extend rights to run script
|
|
||||||
validAuth = AuthorizationCopyRights(auth,
|
|
||||||
&rights,
|
|
||||||
kAuthorizationEmptyEnvironment,
|
|
||||||
(AuthorizationFlags)
|
|
||||||
(kAuthorizationFlagPreAuthorize |
|
|
||||||
kAuthorizationFlagExtendRights |
|
|
||||||
kAuthorizationFlagInteractionAllowed),
|
|
||||||
NULL);
|
|
||||||
if (validAuth != errAuthorizationSuccess)
|
|
||||||
{
|
|
||||||
// Error, clean up authorization
|
|
||||||
(void) AuthorizationFree(auth,kAuthorizationFlagDefaults);
|
|
||||||
auth = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return auth;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation SUGuidedPackageInstaller
|
@implementation SUGuidedPackageInstaller
|
||||||
|
|
||||||
+ (void)performInstallationToPath:(NSString *)destinationPath fromPath:(NSString *)packagePath host:(SUHost *)__unused host versionComparator:(id<SUVersionComparison>)__unused comparator completionHandler:(void (^)(NSError *))completionHandler
|
+ (void)performInstallationToPath:(NSString *)destinationPath fromPath:(NSString *)packagePath host:(SUHost *)__unused host fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id<SUVersionComparison>)__unused comparator completionHandler:(void (^)(NSError *))completionHandler
|
||||||
{
|
{
|
||||||
SUParameterAssert(packagePath);
|
SUParameterAssert(packagePath);
|
||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
SUFileManager *fileManager = [SUFileManager fileManagerWithAuthorizationToolPath:fileOperationToolPath];
|
||||||
// Preflight
|
|
||||||
NSString* installerPath = @"/usr/sbin/installer"; // Mac OS X 10.2+ command line installer tool
|
NSError *error = nil;
|
||||||
NSError* error = nil;
|
BOOL validInstallation = [fileManager executePackageAtURL:[NSURL fileURLWithPath:packagePath] error:&error];
|
||||||
|
|
||||||
// Create authorization for installer executable
|
|
||||||
BOOL validInstallation = NO;
|
|
||||||
AuthorizationRef auth = [self authorizationForExecutable:installerPath];
|
|
||||||
if (auth != NULL)
|
|
||||||
{
|
|
||||||
char pathBuffer[PATH_MAX] = {0};
|
|
||||||
[packagePath getFileSystemRepresentation:pathBuffer maxLength:sizeof(pathBuffer)];
|
|
||||||
|
|
||||||
// Permission was granted to execute the installer with privileges
|
|
||||||
char * const arguments[] = {
|
|
||||||
"-pkg",
|
|
||||||
pathBuffer,
|
|
||||||
"-target",
|
|
||||||
"/",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
validInstallation = AuthorizationExecuteWithPrivilegesAndWait(auth,
|
|
||||||
[installerPath fileSystemRepresentation],
|
|
||||||
kAuthorizationFlagDefaults,
|
|
||||||
arguments);
|
|
||||||
// TODO: wait for communications pipe to close via fileno & CFSocketCreateWithNative
|
|
||||||
AuthorizationFree(auth,kAuthorizationFlagDefaults);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NSString* errorMessage = [NSString stringWithFormat:@"Sparkle Updater: Script authorization denied."];
|
|
||||||
error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:[NSDictionary dictionaryWithObject:errorMessage forKey:NSLocalizedDescriptionKey]];
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self finishInstallationToPath:destinationPath
|
[self finishInstallationToPath:destinationPath
|
||||||
withResult:validInstallation
|
withResult:validInstallation
|
||||||
error:error
|
error:error
|
||||||
completionHandler:completionHandler];
|
completionHandler:completionHandler];
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ typedef struct {
|
|||||||
- (instancetype)initWithBundle:(NSBundle *)aBundle;
|
- (instancetype)initWithBundle:(NSBundle *)aBundle;
|
||||||
@property (readonly, copy) NSString *bundlePath;
|
@property (readonly, copy) NSString *bundlePath;
|
||||||
@property (readonly) BOOL allowsAutomaticUpdates;
|
@property (readonly) BOOL allowsAutomaticUpdates;
|
||||||
@property (readonly, copy) NSString *appCachePath;
|
|
||||||
@property (readonly, copy) NSString *installationPath;
|
@property (readonly, copy) NSString *installationPath;
|
||||||
@property (readonly, copy) NSString *name;
|
@property (readonly, copy) NSString *name;
|
||||||
@property (readonly, copy) NSString *version;
|
@property (readonly, copy) NSString *version;
|
||||||
@@ -35,6 +34,7 @@ typedef struct {
|
|||||||
@property (getter=isRunningOnReadOnlyVolume, readonly) BOOL runningOnReadOnlyVolume;
|
@property (getter=isRunningOnReadOnlyVolume, readonly) BOOL runningOnReadOnlyVolume;
|
||||||
@property (getter=isBackgroundApplication, readonly) BOOL backgroundApplication;
|
@property (getter=isBackgroundApplication, readonly) BOOL backgroundApplication;
|
||||||
@property (readonly, copy) NSString *publicDSAKey;
|
@property (readonly, copy) NSString *publicDSAKey;
|
||||||
|
@property (readonly, nonatomic, copy) NSString *publicDSAKeyFileKey;
|
||||||
@property (readonly, copy) NSArray *systemProfile;
|
@property (readonly, copy) NSArray *systemProfile;
|
||||||
|
|
||||||
- (id)objectForInfoDictionaryKey:(NSString *)key;
|
- (id)objectForInfoDictionaryKey:(NSString *)key;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#import "SUSystemProfiler.h"
|
#import "SUSystemProfiler.h"
|
||||||
#include <sys/mount.h> // For statfs for isRunningOnReadOnlyVolume
|
#include <sys/mount.h> // For statfs for isRunningOnReadOnlyVolume
|
||||||
#import "SULog.h"
|
#import "SULog.h"
|
||||||
|
#import "SUFileManager.h"
|
||||||
|
|
||||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000
|
||||||
@interface NSProcessInfo ()
|
@interface NSProcessInfo ()
|
||||||
@@ -71,29 +72,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Can we automatically update in the background without bugging the user (e.g, with a administrator password prompt)?
|
// Can we automatically update in the background without bugging the user (e.g, with a administrator password prompt)?
|
||||||
return [[NSFileManager defaultManager] isWritableFileAtPath:self.bundlePath];
|
// Note it's very well possible to have the bundle be writable but not be able to write into the parent directory
|
||||||
}
|
// And if the bundle isn't writable, but we can write into the parent directory, we will still need to authorize to replace it
|
||||||
|
NSString *bundlePath = [self bundlePath];
|
||||||
- (NSString *)appCachePath
|
if (![[NSFileManager defaultManager] isWritableFileAtPath:bundlePath.stringByDeletingLastPathComponent] || ![[NSFileManager defaultManager] isWritableFileAtPath:bundlePath]) {
|
||||||
{
|
return NO;
|
||||||
NSArray *cachePaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
|
||||||
NSString *cachePath = nil;
|
|
||||||
if ([cachePaths count]) {
|
|
||||||
cachePath = cachePaths[0];
|
|
||||||
}
|
}
|
||||||
if (!cachePath) {
|
|
||||||
SULog(@"Failed to find user's cache directory! Using system default");
|
// Just because we have writability access does not mean we can set the correct owner/group silently
|
||||||
cachePath = NSTemporaryDirectory();
|
// Test if we can set the owner/group on a temporarily created file
|
||||||
|
// If we can, then we can probably perform an update without authorization
|
||||||
|
// One place where this matters is if you copy and run an app from /tmp/
|
||||||
|
|
||||||
|
NSString *tempFilename = @"permission_test" ;
|
||||||
|
|
||||||
|
SUFileManager *suFileManager = [SUFileManager defaultManager];
|
||||||
|
NSURL *tempDirectoryURL = [suFileManager makeTemporaryDirectoryWithPreferredName:tempFilename appropriateForDirectoryURL:[NSURL fileURLWithPath:NSTemporaryDirectory()] error:NULL];
|
||||||
|
|
||||||
|
if (tempDirectoryURL == nil) {
|
||||||
|
// I don't imagine this ever happening but in case it does, requesting authorization may be the better option
|
||||||
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *name = [self.bundle bundleIdentifier];
|
NSURL *tempFileURL = [tempDirectoryURL URLByAppendingPathComponent:tempFilename];
|
||||||
if (!name) {
|
|
||||||
name = [self name];
|
BOOL changeOwnerAndGroupSuccess =
|
||||||
}
|
[[NSData data] writeToURL:tempFileURL atomically:NO] &&
|
||||||
|
[suFileManager changeOwnerAndGroupOfItemAtRootURL:tempFileURL toMatchURL:self.bundle.bundleURL error:NULL];
|
||||||
cachePath = [cachePath stringByAppendingPathComponent:name];
|
|
||||||
cachePath = [cachePath stringByAppendingPathComponent:@"Sparkle"];
|
[suFileManager removeItemAtURL:tempDirectoryURL error:NULL];
|
||||||
return cachePath;
|
|
||||||
|
return changeOwnerAndGroupSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)installationPath
|
- (NSString *)installationPath
|
||||||
@@ -147,11 +156,11 @@
|
|||||||
{
|
{
|
||||||
// Cache the application icon.
|
// Cache the application icon.
|
||||||
NSString *iconPath = [self.bundle pathForResource:[self.bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType:@"icns"];
|
NSString *iconPath = [self.bundle pathForResource:[self.bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType:@"icns"];
|
||||||
// According to the OS X docs, "CFBundleIconFile - This key identifies the file containing
|
// According to the macOS docs, "CFBundleIconFile - This key identifies the file containing
|
||||||
// the icon for the bundle. The filename you specify does not need to include the .icns
|
// the icon for the bundle. The filename you specify does not need to include the .icns
|
||||||
// extension, although it may."
|
// extension, although it may."
|
||||||
//
|
//
|
||||||
// However, if it *does* include the '.icns' the above method fails (tested on OS X 10.3.9) so we'll also try:
|
// However, if it *does* include the '.icns' the above method fails (tested on macOS 10.3.9) so we'll also try:
|
||||||
if (!iconPath) {
|
if (!iconPath) {
|
||||||
iconPath = [self.bundle pathForResource:[self.bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType:nil];
|
iconPath = [self.bundle pathForResource:[self.bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType:nil];
|
||||||
}
|
}
|
||||||
@@ -187,7 +196,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// More likely, we've got a reference to a Resources file by filename:
|
// More likely, we've got a reference to a Resources file by filename:
|
||||||
NSString *keyFilename = [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey];
|
NSString *keyFilename = [self publicDSAKeyFileKey];
|
||||||
if (!keyFilename) {
|
if (!keyFilename) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
@@ -199,6 +208,11 @@
|
|||||||
return [NSString stringWithContentsOfFile:keyPath encoding:NSASCIIStringEncoding error:nil];
|
return [NSString stringWithContentsOfFile:keyPath encoding:NSASCIIStringEncoding error:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString * __nullable)publicDSAKeyFileKey
|
||||||
|
{
|
||||||
|
return [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSArray *)systemProfile
|
- (NSArray *)systemProfile
|
||||||
{
|
{
|
||||||
return [[SUSystemProfiler sharedSystemProfiler] systemProfileArrayForHost:self];
|
return [[SUSystemProfiler sharedSystemProfiler] systemProfileArrayForHost:self];
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
@interface SUInstaller : NSObject
|
@interface SUInstaller : NSObject
|
||||||
|
|
||||||
+ (NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr;
|
+ (NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr;
|
||||||
+ (void)installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
|
+ (void)installFromUpdateFolder:(NSString *)inUpdateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
|
||||||
+ (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result error:(NSError *)error completionHandler:(void (^)(NSError *))completionHandler;
|
+ (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result error:(NSError *)error completionHandler:(void (^)(NSError *))completionHandler;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
return newAppDownloadPath;
|
return newAppDownloadPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)installFromUpdateFolder:(NSString *)inUpdateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler
|
+ (void)installFromUpdateFolder:(NSString *)inUpdateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler
|
||||||
{
|
{
|
||||||
BOOL isPackage = NO;
|
BOOL isPackage = NO;
|
||||||
BOOL isGuided = NO;
|
BOOL isGuided = NO;
|
||||||
@@ -113,39 +113,18 @@
|
|||||||
[self finishInstallationToPath:installationPath withResult:NO error:[NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingUpdateError userInfo:@{ NSLocalizedDescriptionKey: @"Couldn't find an appropriate update in the downloaded package." }] completionHandler:completionHandler];
|
[self finishInstallationToPath:installationPath withResult:NO error:[NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingUpdateError userInfo:@{ NSLocalizedDescriptionKey: @"Couldn't find an appropriate update in the downloaded package." }] completionHandler:completionHandler];
|
||||||
} else {
|
} else {
|
||||||
if (isPackage && isGuided) {
|
if (isPackage && isGuided) {
|
||||||
[SUGuidedPackageInstaller performInstallationToPath:installationPath fromPath:newAppDownloadPath host:host versionComparator:comparator completionHandler:completionHandler];
|
[SUGuidedPackageInstaller performInstallationToPath:installationPath fromPath:newAppDownloadPath host:host fileOperationToolPath:fileOperationToolPath versionComparator:comparator completionHandler:completionHandler];
|
||||||
} else if (isPackage) {
|
} else if (isPackage) {
|
||||||
[SUPackageInstaller performInstallationToPath:installationPath fromPath:newAppDownloadPath host:host versionComparator:comparator completionHandler:completionHandler];
|
[SUPackageInstaller performInstallationToPath:installationPath fromPath:newAppDownloadPath host:host fileOperationToolPath:fileOperationToolPath versionComparator:comparator completionHandler:completionHandler];
|
||||||
} else {
|
} else {
|
||||||
[SUPlainInstaller performInstallationToPath:installationPath fromPath:newAppDownloadPath host:host versionComparator:comparator completionHandler:completionHandler];
|
[SUPlainInstaller performInstallationToPath:installationPath fromPath:newAppDownloadPath host:host fileOperationToolPath:fileOperationToolPath versionComparator:comparator completionHandler:completionHandler];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)mdimportInstallationPath:(NSString *)installationPath
|
+ (void)finishInstallationToPath:(NSString *)__unused installationPath withResult:(BOOL)result error:(NSError *)error completionHandler:(void (^)(NSError *))completionHandler
|
||||||
{
|
|
||||||
// *** GETS CALLED ON NON-MAIN THREAD!
|
|
||||||
|
|
||||||
SULog(@"mdimporting");
|
|
||||||
|
|
||||||
NSTask *mdimport = [[NSTask alloc] init];
|
|
||||||
[mdimport setLaunchPath:@"/usr/bin/mdimport"];
|
|
||||||
[mdimport setArguments:@[installationPath]];
|
|
||||||
@try {
|
|
||||||
[mdimport launch];
|
|
||||||
[mdimport waitUntilExit];
|
|
||||||
}
|
|
||||||
@catch (NSException *launchException)
|
|
||||||
{
|
|
||||||
// No big deal.
|
|
||||||
SULog(@"Error: %@", [launchException description]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result error:(NSError *)error completionHandler:(void (^)(NSError *))completionHandler
|
|
||||||
{
|
{
|
||||||
if (result) {
|
if (result) {
|
||||||
[self mdimportInstallationPath:installationPath];
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
completionHandler(nil);
|
completionHandler(nil);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,14 +20,21 @@
|
|||||||
{
|
{
|
||||||
NSOperatingSystemVersion version = { 0, 0, 0 };
|
NSOperatingSystemVersion version = { 0, 0, 0 };
|
||||||
NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil];
|
NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil];
|
||||||
NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."];
|
NSURL *url = [coreServices URLByAppendingPathComponent:@"SystemVersion.plist"];
|
||||||
version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0;
|
assert(url != nil);
|
||||||
version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0;
|
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfURL:url];
|
||||||
version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0;
|
NSArray *components = [ [dictionary objectForKey: @"ProductVersion"] componentsSeparatedByString:@"."];
|
||||||
|
version.majorVersion = components.count > 0 ? [ [components objectAtIndex:0] integerValue] : 0;
|
||||||
|
version.minorVersion = components.count > 1 ? [ [components objectAtIndex:1] integerValue] : 0;
|
||||||
|
version.patchVersion = components.count > 2 ? [ [components objectAtIndex:2] integerValue] : 0;
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||||
return [[NSProcessInfo processInfo] operatingSystemVersion];
|
return [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL)isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version
|
+ (BOOL)isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
@implementation SUPackageInstaller
|
@implementation SUPackageInstaller
|
||||||
|
|
||||||
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)__unused host versionComparator:(id<SUVersionComparison>)__unused comparator completionHandler:(void (^)(NSError *))completionHandler
|
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)__unused host fileOperationToolPath:(NSString *)__unused fileOperationToolPath versionComparator:(id<SUVersionComparison>)__unused comparator completionHandler:(void (^)(NSError *))completionHandler
|
||||||
{
|
{
|
||||||
// Run installer using the "open" command to ensure it is launched in front of current application.
|
// Run installer using the "open" command to ensure it is launched in front of current application.
|
||||||
// -W = wait until the app has quit.
|
// -W = wait until the app has quit.
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
NSString *lastPathComponent = [path lastPathComponent];
|
NSString *lastPathComponent = [path lastPathComponent];
|
||||||
for (NSString *currentType in typeSelectorDictionary)
|
for (NSString *currentType in typeSelectorDictionary)
|
||||||
{
|
{
|
||||||
NSString *value = typeSelectorDictionary[currentType];
|
NSString *value = [typeSelectorDictionary objectForKey:currentType];
|
||||||
assert(value);
|
assert(value);
|
||||||
|
|
||||||
if ([currentType length] > [lastPathComponent length]) continue;
|
if ([currentType length] > [lastPathComponent length]) continue;
|
||||||
@@ -41,6 +41,11 @@
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)start
|
- (void)start
|
||||||
{
|
{
|
||||||
[NSThread detachNewThreadSelector:[[self class] selectorConformingToTypeOfPath:self.archivePath] toTarget:self withObject:nil];
|
[NSThread detachNewThreadSelector:[[self class] selectorConformingToTypeOfPath:self.archivePath] toTarget:self withObject:nil];
|
||||||
@@ -62,7 +67,8 @@
|
|||||||
SULog(@"Extracting using '%@' '%@' < '%@' '%@'", command, [args componentsJoinedByString:@"' '"], self.archivePath, destination);
|
SULog(@"Extracting using '%@' '%@' < '%@' '%@'", command, [args componentsJoinedByString:@"' '"], self.archivePath, destination);
|
||||||
|
|
||||||
// Get the file size.
|
// Get the file size.
|
||||||
NSUInteger expectedLength = [[[NSFileManager defaultManager] attributesOfItemAtPath:self.archivePath error:nil][NSFileSize] unsignedIntegerValue];
|
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:self.archivePath error:nil];
|
||||||
|
NSUInteger expectedLength = [[attributes objectForKey:NSFileSize] unsignedIntegerValue];
|
||||||
if (expectedLength > 0) {
|
if (expectedLength > 0) {
|
||||||
NSFileHandle *archiveInput = [NSFileHandle fileHandleForReadingAtPath:self.archivePath];
|
NSFileHandle *archiveInput = [NSFileHandle fileHandleForReadingAtPath:self.archivePath];
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
@interface SUPlainInstaller : SUInstaller
|
@interface SUPlainInstaller : SUInstaller
|
||||||
|
|
||||||
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
|
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
return trimmedVersion.length > 0 ? trimmedVersion : nil;
|
return trimmedVersion.length > 0 ? trimmedVersion : nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL)performInstallationToURL:(NSURL *)installationURL fromUpdateAtURL:(NSURL *)newURL withHost:(SUHost *)host error:(NSError * __autoreleasing *)error
|
+ (BOOL)performInstallationToURL:(NSURL *)installationURL fromUpdateAtURL:(NSURL *)newURL withHost:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
if (installationURL == nil || newURL == nil) {
|
if (installationURL == nil || newURL == nil) {
|
||||||
// this really shouldn't happen but just in case
|
// this really shouldn't happen but just in case
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
SUFileManager *fileManager = [SUFileManager fileManagerAllowingAuthorization:YES];
|
SUFileManager *fileManager = [SUFileManager fileManagerWithAuthorizationToolPath:fileOperationToolPath];
|
||||||
|
|
||||||
// Create a temporary directory for our new app that resides on our destination's volume
|
// Create a temporary directory for our new app that resides on our destination's volume
|
||||||
NSURL *tempNewDirectoryURL = [fileManager makeTemporaryDirectoryWithPreferredName:[installationURL.lastPathComponent.stringByDeletingPathExtension stringByAppendingString:@" (Incomplete Update)"] appropriateForDirectoryURL:installationURL.URLByDeletingLastPathComponent error:error];
|
NSURL *tempNewDirectoryURL = [fileManager makeTemporaryDirectoryWithPreferredName:[installationURL.lastPathComponent.stringByDeletingPathExtension stringByAppendingString:@" (Incomplete Update)"] appropriateForDirectoryURL:installationURL.URLByDeletingLastPathComponent error:error];
|
||||||
@@ -139,20 +139,23 @@
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// From here on out, we don't really need to bring up authorization if we haven't done so prior
|
||||||
|
SUFileManager *constrainedFileManager = [fileManager fileManagerByPreservingAuthorizationRights];
|
||||||
|
|
||||||
// Cleanup: move the old app to the trash
|
// Cleanup: move the old app to the trash
|
||||||
NSError *trashError = nil;
|
NSError *trashError = nil;
|
||||||
if (![fileManager moveItemAtURLToTrash:oldTempURL error:&trashError]) {
|
if (![constrainedFileManager moveItemAtURLToTrash:oldTempURL error:&trashError]) {
|
||||||
SULog(@"Failed to move %@ to trash with error %@", oldTempURL, trashError);
|
SULog(@"Failed to move %@ to trash with error %@", oldTempURL, trashError);
|
||||||
}
|
}
|
||||||
|
|
||||||
[fileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
|
[constrainedFileManager removeItemAtURL:tempOldDirectoryURL error:NULL];
|
||||||
|
|
||||||
[fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
|
[constrainedFileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler
|
+ (void)performInstallationToPath:(NSString *)installationPath fromPath:(NSString *)path host:(SUHost *)host fileOperationToolPath:(NSString *)fileOperationToolPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler
|
||||||
{
|
{
|
||||||
SUParameterAssert(host);
|
SUParameterAssert(host);
|
||||||
|
|
||||||
@@ -161,7 +164,7 @@
|
|||||||
// Prevent malicious downgrades
|
// Prevent malicious downgrades
|
||||||
if (!allowDowngrades) {
|
if (!allowDowngrades) {
|
||||||
if ([comparator compareVersion:[host version] toVersion:[[NSBundle bundleWithPath:path] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]] == NSOrderedDescending) {
|
if ([comparator compareVersion:[host version] toVersion:[[NSBundle bundleWithPath:path] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]] == NSOrderedDescending) {
|
||||||
NSString *errorMessage = [NSString stringWithFormat:@"Sparkle Updater: Possible attack in progress! Attempting to \"upgrade\" from %@ to %@. Aborting update.", [host version], [[NSBundle bundleWithPath:path] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]];
|
NSString *errorMessage = [NSString stringWithFormat:@"For security reasons, updates that downgrade version of the application are not allowed. Refusing to downgrade app from version %@ to %@. Aborting update.", [host version], [[NSBundle bundleWithPath:path] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]];
|
||||||
NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUDowngradeError userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
|
NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUDowngradeError userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
|
||||||
[self finishInstallationToPath:installationPath withResult:NO error:error completionHandler:completionHandler];
|
[self finishInstallationToPath:installationPath withResult:NO error:error completionHandler:completionHandler];
|
||||||
return;
|
return;
|
||||||
@@ -170,7 +173,7 @@
|
|||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
BOOL result = [self performInstallationToURL:[NSURL fileURLWithPath:installationPath] fromUpdateAtURL:[NSURL fileURLWithPath:path] withHost:host error:&error];
|
BOOL result = [self performInstallationToURL:[NSURL fileURLWithPath:installationPath] fromUpdateAtURL:[NSURL fileURLWithPath:path] withHost:host fileOperationToolPath:fileOperationToolPath error:&error];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self finishInstallationToPath:installationPath withResult:result error:error completionHandler:completionHandler];
|
[self finishInstallationToPath:installationPath withResult:result error:error completionHandler:completionHandler];
|
||||||
|
|||||||
@@ -9,7 +9,11 @@
|
|||||||
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
|
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
|
||||||
#define SUSTANDARDVERSIONCOMPARATOR_H
|
#define SUSTANDARDVERSIONCOMPARATOR_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Foundation;
|
||||||
|
#else
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
#import "SUVersionComparisonProtocol.h"
|
#import "SUVersionComparisonProtocol.h"
|
||||||
|
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ typedef NS_ENUM(NSInteger, SUCharacterType) {
|
|||||||
|
|
||||||
n = MIN([partsA count], [partsB count]);
|
n = MIN([partsA count], [partsB count]);
|
||||||
for (i = 0; i < n; ++i) {
|
for (i = 0; i < n; ++i) {
|
||||||
partA = partsA[i];
|
partA = [partsA objectAtIndex:i];
|
||||||
partB = partsB[i];
|
partB = [partsB objectAtIndex:i];
|
||||||
|
|
||||||
typeA = [self typeOfCharacter:partA];
|
typeA = [self typeOfCharacter:partA];
|
||||||
typeB = [self typeOfCharacter:partB];
|
typeB = [self typeOfCharacter:partB];
|
||||||
@@ -142,11 +142,11 @@ typedef NS_ENUM(NSInteger, SUCharacterType) {
|
|||||||
NSComparisonResult shorterResult, largerResult;
|
NSComparisonResult shorterResult, largerResult;
|
||||||
|
|
||||||
if ([partsA count] > [partsB count]) {
|
if ([partsA count] > [partsB count]) {
|
||||||
missingPart = partsA[n];
|
missingPart = [partsA objectAtIndex:n];
|
||||||
shorterResult = NSOrderedAscending;
|
shorterResult = NSOrderedAscending;
|
||||||
largerResult = NSOrderedDescending;
|
largerResult = NSOrderedDescending;
|
||||||
} else {
|
} else {
|
||||||
missingPart = partsB[n];
|
missingPart = [partsB objectAtIndex:n];
|
||||||
shorterResult = NSOrderedDescending;
|
shorterResult = NSOrderedDescending;
|
||||||
largerResult = NSOrderedAscending;
|
largerResult = NSOrderedAscending;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<connections>
|
<connections>
|
||||||
<outlet property="actionButton" destination="12" id="34"/>
|
<outlet property="actionButton" destination="12" id="34"/>
|
||||||
<outlet property="progressBar" destination="11" id="49"/>
|
<outlet property="progressBar" destination="11" id="49"/>
|
||||||
|
<outlet property="statusTextField" destination="16" id="MiZ-Tn-yVg"/>
|
||||||
<outlet property="window" destination="5" id="25"/>
|
<outlet property="window" destination="5" id="25"/>
|
||||||
</connections>
|
</connections>
|
||||||
</customObject>
|
</customObject>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
@interface SUStatusController : SUWindowController
|
@interface SUStatusController : SUWindowController
|
||||||
@property (weak) IBOutlet NSButton *actionButton;
|
@property (weak) IBOutlet NSButton *actionButton;
|
||||||
@property (weak) IBOutlet NSProgressIndicator *progressBar;
|
@property (weak) IBOutlet NSProgressIndicator *progressBar;
|
||||||
|
@property (weak) IBOutlet NSTextField *statusTextField;
|
||||||
|
|
||||||
@property (copy) NSString *statusText;
|
@property (copy) NSString *statusText;
|
||||||
@property double progressValue;
|
@property double progressValue;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#import "SUAppcast.h"
|
#import "SUAppcast.h"
|
||||||
#import "SUAppcastItem.h"
|
#import "SUAppcastItem.h"
|
||||||
#import "SUVersionComparisonProtocol.h"
|
#import "SUVersionComparisonProtocol.h"
|
||||||
|
#import "SUOperatingSystem.h"
|
||||||
#import "SUStatusController.h"
|
#import "SUStatusController.h"
|
||||||
#import "SUHost.h"
|
#import "SUHost.h"
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
@synthesize host;
|
@synthesize host;
|
||||||
@synthesize actionButton;
|
@synthesize actionButton;
|
||||||
@synthesize progressBar;
|
@synthesize progressBar;
|
||||||
|
@synthesize statusTextField;
|
||||||
|
|
||||||
- (instancetype)initWithHost:(SUHost *)aHost
|
- (instancetype)initWithHost:(SUHost *)aHost
|
||||||
{
|
{
|
||||||
@@ -51,6 +53,13 @@
|
|||||||
[[self window] center];
|
[[self window] center];
|
||||||
[[self window] setFrameAutosaveName:@"SUStatusFrame"];
|
[[self window] setFrameAutosaveName:@"SUStatusFrame"];
|
||||||
[self.progressBar setUsesThreadedAnimation:YES];
|
[self.progressBar setUsesThreadedAnimation:YES];
|
||||||
|
|
||||||
|
if ([SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 11, 0}]) {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||||
|
[self.statusTextField setFont:[NSFont monospacedDigitSystemFontOfSize:0 weight:NSFontWeightRegular]];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)windowTitle
|
- (NSString *)windowTitle
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
|
|||||||
error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0);
|
error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0);
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
NSString *rawModelName = @(cpuModel);
|
NSString *rawModelName = @(cpuModel);
|
||||||
NSString *visibleModelName = modelTranslation[rawModelName];
|
NSString *visibleModelName = [modelTranslation objectForKey:rawModelName];
|
||||||
if (visibleModelName == nil) {
|
if (visibleModelName == nil) {
|
||||||
visibleModelName = rawModelName;
|
visibleModelName = rawModelName;
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
|
|||||||
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
||||||
NSArray *languages = [defs objectForKey:@"AppleLanguages"];
|
NSArray *languages = [defs objectForKey:@"AppleLanguages"];
|
||||||
if ([languages count] > 0) {
|
if ([languages count] > 0) {
|
||||||
[profileArray addObject:[NSDictionary dictionaryWithObjects:@[SUSystemProfilerPreferredLanguageKey, @"Preferred Language", languages[0], languages[0]] forKeys:profileDictKeys]];
|
[profileArray addObject:[NSDictionary dictionaryWithObjects:@[SUSystemProfilerPreferredLanguageKey, @"Preferred Language", [languages objectAtIndex:0], [languages objectAtIndex:0]] forKeys:profileDictKeys]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Application sending the request
|
// Application sending the request
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
@interface SUUIBasedUpdateDriver : SUBasicUpdateDriver <SUUnarchiverDelegate>
|
@interface SUUIBasedUpdateDriver : SUBasicUpdateDriver <SUUnarchiverDelegate>
|
||||||
|
|
||||||
- (void)showModalAlert:(NSAlert *)alert;
|
- (void)showAlert:(NSAlert *)alert;
|
||||||
- (IBAction)cancelDownload:(id)sender;
|
- (IBAction)cancelDownload:(id)sender;
|
||||||
- (void)installAndRestart:(id)sender;
|
- (void)installAndRestart:(id)sender;
|
||||||
|
|
||||||
|
|||||||
@@ -97,9 +97,10 @@
|
|||||||
alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates.");
|
alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates.");
|
||||||
alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]];
|
alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]];
|
||||||
[alert addButtonWithTitle:SULocalizedString(@"OK", nil)];
|
[alert addButtonWithTitle:SULocalizedString(@"OK", nil)];
|
||||||
[self showModalAlert:alert];
|
[self showAlert:alert];
|
||||||
[self abortUpdate];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[self abortUpdate];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(NSNotification *)__unused aNotification
|
- (void)applicationDidBecomeActive:(NSNotification *)__unused aNotification
|
||||||
@@ -114,10 +115,6 @@
|
|||||||
[self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey];
|
[self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey];
|
||||||
switch (choice) {
|
switch (choice) {
|
||||||
case SUInstallUpdateChoice:
|
case SUInstallUpdateChoice:
|
||||||
self.statusController = [[SUStatusController alloc] initWithHost:self.host];
|
|
||||||
[self.statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil];
|
|
||||||
[self.statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO];
|
|
||||||
[self.statusController showWindow:self];
|
|
||||||
[self downloadUpdate];
|
[self downloadUpdate];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -137,6 +134,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)downloadUpdate
|
||||||
|
{
|
||||||
|
BOOL createdStatusController = NO;
|
||||||
|
if (self.statusController == nil) {
|
||||||
|
self.statusController = [[SUStatusController alloc] initWithHost:self.host];
|
||||||
|
createdStatusController = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil];
|
||||||
|
[self.statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO];
|
||||||
|
[self.statusController setButtonEnabled:YES];
|
||||||
|
|
||||||
|
if (createdStatusController) {
|
||||||
|
[self.statusController showWindow:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
[super downloadUpdate];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)download:(NSURLDownload *)__unused download didReceiveResponse:(NSURLResponse *)response
|
- (void)download:(NSURLDownload *)__unused download didReceiveResponse:(NSURLResponse *)response
|
||||||
{
|
{
|
||||||
[self.statusController setMaxProgressValue:[response expectedContentLength]];
|
[self.statusController setMaxProgressValue:[response expectedContentLength]];
|
||||||
@@ -164,8 +180,12 @@
|
|||||||
SULocalizedString(@"GB", @"the unit for gigabytes")];
|
SULocalizedString(@"GB", @"the unit for gigabytes")];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [NSByteCountFormatter stringFromByteCount:value
|
#pragma clang diagnostic push
|
||||||
countStyle:NSByteCountFormatterCountStyleFile];
|
#pragma clang diagnostic ignored "-Wpartial-availability"
|
||||||
|
NSByteCountFormatter *formatter = [[NSByteCountFormatter alloc] init];
|
||||||
|
[formatter setZeroPadsFractionDigits:YES];
|
||||||
|
return [formatter stringFromByteCount:value];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)download:(NSURLDownload *)__unused download didReceiveDataOfLength:(NSUInteger)length
|
- (void)download:(NSURLDownload *)__unused download didReceiveDataOfLength:(NSUInteger)length
|
||||||
@@ -253,7 +273,7 @@
|
|||||||
alert.messageText = SULocalizedString(@"Update Error!", nil);
|
alert.messageText = SULocalizedString(@"Update Error!", nil);
|
||||||
alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]];
|
alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]];
|
||||||
[alert addButtonWithTitle:SULocalizedString(@"Cancel Update", nil)];
|
[alert addButtonWithTitle:SULocalizedString(@"Cancel Update", nil)];
|
||||||
[self showModalAlert:alert];
|
[self showAlert:alert];
|
||||||
[super abortUpdateWithError:error];
|
[super abortUpdateWithError:error];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +287,7 @@
|
|||||||
[super abortUpdate];
|
[super abortUpdate];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showModalAlert:(NSAlert *)alert
|
- (void)showAlert:(NSAlert *)alert
|
||||||
{
|
{
|
||||||
if ([[self.updater delegate] respondsToSelector:@selector(updaterWillShowModalAlert:)]) {
|
if ([[self.updater delegate] respondsToSelector:@selector(updaterWillShowModalAlert:)]) {
|
||||||
[[self.updater delegate] updaterWillShowModalAlert:self.updater];
|
[[self.updater delegate] updaterWillShowModalAlert:self.updater];
|
||||||
|
|||||||
@@ -18,11 +18,15 @@
|
|||||||
|
|
||||||
@property (copy, readonly) NSString *archivePath;
|
@property (copy, readonly) NSString *archivePath;
|
||||||
@property (copy, readonly) NSString *updateHostBundlePath;
|
@property (copy, readonly) NSString *updateHostBundlePath;
|
||||||
|
@property (copy, readonly) NSString *decryptionPassword;
|
||||||
@property (weak) id<SUUnarchiverDelegate> delegate;
|
@property (weak) id<SUUnarchiverDelegate> delegate;
|
||||||
|
|
||||||
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host;
|
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host withPassword:(NSString *)decryptionPassword;
|
||||||
|
|
||||||
|
+ (BOOL)unsafeIfArchiveIsNotValidated;
|
||||||
|
|
||||||
- (void)start;
|
- (void)start;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@protocol SUUnarchiverDelegate <NSObject>
|
@protocol SUUnarchiverDelegate <NSObject>
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
@synthesize archivePath;
|
@synthesize archivePath;
|
||||||
@synthesize updateHostBundlePath;
|
@synthesize updateHostBundlePath;
|
||||||
@synthesize delegate;
|
@synthesize delegate;
|
||||||
|
@synthesize decryptionPassword;
|
||||||
|
|
||||||
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)hostPath
|
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)hostPath withPassword:(NSString *)decryptionPassword
|
||||||
{
|
{
|
||||||
for (id current in [self unarchiverImplementations])
|
for (id current in [self unarchiverImplementations]) {
|
||||||
{
|
|
||||||
if ([current canUnarchivePath:path]) {
|
if ([current canUnarchivePath:path]) {
|
||||||
return [[current alloc] initWithPath:path hostBundlePath:hostPath];
|
return [[current alloc] initWithPath:path hostBundlePath:hostPath password:decryptionPassword];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
@@ -39,12 +39,13 @@
|
|||||||
// No-op
|
// No-op
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithPath:(NSString *)path hostBundlePath:(NSString *)hostPath
|
- (instancetype)initWithPath:(NSString *)path hostBundlePath:(NSString *)hostPath password:(NSString *)password
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
{
|
{
|
||||||
archivePath = [path copy];
|
archivePath = [path copy];
|
||||||
updateHostBundlePath = hostPath;
|
updateHostBundlePath = hostPath;
|
||||||
|
decryptionPassword = password;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -54,6 +55,11 @@
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (BOOL)unsafeIfArchiveIsNotValidated
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)notifyDelegateOfProgress:(double)progress
|
- (void)notifyDelegateOfProgress:(double)progress
|
||||||
{
|
{
|
||||||
if ([self.delegate respondsToSelector:@selector(unarchiver:extractedProgress:)]) {
|
if ([self.delegate respondsToSelector:@selector(unarchiver:extractedProgress:)]) {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#import <WebKit/WebKit.h>
|
#import <WebKit/WebKit.h>
|
||||||
|
|
||||||
#import "SUConstants.h"
|
#import "SUConstants.h"
|
||||||
|
#import "SULog.h"
|
||||||
|
|
||||||
// WebKit protocols are not explicitly declared until 10.11 SDK, so
|
// WebKit protocols are not explicitly declared until 10.11 SDK, so
|
||||||
// declare dummy protocols to keep the build working on earlier SDKs.
|
// declare dummy protocols to keep the build working on earlier SDKs.
|
||||||
@@ -121,11 +122,13 @@
|
|||||||
self.releaseNotesView.preferencesIdentifier = SUBundleIdentifier;
|
self.releaseNotesView.preferencesIdentifier = SUBundleIdentifier;
|
||||||
WebPreferences *prefs = [self.releaseNotesView preferences];
|
WebPreferences *prefs = [self.releaseNotesView preferences];
|
||||||
prefs.plugInsEnabled = NO;
|
prefs.plugInsEnabled = NO;
|
||||||
|
prefs.javaEnabled = NO;
|
||||||
|
prefs.javaScriptEnabled = [self.host boolForInfoDictionaryKey:SUEnableJavaScriptKey];
|
||||||
self.releaseNotesView.frameLoadDelegate = self;
|
self.releaseNotesView.frameLoadDelegate = self;
|
||||||
self.releaseNotesView.policyDelegate = self;
|
self.releaseNotesView.policyDelegate = self;
|
||||||
|
|
||||||
// Set the default font
|
// Set the default font
|
||||||
// "-apple-system-font" is a reference to the system UI font on OS X. "-apple-system" is the new recommended token, but for backward compatibility we can't use it.
|
// "-apple-system-font" is a reference to the system UI font. "-apple-system" is the new recommended token, but for backward compatibility we can't use it.
|
||||||
prefs.standardFontFamily = @"-apple-system-font";
|
prefs.standardFontFamily = @"-apple-system-font";
|
||||||
prefs.defaultFontSize = (int)[NSFont systemFontSize];
|
prefs.defaultFontSize = (int)[NSFont systemFontSize];
|
||||||
|
|
||||||
@@ -140,14 +143,7 @@
|
|||||||
// If there's a release notes URL, load it; otherwise, just stick the contents of the description into the web view.
|
// If there's a release notes URL, load it; otherwise, just stick the contents of the description into the web view.
|
||||||
if ([self.updateItem releaseNotesURL])
|
if ([self.updateItem releaseNotesURL])
|
||||||
{
|
{
|
||||||
if ([[self.updateItem releaseNotesURL] isFileURL])
|
[[self.releaseNotesView mainFrame] loadRequest:[NSURLRequest requestWithURL:[self.updateItem releaseNotesURL] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]];
|
||||||
{
|
|
||||||
[[self.releaseNotesView mainFrame] loadHTMLString:@"Release notes with file:// URLs are not supported for security reasons—Javascript would be able to read files on your file system." baseURL:nil];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[[self.releaseNotesView mainFrame] loadRequest:[NSURLRequest requestWithURL:[self.updateItem releaseNotesURL] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -262,8 +258,18 @@
|
|||||||
|
|
||||||
- (void)webView:(WebView *)__unused sender decidePolicyForNavigationAction:(NSDictionary *)__unused actionInformation request:(NSURLRequest *)request frame:(WebFrame *)__unused frame decisionListener:(id<WebPolicyDecisionListener>)listener
|
- (void)webView:(WebView *)__unused sender decidePolicyForNavigationAction:(NSDictionary *)__unused actionInformation request:(NSURLRequest *)request frame:(WebFrame *)__unused frame decisionListener:(id<WebPolicyDecisionListener>)listener
|
||||||
{
|
{
|
||||||
|
NSURL *requestURL = request.URL;
|
||||||
|
NSString *scheme = requestURL.scheme;
|
||||||
|
BOOL whitelistedSafe = [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [requestURL.absoluteString isEqualToString:@"about:blank"];
|
||||||
|
|
||||||
|
// Do not allow redirects to dangerous protocols such as file://
|
||||||
|
if (!whitelistedSafe) {
|
||||||
|
SULog(@"Blocked display of %@ URL which may be dangerous", scheme);
|
||||||
|
[listener ignore];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (self.webViewFinishedLoading) {
|
if (self.webViewFinishedLoading) {
|
||||||
NSURL *requestURL = request.URL;
|
|
||||||
if (requestURL) {
|
if (requestURL) {
|
||||||
[[NSWorkspace sharedWorkspace] openURL:requestURL];
|
[[NSWorkspace sharedWorkspace] openURL:requestURL];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ extern NSString *const SUUpdateDriverFinishedNotification;
|
|||||||
- (instancetype)initWithUpdater:(SUUpdater *)updater;
|
- (instancetype)initWithUpdater:(SUUpdater *)updater;
|
||||||
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host;
|
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)host;
|
||||||
- (void)abortUpdate;
|
- (void)abortUpdate;
|
||||||
|
|
||||||
|
- (void)showAlert:(NSAlert *)alert;
|
||||||
|
|
||||||
@property (getter=isInterruptible, readonly) BOOL interruptible;
|
@property (getter=isInterruptible, readonly) BOOL interruptible;
|
||||||
@property (readonly) BOOL finished;
|
@property (readonly) BOOL finished;
|
||||||
@property BOOL automaticallyInstallUpdates;
|
@property BOOL automaticallyInstallUpdates;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#import "SUUpdateDriver.h"
|
#import "SUUpdateDriver.h"
|
||||||
#import "SUHost.h"
|
#import "SUHost.h"
|
||||||
|
#import "SULog.h"
|
||||||
|
|
||||||
NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
|
NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
|
||||||
|
|
||||||
@@ -50,4 +51,10 @@ NSString *const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
|
|||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdateDriverFinishedNotification object:self];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdateDriverFinishedNotification object:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)showAlert:(NSAlert *)alert {
|
||||||
|
// Only UI-based subclass shows the actual alert
|
||||||
|
SULog(@"ALERT: %@\n%@", alert.messageText, alert.informativeText);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// SUUpdateValidator.h
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by Mayur Pawashe on 12/3/16.
|
||||||
|
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@class SUHost;
|
||||||
|
|
||||||
|
@interface SUUpdateValidator : NSObject
|
||||||
|
|
||||||
|
// Pass YES to performingPrevalidation if archive validation must be done immediately, before extraction
|
||||||
|
- (instancetype)initWithDownloadPath:(NSString *)downloadPath dsaSignature:(NSString *)dsaSignature host:(SUHost *)host performingPrevalidation:(BOOL)performingPrevalidation;
|
||||||
|
|
||||||
|
// Indicates whether we can perform (post) validation later
|
||||||
|
@property (nonatomic, readonly) BOOL canValidate;
|
||||||
|
|
||||||
|
// precondition: validation must be possible (see -canValidate)
|
||||||
|
// This is "post" validation, after an archive has been extracted
|
||||||
|
- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory;
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
//
|
||||||
|
// SUUpdateValidator.m
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by Mayur Pawashe on 12/3/16.
|
||||||
|
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "SUUpdateValidator.h"
|
||||||
|
#import "SUDSAVerifier.h"
|
||||||
|
#import "SUCodeSigningVerifier.h"
|
||||||
|
#import "SUInstaller.h"
|
||||||
|
#import "SUHost.h"
|
||||||
|
#import "SULog.h"
|
||||||
|
|
||||||
|
@interface SUUpdateValidator ()
|
||||||
|
|
||||||
|
@property (nonatomic, readonly) SUHost *host;
|
||||||
|
@property (nonatomic, readonly) BOOL prevalidatedDsaSignature;
|
||||||
|
@property (nonatomic, readonly) NSString *dsaSignature;
|
||||||
|
@property (nonatomic, readonly) NSString *downloadPath;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation SUUpdateValidator
|
||||||
|
|
||||||
|
@synthesize host = _host;
|
||||||
|
@synthesize canValidate = _canValidate;
|
||||||
|
@synthesize prevalidatedDsaSignature = _prevalidatedDsaSignature;
|
||||||
|
@synthesize dsaSignature = _dsaSignature;
|
||||||
|
@synthesize downloadPath = _downloadPath;
|
||||||
|
|
||||||
|
- (instancetype)initWithDownloadPath:(NSString *)downloadPath dsaSignature:(NSString *)dsaSignature host:(SUHost *)host performingPrevalidation:(BOOL)performingPrevalidation
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self != nil) {
|
||||||
|
BOOL canValidate;
|
||||||
|
BOOL prevalidatedDsaSignature;
|
||||||
|
if (performingPrevalidation) {
|
||||||
|
NSString *publicDSAKey = host.publicDSAKey;
|
||||||
|
|
||||||
|
if (publicDSAKey == nil) {
|
||||||
|
prevalidatedDsaSignature = NO;
|
||||||
|
SULog(@"Failed to validate update before unarchiving because no DSA key was found");
|
||||||
|
} else if (dsaSignature == nil) {
|
||||||
|
prevalidatedDsaSignature = NO;
|
||||||
|
SULog(@"Failed to validate update before unarchiving because no DSA signature was found");
|
||||||
|
} else {
|
||||||
|
prevalidatedDsaSignature = [SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:dsaSignature withPublicDSAKey:publicDSAKey];
|
||||||
|
if (!prevalidatedDsaSignature) {
|
||||||
|
SULog(@"DSA signature validation before unarchiving failed for update %@", downloadPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
canValidate = prevalidatedDsaSignature;
|
||||||
|
} else {
|
||||||
|
prevalidatedDsaSignature = NO;
|
||||||
|
canValidate = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
_canValidate = canValidate;
|
||||||
|
_prevalidatedDsaSignature = prevalidatedDsaSignature;
|
||||||
|
_downloadPath = [downloadPath copy];
|
||||||
|
_dsaSignature = [dsaSignature copy];
|
||||||
|
_host = host;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory
|
||||||
|
{
|
||||||
|
assert(self.canValidate);
|
||||||
|
|
||||||
|
NSString *DSASignature = self.dsaSignature;
|
||||||
|
NSString *publicDSAKey = self.host.publicDSAKey;
|
||||||
|
NSString *downloadPath = self.downloadPath;
|
||||||
|
SUHost *host = self.host;
|
||||||
|
|
||||||
|
BOOL prevalidatedDsaSignature = self.prevalidatedDsaSignature;
|
||||||
|
|
||||||
|
BOOL validationCheckSuccess;
|
||||||
|
BOOL isPackage = NO;
|
||||||
|
|
||||||
|
// install source could point to a new bundle or a package
|
||||||
|
NSString *installSource = [SUInstaller installSourcePathInUpdateFolder:updateDirectory forHost:host isPackage:&isPackage isGuided:NULL];
|
||||||
|
if (installSource == nil) {
|
||||||
|
SULog(@"No suitable install is found in the update. The update will be rejected.");
|
||||||
|
validationCheckSuccess = NO;
|
||||||
|
} else {
|
||||||
|
NSURL *installSourceURL = [NSURL fileURLWithPath:installSource];
|
||||||
|
|
||||||
|
if (!prevalidatedDsaSignature) {
|
||||||
|
// Check to see if we have a package or bundle to validate
|
||||||
|
if (isPackage) {
|
||||||
|
// For package type updates, all we do is check if the DSA signature is valid
|
||||||
|
validationCheckSuccess = [SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey];
|
||||||
|
if (!validationCheckSuccess) {
|
||||||
|
SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// For application bundle updates, we check both the DSA and Apple code signing signatures
|
||||||
|
validationCheckSuccess = [self validateUpdateForHost:host downloadedToPath:downloadPath newBundleURL:installSourceURL DSASignature:DSASignature];
|
||||||
|
}
|
||||||
|
} else if (isPackage) {
|
||||||
|
// We shouldn't get here because we don't validate packages before extracting them currently
|
||||||
|
SULog(@"Error: not expecting to find package after being required to validate update before extraction");
|
||||||
|
validationCheckSuccess = NO;
|
||||||
|
} else {
|
||||||
|
// Because we already validated the DSA signature, this is just a consistency check to see
|
||||||
|
// if the developer signed their application properly with their Apple ID
|
||||||
|
// Currently, this case only gets hit for binary delta updates
|
||||||
|
NSError *error = nil;
|
||||||
|
if ([SUCodeSigningVerifier bundleAtURLIsCodeSigned:installSourceURL] && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:installSourceURL error:&error]) {
|
||||||
|
SULog(@"Failed to validate apple code sign signature on bundle after archive validation with error: %@", error);
|
||||||
|
validationCheckSuccess = NO;
|
||||||
|
} else {
|
||||||
|
validationCheckSuccess = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return validationCheckSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the update is a bundle, then it must meet any one of:
|
||||||
|
*
|
||||||
|
* * old and new DSA public keys are the same and valid (it allows change of Code Signing identity), or
|
||||||
|
*
|
||||||
|
* * old and new Code Signing identity are the same and valid
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
- (BOOL)validateUpdateForHost:(SUHost *)host downloadedToPath:(NSString *)downloadedPath newBundleURL:(NSURL *)newBundleURL DSASignature:(NSString *)DSASignature
|
||||||
|
{
|
||||||
|
NSBundle *newBundle = [NSBundle bundleWithURL:newBundleURL];
|
||||||
|
if (newBundle == nil) {
|
||||||
|
SULog(@"No suitable bundle is found in the update. The update will be rejected.");
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *publicDSAKey = host.publicDSAKey;
|
||||||
|
|
||||||
|
SUHost *newHost = [[SUHost alloc] initWithBundle:newBundle];
|
||||||
|
NSString *newPublicDSAKey = newHost.publicDSAKey;
|
||||||
|
|
||||||
|
// Downgrade in DSA security should not be possible
|
||||||
|
if (publicDSAKey != nil && newPublicDSAKey == nil) {
|
||||||
|
SULog(@"A public DSA key is found in the old bundle but no public DSA key is found in the new update. For security reasons, the update will be rejected.");
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL dsaKeysMatch = (publicDSAKey == nil || newPublicDSAKey == nil) ? NO : [publicDSAKey isEqualToString:newPublicDSAKey];
|
||||||
|
|
||||||
|
// If the new DSA key differs from the old, then this check is not a security measure, because the new key is not trusted.
|
||||||
|
// In that case, the check ensures that the app author has correctly used DSA keys, so that the app will be updateable in the next version.
|
||||||
|
// However if the new and old DSA keys are the same, then this is a security measure.
|
||||||
|
if (newPublicDSAKey != nil) {
|
||||||
|
if (![SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:newPublicDSAKey]) {
|
||||||
|
SULog(@"DSA signature validation failed. The update has a public DSA key and is signed with a DSA key, but the %@ doesn't match the signature. The update will be rejected.",
|
||||||
|
dsaKeysMatch ? @"public key" : @"new public key shipped with the update");
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BOOL updateIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:newHost.bundle.bundleURL];
|
||||||
|
|
||||||
|
if (dsaKeysMatch) {
|
||||||
|
NSError *error = nil;
|
||||||
|
if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:newHost.bundle.bundleURL error:&error]) {
|
||||||
|
SULog(@"The update archive has a valid DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:host.bundle.bundleURL];
|
||||||
|
|
||||||
|
NSString *dsaStatus = newPublicDSAKey ? @"has a new DSA key that doesn't match the previous one" : (publicDSAKey ? @"removes the DSA key" : @"isn't signed with a DSA key");
|
||||||
|
if (!hostIsCodeSigned || !updateIsCodeSigned) {
|
||||||
|
NSString *acsStatus = !hostIsCodeSigned ? @"old app hasn't been signed with app Code Signing" : @"new app isn't signed with app Code Signing";
|
||||||
|
SULog(@"The update archive %@, and the %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, acsStatus);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSError *error = nil;
|
||||||
|
if (![SUCodeSigningVerifier codeSignatureAtBundleURL:host.bundle.bundleURL matchesSignatureAtBundleURL:newHost.bundle.bundleURL error:&error]) {
|
||||||
|
SULog(@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -9,12 +9,16 @@
|
|||||||
#ifndef SUUPDATER_H
|
#ifndef SUUPDATER_H
|
||||||
#define SUUPDATER_H
|
#define SUUPDATER_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Foundation;
|
||||||
|
#else
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
#import "SUVersionComparisonProtocol.h"
|
#import "SUVersionComparisonProtocol.h"
|
||||||
#import "SUVersionDisplayProtocol.h"
|
#import "SUVersionDisplayProtocol.h"
|
||||||
|
|
||||||
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
|
@class SUAppcastItem, SUAppcast;
|
||||||
|
|
||||||
@protocol SUUpdaterDelegate;
|
@protocol SUUpdaterDelegate;
|
||||||
|
|
||||||
@@ -28,62 +32,158 @@ SU_EXPORT @interface SUUpdater : NSObject
|
|||||||
|
|
||||||
@property (unsafe_unretained) IBOutlet id<SUUpdaterDelegate> delegate;
|
@property (unsafe_unretained) IBOutlet id<SUUpdaterDelegate> delegate;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The shared updater for the main bundle.
|
||||||
|
|
||||||
|
This is equivalent to passing [NSBundle mainBundle] to SUUpdater::updaterForBundle:
|
||||||
|
*/
|
||||||
+ (SUUpdater *)sharedUpdater;
|
+ (SUUpdater *)sharedUpdater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The shared updater for a specified bundle.
|
||||||
|
|
||||||
|
If an updater has already been initialized for the provided bundle, that shared instance will be returned.
|
||||||
|
*/
|
||||||
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
|
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Designated initializer for SUUpdater.
|
||||||
|
|
||||||
|
If an updater has already been initialized for the provided bundle, that shared instance will be returned.
|
||||||
|
*/
|
||||||
- (instancetype)initForBundle:(NSBundle *)bundle;
|
- (instancetype)initForBundle:(NSBundle *)bundle;
|
||||||
|
|
||||||
@property (readonly, strong) NSBundle *hostBundle;
|
|
||||||
@property (strong, readonly) NSBundle *sparkleBundle;
|
|
||||||
|
|
||||||
@property BOOL automaticallyChecksForUpdates;
|
|
||||||
|
|
||||||
@property NSTimeInterval updateCheckInterval;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* The URL of the appcast used to download update information.
|
Explicitly checks for updates and displays a progress dialog while doing so.
|
||||||
*
|
|
||||||
* This property must be called on the main thread.
|
|
||||||
*/
|
|
||||||
@property (copy) NSURL *feedURL;
|
|
||||||
|
|
||||||
@property (nonatomic, copy) NSString *userAgentString;
|
This method is meant for a main menu item.
|
||||||
|
Connect any menu item to this action in Interface Builder,
|
||||||
|
and Sparkle will check for updates and report back its findings verbosely
|
||||||
|
when it is invoked.
|
||||||
|
|
||||||
@property (copy) NSDictionary *httpHeaders;
|
This will find updates that the user has opted into skipping.
|
||||||
|
|
||||||
@property BOOL sendsSystemProfile;
|
|
||||||
|
|
||||||
@property BOOL automaticallyDownloadsUpdates;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Explicitly checks for updates and displays a progress dialog while doing so.
|
|
||||||
|
|
||||||
This method is meant for a main menu item.
|
|
||||||
Connect any menu item to this action in Interface Builder,
|
|
||||||
and Sparkle will check for updates and report back its findings verbosely
|
|
||||||
when it is invoked.
|
|
||||||
*/
|
*/
|
||||||
- (IBAction)checkForUpdates:(id)sender;
|
- (IBAction)checkForUpdates:(id)sender;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Checks for updates, but does not display any UI unless an update is found.
|
The menu item validation used for the -checkForUpdates: action
|
||||||
|
*/
|
||||||
|
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem;
|
||||||
|
|
||||||
This is meant for programmatically initating a check for updates. That is,
|
/*!
|
||||||
it will display no UI unless it actually finds an update, in which case it
|
Checks for updates, but does not display any UI unless an update is found.
|
||||||
proceeds as usual.
|
|
||||||
|
|
||||||
If the fully automated updating is turned on, however, this will invoke that
|
This is meant for programmatically initating a check for updates. That is,
|
||||||
behavior, and if an update is found, it will be downloaded and prepped for
|
it will display no UI unless it actually finds an update, in which case it
|
||||||
installation.
|
proceeds as usual.
|
||||||
|
|
||||||
|
If automatic downloading of updates it turned on and allowed, however,
|
||||||
|
this will invoke that behavior, and if an update is found, it will be downloaded
|
||||||
|
in the background silently and will be prepped for installation.
|
||||||
|
|
||||||
|
This will not find updates that the user has opted into skipping.
|
||||||
*/
|
*/
|
||||||
- (void)checkForUpdatesInBackground;
|
- (void)checkForUpdatesInBackground;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A property indicating whether or not to check for updates automatically.
|
||||||
|
|
||||||
|
Setting this property will persist in the host bundle's user defaults.
|
||||||
|
The update schedule cycle will be reset in a short delay after the property's new value is set.
|
||||||
|
This is to allow reverting this property without kicking off a schedule change immediately
|
||||||
|
*/
|
||||||
|
@property BOOL automaticallyChecksForUpdates;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A property indicating whether or not updates can be automatically downloaded in the background.
|
||||||
|
|
||||||
|
Note that automatic downloading of updates can be disallowed by the developer
|
||||||
|
or by the user's system if silent updates cannot be done (eg: if they require authentication).
|
||||||
|
In this case, -automaticallyDownloadsUpdates will return NO regardless of how this property is set.
|
||||||
|
|
||||||
|
Setting this property will persist in the host bundle's user defaults.
|
||||||
|
*/
|
||||||
|
@property BOOL automaticallyDownloadsUpdates;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A property indicating the current automatic update check interval.
|
||||||
|
|
||||||
|
Setting this property will persist in the host bundle's user defaults.
|
||||||
|
The update schedule cycle will be reset in a short delay after the property's new value is set.
|
||||||
|
This is to allow reverting this property without kicking off a schedule change immediately
|
||||||
|
*/
|
||||||
|
@property NSTimeInterval updateCheckInterval;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Begins a "probing" check for updates which will not actually offer to
|
||||||
|
update to that version.
|
||||||
|
|
||||||
|
However, the delegate methods
|
||||||
|
SUUpdaterDelegate::updater:didFindValidUpdate: and
|
||||||
|
SUUpdaterDelegate::updaterDidNotFindUpdate: will be called,
|
||||||
|
so you can use that information in your UI.
|
||||||
|
|
||||||
|
Updates that have been skipped by the user will not be found.
|
||||||
|
*/
|
||||||
|
- (void)checkForUpdateInformation;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The URL of the appcast used to download update information.
|
||||||
|
|
||||||
|
Setting this property will persist in the host bundle's user defaults.
|
||||||
|
If you don't want persistence, you may want to consider instead implementing
|
||||||
|
SUUpdaterDelegate::feedURLStringForUpdater: or SUUpdaterDelegate::feedParametersForUpdater:sendingSystemProfile:
|
||||||
|
|
||||||
|
This property must be called on the main thread.
|
||||||
|
*/
|
||||||
|
@property (copy) NSURL *feedURL;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The host bundle that is being updated.
|
||||||
|
*/
|
||||||
|
@property (readonly, strong) NSBundle *hostBundle;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The bundle this class (SUUpdater) is loaded into.
|
||||||
|
*/
|
||||||
|
@property (strong, readonly) NSBundle *sparkleBundle;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The user agent used when checking for updates.
|
||||||
|
|
||||||
|
The default implementation can be overrided.
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *userAgentString;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
The HTTP headers used when checking for updates.
|
||||||
|
|
||||||
|
The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString)
|
||||||
|
*/
|
||||||
|
@property (copy) NSDictionary *httpHeaders;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A property indicating whether or not the user's system profile information is sent when checking for updates.
|
||||||
|
|
||||||
|
Setting this property will persist in the host bundle's user defaults.
|
||||||
|
*/
|
||||||
|
@property BOOL sendsSystemProfile;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A property indicating the decryption password used for extracting updates shipped as Apple Disk Images (dmg)
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *decryptionPassword;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Checks for updates and, if available, immediately downloads and installs them.
|
Checks for updates and, if available, immediately downloads and installs them.
|
||||||
A progress dialog is shown but the user will never be prompted to read the
|
A progress dialog is shown but the user will never be prompted to read the
|
||||||
release notes.
|
release notes.
|
||||||
|
|
||||||
You may want to respond to the userDidCancelDownload delegate method in case
|
You may want to respond to the userDidCancelDownload delegate method in case
|
||||||
the user clicks the "Cancel" button while the update is downloading.
|
the user clicks the "Cancel" button while the update is downloading.
|
||||||
|
|
||||||
|
If you are writing a UI-less background application, you probably want to instead use
|
||||||
|
SUUpdaterDelegate::updater:willInstallUpdateOnQuit:immediateInstallationInvocation:
|
||||||
*/
|
*/
|
||||||
- (void)installUpdatesIfAvailable;
|
- (void)installUpdatesIfAvailable;
|
||||||
|
|
||||||
@@ -94,17 +194,6 @@ SU_EXPORT @interface SUUpdater : NSObject
|
|||||||
*/
|
*/
|
||||||
@property (readonly, copy) NSDate *lastUpdateCheckDate;
|
@property (readonly, copy) NSDate *lastUpdateCheckDate;
|
||||||
|
|
||||||
/*!
|
|
||||||
Begins a "probing" check for updates which will not actually offer to
|
|
||||||
update to that version.
|
|
||||||
|
|
||||||
However, the delegate methods
|
|
||||||
SUUpdaterDelegate::updater:didFindValidUpdate: and
|
|
||||||
SUUpdaterDelegate::updaterDidNotFindUpdate: will be called,
|
|
||||||
so you can use that information in your UI.
|
|
||||||
*/
|
|
||||||
- (void)checkForUpdateInformation;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Appropriately schedules or cancels the update checking timer according to
|
Appropriately schedules or cancels the update checking timer according to
|
||||||
the preferences for time interval and automatic checks.
|
the preferences for time interval and automatic checks.
|
||||||
@@ -114,6 +203,12 @@ SU_EXPORT @interface SUUpdater : NSObject
|
|||||||
*/
|
*/
|
||||||
- (void)resetUpdateCycle;
|
- (void)resetUpdateCycle;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
A property indicating whether or not an update is in progress.
|
||||||
|
|
||||||
|
Note this property is not indicative of whether or not user initiated updates can be performed.
|
||||||
|
Use SUUpdater::validateMenuItem: for that instead.
|
||||||
|
*/
|
||||||
@property (readonly) BOOL updateInProgress;
|
@property (readonly) BOOL updateInProgress;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -170,6 +265,9 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
|||||||
|
|
||||||
Override this to dynamically specify the entire URL.
|
Override this to dynamically specify the entire URL.
|
||||||
|
|
||||||
|
An alternative may be to use SUUpdaterDelegate::feedParametersForUpdater:sendingSystemProfile:
|
||||||
|
and let the server handle what kind of feed to provide.
|
||||||
|
|
||||||
\param updater The SUUpdater instance.
|
\param updater The SUUpdater instance.
|
||||||
*/
|
*/
|
||||||
- (NSString *)feedURLStringForUpdater:(SUUpdater *)updater;
|
- (NSString *)feedURLStringForUpdater:(SUUpdater *)updater;
|
||||||
@@ -261,7 +359,7 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
|||||||
|
|
||||||
\param updater The SUUpdater instance.
|
\param updater The SUUpdater instance.
|
||||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||||
\param invocation The invocation that must be completed before continuing with the relaunch.
|
\param invocation The invocation that must be completed with `[invocation invoke]` before continuing with the relaunch.
|
||||||
|
|
||||||
\return \c YES to delay the relaunch until \p invocation is invoked.
|
\return \c YES to delay the relaunch until \p invocation is invoked.
|
||||||
*/
|
*/
|
||||||
@@ -336,6 +434,8 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Called when an update is scheduled to be silently installed on quit.
|
Called when an update is scheduled to be silently installed on quit.
|
||||||
|
This is after an update has been automatically downloaded in the background.
|
||||||
|
(i.e. SUUpdater::automaticallyDownloadsUpdates is YES)
|
||||||
|
|
||||||
\param updater The SUUpdater instance.
|
\param updater The SUUpdater instance.
|
||||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
|||||||
- (void)updateDriverDidFinish:(NSNotification *)note;
|
- (void)updateDriverDidFinish:(NSNotification *)note;
|
||||||
@property (readonly, copy) NSURL *parameterizedFeedURL;
|
@property (readonly, copy) NSURL *parameterizedFeedURL;
|
||||||
|
|
||||||
- (void)notifyWillShowModalAlert;
|
|
||||||
- (void)notifyDidShowModalAlert;
|
|
||||||
|
|
||||||
@property (strong) SUUpdateDriver *driver;
|
@property (strong) SUUpdateDriver *driver;
|
||||||
@property (strong) SUHost *host;
|
@property (strong) SUHost *host;
|
||||||
|
|
||||||
@@ -57,10 +54,20 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
|||||||
@synthesize driver;
|
@synthesize driver;
|
||||||
@synthesize host;
|
@synthesize host;
|
||||||
@synthesize sparkleBundle;
|
@synthesize sparkleBundle;
|
||||||
|
@synthesize decryptionPassword;
|
||||||
|
|
||||||
static NSMutableDictionary *sharedUpdaters = nil;
|
static NSMutableDictionary *sharedUpdaters = nil;
|
||||||
static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext";
|
static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext";
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
+ (void)load
|
||||||
|
{
|
||||||
|
// Debug builds have different configurations for update check intervals
|
||||||
|
// We're using NSLog instead of SULog here because we don't want to start Sparkle's logger here
|
||||||
|
NSLog(@"WARNING: This is running a Debug build of Sparkle; don't use this in production!");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
+ (SUUpdater *)sharedUpdater
|
+ (SUUpdater *)sharedUpdater
|
||||||
{
|
{
|
||||||
return [self updaterForBundle:[NSBundle mainBundle]];
|
return [self updaterForBundle:[NSBundle mainBundle]];
|
||||||
@@ -70,7 +77,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle
|
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle
|
||||||
{
|
{
|
||||||
if (bundle == nil) bundle = [NSBundle mainBundle];
|
if (bundle == nil) bundle = [NSBundle mainBundle];
|
||||||
id updater = sharedUpdaters[[NSValue valueWithNonretainedObject:bundle]];
|
id updater = [sharedUpdaters objectForKey:[NSValue valueWithNonretainedObject:bundle]];
|
||||||
if (updater == nil) {
|
if (updater == nil) {
|
||||||
updater = [[[self class] alloc] initForBundle:bundle];
|
updater = [[[self class] alloc] initForBundle:bundle];
|
||||||
}
|
}
|
||||||
@@ -95,7 +102,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
[self registerAsObserver];
|
[self registerAsObserver];
|
||||||
}
|
}
|
||||||
|
|
||||||
id updater = sharedUpdaters[[NSValue valueWithNonretainedObject:bundle]];
|
id updater = [sharedUpdaters objectForKey:[NSValue valueWithNonretainedObject:bundle]];
|
||||||
if (updater)
|
if (updater)
|
||||||
{
|
{
|
||||||
self = updater;
|
self = updater;
|
||||||
@@ -105,38 +112,64 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
if (sharedUpdaters == nil) {
|
if (sharedUpdaters == nil) {
|
||||||
sharedUpdaters = [[NSMutableDictionary alloc] init];
|
sharedUpdaters = [[NSMutableDictionary alloc] init];
|
||||||
}
|
}
|
||||||
sharedUpdaters[[NSValue valueWithNonretainedObject:bundle]] = self;
|
[sharedUpdaters setObject:self forKey:[NSValue valueWithNonretainedObject:bundle]];
|
||||||
host = [[SUHost alloc] initWithBundle:bundle];
|
host = [[SUHost alloc] initWithBundle:bundle];
|
||||||
|
|
||||||
// Saving-the-developer-from-a-stupid-mistake-check:
|
|
||||||
BOOL hasPublicDSAKey = [host publicDSAKey] != nil;
|
|
||||||
BOOL isMainBundle = [bundle isEqualTo:[NSBundle mainBundle]];
|
|
||||||
BOOL hostIsCodeSigned = [SUCodeSigningVerifier hostApplicationIsCodeSigned];
|
|
||||||
BOOL servingOverHttps = [[[[self feedURL] scheme] lowercaseString] isEqualToString:@"https"];
|
|
||||||
if (!isMainBundle && !hasPublicDSAKey) {
|
|
||||||
[self notifyWillShowModalAlert];
|
|
||||||
NSAlert *alert = [[NSAlert alloc] init];
|
|
||||||
alert.messageText = @"Insecure update error!";
|
|
||||||
alert.informativeText = @"For security reasons, you need to sign your updates with a DSA key. See Sparkle's documentation for more information.";
|
|
||||||
[alert runModal];
|
|
||||||
[self notifyDidShowModalAlert];
|
|
||||||
} else if (isMainBundle && !(hasPublicDSAKey || hostIsCodeSigned)) {
|
|
||||||
[self notifyWillShowModalAlert];
|
|
||||||
NSAlert *alert = [[NSAlert alloc] init];
|
|
||||||
alert.messageText = @"Insecure update error!";
|
|
||||||
alert.informativeText = @"For security reasons, you need to code sign your application or sign your updates with a DSA key. See Sparkle's documentation for more information.";
|
|
||||||
[alert runModal];
|
|
||||||
[self notifyDidShowModalAlert];
|
|
||||||
} else if (isMainBundle && !hasPublicDSAKey && !servingOverHttps) {
|
|
||||||
SULog(@"WARNING: Serving updates over http without signing them with a DSA key is deprecated and may not be possible in a future release. Please serve your updates over https, or sign them with a DSA key, or do both. See Sparkle's documentation for more information.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// This runs the permission prompt if needed, but never before the app has finished launching because the runloop won't run before that
|
// This runs the permission prompt if needed, but never before the app has finished launching because the runloop won't run before that
|
||||||
[self performSelector:@selector(startUpdateCycle) withObject:nil afterDelay:0];
|
[self performSelector:@selector(startUpdateCycle) withObject:nil afterDelay:0];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)showAlertText:(NSString *)text informativeText:(NSString *)informativeText {
|
||||||
|
NSAlert *alert = [[NSAlert alloc] init];
|
||||||
|
alert.messageText = text;
|
||||||
|
alert.informativeText = informativeText;
|
||||||
|
[self.driver showAlert:alert];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)checkIfConfiguredProperly {
|
||||||
|
BOOL hasPublicDSAKey = [self.host publicDSAKey] != nil;
|
||||||
|
BOOL isMainBundle = [self.host.bundle isEqualTo:[NSBundle mainBundle]];
|
||||||
|
BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:self.host.bundle.bundleURL];
|
||||||
|
NSURL *feedURL = [self feedURL];
|
||||||
|
BOOL servingOverHttps = [[[feedURL scheme] lowercaseString] isEqualToString:@"https"];
|
||||||
|
|
||||||
|
if (!hasPublicDSAKey) {
|
||||||
|
// If we failed to retrieve a DSA key but the bundle specifies a path to one, we should consider this a configuration failure
|
||||||
|
NSString *publicDSAKeyFileKey = [self.host publicDSAKeyFileKey];
|
||||||
|
if (publicDSAKeyFileKey != nil) {
|
||||||
|
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||||
|
informativeText:[NSString stringWithFormat:SULocalizedString(@"For security reasons, the file (%@) indicated by the '%@' key needs to exist in the bundle's Resources.", nil), publicDSAKeyFileKey, SUPublicDSAKeyFileKey]];
|
||||||
|
} else {
|
||||||
|
if (!isMainBundle) {
|
||||||
|
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||||
|
informativeText:SULocalizedString(@"For security reasons, you need to sign your updates with a DSA key. See Sparkle's documentation for more information.", nil)];
|
||||||
|
} else {
|
||||||
|
if (!hostIsCodeSigned) {
|
||||||
|
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||||
|
informativeText:SULocalizedString(@"For security reasons, you need to code sign your application or sign your updates with a DSA key. See https://sparkle-project.org/documentation/ for more information.", nil)];
|
||||||
|
} else if (!servingOverHttps) {
|
||||||
|
[self showAlertText:SULocalizedString(@"Insecure update error!", nil)
|
||||||
|
informativeText:SULocalizedString(@"For security reasons, you need to serve your updates over HTTPS and/or sign your updates with a DSA key. See https://sparkle-project.org/documentation/ for more information.", nil)];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
|
||||||
|
if (!servingOverHttps) {
|
||||||
|
BOOL atsExceptionsExist = nil != [self.host objectForInfoDictionaryKey:@"NSAppTransportSecurity"];
|
||||||
|
if (isMainBundle && !atsExceptionsExist) {
|
||||||
|
[self showAlertText:SULocalizedString(@"Insecure feed URL is blocked in macOS 10.11", nil)
|
||||||
|
informativeText:[NSString stringWithFormat:SULocalizedString(@"You must change the feed URL (%@) to use HTTPS or disable App Transport Security.\n\nFor more information:\nhttps://sparkle-project.org/documentation/app-transport-security/", nil), [feedURL absoluteString]]];
|
||||||
|
} else if (!isMainBundle) {
|
||||||
|
SULog(@"WARNING: Serving updates over HTTP may be blocked in macOS 10.11. Please change the feed URL (%@) to use HTTPS. For more information:\nhttps://sparkle-project.org/documentation/app-transport-security/", feedURL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// This will be used when the updater is instantiated in a nib such as MainMenu
|
// This will be used when the updater is instantiated in a nib such as MainMenu
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
@@ -146,21 +179,6 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
|
|
||||||
- (NSString *)description { return [NSString stringWithFormat:@"%@ <%@, %@>", [self class], [self.host bundlePath], [self.host installationPath]]; }
|
- (NSString *)description { return [NSString stringWithFormat:@"%@ <%@, %@>", [self class], [self.host bundlePath], [self.host installationPath]]; }
|
||||||
|
|
||||||
|
|
||||||
- (void)notifyWillShowModalAlert
|
|
||||||
{
|
|
||||||
if ([self.delegate respondsToSelector:@selector(updaterWillShowModalAlert:)])
|
|
||||||
[self.delegate updaterWillShowModalAlert:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)notifyDidShowModalAlert
|
|
||||||
{
|
|
||||||
if ([self.delegate respondsToSelector:@selector(updaterDidShowModalAlert:)])
|
|
||||||
[self.delegate updaterDidShowModalAlert:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)startUpdateCycle
|
- (void)startUpdateCycle
|
||||||
{
|
{
|
||||||
BOOL shouldPrompt = NO;
|
BOOL shouldPrompt = NO;
|
||||||
@@ -211,6 +229,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
if ([note object] == self.driver && [self.driver finished])
|
if ([note object] == self.driver && [self.driver finished])
|
||||||
{
|
{
|
||||||
self.driver = nil;
|
self.driver = nil;
|
||||||
|
[self updateLastUpdateCheckDate];
|
||||||
[self scheduleNextUpdateCheck];
|
[self scheduleNextUpdateCheck];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -220,6 +239,13 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
return [self.host objectForUserDefaultsKey:SULastCheckTimeKey];
|
return [self.host objectForUserDefaultsKey:SULastCheckTimeKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateLastUpdateCheckDate
|
||||||
|
{
|
||||||
|
[self willChangeValueForKey:@"lastUpdateCheckDate"];
|
||||||
|
[self.host setObject:[NSDate date] forUserDefaultsKey:SULastCheckTimeKey];
|
||||||
|
[self didChangeValueForKey:@"lastUpdateCheckDate"];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)scheduleNextUpdateCheck
|
- (void)scheduleNextUpdateCheck
|
||||||
{
|
{
|
||||||
if (self.checkTimer)
|
if (self.checkTimer)
|
||||||
@@ -245,76 +271,14 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO]; // Timer is non-repeating, may have invalidated itself, so we had to retain it.
|
self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO]; // Timer is non-repeating, may have invalidated itself, so we had to retain it.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)putFeedURLIntoDictionary:(NSMutableDictionary *)theDict // You release this.
|
|
||||||
{
|
|
||||||
theDict[@"feedURL"] = [self feedURL];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)checkForUpdatesInBgReachabilityCheckWithDriver:(SUUpdateDriver *)inDriver /* RUNS ON ITS OWN THREAD */
|
|
||||||
{
|
|
||||||
@try {
|
|
||||||
// This method *must* be called on its own thread. SCNetworkReachabilityCheckByName
|
|
||||||
// can block, and it can be waiting a long time on slow networks, and we
|
|
||||||
// wouldn't want to beachball the main thread for a background operation.
|
|
||||||
// We could use asynchronous reachability callbacks, but those aren't
|
|
||||||
// reliable enough and can 'get lost' sometimes, which we don't want.
|
|
||||||
|
|
||||||
@autoreleasepool {
|
|
||||||
SCNetworkConnectionFlags flags = 0;
|
|
||||||
BOOL isNetworkReachable = YES;
|
|
||||||
|
|
||||||
// Don't perform automatic checks on unconnected laptops or dial-up connections that aren't online:
|
|
||||||
NSMutableDictionary *theDict = [NSMutableDictionary dictionary];
|
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
||||||
[self putFeedURLIntoDictionary:theDict]; // Get feed URL on main thread, it's not safe to call elsewhere.
|
|
||||||
});
|
|
||||||
|
|
||||||
const char *hostname = [[(NSURL *)theDict[@"feedURL"] host] cStringUsingEncoding:NSUTF8StringEncoding];
|
|
||||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, hostname);
|
|
||||||
Boolean reachabilityResult = NO;
|
|
||||||
// If the feed's using a file:// URL, we won't be able to use reachability.
|
|
||||||
if (reachability != NULL) {
|
|
||||||
SCNetworkReachabilityGetFlags(reachability, &flags);
|
|
||||||
CFRelease(reachability);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( reachabilityResult )
|
|
||||||
{
|
|
||||||
BOOL reachable = (flags & kSCNetworkFlagsReachable) == kSCNetworkFlagsReachable;
|
|
||||||
BOOL automatic = (flags & kSCNetworkFlagsConnectionAutomatic) == kSCNetworkFlagsConnectionAutomatic;
|
|
||||||
BOOL local = (flags & kSCNetworkFlagsIsLocalAddress) == kSCNetworkFlagsIsLocalAddress;
|
|
||||||
|
|
||||||
if (!(reachable || automatic || local))
|
|
||||||
isNetworkReachable = NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the network's not reachable, we pass a nil driver into checkForUpdatesWithDriver, which will then reschedule the next update so we try again later.
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
[self checkForUpdatesWithDriver: isNetworkReachable ? inDriver : nil];
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
} @catch (NSException *localException) {
|
|
||||||
SULog(@"UNCAUGHT EXCEPTION IN UPDATE CHECK TIMER: %@", [localException reason]);
|
|
||||||
// Don't propagate the exception beyond here. In Carbon apps that would trash the stack.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)checkForUpdatesInBackground
|
- (void)checkForUpdatesInBackground
|
||||||
{
|
{
|
||||||
// Background update checks should only happen if we have a network connection.
|
// Do not use reachability for a preflight check. This can be deceptive and a bad idea. Apple does not recommend doing it.
|
||||||
// Wouldn't want to annoy users on dial-up by establishing a connection every
|
|
||||||
// hour or so:
|
|
||||||
SUUpdateDriver *theUpdateDriver = [[([self automaticallyDownloadsUpdates] ? [SUAutomaticUpdateDriver class] : [SUScheduledUpdateDriver class])alloc] initWithUpdater:self];
|
SUUpdateDriver *theUpdateDriver = [[([self automaticallyDownloadsUpdates] ? [SUAutomaticUpdateDriver class] : [SUScheduledUpdateDriver class])alloc] initWithUpdater:self];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
[self checkForUpdatesWithDriver:theUpdateDriver];
|
||||||
[self checkForUpdatesInBgReachabilityCheckWithDriver:theUpdateDriver];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (BOOL)mayUpdateAndRestart
|
- (BOOL)mayUpdateAndRestart
|
||||||
{
|
{
|
||||||
return (!self.delegate || ![self.delegate respondsToSelector:@selector(updaterShouldRelaunchApplication:)] || [self.delegate updaterShouldRelaunchApplication:self]);
|
return (!self.delegate || ![self.delegate respondsToSelector:@selector(updaterShouldRelaunchApplication:)] || [self.delegate updaterShouldRelaunchApplication:self]);
|
||||||
@@ -350,9 +314,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
if ([self updateInProgress]) { return; }
|
if ([self updateInProgress]) { return; }
|
||||||
if (self.checkTimer) { [self.checkTimer invalidate]; self.checkTimer = nil; } // Timer is non-repeating, may have invalidated itself, so we had to retain it.
|
if (self.checkTimer) { [self.checkTimer invalidate]; self.checkTimer = nil; } // Timer is non-repeating, may have invalidated itself, so we had to retain it.
|
||||||
|
|
||||||
[self willChangeValueForKey:@"lastUpdateCheckDate"];
|
[self updateLastUpdateCheckDate];
|
||||||
[self.host setObject:[NSDate date] forUserDefaultsKey:SULastCheckTimeKey];
|
|
||||||
[self didChangeValueForKey:@"lastUpdateCheckDate"];
|
|
||||||
|
|
||||||
if( [self.delegate respondsToSelector: @selector(updaterMayCheckForUpdates:)] && ![self.delegate updaterMayCheckForUpdates: self] )
|
if( [self.delegate respondsToSelector: @selector(updaterMayCheckForUpdates:)] && ![self.delegate updaterMayCheckForUpdates: self] )
|
||||||
{
|
{
|
||||||
@@ -369,6 +331,8 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[self checkIfConfiguredProperly];
|
||||||
|
|
||||||
NSURL *theFeedURL = [self parameterizedFeedURL];
|
NSURL *theFeedURL = [self parameterizedFeedURL];
|
||||||
if (theFeedURL) // Use a NIL URL to cancel quietly.
|
if (theFeedURL) // Use a NIL URL to cancel quietly.
|
||||||
[self.driver checkForUpdatesAtURL:theFeedURL host:self.host];
|
[self.driver checkForUpdatesAtURL:theFeedURL host:self.host];
|
||||||
@@ -534,7 +498,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
// Build up the parameterized URL.
|
// Build up the parameterized URL.
|
||||||
NSMutableArray *parameterStrings = [NSMutableArray array];
|
NSMutableArray *parameterStrings = [NSMutableArray array];
|
||||||
for (NSDictionary *currentProfileInfo in parameters) {
|
for (NSDictionary *currentProfileInfo in parameters) {
|
||||||
[parameterStrings addObject:[NSString stringWithFormat:@"%@=%@", [[currentProfileInfo[@"key"] description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], [[currentProfileInfo[@"value"] description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
|
[parameterStrings addObject:[NSString stringWithFormat:@"%@=%@", [[[currentProfileInfo objectForKey:@"key"] description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], [[[currentProfileInfo objectForKey:@"value"] description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *separatorCharacter = @"?";
|
NSString *separatorCharacter = @"?";
|
||||||
@@ -578,7 +542,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
|||||||
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||||
{
|
{
|
||||||
if ([item action] == @selector(checkForUpdates:)) {
|
if ([item action] == @selector(checkForUpdates:)) {
|
||||||
return ![self updateInProgress];
|
return ![self updateInProgress] || [self.driver isInterruptible];
|
||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui
|
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui
|
||||||
{
|
{
|
||||||
// We don't check to see if this update's been skipped, because the user explicitly *asked* if he had the latest version.
|
// We don't check to see if this update's been skipped, because the user explicitly *asked* if he had the latest version.
|
||||||
return [self hostSupportsItem:ui] && [self isItemNewer:ui];
|
return [[self class] hostSupportsItem:ui] && [self isItemNewer:ui];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -9,7 +9,11 @@
|
|||||||
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
||||||
#define SUVERSIONCOMPARISONPROTOCOL_H
|
#define SUVERSIONCOMPARISONPROTOCOL_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Cocoa;
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -6,7 +6,11 @@
|
|||||||
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Cocoa;
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
#import "SUExport.h"
|
#import "SUExport.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -9,7 +9,11 @@
|
|||||||
#ifndef SPARKLE_H
|
#ifndef SPARKLE_H
|
||||||
#define SPARKLE_H
|
#define SPARKLE_H
|
||||||
|
|
||||||
|
#if __has_feature(modules)
|
||||||
|
@import Cocoa;
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
|
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
|
||||||
// there are name-space collisions) so we can list all of them to start with:
|
// there are name-space collisions) so we can list all of them to start with:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<constraint firstAttribute="height" priority="800" constant="64" id="aXh-vN-k5u"/>
|
<constraint firstAttribute="height" priority="800" constant="64" id="aXh-vN-k5u"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
<animations/>
|
||||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSApplicationIcon" id="168"/>
|
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="168"/>
|
||||||
<connections>
|
<connections>
|
||||||
<binding destination="-2" name="value" keyPath="applicationIcon" id="9"/>
|
<binding destination="-2" name="value" keyPath="applicationIcon" id="9"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9046" systemVersion="15C27e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9046"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="SUAutomaticUpdateAlert">
|
<customObject id="-2" userLabel="File's Owner" customClass="SUAutomaticUpdateAlert">
|
||||||
@@ -24,7 +24,6 @@
|
|||||||
<imageView id="7">
|
<imageView id="7">
|
||||||
<rect key="frame" x="23" y="73" width="64" height="64"/>
|
<rect key="frame" x="23" y="73" width="64" height="64"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<animations/>
|
|
||||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSApplicationIcon" id="38"/>
|
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSApplicationIcon" id="38"/>
|
||||||
<connections>
|
<connections>
|
||||||
<binding destination="-2" name="value" keyPath="applicationIcon" id="10"/>
|
<binding destination="-2" name="value" keyPath="applicationIcon" id="10"/>
|
||||||
@@ -33,7 +32,6 @@
|
|||||||
<textField verticalHuggingPriority="750" id="8">
|
<textField verticalHuggingPriority="750" id="8">
|
||||||
<rect key="frame" x="105" y="120" width="497" height="17"/>
|
<rect key="frame" x="105" y="120" width="497" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<animations/>
|
|
||||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="39">
|
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="39">
|
||||||
<font key="font" metaFont="systemBold"/>
|
<font key="font" metaFont="systemBold"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -46,7 +44,6 @@
|
|||||||
<textField verticalHuggingPriority="750" id="9">
|
<textField verticalHuggingPriority="750" id="9">
|
||||||
<rect key="frame" x="105" y="81" width="497" height="31"/>
|
<rect key="frame" x="105" y="81" width="497" height="31"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<animations/>
|
|
||||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="40">
|
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="40">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -57,10 +54,9 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
<button verticalHuggingPriority="750" id="15">
|
<button verticalHuggingPriority="750" id="15">
|
||||||
<rect key="frame" x="435" y="12" width="167" height="32"/>
|
<rect key="frame" x="399" y="12" width="211" height="32"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
|
||||||
<animations/>
|
<buttonCell key="cell" type="push" title="Nainstalovat a znovu spustit" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="41">
|
||||||
<buttonCell key="cell" type="push" title="Nainstalovat, znovu spustit" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="41">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<string key="keyEquivalent" base64-UTF8="YES">
|
<string key="keyEquivalent" base64-UTF8="YES">
|
||||||
@@ -71,11 +67,32 @@ DQ
|
|||||||
<action selector="installNow:" target="-2" id="33"/>
|
<action selector="installNow:" target="-2" id="33"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
|
<button verticalHuggingPriority="750" id="30">
|
||||||
|
<rect key="frame" x="102" y="12" width="116" height="32"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<buttonCell key="cell" type="push" title="Neinstalovat" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="44">
|
||||||
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="doNotInstall:" target="-2" id="35"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button id="17">
|
||||||
|
<rect key="frame" x="105" y="58" width="493" height="18"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<buttonCell key="cell" type="check" title="V budoucnu kopírovat a instalovat aktualizace automaticky" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="43">
|
||||||
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
<font key="font" metaFont="smallSystem"/>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<binding destination="18" name="value" keyPath="values.SUAutomaticallyUpdate" id="19"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
<button verticalHuggingPriority="750" id="16">
|
<button verticalHuggingPriority="750" id="16">
|
||||||
<rect key="frame" x="306" y="12" width="129" height="32"/>
|
<rect key="frame" x="239" y="12" width="168" height="32"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
|
||||||
<animations/>
|
<buttonCell key="cell" type="push" title="Nainstalovat a ukončit" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="42">
|
||||||
<buttonCell key="cell" type="push" title="Nainstalovat, ukončit" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="42">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<string key="keyEquivalent" base64-UTF8="YES">
|
<string key="keyEquivalent" base64-UTF8="YES">
|
||||||
@@ -86,32 +103,7 @@ Gw
|
|||||||
<action selector="installLater:" target="-2" id="34"/>
|
<action selector="installLater:" target="-2" id="34"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<button verticalHuggingPriority="750" id="30">
|
|
||||||
<rect key="frame" x="102" y="12" width="116" height="32"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
<animations/>
|
|
||||||
<buttonCell key="cell" type="push" title="Neinstalovat" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="44">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
</buttonCell>
|
|
||||||
<connections>
|
|
||||||
<action selector="doNotInstall:" target="-2" id="35"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
<button id="17">
|
|
||||||
<rect key="frame" x="105" y="58" width="619" height="18"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
<animations/>
|
|
||||||
<buttonCell key="cell" type="check" title="V budoucnosti kopírovat a instalovat aktualizace automaticky" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="43">
|
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
|
||||||
<font key="font" metaFont="smallSystem"/>
|
|
||||||
</buttonCell>
|
|
||||||
<connections>
|
|
||||||
<binding destination="18" name="value" keyPath="values.SUAutomaticallyUpdate" id="19"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
<animations/>
|
|
||||||
</view>
|
</view>
|
||||||
</window>
|
</window>
|
||||||
<userDefaultsController representsSharedInstance="YES" id="18" userLabel="Shared Defaults"/>
|
<userDefaultsController representsSharedInstance="YES" id="18" userLabel="Shared Defaults"/>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9046" systemVersion="15C27e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9046"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
|
||||||
<plugIn identifier="com.apple.WebKitIBPlugin" version="9046"/>
|
<plugIn identifier="com.apple.WebKitIBPlugin" version="9532"/>
|
||||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||||
<capability name="box content view" minToolsVersion="7.0"/>
|
<capability name="box content view" minToolsVersion="7.0"/>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="746" y="229" width="620" height="370"/>
|
<rect key="contentRect" x="746" y="229" width="620" height="370"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1366" height="745"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||||
<value key="minSize" type="size" width="550" height="150"/>
|
<value key="minSize" type="size" width="550" height="150"/>
|
||||||
<value key="maxSize" type="size" width="700" height="600"/>
|
<value key="maxSize" type="size" width="700" height="600"/>
|
||||||
<view key="contentView" id="6">
|
<view key="contentView" id="6">
|
||||||
@@ -40,8 +40,7 @@
|
|||||||
<constraint firstAttribute="width" priority="800" constant="64" id="QhW-E9-8Br"/>
|
<constraint firstAttribute="width" priority="800" constant="64" id="QhW-E9-8Br"/>
|
||||||
<constraint firstAttribute="height" priority="800" constant="64" id="aXh-vN-k5u"/>
|
<constraint firstAttribute="height" priority="800" constant="64" id="aXh-vN-k5u"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="168"/>
|
||||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSApplicationIcon" id="168"/>
|
|
||||||
<connections>
|
<connections>
|
||||||
<binding destination="-2" name="value" keyPath="applicationIcon" id="9"/>
|
<binding destination="-2" name="value" keyPath="applicationIcon" id="9"/>
|
||||||
</connections>
|
</connections>
|
||||||
@@ -51,7 +50,6 @@
|
|||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" priority="777" constant="17" id="n8w-DR-XEM"/>
|
<constraint firstAttribute="height" priority="777" constant="17" id="n8w-DR-XEM"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" usesSingleLineMode="YES" id="169">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" usesSingleLineMode="YES" id="169">
|
||||||
<font key="font" metaFont="systemBold"/>
|
<font key="font" metaFont="systemBold"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -61,13 +59,12 @@
|
|||||||
<binding destination="-2" name="value" keyPath="titleText" id="11"/>
|
<binding destination="-2" name="value" keyPath="titleText" id="11"/>
|
||||||
</connections>
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
<textField horizontalHuggingPriority="350" verticalHuggingPriority="999" horizontalCompressionResistancePriority="100" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="101" userLabel="Question text field">
|
<textField horizontalHuggingPriority="350" verticalHuggingPriority="999" horizontalCompressionResistancePriority="100" verticalCompressionResistancePriority="1000" preferredMaxLayoutWidth="490" translatesAutoresizingMaskIntoConstraints="NO" id="101" userLabel="Question text field">
|
||||||
<rect key="frame" x="106" y="316" width="494" height="14"/>
|
<rect key="frame" x="106" y="316" width="494" height="14"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" relation="lessThanOrEqual" priority="300" constant="28" id="H6E-te-Fog"/>
|
<constraint firstAttribute="height" relation="lessThanOrEqual" priority="300" constant="28" id="H6E-te-Fog"/>
|
||||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="14" id="KUO-Dw-g6s"/>
|
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="14" id="KUO-Dw-g6s"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
<textFieldCell key="cell" allowsUndo="NO" sendsActionOnEndEditing="YES" id="174">
|
<textFieldCell key="cell" allowsUndo="NO" sendsActionOnEndEditing="YES" id="174">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -88,7 +85,6 @@
|
|||||||
<subviews>
|
<subviews>
|
||||||
<webView maintainsBackForwardList="NO" translatesAutoresizingMaskIntoConstraints="NO" id="18">
|
<webView maintainsBackForwardList="NO" translatesAutoresizingMaskIntoConstraints="NO" id="18">
|
||||||
<rect key="frame" x="0.0" y="-2" width="492" height="214"/>
|
<rect key="frame" x="0.0" y="-2" width="492" height="214"/>
|
||||||
<animations/>
|
|
||||||
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" minimumFontSize="7" plugInsEnabled="NO" javaEnabled="NO" javaScriptCanOpenWindowsAutomatically="NO">
|
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" minimumFontSize="7" plugInsEnabled="NO" javaEnabled="NO" javaScriptCanOpenWindowsAutomatically="NO">
|
||||||
<nil key="identifier"/>
|
<nil key="identifier"/>
|
||||||
</webPreferences>
|
</webPreferences>
|
||||||
@@ -101,7 +97,6 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</webView>
|
</webView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<animations/>
|
|
||||||
</view>
|
</view>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="18" firstAttribute="top" secondItem="89" secondAttribute="top" constant="1" id="3ps-Yo-uZA"/>
|
<constraint firstItem="18" firstAttribute="top" secondItem="89" secondAttribute="top" constant="1" id="3ps-Yo-uZA"/>
|
||||||
@@ -110,7 +105,6 @@
|
|||||||
<constraint firstItem="18" firstAttribute="leading" secondItem="89" secondAttribute="leading" constant="1" id="kSE-Xj-CRB"/>
|
<constraint firstItem="18" firstAttribute="leading" secondItem="89" secondAttribute="leading" constant="1" id="kSE-Xj-CRB"/>
|
||||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="100" id="pvn-8k-9Ev"/>
|
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="100" id="pvn-8k-9Ev"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
||||||
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
<font key="titleFont" size="11" name="LucidaGrande"/>
|
<font key="titleFont" size="11" name="LucidaGrande"/>
|
||||||
@@ -127,7 +121,6 @@
|
|||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" priority="100" constant="100" id="gkn-FW-9aC"/>
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" priority="100" constant="100" id="gkn-FW-9aC"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" title="Poznámky k vydání:" usesSingleLineMode="YES" id="170">
|
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" title="Poznámky k vydání:" usesSingleLineMode="YES" id="170">
|
||||||
<font key="font" metaFont="smallSystemBold"/>
|
<font key="font" metaFont="smallSystemBold"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@@ -150,14 +143,12 @@
|
|||||||
<constraint firstItem="89" firstAttribute="leading" secondItem="fKC-QA-GZa" secondAttribute="leading" id="e5T-q1-kq1"/>
|
<constraint firstItem="89" firstAttribute="leading" secondItem="fKC-QA-GZa" secondAttribute="leading" id="e5T-q1-kq1"/>
|
||||||
<constraint firstItem="17" firstAttribute="leading" secondItem="fKC-QA-GZa" secondAttribute="leading" id="tFH-k0-O7I"/>
|
<constraint firstItem="17" firstAttribute="leading" secondItem="fKC-QA-GZa" secondAttribute="leading" id="tFH-k0-O7I"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
</customView>
|
</customView>
|
||||||
<button horizontalHuggingPriority="150" verticalHuggingPriority="750" horizontalCompressionResistancePriority="997" translatesAutoresizingMaskIntoConstraints="NO" id="22">
|
<button horizontalHuggingPriority="150" verticalHuggingPriority="750" horizontalCompressionResistancePriority="997" translatesAutoresizingMaskIntoConstraints="NO" id="22">
|
||||||
<rect key="frame" x="307" y="12" width="165" height="32"/>
|
<rect key="frame" x="307" y="12" width="165" height="32"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" priority="222" constant="90" id="2Zy-5G-GBj"/>
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" priority="222" constant="90" id="2Zy-5G-GBj"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
<buttonCell key="cell" type="push" title="Připomenout později" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="171">
|
<buttonCell key="cell" type="push" title="Připomenout později" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="171">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -171,7 +162,6 @@ Gw
|
|||||||
</button>
|
</button>
|
||||||
<button verticalHuggingPriority="750" horizontalCompressionResistancePriority="998" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
<button verticalHuggingPriority="750" horizontalCompressionResistancePriority="998" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
||||||
<rect key="frame" x="103" y="12" width="157" height="32"/>
|
<rect key="frame" x="103" y="12" width="157" height="32"/>
|
||||||
<animations/>
|
|
||||||
<buttonCell key="cell" type="push" title="Přeskočit tuto verzi" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="172">
|
<buttonCell key="cell" type="push" title="Přeskočit tuto verzi" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="172">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -185,7 +175,6 @@ Gw
|
|||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" priority="222" constant="120" id="N94-uf-6oP"/>
|
<constraint firstAttribute="width" relation="greaterThanOrEqual" priority="222" constant="120" id="N94-uf-6oP"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
<buttonCell key="cell" type="push" title="Nainstalovat" bezelStyle="rounded" alignment="center" state="on" borderStyle="border" inset="2" id="173">
|
<buttonCell key="cell" type="push" title="Nainstalovat" bezelStyle="rounded" alignment="center" state="on" borderStyle="border" inset="2" id="173">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@@ -203,8 +192,7 @@ DQ
|
|||||||
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="28" id="0AI-ue-a0r"/>
|
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="28" id="0AI-ue-a0r"/>
|
||||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="14" id="yM1-TA-HfP"/>
|
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="14" id="yM1-TA-HfP"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
<buttonCell key="cell" type="check" title="V budoucnu kopírovat a instalovat aktualizace automaticky" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="175">
|
||||||
<buttonCell key="cell" type="check" title="V budoucnosti kopírovat a instalovat aktualizace automaticky" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="175">
|
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
</buttonCell>
|
</buttonCell>
|
||||||
@@ -246,7 +234,6 @@ DQ
|
|||||||
<constraint firstAttribute="trailing" secondItem="117" secondAttribute="trailing" constant="21" id="sHI-Hm-eSA"/>
|
<constraint firstAttribute="trailing" secondItem="117" secondAttribute="trailing" constant="21" id="sHI-Hm-eSA"/>
|
||||||
<constraint firstItem="7" firstAttribute="leading" secondItem="6" secondAttribute="leading" constant="22" id="zSE-lw-Ggj"/>
|
<constraint firstItem="7" firstAttribute="leading" secondItem="6" secondAttribute="leading" constant="22" id="zSE-lw-Ggj"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<animations/>
|
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="-2" id="50"/>
|
<outlet property="delegate" destination="-2" id="50"/>
|
||||||
|
|||||||