Compare commits

...
Author SHA1 Message Date
Sam Deane 8d26709fe8 Updated to the 1.10.0 tag from the sparkle-project.
Merge commit '9646b0b7907235c4fdec44aaba652a7db25047af' into develop

Conflicts:
	.gitignore
	Configurations/ConfigCommon.xcconfig
	Configurations/ConfigFrameworkRelease.xcconfig
	README.markdown
	SUAppcastItem.h
	SUBasicUpdateDriver.m
	SUBinaryDeltaCommon.m
	SUCodeSigningVerifier.m
	SUHost.m
	SUPipedUnarchiver.m
	SUPlainInstallerInternals.m
	SUStatusController.m
	SUUIBasedUpdateDriver.m
	Sparkle.xcodeproj/project.pbxproj
	Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle (Release).xcscheme
	finish_installation.m
	th.lproj/Sparkle.strings
2015-05-28 10:41:56 +01:00
Sam Deane f16d3b2db0 Fix for warning introduced by XC6.3 2015-02-10 11:55:03 +00:00
Sam Deane 01685649ee XC6.3 update 2015-02-10 11:39:49 +00:00
Sam Deane be836bea5a XC6.1 update 2014-11-18 12:53:59 +00:00
Sam Deane d4f947cafc enabled Skip Install to avoid a warning when archiving 2014-09-01 12:59:21 +01:00
Sam Deane 8e25f9bd7f xc6 updates 2014-07-25 11:33:52 +01:00
Sam Deane 65b4f7a476 Merge branch 'better-code-signature-logging' into sketch 2014-06-17 19:33:24 +01:00
Sam Deane 2c0b8b9696 Another 32-bit fix. 2014-06-17 19:33:08 +01:00
Sam Deane 51e10eb445 Merge branch 'better-code-signature-logging' into sketch 2014-06-17 19:29:30 +01:00
Sam Deane b98c5fe47d Use old syntax because we're still supporting a 32-bit build. 2014-06-17 19:28:43 +01:00
Sam Deane 779599b40d If the downloaded update fails the code signing check, log out some more detailed information to help with diagnosing the problem. 2014-06-17 15:27:44 +01:00
Sam Deane fb04d0aaf6 XC6 update 2014-06-13 12:30:27 +01:00
Sam Deane df327bb8b1 XC6 updates 2014-06-12 16:09:50 +01:00
Sam Deane e759c10252 Merge branch 'master' of github.com:andymatuschak/Sparkle 2014-01-27 09:56:36 +00:00
Andy Matuschak f832c27bf9 Added warning that this fork is not being actively maintained. 2013-12-31 18:27:29 -08:00
Sam Deane ee5710d296 use lldb - I suspect that XC5.1 forced this change since I didn’t do anything... 2013-11-22 12:11:16 +00:00
Sam Deane 39f644590b Enable sandboxing for the test app. 2013-11-22 12:04:50 +00:00
Sam Deane c4e4d39796 Added a scheme for the test app. 2013-11-22 11:52:18 +00:00
Sam Deane dda7c35b17 Include XPC service with test app, and sign both it and the embedded Sparkle framework. 2013-11-22 11:51:58 +00:00
Sam Deane af0a3ba4a7 Sign the test app. 2013-11-22 11:50:56 +00:00
Sam Deane 2b261600e0 XC5.1 update 2013-11-19 21:01:23 +00:00
Sam Deane fcc5a0bf93 Merge branch 'sandboxing' of github.com:blackpixel/Sparkle into sandboxing
Conflicts:
	Sparkle.xcodeproj/project.pbxproj
	Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle (Release).xcscheme
2013-11-19 20:17:17 +00:00
Sam Deane a494f5bcd1 Merge branch 'master' of github.com:andymatuschak/Sparkle into sandboxing 2013-11-19 20:05:51 +00:00
Sam Deane a47cd57394 XC5.1 upgrade check 2013-11-19 20:05:34 +00:00
Michael Gorbach c4a4f52d9d Get rid of Sparkle’s custom binary stripping settings, since they were causing trouble with repeated compilations generating errors. Instead, we can rely on NNW’s Copy Phase for the Sparkle framework to strip symbols as needed. 2013-11-08 11:47:55 -05:00
Michael Gorbach 22b85fba6e Get rid of weird debugging configs. 2013-11-08 11:44:07 -05:00
Michael Gorbach 307a4bca74 Clarify the scheme names as building Debug and Release configs for running. 2013-11-08 11:43:46 -05:00
Rick Fillion 1c6a781cde Manually importing changes done when Sparkle was a source copy in
NetNewsWire:
- Minor project changes
- Fixes for the XPC stuff to be more stable under 10.7
2013-11-08 09:20:27 -05:00
Rick Fillion 323232566d Merge remote-tracking branch 'tumult/master' into sandboxing
Conflicts:
	SUStandardVersionComparator.m
	Sparkle.xcodeproj/project.pbxproj
2013-08-01 10:53:43 -04:00
Sam Deane ad5988399b XC5 automatic project update. 2013-07-12 12:53:38 +01:00
Sam Deane 90e07bcefa Fixed warnings. 2013-07-12 12:53:14 +01:00
Sam Deane 4b0e4ef2ca Merge branch 'sandboxing' of github.com:samdeane/Sparkle into sandboxing 2013-06-11 19:00:29 +01:00
Sam Deane a4d53c3454 Xcode 5 upgrade check. 2013-06-11 18:59:51 +01:00
Ryan Nielsen 91e54fdbdd Merge remote-tracking branch 'samdeane/sandboxing'
Merge in the most recent changes from Sam's branch

Conflicts:
	SUPipedUnarchiver.m
	SUUIBasedUpdateDriver.m
2013-04-01 21:59:53 -07:00
Ryan Nielsen cd60df74f0 Silence Xcode and clang analyzer warnings for everythign except GC and nib warnings 2013-04-01 21:53:01 -07:00
Ryan Nielsen f08a4a255e Merge remote-tracking branch 'liyanage/master' 2013-04-01 21:35:38 -07:00
Ryan Nielsen 2f65259f50 Merge remote-tracking branch 'samdeane/master'
Sam Deane's branch seems to be the most up-to-date and well
curated fork on GitHub at the moment.

Conflicts:
	SUHost.m
2013-04-01 21:23:06 -07:00
Patrick Burleson 0ffdc854ce Merge commit 'ea50a33b46ceeef19b92534a29cc8d3463f67b23' into sandbox-merge
Merging in Sam Dean's sandboxing branch which contains the work to get Sparkle to work with sandboxing done by several folks in this pull request thread: https://github.com/andymatuschak/Sparkle/pull/165

Resolved with changes from upstream
2013-03-21 14:55:24 -05:00
Marc Liyanage 3fddd63329 Reorder variable initialization to satisfy stricter compiler. 2013-03-12 22:57:39 -07:00
Sam Deane ea50a33b46 A bit of Xcode project tidying (I didn't touch it, so presumably Xcode just did it…) 2013-03-08 14:05:32 +00:00
Sam Deane 678b08c153 Use @rpath as the install path. 2013-03-08 13:56:52 +00:00
Sam Deane 965d386bff Merge branch 'master' of https://github.com/andymatuschak/Sparkle into sandboxing
Conflicts:
	.gitignore
	Sparkle.xcodeproj/project.pbxproj
	Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme
2013-02-08 15:11:37 +00:00
Sam Deane 4e4012b31f Xcode 4.6 project updates. 2013-02-08 14:49:10 +00:00
Sam Deane b221fca031 Fixed security warning for a non-constant format string. 2013-02-08 14:48:47 +00:00
Sam Deane 77dad94c55 Merge branch 'master' of git://github.com/tumult/Sparkle into sandboxing 2013-02-08 14:43:29 +00:00
Doug Russell 130efeda04 Disable turkish localization because xcode believes it is corrupted 2013-01-28 16:05:19 -08:00
Doug Russell b007f21f7d Get xcode to shut up 2013-01-28 14:05:00 -08:00
Doug Russell 161adc2946 using NSInteger instead of int 2013-01-28 12:20:25 -08:00
Doug Russell 0f1e30955e Merge branch 'refs/heads/sparkle-upstream'
Conflicts:
	SUPipedUnarchiver.m
	th.lproj/Sparkle.strings
2013-01-28 12:08:06 -08:00
Doug Russell adebca38ba Fix for un-initialized variable error 2013-01-28 11:53:47 -08:00
Patrick Burleson dbc9c5c1c2 Fix Warnings and copy resource errors 2012-12-03 21:05:04 -06:00
Patrick Burleson 298e1a1e4c Revert "Updates to Turkish localization courtesy Emir Sarı"
This reverts commit 38eb63a7a2.
2012-12-03 20:55:09 -06:00
Ryan Nielsen 9c912bf8ba Address fallout from 56aa598e2e
Needed to fix some bundle copy steps and restore explicit UTF-16
parsing to address some Xcode warnings.
2012-11-05 21:53:00 -08:00
Ryan Nielsen 512f9d7165 Set JoinExistingSession to YES
Intended to do this on the last commit…
2012-11-05 20:25:27 -08:00
Ryan Nielsen 82eaa63db2 Set the blessed key that keeps pboxd from appearing in the Dock along side our app
If SandboxService.plist doesn't have JoinExistingSession as YES
in the XPCService dictionary, the XPC service will instantiate
its own security session, separate from the app. While this seems
inoccous, it may lead to subtle (or, in our case, not so subtle)
problems. In our case, as a sandboxed NSDocument based app, pboxd
is instantiated on launch. When our app is in a different
security session – as it would be without this key – the Dock
actually shows pboxd running alongside our app, looking like our
app. Effectively, the user sees two copies of our app but one
seems totally broken. Setting JoinExistingSession to YES makes
everyone happy.
2012-11-05 19:09:06 -08:00
Ryan Nielsen 56aa598e2e Removed and re-added strings files
I continually get errors along the lines of "failed to remove
<string file path>: “Sparkle.strings” couldn’t be removed." The
internets suggest removing and re-adding the files "fixes" this
issue, so I did… and, yes, things seem to always build, now. Have
no clue what this really tweaked, but I'm just happy the errors
seem to have disappeared.
2012-11-05 14:20:20 -08:00
Ryan Nielsen 05fb66beae Remove useless build flag that's not understood by modern clang 2012-11-02 11:56:40 -07:00
Ryan Nielsen 56056ba95c XPC service only needs to build x86_64 2012-10-31 17:24:31 -07:00
Ryan Nielsen 3a71f25062 Build dSYM for XPC service 2012-10-31 15:13:17 -07:00
Ryan Nielsen 08be9202ad Merge current TOT from upstream 2012-10-31 15:09:46 -07:00
Ryan Nielsen ced3a44a28 Merge in changes for sandboxing and XPC
Pull request here: https://github.com/andymatuschak/Sparkle/pull/165
Changes here: https://github.com/wbyoung/Sparkle/commit/dbd2b9b30aad66296fab5cf9b980bf02020fa71a
2012-10-31 14:59:20 -07:00
Sam Deane a0c93c4da5 Merge remote-tracking branch 'wbyoung/master' into sandboxing 2012-07-04 22:13:48 +01:00
Sam Deane 9c9fddd5ec Merge branch 'master' of https://github.com/andymatuschak/Sparkle into integration 2012-07-04 19:05:58 +01:00
Sam Deane 39546b8e03 xcode 4.4 project settings update 2012-04-26 10:37:21 +01:00
Sam Deane 805a5ac66a fixes for warnings thrown up by xcode 4.4 / llvm 2012-04-26 10:20:41 +01:00
Sam Deane 5be6ba2c62 Removed -fsingle-precision-constant flag which LLVM doesn't recognise 2012-04-26 10:19:38 +01:00
Sam Deane 53ea1ffe73 Updated project settings. 2012-04-22 13:36:56 +01:00
Sam Deane cd8f2ec4c9 Merged latest from Andy's branch 2012-04-22 13:32:35 +01:00
Whitney Young dbd2b9b30a Added an XPC service to deal with sandboxing.
This fixes #163. It requires that you copy the XPC service into your main application bundle in
Contents/XPCServices and runs the remove from quarantine step of copying the finish_installation
app as well as launching finish_installation app outside of the sandbox. Sparkle will function
exactly as it does now for applications that do not copy the XPC service into their application
bundle.
2012-03-20 10:01:21 -05:00
Jonathan Deutsch b4acf16d34 Changes for Hype 2011-12-25 16:46:29 -08:00
Sam Deane e162094aec added xc4 workspace 2011-03-02 17:58:26 +00:00
Sam Deane 6efb28485d added xc4 workspace 2011-03-02 17:58:04 +00:00
Sam Deane da4ca66497 project update caused by opening in XC4 I think 2011-03-02 17:57:51 +00:00
Sam Deane 3be2aee60c changed default SDK to the current one
fixed non-literal format string warning
2011-03-02 17:56:54 +00:00
16 changed files with 507 additions and 1 deletions

No files matched your search

@@ -1,2 +1,3 @@
#include "ConfigFramework.xcconfig"
+5
View File
@@ -0,0 +1,5 @@
// Sandbox Service only
PRODUCT_NAME = com.andymatuschak.Sparkle.SandboxService
WRAPPER_EXTENSION = xpc
MACH_O_TYPE = mh_execute
@@ -0,0 +1,5 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonDebug.xcconfig"
#include "ConfigService.xcconfig"
OTHER_CFLAGS = -fsingle-precision-constant -DDEBUG
@@ -0,0 +1,3 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonRelease.xcconfig"
#include "ConfigService.xcconfig"
+16
View File
@@ -0,0 +1,16 @@
//
// SUXPC.h
// Sparkle
//
// Created by Whitney Young on 3/19/12.
// Copyright (c) 2012 FadingRed. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SUXPC : NSObject
+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)tmp error:(NSError **)error;
+ (void)launchTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
@end
+72
View File
@@ -0,0 +1,72 @@
//
// SUXPC.m
// Sparkle
//
// Created by Whitney Young on 3/19/12.
// Copyright (c) 2012 FadingRed. All rights reserved.
//
#import <xpc/xpc.h>
#import "SUXPC.h"
@implementation SUXPC
+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)tmp error:(NSError **)error {
xpc_connection_t connection = xpc_connection_create("com.andymatuschak.Sparkle.SandboxService", NULL);
xpc_connection_set_event_handler(connection, ^(xpc_object_t event) {
xpc_dictionary_apply(event, ^bool(const char *key, xpc_object_t value) {
NSLog(@"Sparkle Copy XPC %s: %s", key, xpc_string_get_string_ptr(value));
return true;
});
});
xpc_connection_resume(connection);
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
xpc_dictionary_set_string(message, "id", "copy_path");
if( src )
xpc_dictionary_set_string(message, "source", [src fileSystemRepresentation]);
if( dst )
xpc_dictionary_set_string(message, "destination", [dst fileSystemRepresentation]);
if( tmp )
xpc_dictionary_set_string(message, "tmp", [tmp UTF8String]);
xpc_object_t response = xpc_connection_send_message_with_reply_sync(connection, message);
xpc_type_t type = xpc_get_type(response);
return type == XPC_TYPE_DICTIONARY;
}
+ (void)launchTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments {
xpc_connection_t connection = xpc_connection_create("com.andymatuschak.Sparkle.SandboxService", NULL);
xpc_connection_set_event_handler(connection, ^(xpc_object_t event) {
xpc_dictionary_apply(event, ^bool(const char *key, xpc_object_t value) {
NSLog(@"Sparkle Launch XPC %s: %s", key, xpc_string_get_string_ptr(value));
return true;
});
});
xpc_connection_resume(connection);
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
xpc_dictionary_set_string(message, "id", "launch_task");
if( path )
xpc_dictionary_set_string(message, "path", [path fileSystemRepresentation]);
xpc_object_t array = xpc_array_create(NULL, 0);
for (id argument in arguments) {
xpc_array_append_value(array, xpc_string_create([argument UTF8String]));
}
xpc_dictionary_set_value(message, "arguments", array);
xpc_object_t response = xpc_connection_send_message_with_reply_sync(connection, message);
xpc_type_t type = xpc_get_type(response);
BOOL success = (type == XPC_TYPE_DICTIONARY);
if (!success) {
NSLog(@"XPC launch error");
}
}
@end
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>XPCService</key>
<dict>
<key>ServiceType</key>
<string>Application</string>
<key>JoinExistingSession</key>
<true/>
</dict>
</dict>
</plist>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "Sparkle.framework"
BlueprintName = "Sparkle"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "612279D80DB5470200AB99EA"
BuildableName = "Sparkle Unit Tests.xctest"
BlueprintName = "Sparkle Unit Tests"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "Sparkle.framework"
BlueprintName = "Sparkle"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "61B5F90109C4CEE200B25A18"
BuildableName = "Sparkle Test App.app"
BlueprintName = "Sparkle Test App"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "61B5F90109C4CEE200B25A18"
BuildableName = "Sparkle Test App.app"
BlueprintName = "Sparkle Test App"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "61B5F90109C4CEE200B25A18"
BuildableName = "Sparkle Test App.app"
BlueprintName = "Sparkle Test App"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "61B5F90109C4CEE200B25A18"
BuildableName = "Sparkle Test App.app"
BlueprintName = "Sparkle Test App"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+2
View File
@@ -50,6 +50,8 @@
- (void)abortUpdateWithError:(NSError *)error;
- (void)terminateApp;
- (void)appcastDidFinishLoading:(SUAppcast *)ac;
@end
#endif
-1
View File
@@ -20,7 +20,6 @@
- (void)showModalAlert:(NSAlert *)alert;
- (IBAction)cancelDownload:(id)sender;
- (void)installAndRestart:(id)sender;
- (void)appcastDidFinishLoading:(SUAppcast *)ac;
@end
+1
View File
@@ -9,6 +9,7 @@
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import "SUConstants.h"
#import "SUErrors.h"
+93
View File
@@ -0,0 +1,93 @@
//
// main.m
// Update
//
// Created by Whitney Young on 3/19/12.
// Copyright (c) 2012 FadingRed. All rights reserved.
//
#include <xpc/xpc.h>
#include <Foundation/Foundation.h>
#import "SUPlainInstallerInternals.h"
static void peer_event_handler(xpc_connection_t peer, xpc_object_t event)
{
xpc_type_t type = xpc_get_type(event);
if (type == XPC_TYPE_ERROR) {
if (event == XPC_ERROR_CONNECTION_INVALID) {
// The client process on the other end of the connection has either
// crashed or cancelled the connection. After receiving this error,
// the connection is in an invalid state, and you do not need to
// call xpc_connection_cancel(). Just tear down any associated state
// here.
} else if (event == XPC_ERROR_TERMINATION_IMMINENT) {
// Handle per-connection termination cleanup.
}
} else {
assert(type == XPC_TYPE_DICTIONARY);
// Handle the message.
const char *identifier = xpc_dictionary_get_string(event, "id");
BOOL copyPath = strcmp(identifier, "copy_path") == 0;
BOOL launchTask = strcmp(identifier, "launch_task") == 0;
if( copyPath )
{
const char *src = xpc_dictionary_get_string(event, "source");
const char *dst = xpc_dictionary_get_string(event, "destination");
const char *tmp = xpc_dictionary_get_string(event, "tmp");
NSFileManager *manager = [NSFileManager defaultManager];
NSString *relaunchPathToCopy = src ? [manager stringWithFileSystemRepresentation:src length:strlen(src)] : nil;
NSString *targetPath = dst ? [manager stringWithFileSystemRepresentation:dst length:strlen(dst)] : nil;
NSString *temporaryName = tmp ? [NSString stringWithUTF8String:tmp] : nil;
NSError *error = nil;
[SUPlainInstaller copyPathWithAuthentication: relaunchPathToCopy overPath: targetPath temporaryName: temporaryName error: &error];
// send response to indicate ok
xpc_object_t reply = xpc_dictionary_create_reply(event);
xpc_connection_send_message(peer, reply);
}
else if( launchTask )
{
const char *path = xpc_dictionary_get_string(event, "path");
xpc_object_t array = xpc_dictionary_get_value(event, "arguments");
NSFileManager *manager = [NSFileManager defaultManager];
NSString *relaunchToolPath = path ? [manager stringWithFileSystemRepresentation:path length:strlen(path)] : nil;;
NSMutableArray *arguments = [NSMutableArray array];
for (size_t i = 0; i < xpc_array_get_count(array); i++) {
[arguments addObject:
[NSString stringWithUTF8String:xpc_array_get_string(array, i)]];
}
NSError *launchError = nil;
NSRunningApplication *runningApplication = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:relaunchToolPath] options:NSWorkspaceLaunchNewInstance configuration:@{NSWorkspaceLaunchConfigurationArguments:arguments} error:&launchError];
[runningApplication activateWithOptions:NSApplicationActivateIgnoringOtherApps];
// send response to indicate ok
xpc_object_t reply = xpc_dictionary_create_reply(event);
xpc_connection_send_message(peer, reply);
}
}
}
static void event_handler(xpc_connection_t peer)
{
// By defaults, new connections will target the default dispatch
// concurrent queue.
xpc_connection_set_event_handler(peer, ^(xpc_object_t event) {
peer_event_handler(peer, event);
});
// This will tell the connection to begin listening for events. If you
// have some other initialization that must be done asynchronously, then
// you can defer this call until after that initialization is done.
xpc_connection_resume(peer);
}
int main(int argc, const char *argv[])
{
xpc_main(event_handler);
return 0;
}
+100
View File
@@ -0,0 +1,100 @@
/* No comment provided by engineer. */
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ ได้ถูกดาวน์โหลดและพร้อมใช้งานแล้ว คุณต้องการติดตั้งและเริ่ม %1$@ ใหม่เดี๋ยวนี้หรือไม่";
/* No comment provided by engineer. */
"%1$@ can't be updated when it's running from a read-only volume like a disk image or an optical drive. Move %1$@ to your Applications folder, relaunch it from there, and try again." = "%1$@ ไม่สามารถรับการอัพเดทได้เมื่อถูกเรียกจากดิสก์แบบอ่านอย่างเดียวหรือซีดีรอม ย้าย %1$@ ไปยังโฟลเดอร์แอปพลิเคชัน และเรียกใช้งาน จากนั้นลองใหม่อีกครั้ง";
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available." = "%1$@ %2$@ เป็นเวอร์ชั่นใหม่ล่าสุดแล้ว";
/* No comment provided by engineer. */
"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ พร้อมให้ดาวน์โหลดแล้ว (คุณมีเวอร์ชั่น %3$@) ต้องการดาวน์โหลดเลยหรือไม่";
/* No comment provided by engineer. */
"%@ downloaded" = "ดาวน์โหลด %@ เสร็จสิ้น";
/* No comment provided by engineer. */
"%@ of %@" = "%1$@ จาก %2$@";
/* No comment provided by engineer. */
"A new version of %@ is available!" = "%@ มีเวอร์ชั่นใหม่!";
/* No comment provided by engineer. */
"A new version of %@ is ready to install!" = "เวอร์ชั่นใหม่ของ %@ พร้อมสำหรับการติดตั้งแล้ว";
/* No comment provided by engineer. */
"An error occurred in retrieving update information. Please try again later." = "เกิดข้อผิดพลาดระหว่างการรับข้อมูลอัพเดท กรุณาลองใหม่ในภายหลัง";
/* No comment provided by engineer. */
"An error occurred while downloading the update. Please try again later." = "เกิดข้อผิดพลาดระหว่างพยายามดาวน์โหลดอัพเดท กรุณาลองใหม่ในภายหลัง";
/* No comment provided by engineer. */
"An error occurred while extracting the archive. Please try again later." = "เกิดข้อผิดพลาดระหว่างการแตกไฟล์ที่ถูกบีบอัด กรุณาลองใหม่ในภายหลัง";
/* No comment provided by engineer. */
"An error occurred while installing the update. Please try again later." = "เกิดข้อผิดพลาดระหว่างการติดตั้งอัพเดท กรุณาลองใหม่ในภายหลัง";
/* No comment provided by engineer. */
"An error occurred while parsing the update feed." = "เกิดข้อผิดพลาดระหว่างการประมวลผลฟีดอัพเดท กรุณาลองใหม่ในภายหลัง";
/* No comment provided by engineer. */
"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "เกิดข้อผิดพลาดระหว่างการเริ่ม %1$@ ใหม่ อย่างไรก็ตามเวอร์ชั่นใหม่จะใช้ได้เมื่อคุณเรียก %1$@ ครั้งถัดไป";
/* the unit for bytes */
"B" = "B";
/* No comment provided by engineer. */
"Cancel" = "ยกเลิก";
/* No comment provided by engineer. */
"Cancel Update" = "ยกเลิกอัพเดท";
/* No comment provided by engineer. */
"Checking for updates..." = "ตรวจสอบอัพเดท…";
/* Take care not to overflow the status window. */
"Downloading update..." = "กำลังดาวน์โหลดอัพเดท…";
/* Take care not to overflow the status window. */
"Extracting update..." = "กำลังแตกไฟล์อัพเดท…";
/* the unit for gigabytes */
"GB" = "GB";
/* No comment provided by engineer. */
"Install and Relaunch" = "ติดตั้งและเริ่มแอปพลิเคชันใหม่";
/* Take care not to overflow the status window. */
"Installing update..." = "กำลังติดตั้งอัพเดท…";
/* the unit for kilobytes */
"KB" = "KB";
/* the unit for megabytes */
"MB" = "MB";
/* OK button. */
"OK" = "ตกลง";
/* Status message on progress window once download has finished. */
"Ready to Install" = "พร้อมติดตั้ง";
/* Message that is optionally shown at startup to allow users to turn on/off update checks. */
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "คุณต้องการให้ %1$@ ตรวจสอบอัพเดทโดยอัตโนมัติหรือไม่ คุณสามารถเริ่มการตรวจสอบอัพเดทด้วยตนเองได้ทุกเมื่อจากเมนูของ %1$@";
/* No comment provided by engineer. */
"Update Error!" = "อัพเดทผิดพลาด!";
/* No comment provided by engineer. */
"Updating %@" = "กำลังอัพเดท %@";
/* 'Error' message when the user checks for updates but is already current or the feed doesn't contain any updates. (not necessarily shown in UI) */
"You already have the newest version of %@." = "คุณมีเวอร์ชั่นล่าสุดของ %@ แล้ว";
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */
"You're up-to-date!" = "คุณมีเวอร์ชั่นล่าสุดแล้ว!";
/* Alternative name for "Install" button if we have a paid update or other update
without a download but with a URL. */
"Learn More..." = "เรียนรู้เพิ่มเติม…";