diff options
-rw-r--r-- | SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj | 26 | ||||
-rw-r--r-- | SpotlightPlugins/AppleScript/ReadMe.rtf | 11 | ||||
-rw-r--r-- | SpotlightPlugins/AppleScript/TestData/test.scpt | bin | 296 -> 0 bytes | |||
-rw-r--r-- | SpotlightPlugins/AppleScript/TestData/test.scpt.tar | bin | 0 -> 10240 bytes | |||
-rw-r--r-- | SpotlightPlugins/AppleScript/schema.xml | 38 | ||||
-rw-r--r-- | SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m | 84 | ||||
-rw-r--r-- | SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj | 6 | ||||
-rw-r--r-- | SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | SpotlightPlugins/XcodeProject/schema.xml | 31 |
9 files changed, 167 insertions, 33 deletions
diff --git a/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj b/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj index ea381b3..59c6152 100644 --- a/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj +++ b/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj @@ -11,7 +11,8 @@ isa = PBXAggregateTarget; buildConfigurationList = 8BF156170E5B8C8F00D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */; buildPhases = ( - 8BF1560C0E5B8C7A00D28B05 /* ShellScript */, + F464A7FD0E5DBD92006B02E8 /* Prep Resource Files */, + 8BF1560C0E5B8C7A00D28B05 /* Run Tests */, ); dependencies = ( 8BF156110E5B8C8000D28B05 /* PBXTargetDependency */, @@ -27,6 +28,7 @@ 8B58F8EF0E5726DE00A0E02E /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; }; 8BF152920E5A334200D28B05 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF152910E5A334200D28B05 /* AppKit.framework */; }; 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; + F464A8630E5DCB9C006B02E8 /* schema.xml in Resources */ = {isa = PBXBuildFile; fileRef = F464A8620E5DCB9C006B02E8 /* schema.xml */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -52,6 +54,7 @@ 8D576316048677EA00EA77CD /* AppleScript.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppleScript.mdimporter; sourceTree = BUILT_PRODUCTS_DIR; }; 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; C86B05260671AA6E00DD9006 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; + F464A8620E5DCB9C006B02E8 /* schema.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = schema.xml; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -94,6 +97,7 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( + F464A8620E5DCB9C006B02E8 /* schema.xml */, 8D576317048677EA00EA77CD /* Info.plist */, 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, ); @@ -198,24 +202,40 @@ buildActionMask = 2147483647; files = ( 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + F464A8630E5DCB9C006B02E8 /* schema.xml in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 8BF1560C0E5B8C7A00D28B05 /* ShellScript */ = { + 8BF1560C0E5B8C7A00D28B05 /* Run Tests */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Run Tests"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /usr/bin/python; - shellScript = "# Test of scpt and scptd importer\nimport os\nimport subprocess\n\ncmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/AppleScript.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/test.scpt\"\nimporter_out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).stderr.read()\nif importer_out.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n\tprint \"error: Bad Description for test.scpt\"\n\texit(1)\nif importer_out.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n\tprint \"error: Bad Content for test.scpt\"\n\texit(1)\n\n# quick test of scptd importer\n# Commented out due to radars:\n# 6160685 Need UTI for AppleScript script bundle \n# 6160646 UTIs declared in Spotlight Importers in Library/Spotlight not recognized\n# Basically we don't have a UTI for AppleScript script bundles (.scptd) defined by the system\n# even worse, UTIs defined by Spotlight Importers in the right location\n# don't get their UTIs that they declare recognized by LaunchServices.\n#aCmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/AppleScript.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/test.scptd\"\n#importerOut = subprocess.Popen(aCmd, shell=True, stderr=subprocess.PIPE).stderr.read()\n#if importerOut.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n#\tprint \"error: Bad Description for test.scpt\"\n#\texit(1)\n#if importerOut.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n#\tprint \"error: Bad Content for test.scpt\"\n#\texit(1)\n#\nexit(0)"; + shellScript = "# Test of scpt and scptd importer\nimport os\nimport subprocess\n\n# file w/ resource fork, see previous script step for it's setup\ncmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/AppleScript.mdimporter \" + os.environ[\"DERIVED_FILES_DIR\"] + \"/TestsData/test.scpt\"\nimporter_out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).stderr.read()\nif importer_out.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n\tprint \"error: Bad Description for test.scpt\"\n\texit(1)\nif importer_out.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n\tprint \"error: Bad Content for test.scpt\"\n\texit(1)\n\n# quick test of scptd importer\n# Commented out due to radars:\n# 6160685 Need UTI for AppleScript script bundle \n# 6160646 UTIs declared in Spotlight Importers in Library/Spotlight not recognized\n# Basically we don't have a UTI for AppleScript script bundles (.scptd) defined by the system\n# even worse, UTIs defined by Spotlight Importers in the right location\n# don't get their UTIs that they declare recognized by LaunchServices.\n#aCmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/AppleScript.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/test.scptd\"\n#importerOut = subprocess.Popen(aCmd, shell=True, stderr=subprocess.PIPE).stderr.read()\n#if importerOut.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n#\tprint \"error: Bad Description for test.scpt\"\n#\texit(1)\n#if importerOut.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n#\tprint \"error: Bad Content for test.scpt\"\n#\texit(1)\n#\nexit(0)"; + }; + F464A7FD0E5DBD92006B02E8 /* Prep Resource Files */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Prep Resource Files"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# svn doesn't do mac resource forks. so our one test file that has a resource fork\n# is done w/ a tar file in source control, and here we untar so it is there for use\n# in the tests.\n\n# make sure the dir is empty to start\nrm -rf \"${DERIVED_FILES_DIR}/TestsData\"\nmkdir -p \"${DERIVED_FILES_DIR}/TestsData\"\n\n# extract into it\ntar -xvf \"${SOURCE_ROOT}/TestData/test.scpt.tar\" -C \"${DERIVED_FILES_DIR}/TestsData\"\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/SpotlightPlugins/AppleScript/ReadMe.rtf b/SpotlightPlugins/AppleScript/ReadMe.rtf index ae98045..ee2fa25 100644 --- a/SpotlightPlugins/AppleScript/ReadMe.rtf +++ b/SpotlightPlugins/AppleScript/ReadMe.rtf @@ -1,7 +1,7 @@ {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -\vieww9860\viewh7900\viewkind0 +\vieww10980\viewh11300\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural \f0\fs24 \cf0 AppleScript Spotlight Plugin\ @@ -25,7 +25,14 @@ the License.\ This is a spotlight importer for AppleScripts.\ It imports the description and the code of an AppleScript to make them easily searchable.\ \ -To install the spotlight plugin, please copy it into /Library/Spotlight or ~/Library/Spotlight.\ +To install the spotlight plugin, please copy it into /Applications/AppleScript/Script Editor/Contents/Library/Spotlight.\ +\ +If you are wondering why we just don't copy this one into /Library/Spotlight or ~/Library/Spotlight it is due to the fact that on 10.5 the UTIs declared by Spotlight importers don't seem to be recognized unless they are in an application's /Library/Spotlight directory. There isn't a UTI for AppleScript bundle files (.scptd) so we declare one in the importer. If the importer isn't located in an application's /Library/Spotlight directory, you won't be able to import .scptd files.\ +\ +Radars logged:\ +6160646 UTIs declared in Spotlight Importers in Library/Spotlight not recognized\ +6160685 Need UTI for AppleScript script bundle\ +6160707 UTCoreTypes.h needs to be updated\ \ It is part of the Google Toolbox For Mac project\ http://code.google.com/p/google-toolbox-for-mac/}
\ No newline at end of file diff --git a/SpotlightPlugins/AppleScript/TestData/test.scpt b/SpotlightPlugins/AppleScript/TestData/test.scpt Binary files differdeleted file mode 100644 index 8dd96c2..0000000 --- a/SpotlightPlugins/AppleScript/TestData/test.scpt +++ /dev/null diff --git a/SpotlightPlugins/AppleScript/TestData/test.scpt.tar b/SpotlightPlugins/AppleScript/TestData/test.scpt.tar Binary files differnew file mode 100644 index 0000000..185b8da --- /dev/null +++ b/SpotlightPlugins/AppleScript/TestData/test.scpt.tar diff --git a/SpotlightPlugins/AppleScript/schema.xml b/SpotlightPlugins/AppleScript/schema.xml new file mode 100644 index 0000000..d057fd7 --- /dev/null +++ b/SpotlightPlugins/AppleScript/schema.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2008 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. You may obtain a copy + of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations under + the License. +--> + +<schema version="1.0" xmlns="http://www.apple.com/metadata" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.apple.com/metadata file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd"> + <types> + <type name="com.apple.applescript.script"> + <allattrs> + kMDItemDescription + </allattrs> + <displayattrs> + </displayattrs> + </type> + <type name="com.apple.applescript.scriptbundle"> + <allattrs> + kMDItemDescription + </allattrs> + <displayattrs> + </displayattrs> + </type> + </types> +</schema> + diff --git a/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m b/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m index 8c09f1c..32c37c5 100644 --- a/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m +++ b/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m @@ -17,7 +17,6 @@ // #import <Foundation/Foundation.h> -#import "GTMScriptRunner.h" #import "GTMGarbageCollection.h" static BOOL AddStringsToTextContent(NSSet *stringSet, @@ -116,32 +115,73 @@ static BOOL ExtractConnections(NSDictionary *ibToolData, return AddStringsToTextContent(connectionsSet, attributes); } +static NSString *FindIBTool(void) { + NSString *result = nil; + + NSString *possiblePaths[] = { + @"/usr/bin/ibtool", + @"/Developer/usr/bin/ibtool", + }; + + NSFileManager *fm = [NSFileManager defaultManager]; + BOOL isDir; + for (size_t i = 0; i < (sizeof(possiblePaths) / sizeof(NSString*)); ++i) { + if ([fm fileExistsAtPath:possiblePaths[i] isDirectory:&isDir] && + !isDir) { + result = possiblePaths[i]; + break; + } + } + + return result; +} + +static NSData *CommandOutput(NSString *cmd) { + NSMutableData *result = [NSMutableData data]; + + // NOTE: we use popen/pclose in here instead of NSTask because NSTask uses + // a delayed selector to clean up the process it spawns, so since we have + // no runloop it gets ungly trying to clean up the zombie process. + + FILE *fp; + char buffer[2048]; + size_t len; + if((fp = popen([cmd UTF8String], "r"))) { + // spool it all in + while ((len = fread(buffer, 1, sizeof(buffer), fp)) > 0) { + [result appendBytes:buffer length:len]; + } + // make sure we get a clean exit status + if (pclose(fp) != 0) { + result = nil; + } + } + return result; +} + static BOOL ImportIBFile(NSMutableDictionary *attributes, NSString *pathToFile) { BOOL wasGood = NO; - GTMScriptRunner *runner = [GTMScriptRunner runner]; - NSDictionary *environment - = [NSDictionary dictionaryWithObject:@"/usr/bin:/Developer/usr/bin" - forKey:@"PATH"]; - [runner setEnvironment:environment]; - NSString *cmdString - = @"ibtool --classes --localizable-strings --connections \"%@\""; - NSString *cmd = [NSString stringWithFormat:cmdString, pathToFile]; - NSString *dataString = [runner run:cmd]; - CFDataRef data - = (CFDataRef)[dataString dataUsingEncoding:NSUTF8StringEncoding]; - if (data) { - NSDictionary *results - = GTMCFAutorelease(CFPropertyListCreateFromXMLData(NULL, - data , - kCFPropertyListImmutable, - NULL)); - if (results && [results isKindOfClass:[NSDictionary class]]) { - wasGood = ExtractClasses(results, attributes); - wasGood |= ExtractLocalizableStrings(results, attributes); - wasGood |= ExtractConnections(results, attributes); + NSString *ibtoolPath = FindIBTool(); + if (ibtoolPath) { + NSString *cmdString + = @"%@ --classes --localizable-strings --connections \"%@\""; + NSString *cmd = [NSString stringWithFormat:cmdString, ibtoolPath, pathToFile]; + NSData *data = CommandOutput(cmd); + if (data) { + NSDictionary *results + = GTMCFAutorelease(CFPropertyListCreateFromXMLData(NULL, + (CFDataRef)data , + kCFPropertyListImmutable, + NULL)); + if (results && [results isKindOfClass:[NSDictionary class]]) { + wasGood = ExtractClasses(results, attributes); + wasGood |= ExtractLocalizableStrings(results, attributes); + wasGood |= ExtractConnections(results, attributes); + } } } + return wasGood; } diff --git a/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj b/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj index 8bea28e..9909cd4 100644 --- a/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj +++ b/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj @@ -25,7 +25,6 @@ 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */; }; 8B1D48820E59F52A000EB8CA /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D48810E59F52A000EB8CA /* main.c */; }; 8B58F8700E5726D000A0E02E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B58F86F0E5726D000A0E02E /* Foundation.framework */; }; - 8BF153730E5A436600D28B05 /* GTMScriptRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF153720E5A436600D28B05 /* GTMScriptRunner.m */; }; 8BF1543C0E5B42F500D28B05 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF1543B0E5B42F500D28B05 /* ApplicationServices.framework */; }; 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; /* End PBXBuildFile section */ @@ -48,8 +47,6 @@ 8B58F75A0E56502600A0E02E /* ReadMe.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = ReadMe.rtf; sourceTree = "<group>"; }; 8B58F86F0E5726D000A0E02E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = LoadableBundle.xcconfig; sourceTree = "<group>"; }; - 8BF153710E5A436600D28B05 /* GTMScriptRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMScriptRunner.h; path = ../../Foundation/GTMScriptRunner.h; sourceTree = SOURCE_ROOT; }; - 8BF153720E5A436600D28B05 /* GTMScriptRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMScriptRunner.m; path = ../../Foundation/GTMScriptRunner.m; sourceTree = SOURCE_ROOT; }; 8BF1537B0E5A456F00D28B05 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMDefines.h; path = ../../GTMDefines.h; sourceTree = SOURCE_ROOT; }; 8BF153C30E5A48C400D28B05 /* GTMGarbageCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMGarbageCollection.h; path = ../../Foundation/GTMGarbageCollection.h; sourceTree = SOURCE_ROOT; }; 8BF1543B0E5B42F500D28B05 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; @@ -109,8 +106,6 @@ isa = PBXGroup; children = ( 8BF1537B0E5A456F00D28B05 /* GTMDefines.h */, - 8BF153710E5A436600D28B05 /* GTMScriptRunner.h */, - 8BF153720E5A436600D28B05 /* GTMScriptRunner.m */, 8BF153C30E5A48C400D28B05 /* GTMGarbageCollection.h */, 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */, 8B1D48840E59F591000EB8CA /* PluginID.h */, @@ -235,7 +230,6 @@ files = ( 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */, 8B1D48820E59F52A000EB8CA /* main.c in Sources */, - 8BF153730E5A436600D28B05 /* GTMScriptRunner.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj b/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj index 920b6e3..140f832 100644 --- a/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj +++ b/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj @@ -27,6 +27,7 @@ 8B58F8700E5726D000A0E02E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B58F86F0E5726D000A0E02E /* Foundation.framework */; }; 8BF155160E5B442A00D28B05 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF155150E5B442A00D28B05 /* ApplicationServices.framework */; }; 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; + F464A82B0E5DC72D006B02E8 /* schema.xml in Resources */ = {isa = PBXBuildFile; fileRef = F464A82A0E5DC72D006B02E8 /* schema.xml */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -52,6 +53,7 @@ 8BF155150E5B442A00D28B05 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; 8D576316048677EA00EA77CD /* XcodeProject.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeProject.mdimporter; sourceTree = BUILT_PRODUCTS_DIR; }; 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; + F464A82A0E5DC72D006B02E8 /* schema.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = schema.xml; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -94,6 +96,7 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( + F464A82A0E5DC72D006B02E8 /* schema.xml */, 8D576317048677EA00EA77CD /* Info.plist */, 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, ); @@ -198,6 +201,7 @@ buildActionMask = 2147483647; files = ( 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + F464A82B0E5DC72D006B02E8 /* schema.xml in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SpotlightPlugins/XcodeProject/schema.xml b/SpotlightPlugins/XcodeProject/schema.xml new file mode 100644 index 0000000..cd3f3f7 --- /dev/null +++ b/SpotlightPlugins/XcodeProject/schema.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2008 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. You may obtain a copy + of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations under + the License. +--> + +<schema version="1.0" xmlns="http://www.apple.com/metadata" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.apple.com/metadata file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd"> + <types> + <type name="com.apple.xcode.project"> + <allattrs> + kMDItemComment kMDItemDescription + </allattrs> + <displayattrs> + </displayattrs> + </type> + </types> +</schema> + |