-1

:) Well, I have NPAPI plugin, and I need convert it to Native Client (NACL). I have all C/C++ code, but It has not made by me. So I' just a beginner about C/C++ plugins. I have been reading about NACL, and starting with the tutorial and first steps, but I think it could be a long process to start all codification since beginning. So, My question is if someone knows how could I compile the same c/c++ code from the NPAPI plugin to NACL, or if I have to codify all from scratch.

I'm developing for windows.

Thanks for help! and sorry for my bad english :)


I clarify: I have been searching too much about how to compile NPAPI code to NACL in Google and here, but I have not found a way that can help me to get my goal. So, i'm asking for someone who knows how to update some particular plugin made in NPAPI to the Google's Native Client

esneyderp
  • 111
  • 1
  • 12
  • It won't be simple; it may not be possible at all. What does your plugin do? –  Oct 21 '14 at 04:07
  • Thanks for answer! :) I upload some images with QR codes to my website and then, the plugin start to scan that images, takes the QR values of them and then return that values to the website. but the plugin not only read the QR codes, also take some "section-image-shots" and send them to the website too. – esneyderp Oct 21 '14 at 04:18
  • Wait, why is this a browser plugin in the first place? Why can't your web site process these images itself? –  Oct 21 '14 at 04:45
  • As I said, the plugin has not made by me, but It has some complex code to exam some things of the image. also, plugin has to interact with a scanner. My goal for now, is to convert all NPAPI code to NACL... it's just a requirement of my company. there are some suggest to get my goal ? – esneyderp Oct 21 '14 at 05:53

1 Answers1

1

There is no direct translation from NPAPI to NACL. You'll need to start from scratch by learning how NACL works and figure out how to build one, and then you can migrate pieces of the NPAPI plugin as needed into it. Much of it may not be possible, as mentioned. You may need a javascript interface layer to open the files as well, it's hard to say.

NACL is not a replacement for NPAPI, it's a different interface that provides the ability to compile C/C++ code that can run sandboxed in a browser. There is no direct path for porting between them.

taxilian
  • 14,229
  • 4
  • 34
  • 73
  • Thank you so much for your clarification! So, now I know I was searching for the wrong way... I will recycle C code pieces and start the NACL from scratch. – esneyderp Oct 22 '14 at 22:10