mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Change Autoupdate target from app to command line tool
This commit is contained in:
1 parent
66e3083e0c
commit
dd02cb2509
51 files changed
+330
-400
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -60,6 +60,7 @@
|
||||
|
||||
- (BOOL)performThirdStage:(NSError * __autoreleasing *)error
|
||||
{
|
||||
#warning this probably shouldn't be part of file manager anymore
|
||||
return [self.fileManager executePackageAtURL:[NSURL fileURLWithPath:self.packagePath] error:error];
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,5 @@
|
||||
// Relaunch Tool only
|
||||
|
||||
INFOPLIST_FILE = Sparkle/Autoupdate/Autoupdate-Info.plist
|
||||
PRODUCT_NAME = $(SPARKLE_RELAUNCH_TOOL_NAME)
|
||||
SKIP_INSTALL = YES
|
||||
CLANG_ENABLE_MODULES = NO
|
||||
@@ -22,23 +22,14 @@
|
||||
|
||||
NSError *quarantineError = nil;
|
||||
if (![fileManager releaseItemFromQuarantineAtRootURL:installerURL error:&quarantineError]) {
|
||||
// This may or may not be a fatal error depending on if the process is sandboxed or not
|
||||
// Probably not a fatal error because we are submitting the executable through launchd
|
||||
SULog(@"Failed to release quarantine on installer at %@ with error %@", installerPath, quarantineError);
|
||||
}
|
||||
|
||||
NSString *executablePath = [[NSBundle bundleWithURL:installerURL] executablePath];
|
||||
assert(executablePath != nil);
|
||||
|
||||
NSError *ownershipError = nil;
|
||||
if (![fileManager changeOwnerAndGroupOfItemAtRootURL:[NSURL fileURLWithPath:executablePath] toMatchURL:installerURL error:&ownershipError]) {
|
||||
// This may or may not be a fatal error
|
||||
SULog(@"Failed to change ownership on installer executable at %@ with error %@", executablePath, ownershipError);
|
||||
}
|
||||
|
||||
NSString *hostBundleIdentifier = hostBundle.bundleIdentifier;
|
||||
assert(hostBundleIdentifier != nil);
|
||||
|
||||
NSArray<NSString *> *arguments = @[executablePath, hostBundleIdentifier, @(allowingInteraction).stringValue];
|
||||
NSArray<NSString *> *arguments = @[installerPath, hostBundleIdentifier, @(allowingInteraction).stringValue];
|
||||
|
||||
AuthorizationRef auth = NULL;
|
||||
OSStatus createStatus = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &auth);
|
||||
|
||||
+325
-354
File diff suppressed because it is too large.
Load diff
-32
@@ -1,32 +0,0 @@
|
||||
<?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>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<key>LSBackgroundOnly</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>LSUIElement</key>
|
||||
<string>1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Vendored
+1
-1
@@ -376,7 +376,7 @@
|
||||
// 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.
|
||||
NSError *relaunchError = nil;
|
||||
NSString *relaunchToolPath = [self copyPathToCacheDirectory:[self.sparkleBundle pathForResource:@""SPARKLE_RELAUNCH_TOOL_NAME ofType:@"app"] error:&relaunchError];
|
||||
NSString *relaunchToolPath = [self copyPathToCacheDirectory:[self.sparkleBundle pathForResource:@""SPARKLE_RELAUNCH_TOOL_NAME ofType:@""] error:&relaunchError];
|
||||
if (relaunchToolPath == nil) {
|
||||
completionHandler(relaunchError);
|
||||
return;
|
||||
|
||||
Vendored
+1
-1
@@ -49,7 +49,7 @@ BOOL SUNeedsSystemAuthorizationAccess(NSString *path, BOOL guided, BOOL * _Nulla
|
||||
} else if (guided) {
|
||||
result = YES;
|
||||
} else {
|
||||
#pragma what about symbolic links?
|
||||
#warning what about symbolic links?
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
result = ![fileManager isWritableFileAtPath:path] || ![fileManager isWritableFileAtPath:[path stringByDeletingLastPathComponent]];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user