How to load SIMBL plug-in to the SystemUIServer
I have experience in developing two SIMBL plug-in.
Those are working properly on the Mac OS X 10.6.6 at this moment.
I'm planning to make a new SIMBL plug-in that modifies behavior of Menu Extra.
Menu Extra is belonging to the SystemUIServer.
SystemUIServer exists at this place:
/System/Library/CoreServi开发者_StackOverflowces/SystemUIServer.app/Contents/MacOS/SystemUIServer
Bundle identifier of SystemUIServer is com.apple.systemuiserver.
So I add a key SIMBLTargetApplications to the Info.plist as follows:
<?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>
- Build a Foo.bundle.
- Copy to the $HOME/Library/Application Support/SIMBL/Plugins.
- Run a "killall SystemUIServer".
- Watch log messages carefully with Console.app.
But Foo.bundle won't load to the SystemUIServer when relaunching.
If change BundleIdentifier to the other kind of generic app name, It works properly.
What's wrong with that?
--
moyashi
ttp://hitoriblog.com/
SIMBL works only with cocoa application. SystemUIServer is not cocoa application. Check its symbolic link for more evidences.
精彩评论