用FireBreath来编写跨浏览器插件


这是对于公司某个需求的临时研究,最后经过简单实验放弃了这个方案,因为编写插件不能满足需求。

 

下面着重讲一下FireBreath编译。

首先根据文档,用git clone下载Firebreath源码(不推荐1.7):

git clone git: //github.com/firebreath/FireBreath.git firebreath-dev
 
然后再firebreath的源码根目录运行,把依赖boost库下载下来,会自动下载到适当的目录:
git submodule update --recursive --init
我用的是Cmake来编译,编译成VS2013的NMake Makefiles
 
打开VS2013 x86本地工具命令提示,然后修改prep2013.cmd文件,修改如下:
1 @echo off & setlocal enableextensions enabledelayedexpansion
2 
3 @set _FB_GEN="Visual Studio 12"
4 set _FB_GEN="NMake Makefiles"
5 
6 call "%~d0%~p0\common.cmd" %*
7 if %errorlevel% == 2 exit /b 1
8 call "%~d0%~p0\winprep.cmd"

 

然后运行, prep2013.cmd examples build
你会发现源码根目录下直接新建了一个build目录,里面自动生成了NMake的Makefile文件,然后cd进build,运行nmake命令,OK,等待编译完成吧,
firebreath的官方样例也编译好了。
 
最后用regsvr32 [plugin_name].dll来安装插件就可以了。
 
 
 

references:

http://www.firebreath.org/

http://www.firebreath.org/display/documentation/Getting+Started

http://www.firebreath.org/display/documentation/Deploying+and+updating+your+plugin#Deployingandupdatingyourplugin-Firefox

http://blog.csdn.net/beyond_cn/article/details/38235717

http://blog.csdn.net/ubuntu64fan/article/details/7941167

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM