Install and use the cross-browser plug-in framework firebreath-plug-in Linux
Cheungmine
2012-9
Key words: Linux, plugin, Firefox
ReferenceArticleAddress:
Http://www.firebreath.org/display/documentation/Building+on+Linux
This article tries to use the clearest steps to describe how to install the firebreath Development Environment on Linux (Ubuntu Desktop), and
The sample plug-in project Hello describes how to develop browser plug-ins on Linux.
1)First, install the development environment on Ubuntu Desktop 12.04,Install cmake and libgtk (the graphics library used by most browsers) and git.
$ Sudo apt-Get install cmake libgtk2.0-dev git
2) download the latest version of firebreath. Current Directory :~ /Nvpack. Decompress.
$ Sudo wget-o./firebreath.tar.gz https://github.com/firebreath/FireBreath/tarball/master
$ Sudo tar xzvf firebreath.tar.gz
$ Sudo mV./firebreath-*./firebreath
$ Cd./firebreath
The current directory is ~ /Nvpack/firebreath
$ Sudo mkdir./Projects
3) generate a sample project (this step is optional ).
$ Sudo./prepmake. Sh./Examples
4) Create your own plug-in: Hello
$ Sudo python./fbgen. py
Enter: Hello
Such a hello pluginSource codeIt is generated. Next, generate the Project Build File.
5) generate the Project Build File. Because it is built with make, we choose:
$ Sudo./prepmake. Sh./projects/Hello
6) build a project
$ Cd./projects/Hello
$ Sudo make
7) deployment and Testing
The plug-in file nphello. So is generated,In:
../Firebreath/build/bin/Hello/nphello. So
Copy this file to the Firefox plug-in path:
/Usr/lib/Mozilla/plugins/
$ Sudo CP ~ /Nvpack/firebreath/build/bin/Hello/nphello. So/usr/lib/Mozilla/plugins/
Open the following test file in Firefox:
~ /Nvpack/firebreath/build/projects/Hello/GEN/fbcontrol.htm
See:
-----------------------
Plugin loaded!
-----------------------
[OK]
All success.