如何在Windows中为Google Chrome创建PPAPI插件?

gra*_*esh 9 dll plugins google-chrome ppapi

我是PPAPI开发的新手,已经从这里下载了已经有的例子

但是,即使遇到文档后,我也无法构建项目.

我有Microsoft Visual Studio 2010,Windows操作系统和Chrome:30.0.1599.65

我知道一旦创建了一个dll,使用该regsvr32命令就会注册该插件,尽管获取dll,即使使用可用的代码,对我来说也很难.任何有关构建DLL的帮助表示赞赏.

DRa*_*ayX 8

You will want to start here to download the and set up the SDK: https://developers.google.com/native-client/sdk/download

This page will take you through how to build and run the examples: https://developer.chrome.com/native-client/sdk/examples

This page goes over how to actually create your own plugin: https://developer.chrome.com/native-client/devguide/tutorial/tutorial-part1

And then you should read this entire section to code and structure your application: https://developer.chrome.com/native-client/devguide/coding/application-structure

If you need any third party libraries be sure to check here: https://chromium.googlesource.com/webports

Edit: Forgot to mention that you will want to use the same version of the pepper api as the version of chrome you're running (in this case pepper_30). Also, you have to use the NaCl toolchain (one of either glibc, newlib, or pnacl); you can't use the Visual C/C++ toolchains. I recommend trying pnacl now that it is available, as that is by far the most cross platform version, but if you run into trouble, you'll probably want to use the newlib toolchain as it has better support.