先分享一个关于HTTP协议的文章:http://blog.csdn.net/gueter/article/details/1524447
1. 需要安装chorme 14,还有python 2.7,和native client sdk。http://code.google.com/chrome/nativeclient/
在chorme (about://flags)把native client 的enable。
2. 创建项目的模板文件:
在examples下面创建一个叫hello_tutorial的project。
cd project_templates python init_project.py -d ../examples -n hello_tutorial
The script creates the following template files in the directory you specify:
your_project_name.html
, the web page that loads the Native Client moduleyour_project_name.cc
(or.c
), source code for the Native Client modulescons
(orscons.bat
), a driver script that runs the SCons tool to build your applicationbuild.scons
, the build instructions for your application
The script has the following command line options:
- -n your project name (use lowercase letters with underscores and numbers but no uppercase letters)
- -d directory for your project
- -c create project using C (C++ is the default). Include the -c option if you want to write a Native Client module in C.