firebreah开发插件(同时适用IE和chrome、firefox等非IE)

来源:互联网 发布:java 干10年工资多少 编辑:程序博客网 时间:2024/05/01 07:59

一、python安装
下载http://www.activestate.com/activepython/downloads
选择相应的windows版本,按提示操作即可




二、cmake安装
下载http://www.cmake.org/cmake/resources/software.html
选择exe文件,按提示操作即可,最后记得勾选添加环境变量
cmake命令要重启电脑后才有效的



三、firebreath安装
下载http://www.firebreath.org/display/documentation/Download
要下载firebreath和firebreath_boost两个zip包的
解压2个包,假设解压后的firebreath包放在C盘,目录是C:\firebreath
然后将firebreath_boost解压后的lib和boost文件夹整个拷贝到
C:\firebreath\src\3rdParty\boost目录下
拷贝后的目录应该是
C:\firebreath\src\3rdParty\boost\boost和C:\firebreath\src\3rdParty\boost\libs
这样其实已经好了,哈哈!接下来是创建VC项目工程了。




四、创建简单的工程,并生成dll,然后调用
1.打开cmd,win7下最好用管理员方式打开
2.cdC:\firebreath
3.C:\Python27\python.exe   fbgen.gy
假设Python是安装在C盘
输入插件名等信息,具体参看firebreath官方视频(打开很慢,要耐心等)
http://www.firebreath.org/display/documentation/Old+Windows+Video+Tutorial
4.prep2008.cmd    projects   build
我的机器装的是VS2008
5.打开C:\firebreath\build\FireBreath.sln
编译即可生成dll文件,
release版本的在C:\firebreath\build\bin\PluginTest\Release\npPluginTest.dll
顺便说一下,C:\firebreath\projects\PluginTest\PluginTestAPI.cpp文件很重要,添加功能都在这里
6.注册插件,cdC:\firebreath\build\bin\PluginTest\Release\
regsvr32 npPluginTest.dll
会看到弹出注册成功的消息框
7.用IE浏览器打开C:\firebreath\build\projects\PluginTest\gen\FBControl.htm
非IE浏览器也可以的,貌似已经注册好了,
HKEY_CURRENT_USER\Software\MozillaPlugins\www.****.com/PluginTest 

原创粉丝点击