Platform compatibility list
See the WebVM test logs for up to date info.
- Debian x86
- Mac OSX
- Win32
- Similar checklist at Mozilla
- See build notes to WebVM
- Xdiamond Xembed NPAPI example & test
NPAPI sanity test
npsimple tests scriptable object support on several platforms.
Browser versions
- See webkit
- FF2 - Firefox 2 stable releases - ‘Bon Echo’
- Opera
- FF3 - Gran Paradiso
npapi versions in the wild
Get the NPObject for scripting the plugin. Introduced in Firefox 1.0 (NPAPI minor version 14).
NPPVpluginScriptableNPObject = 15,
In FF3 (gecko 1.9) modules/plugin/base/public/npapi.h has a minor of 19, which has a PluginThreadAsyncCall that’s of interest to WebVM.
The latest SDK can be found with the xulrunner nightlies.
In WebVM’s config.mk double check to ensure which version of NPAPI you’re using…
xulrunner-dev
Thanks to Mike Hommey & co. for the excellent packaging work.
x61:~% dpkg -L xulrunner-dev | grep npapi.h | xargs grep NPPVpluginScriptableNPObject
/usr/include/xulrunner-1.9/stable/npapi.h: NPPVpluginScriptableNPObject = 15,
/usr/include/xulrunner-1.9/unstable/npapi.h: NPPVpluginScriptableNPObject = 15,
WebVM uses the stable branch of xulrunner-dev
Gears
Gears seem to be using NPAPI minor 16 for Google Gears
won:508$ find . -iname npapi.h | xargs grep NP_VERSION_MINOR
./gecko_sdk/1.8/linux/include/npapi.h:#define NP_VERSION_MINOR 16
./gecko_sdk/1.8/osx/include/npapi.h:#define NP_VERSION_MINOR 16
./gecko_sdk/1.8/win32/include/npapi.h:#define NP_VERSION_MINOR 16
Lately however Google seem to be moving to MINOR 19:
/Users/hendry/aplix/google/gears/third_party/gecko_1.9/linux/gecko_sdk/include/npapi.h:#define NP_VERSION_MINOR 19
/Users/hendry/aplix/google/gears/third_party/gecko_1.9/osx/gecko_sdk/include/npapi.h:#define NP_VERSION_MINOR 19
/Users/hendry/aplix/google/gears/third_party/gecko_1.9/win32/gecko_sdk/include/npapi.h:#define NP_VERSION_MINOR 19
Mozilla’s gecko-sdk-i686-pc-linux-gnu.tar.gz
- Firefox ‘addon’ plugin listing
- Mozilla sample plugin from from xulrunner sources
- Gecko SDK
- npapi.h $Revision: 3.40 $
- #define NPVERSIONMINOR 16
- A lot of this nspr and other crud
Code’s include
- #define NPVERSIONMINOR 16
- With nspr stripped
Asynchronous events
Gecko 1.9 tip of tree Firefox 3 beta has minor 19. This implements asynchronous events which is important to our plugin.
Darwin’s 10.4.10’s npapi.h
- #define NPVERSIONMAJOR 0
- #define NPVERSIONMINOR 14
- /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/WebKit.framework/Headers/
- A whole lot of other WebKit stuff to possibly bind to
Under Darwin, NPAPI plugins seem to work different. See:
- npsimple
- webkit
- Example NPAPI plugin for WebKit/darwin
- Example NPAPI plugin for Webkit/darwin with Makefile
However:
- It does not matter whether it’s a bundle or dynamiclib
- It does not matter whether it’s a Universal binary (lipo) or not
- It does not necessarily require a main entry point (from Safari 3.1)
- The big caveat is SYMBOL MANGLING. extern “C” is your friend!
Webkit’s tip-of-tree subversion
- #define NPVERSIONMAJOR 0
- #define NPVERSIONMINOR 18
- JavaScriptCore/bindings/npapi.h
Ubuntu (gutsy)
- firefox-dev:/usr/include/firefox/plugin/npapi.h
- $Revision: 3.40.4.2 $
- #define NPVERSIONMAJOR 0
- #define NPVERSIONMINOR 17
- Other versions of npapi
The future of NPAPI
Is decided by plugin futures. Then these “standards” need to be implemented by browser vendors. For example enumeration in minor 18
Identification
Tracking differences with platforms and browsers, in the way the WebVM plugin identifies itself. The objective is to show subversion versioning numbers easily on deployments. The build page shows how the version numbers are inserted into the product.
Darwin (OS_DARWIN)
Opera & FF
opera:plugins - native plugin identification page
about:plugins - native plugin identification page for Firefox
Localized.r - an odd .REZ file (seems Darwin specific) that does not seem to be required by Safari.
resource 'STR#' (126) { {
"WebVM plugin",
"dev-jsx@aplix.co.jp Opera"
} };
This data is displayed on plugin listing.
Also with data from the function:
NPP_GetMIMEDescription
Seemingly not npjsx/darwin/Info.plist like Safari does.
Safari
- Plugin listing displays information from Info.plist, WebPluginName key.
- Native Plugin listing
Gets “WebVM Plug-In VER: 437M” for example from the npjsx/darwin/Info.plist WebPluginName key.
Uses the WebPluginDescription key in npjsx/darwin/Info.plist for description.
Uses the WebPluginMIMETypes key in npjsx/darwin/Info.plist for describing the mime type in native plugin listing.