2
votes

I downloaded "npsimple" NPAPI plugin for Mozilla from the link "https://code.google.com/p/npapi-chrome-plugin-helloworld-example/source/browse/trunk/samplevsproject/?r=2"

I was able to build it fine and run the plugin code in Chrome by packing the "npsimple.dll" as Chrome extension (.crx) and run it Chrome browser.

But I wasn't able to deploy the same NPAPI plugin "npsimple.dll" in Mozilla Firefox. I tried keeping the dll in mozilla firefox's installation folder under "plugins" folder, and restarted the browser. It did not help.

Could someone give some pointers on how to go about deploying NPAPI plugin dll in Mozilla Firefox?

I tried the following ways, but it didn't work.

I tried doing it by writing a plugininstall.reg file having following content inside it and imported the file in regedit window. Then I restarted Mozilla Firefox and it didn't work,

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@somecompany.com/npSample,version=1.‌​0.0.1]
"Description"="A sample plugin"
"Path"="D:\\Projects\\Browser_Plugin_Development\\NPAPI_Samples\\npapi_vs2008\\npsimp‌​le\\Debug\\npsimple.dll"
"ProductName"="npsimple"
"Vendor"="somecompany"
"Version"="1.0.0.1"

Even I've tried keeping the npsimple.dll plugin under Mozilla's plugins directory "C:\Program Files\Mozilla Firefox\plugins" and that too didn't help.

Thanks, Prem

1

1 Answers

1
votes

The page you want is on the mozilla wiki.

Here is what you need to do: (quoted from that page)


Windows Installation Using the Registry

On Windows, plug-ins should be installed to a plug-in-specific directory such as C:\Program Files\Plugin Name\nppluginname.dll. Then the following registry values should be added to the Windows registry (the plug-in-identifier should follow the specification):

  • HKLM/Software/MozillaPlugins/plugin-identifier

    • Descripton: REG_SZ "Description of the Plugin"
    • Path: REG_SZ "C:..Path to the plugin.dll"
    • ProductName: REG_SZ "The Plugin Name"
    • Vendor: REG_SZ "The Plugin Author/Vendor"
    • Version: REG_SZ "0.5.whatever plugin version string"

    -

  • HKLM/Software/MozillaPlugins/plugin-identifier/MimeTypes

    • Add a sub-key for each MIME type the plugin supports, with no values

It is worth noting that you can also use HKCU, though note that when doing both 32 and 64 bit versions HKCU doesn't support the SysWOW32 virtualization that HKLM does. (If that means nothing to you then you can probably ignore it)