How many versions of an NPAPI browser plugin do I have to make? - npapi

I know that if I write a C++ plugin, then I need to have Linux, Mac, Windows versions at least but what's the full list of combinations? NPAPI is supported by many browsers so does that mean the exact same compiled NPAPI plugin binary/installer/whatever for Windows is ready for use in all those browsers on Windows which support NPAPI? Or do you have to 'compile' the same plugin code separately for each browser in some way?

Yes, a single NPAPI plugin runs in every NPAPI-supporting browser on a given platform, as long as you don't do anything to specifically undermine that (e.g., some people make NPAPI plugins but then add XPCOM code to them, making them Firefox-specific).

Additionally, as you probably saw in the answer to your other question, FireBreath can be used to create a single plugin that can be made to work cross platform on pretty much all browsers, including IE on windows.
FireBreath strongly discourages using things like XPCOM for exactly the reason that smorgan mentioned.

Related

TCL/TK in browser

I've been trying to run a TCL/TK script in a browser so people with minimal computer knowledge can run it (my script) on all devices.
I've come across the TCL/TK plugin from 2006 but I can't get it to work. Even if I could, it doesn't contain the user friendliness I am looking for.
I also came across a website that runs TCL scripts in-browser but doesn't seem to recognise TK commands....
So far to distribute it to people I wrapped it into a .exe but people are requesting it to be used on mobile devices (with more mobility than a windows laptop).
Any one got some information to do this without rewriting all of my code?
Or an easy way to port a TCL/TK script to iPhone/iPad or Android (I don't think there will be any easy solution for this, that is why the browser concept made most sense to me)
Unfortunately, the browser plugin depends on the browser supporting the NPAPI specification, and that's now been largely removed from browsers (and was never supported on mobile devices). This has irritated quite a few other people too, and I don't think there's much you can do to fix it directly. So instead, let's look at some workarounds…
You might be able to use the NaCl support in Chrome on desktop systems, or you could package things up in a starpack (ActiveState's TDK is a commercial version of that, among other things) and for deployment to Android you can use Androwish (which I personally recommend). I'm nothing like as certain about solutions for iOS.
For plain Tcl try EmTcl, Tcl compiled with emscripten.

native browser plugins alternatives to NPAPI

Hello as you might now NPAPI is deprecated.
What are the alternatives to this? I see skype released now the web version where you need to install a web plugin to make voice and video calls. Looking over what I installed I arrived to the conclusion that on chrome they are using Google Native Client: https://developer.chrome.com/native-client
But this one is not supported on firefox/safari (only chrome).
On Firefox/Safary I'm not sure what they are using.
So what are now the best alternatives for this kind of job where using c++ is mandatory (to extend an existing app and make it available as web plugin)
Silviu
After Chrome drop the NPAPI support, there is no-common technology support by Firefox/Chrome/Safari. You can consider about Firebreath 2.0. It allow you use one C++ implement to support different browser.
It's not released yet... If you like to try version 2.0, you can get source code from https://github.org/firebreath/firebreath (the "refactor" branch)
Note: version 2.0 make huge change, because the call between plugin and javascript are asynchronous! Upgrade from older version required lots of javascript change.

Clickonce: Appropriate for web site that is only supported in Chrome?

We are looking for an easy way for our users to download and install a small client widget (it is a windows app) used with our (much larger) web app.
Our web app is currently only supported in Chrome.
Our concern is that the clickonce support piece may be missing from most Chrome installs.
The questions:
-- Is clickonce really going to be useful in this situation?
-- What is the best option for "one click" download-and-install for Chrome on windows?
ClickOnce uses NPAPI which is being removed from Chrome. You will need to look at NaCl, Native Messaging or PPAPI instead of ClickOnce. There used to be browser extensions that you could use, however they have been removed from the store (or no longer work).
Using Chrome should not matter, so yes Click once will be useful in this situation.
The only thing you need to worry about is your clients using Windows and the appropriate version of the .net framework. I hope this helps.

Is a NPAPI plugin what I am looking for?

I need to develop a mini ClickOnce plugin for Firefox, Chrome, Operah and Safari (preferably, one that works on all of the above).
My plugin needs to be able to run an application in a one-click fashion. In other words, by going to a specific URL, my application will run on the target machine (no prompts / dialogs shown). Unfortunately, ClickOnce is only available with IE, and I am unhappy with the ClickOnce plugins that currently exist. I would like to develop a tailored ClickOnce plugin that suits my specific needs.
I read about FireBreath, which sounded like a perfect solution for me. I also read about the difference between an extension and a plugin and I think a plugin is what I am looking for. I just wanted to make sure with you guys that I am on the right path. Is what I want to achieve possible with FireBreath / NPAPI plugins? Can a plugin download an executable and then run it on a target machine?
Yes, NPAPI will allow you to do what you want. You can run arbitrary native code using an NPAPI plugin, and control it via JavaScript on the web page side. Users will have to download and install your plugin though, so it only makes sense if this is something users will use more than once.
You'll obviously have to be very, very careful about security though. If you make a plugin whose sole purpose is to download and run code without user interaction then you'll need to be absolutely certain that there's no way for a malicious page to use your plugin.

Any example of writing an NPAPI plugin in Linux?

I need to write a browser plugin to communicate with another process, and it seems I have to use NPAPI plugins. Is there any example or open source NPAPI plugin I can refer to?
Many thanks for your reply.
Summary of answers
http://mxr.mozilla.org/seamonkey/source/modules/plugin/samples/
http://www.firebreath.org/
http://code.google.com/p/nixysa/
http://code.google.com/p/npapi-file-io/
2 and 3 are both frameworks to make plugin development easier.
I found one example at
http://mxr.mozilla.org/seamonkey/source/modules/plugin/samples/
you could also use the open source FireBreath plugin framework; they are nearing a 1.0 release for windows only, but it would not be hard to port it to linux; mac os shouldn't be bad either, but it will take a little work to get CMake to generate the correct bundle type =]
Yes, I am one of the primary maintainers, so I'm a bit biased. You can also find some good general information on how NPAPI works on my blog, starting here:
http://colonelpanic.net/2009/03/building-a-firefox-plugin-part-one/