How to develop NPRuntime Plugin on Opera in Mac?

2019-09-15 07:51发布

问题:

I have recently developed the plugin for web browsers on Mac OS X.

Developed by XCode, my bundle located in /Library/Internet Plug-ins.

Chrome, Safari, Firefox catch this plugin but Opera doesn't.

How can my plugin be caught by Opera?

回答1:

It’s difficult to answer your question without more information about your plug-in.

The plug-in must be located in “/Library/Internet Plug-ins” and the bundle must have a .plugin extension instead of .bundle. Is the plug-in listed in opera:plugins?

This Mozilla Developer Network article on plug-ins should be very useful.

Daniel, Mac Quality Assurance at Opera Software ASA.



回答2:

How do you declare your plugin info (name, version, MIME types, etc.)? Most browsers support the new Info.plist method, but it may be that Opera requires that you also use the old resource-bassed approach.



回答3:

Try creating a FireBreath Plugin and then look at what differs between how it works and how you built yours. Alternately, just use a FireBreath plugin -- it's a heck of a lot easier to deal with than making your NPAPI plugin from scratch and works around a lot of browser issues and inconsistencies.

FireBreath plugins work as NPAPI plugins on mac and have been reported to work in Opera.



回答4:

I spent weeks looking for the solution, but it appeared incredibly simple: rename YourPlugin.bundle to YourPlugin.plugin !

Did not even require the .rsrc file as it was recommended elsewhere.

:)



回答5:

You could try putting you plugin in /Library/Internet Plug-Ins/ When opera didn't load the plugin.

I do not know why this will happen since opera said it could be put @ ~/Library/Internet Plug-ins/ Opera Document