Chrome PPAPI plugin to execute commands on windows system - windows

We were previously using a NPAPI plugin to execute some commands on windows system from our website. Now that NPAPI is gone, we are trying to port things to PPAPI or NaCl but there seems to be a lot of issues.
Google seems to provide vs_addin for Visual Studio 2010 and Visual Studio 2012, but it always give error when trying to compile the code as Pepper Plugin during linking phase. The error is something related to _MSC_VER mismatch as the object files in PPAPI libraries seems to be having that version as 1800 where the value is supposed to be 1600 or 1700 for VS2010 and VS2012 respectively.
To get around this issue, we tried downloading a old copy of pepper, but its not available from SDK. somehow we found the pepper_25 version on the internet, but then it seems that postmessage function is not available for plugins.
Tried using scriptableobjects but looks like the support for them was actually removed long back sometime in chrome 13?
If we are trying to build it as NaCl plugin, then we don't get access to windows functions like ShellExecuteA as the corresponding libraries are not included. Trying to include libraries only results into more errors.
This might be possible by having an extension with native messaging, but again a website cannot directly interact with an extension unless the extension places a content script on the webpage. As the users of the website, can install the website on their own systems, we have to scan and add content script on all the web pages which doesn't seem to be a nice option as it can result into system slowdown.
TLDR:
Now the question is, how can we build a chrome plugin that can execute commands on windows?
Thanks & Regards

The short answer is, there is (by design) no way to distribute a plugin that has access to the native platform APIs. The VS addin has a way to compile one, but it will only run on your local machine. You can develop a NaCl or PNaCl plugin, but it is limited to NaCl's APIs plus Javascript. If you need native APIs, then you might want to look at native messaging.

Related

Inserting libraries or plug-ins into Microsoft Office apps for Mac

I'm trying to write a plugin for Office on Mac to match some functionality I have on Windows. I've been working with Word 2011 for Mac to create a PoC. I can get my library loaded into Word in various ways, but I'd really like something clean and (at least somewhat) supported.
I've discovered a WordPDE.plugin inside the app bundle, but DYLD_PRINT_LIBRARIES reveals that the plugin is never loaded under typical operation (Start app, create doc, type content, save doc, quit app.) I placed a dummy plugin beside WordPDE.plugin only to have it ignored by Word.
I also see that the Office apps include a MicrosoftComponentPlugin.framework but the information reported by class-dump doesn't help determine how to write a "Microsoft Component Plugin" nor how it might actually get loaded.
Ultimately, I can get my library into Word by asking dyld to do it, or by modifying load commands in the executable, but I'd much prefer going a cleaner route with some kind of plugin. Is there anyone with any information about how Word for Mac loads and uses this plugin and/or the mentioned framework?

How to hide the code of firefox extension

I made an IE toolbar by BHO with C#. And now I want to make a firefox version.
I planned to use xul but it will show the source code to the user.
Seems DLL is not a good way in firefox.
I tried some toolbar like yahoo, google which will not create files in extension folder.
How can I make something like that?
(please see my note about obfuscation below)
It might not be the optimal way to develop a Firefox extension, but you can absolutely build them using an external DLL.
Before Gecko 2.0 you had to use the rather esoteric Mozilla build toolchain to include compiled code in your extensions.
js-ctypes to the rescue:
https://developer.mozilla.org/en/js-ctypes/Using_js-ctypes
https://developer.mozilla.org/en/js-ctypes/js-ctypes_reference
js-ctypes makes very easy work of loading external DLLs and binding their APIs to JavaScript functions.
You'll need to compile a few different versions of your DLL, and have your JavaScript correctly detect the platform and load the appropriate DLL, but it basically works the same for all platforms once you're back in JavaScript land.
ctypes.libraryName helps you determine the extension the DLL has on the current platform (e.g: .dll for windows, .so for Unix).
You can use other information (e.g: navigator.userAgent) to more concretely determine which sub-platform (e.g: Windows 7 64bit, or Vista 32bit).
Update:
There are a whole bunch of good reasons to included compiled DLLs in your extensions/applications (e.g: speed, special capabilities, 3rd party libraries), but if your sole purpose is obfuscation (hiding source code), then...
I wouldn't worry about it were I you. Technological means of anti-piracy won't get you very far in this modern world - if your software is good enough to get attention, someone will crack it.
I'd simply forget about it, and spend a little money on lawyers instead. (Copyright: yay! Patents: nay!)

Is there an Adobe AIR like product for just HTML5 (no flash) on Windows

I would like to create a Windows desktop app using HTML5 features, specifically H.264 video,Web SQL Database,FileReader API. I don't want to use AIR (which currently does not support the video tag, instead uses Flash). Ideally I would like an exe file that just wraps the latest version of webkit in a basic window. It should be stand alone, not rely on the user having Chrome etc. installed. It could load an index.html file in the same directory as the exe. That is it.
I have been unable to find anything like this. I was going to build it myself using QTWebkit but the latest version (4.8.0) does not support the Video tag due to some kind of build issue. I assume the 4.8.1 version will fix this.
Does anyone out there know of something like this that is available now?
For anyone coming across this, Titanium for desktop is no longer supported by Appcelerator, but the project is still supported as an open source initiative. As of today (10/14/2012), it is called TideSDK. According to their Twitter account, they're behind in the 1.3 release due to some sponsored work that will end up in the code base.
Additional options not yet mentioned include AppJS (OSS, requires node.js) and Sencha Desktop Packager (quite pricey).
I think titanium is not totally gone. There is this stuff called tideSdk
I couldn't try it out yet also , so video support and the codec are open for your exploration. Here is how they say:
Create multi-platform desktop apps with HTML5, CSS3 and JavaScript
TideSDK is the new standard for creating beautiful and unique desktop
apps using your web development skills.
I recently thought about doing the same thing, you can still do it with air without using flash, but you could also use Chrome Packaged apps, mozilla prism (although inactive today) or Microsoft HTA (html application).
You can think of using a framework that does the browser embedding for you like Titanium. It's mostly used for creating apps that can be published to iphone, android, and windows devices. It will create a windows MSI install.
Another option is to use the CEF project ( Chromium Embedded Framework for C/C++). I havn't looked at it much, so I can't tell you how difficult/easy it is to work with. Their main site also has wrappers for Java, .NET, and other languages.

How to build examples using libspotify on windows

I have downloaded spotify API and am trying to build the example code using libspotify on Windows. The build environment seems to apply only for Mac/Linux world (atleast the Makefile seems to suggest that and there are no Visual Studio project files). Any one has any luck in building the sample code on Windows ?
Even the basic stub example uses pthreads which is not available on windows. Since all their examples assume a POSIX compliant OS (which windows is not) I'm afraid you will not be able to build them on windows (natively). If you want try then take a look at Cygwin.
However, you can still use the include header file and the provided dll/lib to link against and develop applications. The library calls made in the examples are still valid - just not the examples themselves.

Do I need to develop on Vista to write to the wmdc (windows mobile device center) API?

Can I write and compile code for this on XP? We have utilities for our apps that use activesync and now will be adding Vista/WMDC - and I was hoping I don't have to have another development OS (Vista) to develop and compile on.
I have not seen much documentation for the API for WMDC - can someone point me to some useful references for it?
hummm... ActiveSync, so Windows Mobile am I right?
all you need is the SDK and Visual Studio (well, this last you don't need cause you can compile everything using the command line, but, very nice to have for such applications)
there are plenty of SDKs for what you need, for example PocketPC, Windows Mobile, etc...
the sdk contains everything you need to build, compile and deploy an application, works fine on windows XP (what I currently use) and with ActiveSync, you can even debug the application in the device ;)
added:
unfortunatelly there is no SDK for the WMDC. The only thing you have are the 4 libraries in the %WinDir%\Windows Mobile. It contains 4 libraries named as "Microsoft.WindowsMobile.*.dll". Additionally you don't get any documentation on the libraries themselves which makes it hard to use.
As you use the RAPI (I think by using the OpenNETCF library) most of the applications shall still run under WMDC as the included RAPI seems to be backward compatible. The included RAPI itself is in a new version.
taken from MSDN forum
I hope this helps for the moment.

Resources