summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/English.lproj/MainWindow.xib72
-rw-r--r--macosx/HBChapterTitlesController.m2
-rw-r--r--macosx/HBController.m93
-rw-r--r--macosx/HBCore.m54
-rw-r--r--macosx/HBDistributedArray.m18
-rw-r--r--macosx/HBJob+HBJobConversion.m4
-rw-r--r--macosx/HBJob+UIAdditions.m4
-rw-r--r--macosx/HBJob.h16
-rw-r--r--macosx/HBJob.m180
-rw-r--r--macosx/HBJobOutputFileWriter.m33
-rw-r--r--macosx/HBPreferencesController.m3
-rw-r--r--macosx/HBPreviewGenerator.m3
-rw-r--r--macosx/HBQueueController.m34
-rw-r--r--macosx/HBUtilities.h5
-rw-r--r--macosx/HBUtilities.m52
-rw-r--r--macosx/HandBrake.entitlements26
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj505
-rw-r--r--macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG-SANDBOX].xcscheme118
-rw-r--r--macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme6
-rw-r--r--macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE-SANDBOX].xcscheme118
-rw-r--r--macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme9
-rw-r--r--macosx/HandBrakeKitTests/HBJobTests.m6
-rw-r--r--macosx/container-migration.plist10
23 files changed, 1233 insertions, 138 deletions
diff --git a/macosx/English.lproj/MainWindow.xib b/macosx/English.lproj/MainWindow.xib
index 198ea7caa..fe73cb270 100644
--- a/macosx/English.lproj/MainWindow.xib
+++ b/macosx/English.lproj/MainWindow.xib
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D30a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
@@ -162,10 +162,10 @@
</binding>
</connections>
</textField>
- <textField verticalHuggingPriority="750" id="1552">
- <rect key="frame" x="5" y="454" width="47" height="17"/>
+ <textField verticalHuggingPriority="750" misplaced="YES" id="1552">
+ <rect key="frame" x="17" y="458" width="48" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="File:" id="4913">
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Save as:" id="4913">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@@ -244,23 +244,6 @@
<binding destination="-2" name="content" keyPath="self.job.containers" id="aNr-1N-DaN"/>
</connections>
</popUpButton>
- <button toolTip="Browse to select a new destination path and file name for your encode." verticalHuggingPriority="750" id="1562">
- <rect key="frame" x="815" y="450" width="90" height="28"/>
- <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
- <buttonCell key="cell" type="push" title="Browse…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="4920">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="smallSystem"/>
- </buttonCell>
- <accessibility description="Browse Destination"/>
- <connections>
- <action selector="browseDestination:" target="-2" id="FqS-ZD-MaJ"/>
- <binding destination="-2" name="enabled" keyPath="self.job" id="uGd-Ul-eBq">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSIsNotNil</string>
- </dictionary>
- </binding>
- </connections>
- </button>
<box verticalHuggingPriority="750" boxType="separator" id="1623">
<rect key="frame" x="98" y="490" width="802" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
@@ -277,8 +260,8 @@
<accessibilityConnection property="title" destination="1538" id="rra-Xj-yD0"/>
</connections>
</textField>
- <textField toolTip="Destination path, including directory and file name. This is where your new video will be created, and what it will be named." verticalHuggingPriority="750" id="1561">
- <rect key="frame" x="56" y="455" width="756" height="19"/>
+ <textField toolTip="File name. This is what your new video will be named." verticalHuggingPriority="750" misplaced="YES" id="1561">
+ <rect key="frame" x="71" y="455" width="395" height="19"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" continuous="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="4919">
<font key="font" metaFont="smallSystem"/>
@@ -292,10 +275,9 @@
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
- <binding destination="-2" name="value" keyPath="self.job.destURL" id="5zX-7b-Y0f">
+ <binding destination="-2" name="value" keyPath="self.job.outputFileName" id="cct-2d-Ycx">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
- <string key="NSValueTransformerName">HBURLTransformer</string>
</dictionary>
</binding>
</connections>
@@ -604,6 +586,46 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi
</binding>
</connections>
</popUpButton>
+ <pathControl verticalHuggingPriority="750" misplaced="YES" allowsExpansionToolTips="YES" id="PJi-21-hie">
+ <rect key="frame" x="523" y="455" width="311" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <pathCell key="cell" controlSize="small" selectable="YES" alignment="left" id="5Bk-66-HFW">
+ <font key="font" metaFont="smallSystem"/>
+ <url key="url" string="file://localhost/Applications/"/>
+ </pathCell>
+ <connections>
+ <binding destination="-2" name="value" keyPath="self.job.outputURL" id="FQU-UV-RCI"/>
+ </connections>
+ </pathControl>
+ <button toolTip="Browse to select a new destination path and file name for your encode." verticalHuggingPriority="750" misplaced="YES" id="1562">
+ <rect key="frame" x="831" y="450" width="74" height="28"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+ <buttonCell key="cell" type="push" title="Browse…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="4920">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="smallSystem"/>
+ </buttonCell>
+ <accessibility description="Browse Destination"/>
+ <connections>
+ <action selector="browseDestination:" target="-2" id="FqS-ZD-MaJ"/>
+ <binding destination="-2" name="enabled" keyPath="self.job" id="uGd-Ul-eBq">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSIsNotNil</string>
+ </dictionary>
+ </binding>
+ </connections>
+ </button>
+ <textField verticalHuggingPriority="750" misplaced="YES" id="gfs-4j-YSE">
+ <rect key="frame" x="477" y="458" width="40" height="14"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="To:" id="rfK-nQ-Aq2">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="textColor" keyPath="self.labelColor" id="dvP-fr-nOv"/>
+ </connections>
+ </textField>
</subviews>
</view>
<toolbar key="toolbar" implicitIdentifier="E92CA47A-01F7-432A-A61C-28FE4D58C2CD" explicitIdentifier="HBMainWindowToolbar" displayMode="iconAndLabel" sizeMode="regular" id="7g3-gy-bUl">
diff --git a/macosx/HBChapterTitlesController.m b/macosx/HBChapterTitlesController.m
index cedc1088a..4c40ad58a 100644
--- a/macosx/HBChapterTitlesController.m
+++ b/macosx/HBChapterTitlesController.m
@@ -288,7 +288,7 @@
NSSavePanel *panel = [NSSavePanel savePanel];
panel.allowedFileTypes = @[@"csv"];
panel.directoryURL = destinationDirectory;
- panel.nameFieldStringValue = self.job.destURL.lastPathComponent.stringByDeletingPathExtension;
+ panel.nameFieldStringValue = self.job.outputFileName.stringByDeletingPathExtension;
[panel beginSheetModalForWindow:self.view.window completionHandler:^(NSInteger result)
{
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 4a7605c61..2b44aa945 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -106,6 +106,9 @@
/// The current selected preset.
@property (nonatomic, strong) HBPreset *currentPreset;
+/// The current destination.
+@property (nonatomic, strong) NSURL *currentDestination;
+
/// Whether the job has been edited after a preset was applied.
@property (nonatomic) BOOL edited;
@@ -145,6 +148,27 @@
}
_scanSpecificTitleIdx = 1;
+
+ // Check to see if the last destination has been set, use if so, if not, use Movies
+#ifdef __SANDBOX_ENABLED__
+ NSData *bookmark = [[NSUserDefaults standardUserDefaults] objectForKey:@"HBLastDestinationDirectoryBookmark"];
+ if (bookmark)
+ {
+ _currentDestination = [HBUtilities URLFromBookmark:bookmark];
+ }
+#else
+ _currentDestination = [[NSUserDefaults standardUserDefaults] URLForKey:@"HBLastDestinationDirectoryURL"];
+#endif
+
+ if (!_currentDestination)
+ {
+ _currentDestination = [NSURL fileURLWithPath:[NSSearchPathForDirectoriesInDomains(NSMoviesDirectory, NSUserDomainMask, YES) firstObject]
+ isDirectory:YES];
+ }
+
+#ifdef __SANDBOX_ENABLED__
+ [_currentDestination startAccessingSecurityScopedResource];
+#endif
}
return self;
@@ -532,6 +556,8 @@
self.job = nil;
[fSrcTitlePopUp removeAllItems];
+ self.window.representedURL = nil;
+ self.window.title = NSLocalizedString(@"HandBrake", nil);
NSURL *mediaURL = [HBUtilities mediaURLFromURL:fileURL];
NSString *displayName = [HBUtilities displayNameForURL:fileURL];
@@ -587,12 +613,15 @@
{
for (HBTitle *title in self.core.titles)
{
- // Set Source Name at top of window with the browsedSourceDisplayName grokked right before -performScan
- fSrcDVD2Field.stringValue = displayName;
-
[fSrcTitlePopUp addItemWithTitle:title.description];
}
+ // Set Source Name at top of window with the browsedSourceDisplayName grokked right before -performScan
+ fSrcDVD2Field.stringValue = displayName;
+
+ self.window.representedURL = mediaURL;
+ self.window.title = mediaURL.lastPathComponent;
+
completionHandler(self.core.titles);
}
else
@@ -662,7 +691,8 @@
}
HBJob *job = [[HBJob alloc] initWithTitle:title andPreset:self.currentPreset];
- job.destURL = [HBUtilities destURLForJob:job];
+ job.outputURL = self.currentDestination;
+ job.outputFileName = [HBUtilities defaultNameForJob:job];
return job;
}
@@ -771,7 +801,8 @@
}
else
{
- sourceDirectory = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop"];
+ sourceDirectory = [NSURL fileURLWithPath:[NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES) firstObject]
+ isDirectory:YES];
}
[panel setDirectoryURL:sourceDirectory];
@@ -800,23 +831,29 @@
- (IBAction)browseDestination:(id)sender
{
// Open a panel to let the user choose and update the text field
- NSSavePanel *panel = [NSSavePanel savePanel];
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+ panel.canChooseFiles = NO;
+ panel.canChooseDirectories = YES;
+ panel.prompt = NSLocalizedString(@"Choose", nil);
- if (self.job.destURL)
+ if (self.job.outputURL)
{
- panel.directoryURL = self.job.destURL.URLByDeletingLastPathComponent;
- panel.nameFieldStringValue = self.job.destURL.lastPathComponent;
+ panel.directoryURL = self.job.outputURL;
}
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
{
if (result == NSFileHandlingPanelOKButton)
{
- self.job.destURL = panel.URL;
+ self.job.outputURL = panel.URL;
+ self.currentDestination = panel.URL;
// Save this path to the prefs so that on next browse destination window it opens there
- [[NSUserDefaults standardUserDefaults] setURL:panel.URL.URLByDeletingLastPathComponent
- forKey:@"HBLastDestinationDirectory"];
+ [[NSUserDefaults standardUserDefaults] setObject:[HBUtilities bookmarkFromURL:panel.URL]
+ forKey:@"HBLastDestinationDirectoryBookmark"];
+ [[NSUserDefaults standardUserDefaults] setURL:panel.URL
+ forKey:@"HBLastDestinationDirectoryURL"];
+
}
}];
}
@@ -856,8 +893,7 @@
NSString *fileName = [HBUtilities automaticNameForJob:self.job];
// Swap the old one with the new one
- self.job.destURL = [[self.job.destURL URLByDeletingLastPathComponent] URLByAppendingPathComponent:
- [NSString stringWithFormat:@"%@.%@", fileName, self.job.destURL.pathExtension]];
+ self.job.outputFileName = [NSString stringWithFormat:@"%@.%@", fileName, self.job.outputFileName.pathExtension];
}
}
@@ -866,9 +902,9 @@
if (self.job)
{
NSString *extension = [HBUtilities automaticExtForJob:self.job];
- if (![extension isEqualTo:self.job.destURL.pathExtension])
+ if (![extension isEqualTo:self.job.outputFileName.pathExtension])
{
- self.job.destURL = [[self.job.destURL URLByDeletingPathExtension] URLByAppendingPathExtension:extension];
+ self.job.outputFileName = [[self.job.outputFileName stringByDeletingPathExtension] stringByAppendingPathExtension:extension];
}
}
}
@@ -959,38 +995,36 @@
*/
- (void)runDestinationAlerts:(HBJob *)job didEndSelector:(SEL)didEndSelector
{
- NSString *destinationDirectory = job.destURL.path.stringByDeletingLastPathComponent;
-
- if ([[NSFileManager defaultManager] fileExistsAtPath:destinationDirectory] == 0)
+ if ([[NSFileManager defaultManager] fileExistsAtPath:job.outputURL.path] == 0)
{
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:NSLocalizedString(@"Warning!", @"")];
[alert setInformativeText:NSLocalizedString(@"This is not a valid destination directory!", @"")];
[alert beginSheetModalForWindow:self.window modalDelegate:self didEndSelector:didEndSelector contextInfo:NULL];
}
- else if ([job.fileURL isEqual:job.destURL])
+ else if ([job.fileURL isEqual:job.completeOutputURL])
{
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"")];
[alert setInformativeText:NSLocalizedString(@"The destination is the same as the source, you can not overwrite your source file!", @"")];
[alert beginSheetModalForWindow:self.window modalDelegate:self didEndSelector:didEndSelector contextInfo:NULL];
}
- else if ([[NSFileManager defaultManager] fileExistsAtPath:job.destURL.path])
+ else if ([[NSFileManager defaultManager] fileExistsAtPath:job.completeOutputURL.path])
{
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"")];
- [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @""), job.destURL.path]];
+ [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @""), job.completeOutputURL.path]];
[alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
[alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"")];
[alert setAlertStyle:NSCriticalAlertStyle];
[alert beginSheetModalForWindow:self.window modalDelegate:self didEndSelector:didEndSelector contextInfo:NULL];
}
- else if ([fQueueController jobExistAtURL:job.destURL])
+ else if ([fQueueController jobExistAtURL:job.completeOutputURL])
{
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:NSLocalizedString(@"There is already a queue item for this destination.", @"")];
- [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @""), job.destURL.path]];
+ [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @""), job.completeOutputURL.path]];
[alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
[alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"")];
[alert setAlertStyle:NSCriticalAlertStyle];
@@ -1132,7 +1166,8 @@
if ([indexes containsIndex:title.index])
{
HBJob *job = [[HBJob alloc] initWithTitle:title andPreset:preset];
- job.destURL = [HBUtilities destURLForJob:job];
+ job.outputURL = self.currentDestination;
+ job.outputFileName = [HBUtilities defaultNameForJob:job];
job.title = nil;
[jobs addObject:job];
}
@@ -1141,17 +1176,17 @@
NSMutableSet<NSURL *> *destinations = [[NSMutableSet alloc] init];
for (HBJob *job in jobs)
{
- if ([destinations containsObject:job.destURL])
+ if ([destinations containsObject:job.completeOutputURL])
{
fileExists = YES;
break;
}
else
{
- [destinations addObject:job.destURL];
+ [destinations addObject:job.completeOutputURL];
}
- if ([[NSFileManager defaultManager] fileExistsAtPath:job.destURL.path] || [fQueueController jobExistAtURL:job.destURL])
+ if ([[NSFileManager defaultManager] fileExistsAtPath:job.completeOutputURL.path] || [fQueueController jobExistAtURL:job.completeOutputURL])
{
fileExists = YES;
break;
@@ -1160,7 +1195,7 @@
for (HBJob *job in jobs)
{
- if ([job.fileURL isEqual:job.destURL]) {
+ if ([job.fileURL isEqual:job.completeOutputURL]) {
fileOverwritesSource = YES;
break;
}
diff --git a/macosx/HBCore.m b/macosx/HBCore.m
index 50b3e6cce..dbce136f6 100644
--- a/macosx/HBCore.m
+++ b/macosx/HBCore.m
@@ -27,6 +27,8 @@ static void hb_error_handler(const char *errmsg)
}
}
+typedef void (^HBCoreCleanupHandler)();
+
/**
* Private methods of HBCore.
*/
@@ -54,6 +56,9 @@ static void hb_error_handler(const char *errmsg)
/// Completion handler.
@property (nonatomic, readwrite, copy) HBCoreCompletionHandler completionHandler;
+/// Cleanup handle, used for internal HBCore cleanup.
+@property (nonatomic, readwrite, copy) HBCoreCleanupHandler cleanupHandler;
+
@end
@implementation HBCore
@@ -173,6 +178,11 @@ static void hb_error_handler(const char *errmsg)
- (BOOL)canScan:(NSURL *)url error:(NSError * __autoreleasing *)error
{
NSAssert(url, @"[HBCore canScan:] called with nil url.");
+
+#ifdef __SANDBOX_ENABLED__
+ BOOL accessingSecurityScopedResource = [url startAccessingSecurityScopedResource];
+#endif
+
if (![[NSFileManager defaultManager] fileExistsAtPath:url.path]) {
if (error) {
*error = [NSError errorWithDomain:@"HBErrorDomain"
@@ -217,6 +227,13 @@ static void hb_error_handler(const char *errmsg)
}
}
+#ifdef __SANDBOX_ENABLED__
+ if (accessingSecurityScopedResource)
+ {
+ [url stopAccessingSecurityScopedResource];
+ }
+#endif
+
return YES;
}
@@ -225,6 +242,16 @@ static void hb_error_handler(const char *errmsg)
NSAssert(self.state == HBStateIdle, @"[HBCore scanURL:] called while another scan or encode already in progress");
NSAssert(url, @"[HBCore scanURL:] called with nil url.");
+#ifdef __SANDBOX_ENABLED__
+ BOOL accessingSecurityScopedResource = [url startAccessingSecurityScopedResource];
+ self.cleanupHandler = ^{
+ if (accessingSecurityScopedResource)
+ {
+ [url stopAccessingSecurityScopedResource];
+ }
+ };
+#endif
+
// Reset the titles array
self.titles = @[];
@@ -232,16 +259,6 @@ static void hb_error_handler(const char *errmsg)
self.progressHandler = progressHandler;
self.completionHandler = completionHandler;
- NSString *path = url.path;
- HBDVDDetector *detector = [HBDVDDetector detectorForPath:path];
-
- if (detector.isVideoDVD)
- {
- // The chosen path was actually on a DVD, so use the raw block
- // device path instead.
- path = detector.devicePath;
- }
-
// convert minTitleDuration from seconds to the internal HB time
uint64_t min_title_duration_ticks = 90000LL * seconds;
@@ -260,7 +277,7 @@ static void hb_error_handler(const char *errmsg)
[self preventAutoSleep];
- hb_scan(_hb_handle, path.fileSystemRepresentation,
+ hb_scan(_hb_handle, url.path.fileSystemRepresentation,
(int)index, (int)previewsNum,
1, min_title_duration_ticks);
@@ -490,9 +507,15 @@ static void hb_error_handler(const char *errmsg)
self.progressHandler = progressHandler;
self.completionHandler = completionHandler;
+#ifdef __SANDBOX_ENABLED__
+ HBJob *jobCopy = [job copy];
+ [jobCopy startAccessingSecurityScopedResource];
+ self.cleanupHandler = ^{ [jobCopy stopAccessingSecurityScopedResource]; };
+#endif
+
// Add the job to libhb
hb_job_t *hb_job = job.hb_job;
- hb_job_set_file(hb_job, job.destURL.path.fileSystemRepresentation);
+ hb_job_set_file(hb_job, job.completeOutputURL.path.fileSystemRepresentation);
hb_add(_hb_handle, hb_job);
// Free the job
@@ -510,7 +533,7 @@ static void hb_error_handler(const char *errmsg)
// waiting for libhb to set it in a background thread.
self.state = HBStateWorking;
- [HBUtilities writeToActivityLog:"%s started encoding %s", self.name.UTF8String, job.destURL.lastPathComponent.UTF8String];
+ [HBUtilities writeToActivityLog:"%s started encoding %s", self.name.UTF8String, job.outputFileName.UTF8String];
[HBUtilities writeToActivityLog:"%s with preset %s", self.name.UTF8String, job.presetName.UTF8String];
}
@@ -674,6 +697,11 @@ static void hb_error_handler(const char *errmsg)
// Call the completion block and clean ups the handlers
self.progressHandler = nil;
+#ifdef __SANDBOX_ENABLED__
+ self.cleanupHandler();
+ self.cleanupHandler = nil;
+#endif
+
HBCoreResult result = (_hb_state->state == HB_STATE_WORKDONE) ? [self workDone] : [self scanDone];
[self runCompletionBlockAndCleanUpWithResult:result];
}
diff --git a/macosx/HBDistributedArray.m b/macosx/HBDistributedArray.m
index 8a9baef1d..d56311244 100644
--- a/macosx/HBDistributedArray.m
+++ b/macosx/HBDistributedArray.m
@@ -77,8 +77,9 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk";
_array = [[NSMutableArray alloc] init];
_objectClasses = [NSSet setWithObjects:[NSMutableArray class], objectClass, nil];
- NSArray *runningInstances = [NSRunningApplication runningApplicationsWithBundleIdentifier:[[NSBundle mainBundle] bundleIdentifier]];
- const char *name = [NSString stringWithFormat:@"/%@.hblock", _fileURL.lastPathComponent].UTF8String;
+ NSString *identifier = [[NSBundle mainBundle] bundleIdentifier];
+ NSArray *runningInstances = [NSRunningApplication runningApplicationsWithBundleIdentifier:identifier];
+ const char *name = [NSString stringWithFormat:@"%@/%@", identifier, _fileURL.lastPathComponent.stringByDeletingPathExtension].UTF8String;
// Unlink the semaphore if we are the only
// instance running, this fixes the case where
@@ -94,7 +95,7 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk";
_mutex = sem_open(name, O_CREAT, 0777, 1);
if (_mutex == SEM_FAILED)
{
- [HBUtilities writeToActivityLog:"%s: %d\n", "Error in creating semaphore: ", errno];
+ [HBUtilities writeToActivityLog:"%s: %d", "Error in creating semaphore: ", errno];
}
[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:HBDistributedArraWrittenToDisk object:nil];
@@ -182,12 +183,9 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk";
{
if (!([notification.object integerValue] == getpid()))
{
- if ([notification.userInfo[@"path"] isEqualToString:self.fileURL.path])
- {
- [self lock];
- [self reload];
- [self unlock];
- }
+ [self lock];
+ [self reload];
+ [self unlock];
}
}
@@ -273,7 +271,7 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk";
// Send a distributed notification.
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:HBDistributedArraWrittenToDisk
object:[NSString stringWithFormat:@"%d", getpid()]
- userInfo:@{@"path": self.fileURL.path}
+ userInfo:nil
deliverImmediately:YES];
// Update the time, so we can avoid reloaded the file from disk later.
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m
index 5c6d9126b..852603e40 100644
--- a/macosx/HBJob+HBJobConversion.m
+++ b/macosx/HBJob+HBJobConversion.m
@@ -34,12 +34,12 @@
- (hb_job_t *)hb_job
{
NSAssert(self.title, @"HBJob: calling hb_job without a valid title loaded");
- NSAssert(self.destURL, @"HBJob: calling hb_job without a valid destination");
+ NSAssert(self.completeOutputURL, @"HBJob: calling hb_job without a valid destination");
hb_title_t *title = self.title.hb_title;
hb_job_t *job = hb_job_init(title);
- hb_job_set_file(job, self.destURL.path.fileSystemRepresentation);
+ hb_job_set_file(job, self.completeOutputURL.path.fileSystemRepresentation);
// Title Angle for dvdnav
job->angle = self.angle;
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m
index 865cad7d8..5edf48a9b 100644
--- a/macosx/HBJob+UIAdditions.m
+++ b/macosx/HBJob+UIAdditions.m
@@ -167,7 +167,7 @@ static NSDictionary *shortHeightAttr;
[finalString appendString:[NSString stringWithFormat:@"%@", self.description] withAttributes:titleAttr];
// lets add the output file name to the title string here
- NSString *outputFilenameString = self.destURL.lastPathComponent;
+ NSString *outputFilenameString = self.outputFileName;
summaryInfo = [NSString stringWithFormat: @" (%@, %@, %@) -> %@", titleString, startStopString, passesString, outputFilenameString];
@@ -249,7 +249,7 @@ static NSDictionary *shortHeightAttr;
// Fourth Line (Destination Path)
[finalString appendString: @"Destination: " withAttributes:detailBoldAttr];
- [finalString appendString: self.destURL.path withAttributes:detailAttr];
+ [finalString appendString: self.completeOutputURL.path withAttributes:detailAttr];
[finalString appendString:@"\n" withAttributes:detailAttr];
diff --git a/macosx/HBJob.h b/macosx/HBJob.h
index 416ac5b1c..ff4af8d09 100644
--- a/macosx/HBJob.h
+++ b/macosx/HBJob.h
@@ -58,7 +58,13 @@ typedef NS_ENUM(NSUInteger, HBJobState){
@property (nonatomic, readonly) NSURL *fileURL;
/// The file URL at which the new file will be created.
-@property (nonatomic, readwrite, copy, nullable) NSURL *destURL;
+@property (nonatomic, readwrite, copy, nullable) NSURL *outputURL;
+
+/// The name of the new file that will be created.
+@property (nonatomic, readwrite, copy, nullable) NSString *outputFileName;
+
+/// The URL at which the new file will be created.
+@property (nonatomic, readonly, nullable) NSURL *completeOutputURL;
// Job settings
@property (nonatomic, readwrite) int container;
@@ -80,6 +86,14 @@ typedef NS_ENUM(NSUInteger, HBJobState){
@property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo;
+/* Given a HBJob created by NSSecureCoding, make the resource referenced by the job accessible to the process.
+ */
+- (BOOL)startAccessingSecurityScopedResource;
+
+/* Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource.
+ */
+- (void)stopAccessingSecurityScopedResource;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index 2adee6bbb..3eac48e3d 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -14,14 +14,30 @@
#import "HBCodingUtilities.h"
#import "HBMutablePreset.h"
-
#include "hb.h"
NSString *HBContainerChangedNotification = @"HBContainerChangedNotification";
NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
@interface HBJob ()
+
@property (nonatomic, readonly) NSString *name;
+
+/**
+ Store the security scoped bookmarks, so we don't
+ regenerate it each time
+ */
+@property (nonatomic, readonly) NSData *fileURLBookmark;
+@property (nonatomic, readwrite) NSData *outputURLFolderBookmark;
+
+/**
+ Keep track of startAccessingSecurityScopedResource return value
+ to avoid calling stopAccessingSecurityScopedResource when unnecessary
+ and stopping another instance from accessing the url.
+ */
+@property (nonatomic, readwrite) BOOL accessingSecurityScopedFileURL;
+@property (nonatomic, readwrite) BOOL accessingSecurityScopedOutputURL;
+
@end
@implementation HBJob
@@ -118,13 +134,32 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
_presetName = [presetName copy];
}
-- (void)setDestURL:(NSURL *)destURL
+- (void)setOutputURL:(NSURL *)outputURL
+{
+ if (![outputURL isEqualTo:_outputURL])
+ {
+ [[self.undo prepareWithInvocationTarget:self] setOutputURL:_outputURL];
+ }
+ _outputURL = [outputURL copy];
+
+#ifdef __SANDBOX_ENABLED__
+ // Clear we bookmark to regenerate it
+ self.outputURLFolderBookmark = nil;
+#endif
+}
+
+- (void)setOutputFileName:(NSString *)outputFileName
{
- if (![destURL isEqualTo:_destURL])
+ if (![outputFileName isEqualTo:_outputFileName])
{
- [[self.undo prepareWithInvocationTarget:self] setDestURL:_destURL];
+ [[self.undo prepareWithInvocationTarget:self] setOutputFileName:_outputFileName];
}
- _destURL = [destURL copy];
+ _outputFileName = [outputFileName copy];
+}
+
+- (NSURL *)completeOutputURL
+{
+ return [self.outputURL URLByAppendingPathComponent:self.outputFileName];
}
- (void)setContainer:(int)container
@@ -192,6 +227,38 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
return self.name;
}
+- (BOOL)startAccessingSecurityScopedResource
+{
+#ifdef __SANDBOX_ENABLED__
+ if (!self.accessingSecurityScopedFileURL)
+ {
+ self.accessingSecurityScopedFileURL = [self.fileURL startAccessingSecurityScopedResource];
+ }
+ if (!self.accessingSecurityScopedOutputURL)
+ {
+ self.accessingSecurityScopedOutputURL = [self.outputURL startAccessingSecurityScopedResource];
+ }
+
+ return self.accessingSecurityScopedFileURL || self.accessingSecurityScopedOutputURL;
+#else
+ return NO;
+#endif
+}
+
+- (void)stopAccessingSecurityScopedResource
+{
+#ifdef __SANDBOX_ENABLED__
+ if (self.accessingSecurityScopedFileURL)
+ {
+ [self.fileURL stopAccessingSecurityScopedResource];
+ }
+ if (self.accessingSecurityScopedOutputURL)
+ {
+ [self.outputURL stopAccessingSecurityScopedResource];
+ }
+#endif
+}
+
#pragma mark - NSCopying
- (instancetype)copyWithZone:(NSZone *)zone
@@ -206,8 +273,12 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
copy->_titleIdx = _titleIdx;
copy->_uuid = [[NSUUID UUID] UUIDString];
+ copy->_fileURLBookmark = [_fileURLBookmark copy];
+ copy->_outputURLFolderBookmark = [_outputURLFolderBookmark copy];
+
copy->_fileURL = [_fileURL copy];
- copy->_destURL = [_destURL copy];
+ copy->_outputURL = [_outputURL copy];
+ copy->_outputFileName = [_outputFileName copy];
copy->_container = _container;
copy->_angle = _angle;
@@ -242,7 +313,7 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
- (void)encodeWithCoder:(NSCoder *)coder
{
- [coder encodeInt:2 forKey:@"HBJobVersion"];
+ [coder encodeInt:3 forKey:@"HBJobVersion"];
encodeInt(_state);
encodeObject(_name);
@@ -250,8 +321,51 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
encodeInt(_titleIdx);
encodeObject(_uuid);
+#ifdef __SANDBOX_ENABLED__
+ NSError *error = nil;
+
+ if (!_fileURLBookmark)
+ {
+ _fileURLBookmark = [_fileURL bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope|NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess
+ includingResourceValuesForKeys:nil
+ relativeToURL:nil
+ error:&error];
+
+ if (error)
+ {
+ NSLog(@"Error creating bookmark for URL (%@): %@", _fileURL, error);
+ }
+ }
+
+ encodeObject(_fileURLBookmark);
+
+ if (!_outputURLFolderBookmark)
+ {
+ BOOL accessed = [_outputURL startAccessingSecurityScopedResource];
+
+ _outputURLFolderBookmark = [_outputURL bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope
+ includingResourceValuesForKeys:nil
+ relativeToURL:nil
+ error:&error];
+
+
+ if (error)
+ {
+ NSLog(@"Error creating bookmark for URL (%@): %@", _outputURL, error);
+ }
+ if (accessed)
+ {
+ [_outputURL stopAccessingSecurityScopedResource];
+ }
+ }
+
+ encodeObject(_outputURLFolderBookmark);
+
+#endif
+
encodeObject(_fileURL);
- encodeObject(_destURL);
+ encodeObject(_outputURL);
+ encodeObject(_outputFileName);
encodeInt(_container);
encodeInt(_angle);
@@ -274,7 +388,7 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
{
int version = [decoder decodeIntForKey:@"HBJobVersion"];
- if (version == 2 && (self = [super init]))
+ if (version == 3 && (self = [super init]))
{
decodeInt(_state);
decodeObject(_name, NSString);
@@ -282,8 +396,54 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
decodeInt(_titleIdx);
decodeObject(_uuid, NSString);
+#ifdef __SANDBOX_ENABLED__
+ NSError *error;
+
+ _fileURLBookmark = [HBCodingUtilities decodeObjectOfClass:[NSData class] forKey:@"_fileURLBookmark" decoder:decoder];
+
+ if (_fileURLBookmark)
+ {
+ BOOL bookmarkDataIsStale;
+ _fileURL = [NSURL URLByResolvingBookmarkData:_fileURLBookmark
+ options:NSURLBookmarkResolutionWithSecurityScope
+ relativeToURL:nil
+ bookmarkDataIsStale:&bookmarkDataIsStale
+ error:&error];
+ if (error)
+ {
+ NSLog(@"Error creating URL from bookmark (%@): %@", _outputURL, error);
+ }
+ }
+ else
+ {
+ decodeObject(_fileURL, NSURL);
+ }
+
+ _outputURLFolderBookmark = [HBCodingUtilities decodeObjectOfClass:[NSData class] forKey:@"_outputURLFolderBookmark" decoder:decoder];
+
+ if (_outputURLFolderBookmark)
+ {
+ BOOL bookmarkDataIsStale;
+ _outputURL = [NSURL URLByResolvingBookmarkData:_outputURLFolderBookmark
+ options:NSURLBookmarkResolutionWithSecurityScope
+ relativeToURL:nil
+ bookmarkDataIsStale:&bookmarkDataIsStale
+ error:&error];
+ if (error)
+ {
+ NSLog(@"Error creating URL from bookmark (%@): %@", _outputURL, error);
+ }
+ }
+ else
+ {
+ decodeObject(_outputURL, NSURL);
+ }
+#else
decodeObject(_fileURL, NSURL);
- decodeObject(_destURL, NSURL);
+ decodeObject(_outputURL, NSURL);
+#endif
+
+ decodeObject(_outputFileName, NSString);
decodeInt(_container);
decodeInt(_angle);
diff --git a/macosx/HBJobOutputFileWriter.m b/macosx/HBJobOutputFileWriter.m
index 7f2f3d020..f0641eac3 100644
--- a/macosx/HBJobOutputFileWriter.m
+++ b/macosx/HBJobOutputFileWriter.m
@@ -8,12 +8,17 @@
#import "HBJob.h"
#import "HBUtilities.h"
+@interface HBJobOutputFileWriter ()
+
+@property (nonatomic, readonly) NSURL *outputFolderURL;
+@property (nonatomic, readwrite) BOOL accessingSecurityScopedFile;
+
+@end
+
@implementation HBJobOutputFileWriter
- (nullable instancetype)initWithJob:(HBJob *)job
{
- NSURL *outputURL= job.destURL;
-
// Establish the log file location to write to.
// We need to get the current time in YY-MM-DD HH-MM-SS format to put at the beginning of the name of the log file
time_t _now = time(NULL);
@@ -26,13 +31,21 @@
// Assemble the new log file name as YY-MM-DD HH-MM-SS mymoviename.txt
NSString *outputDateFileName = [NSString stringWithFormat:@"%@ %@.txt",
- outputURL.lastPathComponent.stringByDeletingPathExtension,
+ job.outputFileName.stringByDeletingPathExtension,
dateForLogTitle];
+ NSURL *outputURL = nil;
+
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"EncodeLogLocation"])
{
// if we are putting it in the same directory with the movie
- outputURL = [outputURL.URLByDeletingLastPathComponent URLByAppendingPathComponent:outputDateFileName];
+ outputURL = [job.outputURL URLByAppendingPathComponent:outputDateFileName];
+
+#ifdef __SANDBOX_ENABLED__
+ _outputFolderURL = job.outputURL;
+ _accessingSecurityScopedFile = [_outputFolderURL startAccessingSecurityScopedResource];
+#endif
+
}
else
{
@@ -45,7 +58,7 @@
if (self)
{
// Additional header info.
- [self write:job.destURL.lastPathComponent];
+ [self write:job.outputFileName];
[self write:@"\nPreset: "];
[self write:job.presetName];
[self write:@"\n"];
@@ -54,4 +67,14 @@
return self;
}
+- (void)dealloc
+{
+#ifdef __SANDBOX_ENABLED__
+ if (_accessingSecurityScopedFile)
+ {
+ [_outputFolderURL.URLByDeletingLastPathComponent stopAccessingSecurityScopedResource];
+ }
+#endif
+}
+
@end
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m
index 16bc32170..faebcb437 100644
--- a/macosx/HBPreferencesController.m
+++ b/macosx/HBPreferencesController.m
@@ -208,9 +208,10 @@
NSURL *sendToAppDirectoryURL = [sendToAppURL URLByDeletingLastPathComponent];
[[NSUserDefaults standardUserDefaults] setObject:[sendToAppDirectoryURL path] forKey:@"LastSendToAppDirectory"];
+ // We set the name of the app to send to in the display field
NSString *sendToAppName = [[sendToAppURL lastPathComponent] stringByDeletingPathExtension];
- /* we set the name of the app to send to in the display field */
[fSendEncodeToAppField setStringValue:sendToAppName];
+
[[NSUserDefaults standardUserDefaults] setObject:[fSendEncodeToAppField stringValue] forKey:@"HBSendToApp"];
}
}];
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m
index 093a64fea..f30115e4e 100644
--- a/macosx/HBPreviewGenerator.m
+++ b/macosx/HBPreviewGenerator.m
@@ -194,7 +194,8 @@
HBJob *job = [self.job copy];
job.title = self.job.title;
- job.destURL = destURL;
+ job.outputFileName = destURL.lastPathComponent;
+ job.outputURL = destURL.URLByDeletingLastPathComponent;
job.range.type = HBRangePreviewIndex;
job.range.previewIndex = (int)index + 1;;
diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m
index 7fb42dad1..8ff546176 100644
--- a/macosx/HBQueueController.m
+++ b/macosx/HBQueueController.m
@@ -12,6 +12,7 @@
#import "HBQueueOutlineView.h"
#import "NSArray+HBAdditions.h"
+#import "HBUtilities.h"
#import "HBDockTile.h"
@@ -223,7 +224,7 @@
for (HBJob *item in self.jobs)
{
- if ([item.destURL isEqualTo:url])
+ if ([item.completeOutputURL isEqualTo:url])
{
return YES;
}
@@ -587,7 +588,7 @@
// Check to see if there are any more pending items in the queue
HBJob *nextJob = [self getNextPendingQueueItem];
- if (nextJob && [self _isDiskSpaceLowAtURL:nextJob.destURL])
+ if (nextJob && [self _isDiskSpaceLowAtURL:nextJob.outputURL])
{
// Disk space is low, show an alert
[HBUtilities writeToActivityLog:"Queue Stopped, low space on destination disk"];
@@ -648,7 +649,7 @@
if (result != HBCoreResultCancelled)
{
// Send to tagger
- [self sendToExternalApp:job.destURL];
+ [self sendToExternalApp:job];
}
// Mark the encode just finished
@@ -744,7 +745,7 @@
job.title = self.core.titles[0];
HBStateFormatter *formatter = [[HBStateFormatter alloc] init];
- formatter.title = job.destURL.lastPathComponent;
+ formatter.title = job.outputFileName;
self.core.stateFormatter = formatter;
// Progress handler
@@ -862,19 +863,23 @@
* Sends the URL to the external app
* selected in the preferences.
*
- * @param fileURL the URL of the file to send
+ * @param job the job of the file to send
*/
-- (void)sendToExternalApp:(NSURL *)fileURL
+- (void)sendToExternalApp:(HBJob *)job
{
// This end of encode action is called as each encode rolls off of the queue
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBSendToAppEnabled"] == YES)
{
+#ifdef __SANDBOX_ENABLED__
+ BOOL accessingSecurityScopedResource = [job.outputURL startAccessingSecurityScopedResource];
+#endif
+
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
NSString *app = [workspace fullPathForApplication:[[NSUserDefaults standardUserDefaults] objectForKey:@"HBSendToApp"]];
if (app)
{
- if (![workspace openFile:fileURL.path withApplication:app])
+ if (![workspace openFile:job.completeOutputURL.path withApplication:app])
{
[HBUtilities writeToActivityLog:"Failed to send file to: %s", app];
}
@@ -883,6 +888,13 @@
{
[HBUtilities writeToActivityLog:"Send file to: app not found"];
}
+
+#ifdef __SANDBOX_ENABLED__
+ if (accessingSecurityScopedResource)
+ {
+ [job.outputURL stopAccessingSecurityScopedResource];
+ }
+#endif
}
}
@@ -907,19 +919,19 @@
{
title = NSLocalizedString(@"Put down that cocktail…", nil);
description = [NSString stringWithFormat:NSLocalizedString(@"your HandBrake encode %@ is done!", nil),
- job.destURL.lastPathComponent];
+ job.outputFileName];
}
else
{
title = NSLocalizedString(@"Encode failed", nil);
description = [NSString stringWithFormat:NSLocalizedString(@"your HandBrake encode %@ couldn't be completed.", nil),
- job.destURL.lastPathComponent];
+ job.outputFileName];
}
[self showNotificationWithTitle:title
description:description
- url:job.destURL];
+ url:job.completeOutputURL];
}
}
@@ -1069,7 +1081,7 @@
NSUInteger currentIndex = [targetedRows firstIndex];
while (currentIndex != NSNotFound) {
- NSURL *url = [[self.jobs objectAtIndex:currentIndex] destURL];
+ NSURL *url = [[self.jobs objectAtIndex:currentIndex] completeOutputURL];
[urls addObject:url];
currentIndex = [targetedRows indexGreaterThanIndex:currentIndex];
}
diff --git a/macosx/HBUtilities.h b/macosx/HBUtilities.h
index af5538fb9..c7f195b1f 100644
--- a/macosx/HBUtilities.h
+++ b/macosx/HBUtilities.h
@@ -30,12 +30,15 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (void)writeToActivityLog:(const char *)format, ...;
++ (nullable NSURL *)URLFromBookmark:(NSData *)bookmark;
++ (nullable NSData *)bookmarkFromURL:(NSURL *)url;
+
+ (NSString *)displayNameForURL:(NSURL *)URL;
+ (NSURL *)mediaURLFromURL:(NSURL *)URL;
+ (NSString *)automaticNameForJob:(HBJob *)job;
+ (NSString *)automaticExtForJob:(HBJob *)job;
-+ (NSURL *)destURLForJob:(HBJob *)job;
++ (NSString *)defaultNameForJob:(HBJob *)job;
/**
* Generates a file name automatically based on the inputs,
diff --git a/macosx/HBUtilities.m b/macosx/HBUtilities.m
index bf0c8bfa8..a0db9927b 100644
--- a/macosx/HBUtilities.m
+++ b/macosx/HBUtilities.m
@@ -53,6 +53,41 @@
va_end(args);
}
++ (nullable NSURL *)URLFromBookmark:(NSData *)bookmark
+{
+ NSParameterAssert(bookmark);
+
+ NSError *error;
+ BOOL isStale;
+
+ NSURL *url = [NSURL URLByResolvingBookmarkData:bookmark options:NSURLBookmarkResolutionWithSecurityScope relativeToURL:nil bookmarkDataIsStale:&isStale error:&error];
+
+ if (error)
+ {
+ NSString *error_message = [NSString stringWithFormat:@"Failed to resolved bookmark: %@", error];
+ [HBUtilities writeToActivityLog:"%s", error_message.UTF8String];
+ }
+
+ return isStale ? nil : url;
+}
+
++ (nullable NSData *)bookmarkFromURL:(NSURL *)url
+{
+ NSParameterAssert(url);
+
+ NSError *error;
+
+ NSData *bookmark = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil relativeToURL:nil error:&error];
+
+ if (error)
+ {
+ NSString *error_message = [NSString stringWithFormat:@"Failed to create bookmark: %@", error];
+ [HBUtilities writeToActivityLog:"%s", error_message.UTF8String];
+ }
+
+ return bookmark;
+}
+
+ (NSString *)displayNameForURL:(NSURL *)URL
{
NSString *displayName = URL.lastPathComponent;
@@ -107,6 +142,7 @@
[HBUtilities writeToActivityLog:"not a known to package"];
}
}
+#ifndef __SANDBOX_ENABLED__
else
{
// path is not a package, so we call perform scan directly on our file
@@ -121,6 +157,7 @@
[HBUtilities writeToActivityLog:"trying to open a folder or file"];
}
}
+#endif
return mediaURL;
}
@@ -161,16 +198,8 @@
return extension;
}
-+ (NSURL *)destURLForJob:(HBJob *)job
++ (NSString *)defaultNameForJob:(HBJob *)job
{
- // Check to see if the last destination has been set,use if so, if not, use Desktop
- NSURL *destURL = [[NSUserDefaults standardUserDefaults] URLForKey:@"HBLastDestinationDirectory"];
- if (!destURL || ![[NSFileManager defaultManager] fileExistsAtPath:destURL.path])
- {
- destURL = [NSURL fileURLWithPath:[NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES) firstObject]
- isDirectory:YES];
- }
-
// Generate a new file name
NSString *fileName = job.title.name;
@@ -180,12 +209,11 @@
fileName = [self automaticNameForJob:job];
}
- destURL = [destURL URLByAppendingPathComponent:fileName];
// use the correct extension based on the container
NSString *ext = [self automaticExtForJob:job];
- destURL = [destURL URLByAppendingPathExtension:ext];
+ fileName = [fileName stringByAppendingPathExtension:ext];
- return destURL;
+ return fileName;
}
+ (NSString *)automaticNameForSource:(NSString *)sourceName
diff --git a/macosx/HandBrake.entitlements b/macosx/HandBrake.entitlements
new file mode 100644
index 000000000..e29f683e0
--- /dev/null
+++ b/macosx/HandBrake.entitlements
@@ -0,0 +1,26 @@
+<?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.application-groups</key>
+ <array>
+ <string>fr.handbrake.HandBrake</string>
+ </array>
+ <key>com.apple.security.assets.movies.read-write</key>
+ <true/>
+ <key>com.apple.security.files.bookmarks.app-scope</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-write</key>
+ <true/>
+ <key>com.apple.security.temporary-exception.files.absolute-path.read-only</key>
+ <array>
+ <string>/usr/local/</string>
+ </array>
+ <key>com.apple.security.temporary-exception.files.home-relative-path.read-write</key>
+ <array>
+ <string>/.dvdcss/</string>
+ </array>
+</dict>
+</plist>
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index 617b472c6..091c5261e 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 47;
objects = {
/* Begin PBXBuildFile section */
@@ -233,6 +233,7 @@
A9E1468316BC2AD800C307BC /* PrevTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = A9E1467F16BC2AD800C307BC /* PrevTemplate.pdf */; };
A9E165521C523016003EF30E /* libavfilter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9E165511C523016003EF30E /* libavfilter.a */; };
A9E2FD2B1A21BC6F000E8D3F /* AddPreset.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9E2FD291A21BC6F000E8D3F /* AddPreset.xib */; };
+ A9F217E61E2F934C00C10C6E /* container-migration.plist in Resources */ = {isa = PBXBuildFile; fileRef = A9F217E51E2F934C00C10C6E /* container-migration.plist */; };
A9F2EB6F196F12C800066546 /* Audio.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9F2EB6D196F12C800066546 /* Audio.xib */; };
A9F472891976B7F30009EC65 /* HBSubtitlesDefaultsController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F472871976B7F30009EC65 /* HBSubtitlesDefaultsController.m */; };
A9F7102619A475EC00F61301 /* HBDockTile.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F7102519A475EC00F61301 /* HBDockTile.m */; };
@@ -563,6 +564,8 @@
A9E66D6F1A67A2A8007B641D /* HBDistributedArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HBDistributedArray.m; path = ../HBDistributedArray.m; sourceTree = "<group>"; };
A9EA43661A2210C400785E95 /* HBQueueOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBQueueOutlineView.h; sourceTree = "<group>"; };
A9EA43671A2210C400785E95 /* HBQueueOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBQueueOutlineView.m; sourceTree = "<group>"; };
+ A9F217E41E2F897D00C10C6E /* HandBrake.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HandBrake.entitlements; sourceTree = "<group>"; };
+ A9F217E51E2F934C00C10C6E /* container-migration.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "container-migration.plist"; sourceTree = "<group>"; };
A9F2EB6E196F12C800066546 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Audio.xib; sourceTree = "<group>"; };
A9F472861976B7F30009EC65 /* HBSubtitlesDefaultsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBSubtitlesDefaultsController.h; sourceTree = "<group>"; };
A9F472871976B7F30009EC65 /* HBSubtitlesDefaultsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBSubtitlesDefaultsController.m; sourceTree = "<group>"; };
@@ -799,6 +802,8 @@
273F204114ADBC210021BE6D /* HandBrake */ = {
isa = PBXGroup;
children = (
+ A9F217E41E2F897D00C10C6E /* HandBrake.entitlements */,
+ A9F217E51E2F934C00C10C6E /* container-migration.plist */,
A9B34D6F197683FE00871B7D /* Controllers */,
A98F00771A972007001C2298 /* Output Redirect */,
A901C2431BC7D05000D77735 /* Others */,
@@ -1378,6 +1383,19 @@
attributes = {
LastUpgradeCheck = 0800;
TargetAttributes = {
+ 273F203814ADBC200021BE6D = {
+ SystemCapabilities = {
+ com.apple.ApplicationGroups.Mac = {
+ enabled = 0;
+ };
+ com.apple.Push = {
+ enabled = 0;
+ };
+ com.apple.Sandbox = {
+ enabled = 0;
+ };
+ };
+ };
A9736F011C7DA5FE008F1D18 = {
CreatedOnToolsVersion = 7.3;
};
@@ -1388,7 +1406,7 @@
};
};
buildConfigurationList = 273F1FE314AD9DA40021BE6D /* Build configuration list for PBXProject "HandBrake" */;
- compatibilityVersion = "Xcode 3.2";
+ compatibilityVersion = "Xcode 6.3";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
@@ -1446,6 +1464,7 @@
A99F40D31B624EA500750170 /* HBPictureViewController.xib in Resources */,
A93E0ED71972958C00FD67FB /* Video.xib in Resources */,
A9935213196F38A70069C6B7 /* ChaptersTitles.xib in Resources */,
+ A9F217E61E2F934C00C10C6E /* container-migration.plist in Resources */,
A9706CBA1AC1452800BAEAA8 /* ExceptionAlert.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1795,6 +1814,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
EXTERNAL_BUILD = "$(CONFIGURATION_BUILD_DIR)/external";
@@ -1854,6 +1874,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2233,6 +2254,474 @@
};
name = release;
};
+ A9A5CD991E32072F00947914 /* debug-sandbox */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 275916DA14B2AB27007211E9 /* native.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = NO;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_ENTITLEMENTS = "";
+ CODE_SIGN_IDENTITY = "";
+ COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ EXTERNAL_BUILD = "$(CONFIGURATION_BUILD_DIR)/external";
+ EXTERNAL_DRIVER = xcode;
+ EXTERNAL_JOBS = auto;
+ EXTERNAL_SRC = ..;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ "__SANDBOX_ENABLED__=1",
+ );
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OTHER_LDFLAGS = (
+ "-filelist",
+ "$(EXTERNAL_BUILD)/macosx/osl.filelist.txt",
+ "-lc++",
+ );
+ SDKROOT = macosx;
+ SHARED_PRECOMPS_DIR = "$(CONFIGURATION_TEMP_DIR)/PrecompiledHeaders";
+ STRIP_INSTALLED_PRODUCT = NO;
+ };
+ name = "debug-sandbox";
+ };
+ A9A5CD9A1E32072F00947914 /* debug-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = external;
+ };
+ name = "debug-sandbox";
+ };
+ A9A5CD9B1E32072F00947914 /* debug-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_MODULES = NO;
+ CLANG_WARN_BOOL_CONVERSION = NO;
+ CLANG_WARN_CONSTANT_CONVERSION = NO;
+ CLANG_WARN_ENUM_CONVERSION = NO;
+ CLANG_WARN_INT_CONVERSION = NO;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/lib\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = "debug-sandbox";
+ };
+ A9A5CD9C1E32072F00947914 /* debug-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "";
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ DEFINES_MODULE = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ FRAMEWORK_VERSION = A;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ INFOPLIST_FILE = HandBrakeKit/Info.plist;
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/lib\"",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeKit;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = "debug-sandbox";
+ };
+ A9A5CD9D1E32072F00947914 /* debug-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ INFOPLIST_FILE = HandBrakeKitTests/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+ MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeKitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HandBrake.app/Contents/MacOS/HandBrake";
+ };
+ name = "debug-sandbox";
+ };
+ A9A5CD9E1E32072F00947914 /* debug-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CODE_SIGN_ENTITLEMENTS = HandBrake.entitlements;
+ CODE_SIGN_IDENTITY = "-";
+ COMBINE_HIDPI_IMAGES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)\"",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ INFOPLIST_FILE = "$(EXTERNAL_BUILD)/macosx/Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/lib\"",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = "debug-sandbox";
+ };
+ A9A5CD9F1E32073800947914 /* release-sandbox */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 275916DA14B2AB27007211E9 /* native.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = NO;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_ENTITLEMENTS = "";
+ CODE_SIGN_IDENTITY = "";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ EXTERNAL_BUILD = "$(CONFIGURATION_BUILD_DIR)/external";
+ EXTERNAL_DRIVER = xcode;
+ EXTERNAL_JOBS = auto;
+ EXTERNAL_SRC = ..;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = "__SANDBOX_ENABLED__=1";
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OTHER_LDFLAGS = (
+ "-filelist",
+ "$(EXTERNAL_BUILD)/macosx/osl.filelist.txt",
+ "-lc++",
+ );
+ SDKROOT = macosx;
+ SHARED_PRECOMPS_DIR = "$(CONFIGURATION_TEMP_DIR)/PrecompiledHeaders";
+ STRIP_INSTALLED_PRODUCT = YES;
+ };
+ name = "release-sandbox";
+ };
+ A9A5CDA01E32073800947914 /* release-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = external;
+ };
+ name = "release-sandbox";
+ };
+ A9A5CDA11E32073800947914 /* release-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_MODULES = NO;
+ CLANG_WARN_BOOL_CONVERSION = NO;
+ CLANG_WARN_CONSTANT_CONVERSION = NO;
+ CLANG_WARN_ENUM_CONVERSION = NO;
+ CLANG_WARN_INT_CONVERSION = NO;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/lib\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = "release-sandbox";
+ };
+ A9A5CDA21E32073800947914 /* release-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "";
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEFINES_MODULE = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ FRAMEWORK_VERSION = A;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"\n",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ INFOPLIST_FILE = HandBrakeKit/Info.plist;
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/lib\"",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeKit;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = "release-sandbox";
+ };
+ A9A5CDA31E32073800947914 /* release-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ INFOPLIST_FILE = HandBrakeKitTests/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+ MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeKitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HandBrake.app/Contents/MacOS/HandBrake";
+ };
+ name = "release-sandbox";
+ };
+ A9A5CDA41E32073800947914 /* release-sandbox */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CODE_SIGN_ENTITLEMENTS = HandBrake.entitlements;
+ CODE_SIGN_IDENTITY = "-";
+ COMBINE_HIDPI_IMAGES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)\"",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ HEADER_SEARCH_PATHS = (
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/include\"",
+ );
+ INFOPLIST_FILE = "$(EXTERNAL_BUILD)/macosx/Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(EXTERNAL_BUILD)/libhb\"",
+ "\"$(EXTERNAL_BUILD)/contrib/lib\"",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = "release-sandbox";
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -2240,7 +2729,9 @@
isa = XCConfigurationList;
buildConfigurations = (
273F1FE614AD9DA40021BE6D /* debug */,
+ A9A5CD991E32072F00947914 /* debug-sandbox */,
273F1FE714AD9DA40021BE6D /* release */,
+ A9A5CD9F1E32073800947914 /* release-sandbox */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = release;
@@ -2249,7 +2740,9 @@
isa = XCConfigurationList;
buildConfigurations = (
273F200814ADAE950021BE6D /* debug */,
+ A9A5CD9B1E32072F00947914 /* debug-sandbox */,
273F200914ADAE950021BE6D /* release */,
+ A9A5CDA11E32073800947914 /* release-sandbox */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = release;
@@ -2258,7 +2751,9 @@
isa = XCConfigurationList;
buildConfigurations = (
273F205414ADBC210021BE6D /* debug */,
+ A9A5CD9E1E32072F00947914 /* debug-sandbox */,
273F205514ADBC210021BE6D /* release */,
+ A9A5CDA41E32073800947914 /* release-sandbox */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = release;
@@ -2267,7 +2762,9 @@
isa = XCConfigurationList;
buildConfigurations = (
273F217214ADD2170021BE6D /* debug */,
+ A9A5CD9A1E32072F00947914 /* debug-sandbox */,
273F217314ADD2170021BE6D /* release */,
+ A9A5CDA01E32073800947914 /* release-sandbox */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = release;
@@ -2276,7 +2773,9 @@
isa = XCConfigurationList;
buildConfigurations = (
A9736F191C7DA5FE008F1D18 /* debug */,
+ A9A5CD9C1E32072F00947914 /* debug-sandbox */,
A9736F1A1C7DA5FE008F1D18 /* release */,
+ A9A5CDA21E32073800947914 /* release-sandbox */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = release;
@@ -2285,7 +2784,9 @@
isa = XCConfigurationList;
buildConfigurations = (
A9736F1B1C7DA5FE008F1D18 /* debug */,
+ A9A5CD9D1E32072F00947914 /* debug-sandbox */,
A9736F1C1C7DA5FE008F1D18 /* release */,
+ A9A5CDA31E32073800947914 /* release-sandbox */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = release;
diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG-SANDBOX].xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG-SANDBOX].xcscheme
new file mode 100644
index 000000000..2dbfc6feb
--- /dev/null
+++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG-SANDBOX].xcscheme
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0710"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F203814ADBC200021BE6D"
+ BuildableName = "HandBrake.app"
+ BlueprintName = "HandBrake"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+ BuildableName = "HandBrakeCLI"
+ BlueprintName = "HandBrakeCLI"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "NO"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A9736F0A1C7DA5FE008F1D18"
+ BuildableName = "HandBrakeKitTests.xctest"
+ BlueprintName = "HandBrakeKitTests"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "debug-sandbox"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+ BuildableName = "HandBrakeCLI"
+ BlueprintName = "HandBrakeCLI"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "debug-sandbox"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F203814ADBC200021BE6D"
+ BuildableName = "HandBrake.app"
+ BlueprintName = "HandBrake"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "debug-sandbox"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+ BuildableName = "HandBrakeCLI"
+ BlueprintName = "HandBrakeCLI"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "debug-sandbox">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "debug-sandbox"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme
index 29dd0e4d0..2e411547b 100644
--- a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme
+++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme
@@ -11,8 +11,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
- buildForAnalyzing = "YES"
- hideIssues = "NO">
+ buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "273F203814ADBC200021BE6D"
@@ -26,8 +25,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
- buildForAnalyzing = "YES"
- hideIssues = "NO">
+ buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE-SANDBOX].xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE-SANDBOX].xcscheme
new file mode 100644
index 000000000..50a0b4628
--- /dev/null
+++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE-SANDBOX].xcscheme
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0710"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F203814ADBC200021BE6D"
+ BuildableName = "HandBrake.app"
+ BlueprintName = "HandBrake"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+ BuildableName = "HandBrakeCLI"
+ BlueprintName = "HandBrakeCLI"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "NO"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A9736F0A1C7DA5FE008F1D18"
+ BuildableName = "HandBrakeKitTests.xctest"
+ BlueprintName = "HandBrakeKitTests"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "release-sandbox"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+ BuildableName = "HandBrakeCLI"
+ BlueprintName = "HandBrakeCLI"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "release-sandbox"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F203814ADBC200021BE6D"
+ BuildableName = "HandBrake.app"
+ BlueprintName = "HandBrake"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "release-sandbox"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
+ BuildableName = "HandBrakeCLI"
+ BlueprintName = "HandBrakeCLI"
+ ReferencedContainer = "container:HandBrake.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "release-sandbox">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "release-sandbox"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme
index 91183912c..d94e0f910 100644
--- a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme
+++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme
@@ -11,8 +11,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
- buildForAnalyzing = "YES"
- hideIssues = "NO">
+ buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "273F203814ADBC200021BE6D"
@@ -26,8 +25,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
- buildForAnalyzing = "YES"
- hideIssues = "NO">
+ buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "273F1FFE14ADAE950021BE6D"
@@ -41,8 +39,7 @@
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
- buildForAnalyzing = "NO"
- hideIssues = "NO">
+ buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A9736F0A1C7DA5FE008F1D18"
diff --git a/macosx/HandBrakeKitTests/HBJobTests.m b/macosx/HandBrakeKitTests/HBJobTests.m
index dba18e35d..88aec0b5e 100644
--- a/macosx/HandBrakeKitTests/HBJobTests.m
+++ b/macosx/HandBrakeKitTests/HBJobTests.m
@@ -57,7 +57,8 @@
self.title = self.core.titles.firstObject;
self.job = [[HBJob alloc] initWithTitle:self.title andPreset:self.preset];
- self.job.destURL = [NSURL fileURLWithPath:@"/Dest.mp4"];
+ self.job.outputURL = [NSURL fileURLWithPath:@"/"];
+ self.job.outputFileName = @"Dest.mp4";
}
- (void)tearDown
@@ -82,7 +83,8 @@
XCTAssertNotNil(self.job);
- job.destURL = [NSURL fileURLWithPath:@"/Dest.mp4"];
+ self.job.outputURL = [NSURL fileURLWithPath:@"/"];
+ self.job.outputFileName = @"Dest.mp4";
[job applyPreset:preset];
}
diff --git a/macosx/container-migration.plist b/macosx/container-migration.plist
new file mode 100644
index 000000000..24c6d42a5
--- /dev/null
+++ b/macosx/container-migration.plist
@@ -0,0 +1,10 @@
+<?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>Move</key>
+ <array>
+ <string>${ApplicationSupport}/HandBrake</string>
+ </array>
+</dict>
+</plist>