2011-01-25 66 views
0

我有开发两个SIMBL插件的经验。如何将SIMBL插件加载到SystemUIServer

这些在Mac OS X 10.6.6上此时正常工作。

我打算做一个新的SIMBL plug-in修改Menu Extra的行为。

Menu Extra属于SystemUIServer。

SystemUIServer存在在这个地方:SystemUIServer的

/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer

包标识符是com.apple.systemuiserver。

所以我添加了一个关键SIMBLTargetApplications到的Info.plist如下:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
<key>CFBundleDevelopmentRegion</key> 
<string>English</string> 
<key>CFBundleExecutable</key> 
<string>${EXECUTABLE_NAME}</string> 
<key>CFBundleIconFile</key> 
<string></string> 
<key>CFBundleIdentifier</key> 
<string>com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}</string> 
<key>CFBundleInfoDictionaryVersion</key> 
<string>6.0</string> 
<key>CFBundleName</key> 
<string>${PRODUCT_NAME}</string> 
<key>CFBundlePackageType</key> 
<string>BNDL</string> 
<key>CFBundleShortVersionString</key> 
<string>1.0</string> 
<key>CFBundleSignature</key> 
<string>????</string> 
<key>CFBundleVersion</key> 
<string>1</string> 
<key>NSPrincipalClass</key> 
<string></string> 
<key>SIMBLTargetApplications</key> 
<array> 
    <dict> 
    <key>BundleIdentifier</key> 
    <string>com.apple.systemuiserver</string> 
    </dict> 
</array> 
</dict> 
</plist> 
  1. 构建Foo.bundle。
  2. 复制到$ HOME/Library/Application Support/SIMBL/Plugins。
  3. 运行“killall SystemUIServer”。
  4. 使用Console.app仔细查看日志消息。

但重新启动时,Foo.bundle不会加载到SystemUIServer。

如果将BundleIdentifier更改为另一种通用应用程序名称,则它工作正常。

这是什么问题?

-

moyashi

TTP://hitoriblog.com/

回答

0

SIMBL仅适用于可可应用。 SystemUIServer不是可可应用程序。检查其符号链接以获取更多证据。