用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