Install and use the cross-browser plug-in framework firebreath-plug-in Linux

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.