我有開發兩個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>
- 構建Foo.bundle。
- 複製到$ HOME/Library/Application Support/SIMBL/Plugins。
- 運行「killall SystemUIServer」。
- 使用Console.app仔細查看日誌消息。
但重新啓動時,Foo.bundle不會加載到SystemUIServer。
如果將BundleIdentifier更改爲另一種通用應用程序名稱,則它工作正常。
這是什麼問題?
-
moyashi
TTP://hitoriblog.com/