首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将SIMBL插件加载到SystemUIServer中

如何将SIMBL插件加载到SystemUIServer中
EN

Stack Overflow用户
提问于 2011-01-25 11:00:58
回答 1查看 304关注 0票数 0

我有开发两个SIMBL插件的经验。

目前,这些系统在MacOSX10.6.6上运行正常。

我计划做一个新的SIMBL插件,以修改菜单的行为额外。

菜单额外属于SystemUIServer。

SystemUIServer存在于这个地方:

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

SystemUIServer的包标识符是com.apple.systemuiserver。

因此,我将密钥SIMBLTargetApplications添加到Info.plist中,如下所示:

代码语言:javascript
复制
<?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更改为另一种通用应用程序名称,它将正常工作。

这有什么问题吗?

--

莫亚希

ttp://hitoriblog.com

EN

回答 1

Stack Overflow用户

发布于 2011-09-26 14:34:43

SIMBL只适用于可可应用。SystemUIServer不是可可应用。查看它的符号链接以获得更多证据。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4792664

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档