summaryrefslogtreecommitdiff
path: root/macosx/PcsxrPluginHandler.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-17 20:41:31 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-17 20:41:31 +0000
commita603862e8da2d061f728a373acb503fa374b8c6b (patch)
treeef5f8956e5b6a2977d7ff9229df4a799bbfd1dd0 /macosx/PcsxrPluginHandler.m
parentb6f15852f36e8d017a275bc3727c5dcab1846d29 (diff)
downloadpcsxr-a603862e8da2d061f728a373acb503fa374b8c6b.tar.gz
Multiple plug-in directories support for Mac OS X. It could be better: currently it uses hierarchy with the built-in plug-in path at the bottom and the user plug-in path at the top. I should probably do it by plug-in version.
PlayStation plug-in double-clicked on Mac OS X are now moved to the user directory instead of the App's built-in plug-in directory. the previous method could cause problems if write support wasn't set in PCSXR, such as if it was created from a different user. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@73439 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrPluginHandler.m')
-rw-r--r--macosx/PcsxrPluginHandler.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/macosx/PcsxrPluginHandler.m b/macosx/PcsxrPluginHandler.m
index b2231577..8a978876 100644
--- a/macosx/PcsxrPluginHandler.m
+++ b/macosx/PcsxrPluginHandler.m
@@ -56,12 +56,15 @@
[pluginName setObjectValue:[[NSURL fileURLWithPath:theFile] lastPathComponent]];
[NSApp runModalForWindow:[self window]];
-
+
[[self window] orderOut:self];
if (moveOK == YES) {
+ NSURL *supportURL = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL];
+ NSURL *url = [supportURL URLByAppendingPathComponent:@"Pcsxr/PlugIns"];
+
NSFileWrapper *wrapper = [[NSFileWrapper alloc] initWithPath:theFile];
NSString *dst = [NSString stringWithFormat:@"%@/%@",
- [[NSBundle mainBundle] builtInPlugInsPath],
+ [url path],
[wrapper filename]];
if ([wrapper writeToFile:dst atomically:NO updateFilenames:NO]) {
[[NSWorkspace sharedWorkspace] noteFileSystemChanged:[[NSBundle mainBundle] builtInPlugInsPath]];