我尝试注入几个SIMBL插件(例如漂浮和FScriptAnywhere)到Chrome和其他应用程序。
它在所有其他应用程序上都可以正常工作,但在Chrome上不行。我在控制台上得到这样的输出:
01.09.11 13:30:15,911 SIMBL Agent: Google Chrome started
01.09.11 13:30:15,912 SIMBL Agent: app start notification: {
NSApplicationBundleIdentifier = "com.google.Chrome";
NSApplicationName = "Google Chrome";
NSApplicationPath = "/Applications/Google Chrome.app";
NSApplicationProcessIdentifier = 87543;
NSApplicationProcessSerialNumberHigh = 0;
NSApplicationProcessSerialNumberLow = 30412031;
NSWorkspaceApplicationKey = "<NSRunningApplication: 0x40092c060 (com.google.Chrome - 87543)>";
}
01.09.11 13:30:15,913 SIMBL Agent: checking bundle /Users/az/Library/Application Support/SIMBL/Plugins/Afloat.bundle
01.09.11 13:30:15,913 SIMBL Agent: checking target identifier *
01.09.11 13:30:15,914 SIMBL Agent: send inject event
01.09.11 13:30:15,956 SIMBL Agent: eventDidFail:'tvea' error:Error Domain=NSOSStatusErrorDomain Code=-1708 "The operation couldn’t be completed. (OSStatus error -1708.)" (the AppleEvent was not handled by any handler ) UserInfo=0x400877940 {ErrorNumber=-1708} userInfo:{
ErrorNumber = "-1708";
}
01.09.11 13:30:15,957 [0x0-0x1d00cff].com.google.Chrome: Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler in scripting addition /Library/ScriptingAdditions/SIMBL.osax.
我认为eventDidFail:'tvea'
错误可以忽略,因为我在所有应用程序上都得到它(尽管我想知道它是什么)。
然而,我认为最后一个错误Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler in scripting addition /Library/ScriptingAdditions/SIMBL.osax
是相关的。
这是什么意思?会是什么呢?
啊,这似乎是Chrome自己引入博客SIMBL插件的功能,因为稳定性问题。
http://www.conceivablytech.com/8990/products/google-stabilizes-chrome-for-mac-os-x-lion-adds-pulseaudio-for-linux这是Chrome的补丁。这是bug报告。有趣的,顺便说一句。它使用mach_star的mach_override来修补内部函数_CFBundleLoadExecutableAndReturnError
,以增加对黑名单库的检查。
我提交了一个关于禁用CFBundleBlocker的方法的bug报告。
我找到了一种方法来解决CFBundleBlocker在Chrome:
我修补SIMBL工作在/System/Library
而不是在/Library
。补丁版本可以在这里找到。此外,补丁SIMBL搜索SIMBL插件也在/System/Library/Application Support/SIMBL/Plugins/
。SIMBL插件必须安装在该目录下,否则Chrome也会阻止它们。