mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
- Broke out SUUpdater functionality into update drivers. There's a basic one from which everything else inherits, then a user-initiated one, an automatic one, and a scheduled one. It's super-clean-and-shiny. - Destroyed the abomination that was SUStatusChecker. In its place is SUProbingUpdateDriver, which is like 10 lines long. - Made automatic installation less stupid. It used to install, THEN offer to relaunch. That's dumb, beacuse if the user says no, the app is running from the trash. Now it offers to install and relaunch or to install on quit. - Renamed like every method and symbol. I hope you didn't branch anything. - Reorganized the project hierarchy to be much clearer and easier to navigate. - Reworked the error system to no use NSError instead of exceptions; extra technical information is now logged to the console so that we can find problems. - A bunch of other small bugfixes in things I noticed along the way but no longer remember. - Probably a ton of other stuff. Read over the code and see what I've done. Then PLEASE test this with your app internally and let me know how it goes. This revision is hereby NOT YET DECLARED SAFE FOR PUBLIC RELEASE. But because I'm still using SVN, this is how things have to be.
54 lines
2.1 KiB
Objective-C
54 lines
2.1 KiB
Objective-C
//
|
|
// NSFileManager+ExtendedAttributes.h
|
|
// Sparkle
|
|
//
|
|
// Created by Mark Mentovai on 2008-01-22.
|
|
// Copyright 2008 Mark Mentovai. All rights reserved.
|
|
//
|
|
|
|
#ifndef NSFILEMANAGER_PLUS_EXTENDEDATTRIBUTES
|
|
#define NSFILEMANAGER_PLUS_EXTENDEDATTRIBUTES
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
@interface NSFileManager (ExtendedAttributes)
|
|
|
|
// Wraps the removexattr system call, allowing an AppKit-style NSString* to
|
|
// be used for the pathname argument. Note that the order of the arguments
|
|
// has changed from what removexattr accepts, so that code reads more
|
|
// naturally.
|
|
//
|
|
// removexattr is only available on Mac OS X 10.4 ("Tiger") and later. If
|
|
// built with an SDK that includes removexattr, this method will link against
|
|
// removexattr directly. When using earlier SDKs, this method will dynamically
|
|
// look up the removexattr symbol at runtime. If the symbol is not present,
|
|
// as will be the case when running on 10.3, this method returns -1 and sets
|
|
// errno to ENOSYS.
|
|
- (int)removeXAttr:(const char*)name
|
|
fromFile:(NSString*)file
|
|
options:(int)options;
|
|
|
|
// Removes the directory tree rooted at |root| from the file quarantine.
|
|
// The quarantine was introduced on Mac OS X 10.5 and is described at:
|
|
//
|
|
// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html
|
|
//#apple_ref/doc/uid/TP40001369-DontLinkElementID_2
|
|
//
|
|
// If |root| is not a directory, then it alone is removed from the quarantine.
|
|
// Symbolic links, including |root| if it is a symbolic link, will not be
|
|
// traversed.
|
|
//
|
|
// Ordinarily, the quarantine is managed by calling LSSetItemAttribute
|
|
// to set the kLSItemQuarantineProperties attribute to a dictionary specifying
|
|
// the quarantine properties to be applied. However, it does not appear to be
|
|
// possible to remove an item from the quarantine directly through any public
|
|
// Launch Services calls. Instead, this method takes advantage of the fact
|
|
// that the quarantine is implemented in part by setting an extended attribute,
|
|
// "com.apple.quarantine", on affected files. Removing this attribute is
|
|
// sufficient to remove files from the quarantine.
|
|
- (void)releaseFromQuarantine:(NSString*)root;
|
|
|
|
@end
|
|
|
|
#endif
|