How do I package a NPAPI plugin for chrome in linux? - google-chrome

I have developed a NPAPI plugin with FireBreath. I've read the method on Chrome NPAPI Plugins and Google Chrome Extensions and NPAPI, then followed that way to include my npapi.so file in the manifest.json like this:
"plugins": [
{ "path": "linux_npapi.so" }
]
Actually, I packaged my plugin file into .crx and installed it successfully, but when I run my test page, the plugin didn't seem to work.
I have already tryed to package my plugin into .xpi and it worked fine with firefox. Then I've followed the way on Deploying and updating your plugin and copyed my plugin file into ~/.mozilla/plugins. It worked fine on firefox too, but still failed to work on chrome. :( And my plugin didn't show in chrome://plugins page.
How do I package a NPAPI plugin for chrome in linux?
Chrome version is 32.0.1700.107 .
Any help would be greatly appreciated...
Thanks...

When you build a plugin on linux, you either build it 32 bit or 64 bit. If you build it 32 bit it will load in 32 bit browsers, and 64 bit will load in 64 bit browsers. You need to make sure you build it correctly for what you want.
It sounds like that's your issue -- you are trying to load a 32 bit plugin on a 64 bit process and/or vise versa. That won't work.
Unfortunately I don't know offhand how to make cmake build 32 bit on a 64 bit system.

Related

How install custom pepper plugin in Chromium browser source code?

I need to build in my pepper plugin in chromium source code for building browser with already installed plugin. Is there possibility to do that?
A handful of plugins are built in. Since these are plugins, they are built independently from Chrome and loaded dynamically rather than directly linked to the Chromium executable. This is the function that causes them to be loaded into Chromium:
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/chrome_content_client.cc&rcl=1436599777&l=118
The NaCl plugin is special, since it runs "in process", which means it is loaded into the renderer process. Eventually, support for this kind of plugin will be eliminated, so it is best to follow the pattern of the "out of process" plugins, which run in their own process, such as PDF.

How to deploy a simple NPAPI plugin DLL in Mozilla Firefox (v29.0.1) in Windows?

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
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)

Running the iMacros Chrome plugin from Batch file

I have the iMacros plugin for Google Chrome installed and I want to be able to run a .iim file from a Batch file.
I have seen many options online but they all seem to work only if you have the actual iMacros program (not just the plugin).
For example, some solutions look like:
C:\Program Files\Mozilla Firefox\firefox.exe imacros://run/?m=test.iim
Also an option that seemed to originally have worked for pluggins was:
C:\Program Files\Mozilla Firefox\firefox.exe http://run.imacros.net/?m=test.iim
But this apparently has not been working for some years now.
Are there any options to opening a iMacro file from a Batch file, only having the plugin?
Thank you.
Well, it depends on the version and OS of your computer. If you are using Windows then you might want to check to see if that version is compatable with what you are trying to do. If you are using Mac then make sure your iOS is compatable as well. Different versions of OS do different thing. For example, Windows XP batch filing does things differently than from Windows 8.1 or Windows 7.
Another example:
:start
Color 0a
Echo hello world.
Pause
:end
Cls
Color 0b
Echo hello again.
Pause
This will work in Windows 8 because it allows for color changes when cls clears the screen. However, this will not work in Windows 7, or when I tried it didn't work.

Any workaround for NPAPI nor working on Chrome 32

Chrome 32 has blocked NPAPI for extension development.
I wonder if there is any workaround for enable this feature in Chrome, like some settings or launch args.
The only thing that should have changed for extensions so far is that you can't post new extensions that include NPAPI plugins to the store. There's no setting or flag that you can use locally that would make the store policy not apply to you.
If you are seeing plugins in existing extensions not working correctly in 32, you should file a bug.

Firebreath plugin not loading in Firefox 20.0

My environment: win8 64bit, vs2010,
I follow every step in the tutorial but my own dll plugin just can't be installed, I have also installed WiX toolsets and made a msi file, but it simply do not work...
(1) I do all the work with prompt(privileged ) cmd.
(2)My files are shown in below
(3)firefox about:plugins page do not contain my dll plugin after my msi file installed..
(4) failed ..
So what is going on here?
Are you building using the prep2010x64.cmd file (or a different x64.cmd file)? if so, that's likely your issue. Many people, failing entirely to read the instructions on the firebreath website, mistakenly build using the x64 because they're running a 64 bit operating system. thing is, the browsers like firefox still are 32 bit, so the plugin needs to be built 32 bit as well.
The next question, if that doesn't help, is whether or not the regsvr32 command succeeds when you run it on the .dll.
Clarification: You figured this out, but for future readers to be very clear:
Do not use prep2010x64.cmd unless you can explain clearly why you need to -- and running a 64 bit OS does not count. Most people want to use prep2010.cmd (or whichever year).