EclipseEnv
Configuring a development environment for mozilla projects is a pretty straightforward operation now with the recent releases of Eclipse-CDT. This tutorial explains how to edit a Mozilla project from it's sources within the Eclipse IDE. For convenience, the Firefox project is used as a sample
Requirements
Applications and Libraries
The Ubuntu repositories contain Eclipse version 3.2.2 and Eclipse-CDT 3.1.2. You might want to download these directly from Eclipse's download page
#sudo apt-get install eclipse eclipse-cdt libcurl4-openssl-dev #sudo apt-get build-dep firefox
Sources
Make sure you've retrieved your Mozilla project sources and configured your .mozconfig file (see the documentation). Here is an example of a .mozconfig used to build a debug version of Firefox.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@ ac_add_options --enable-application=browser mk_add_options MOZ_CO_PROJECT=browser ac_add_options --enable-debug ac_add_options --disable-optimize
The Eclipse Project
Create the Project
File->New->Project… C/C++ Project->Standard Make C++ Project Project Name: Firefox (can be anything) Location : (select the Mozilla root folder) Click Finish
Configure the Project
Right-click on the new Firefox project in Eclipse’s left column Click Properties Select Make C++ Project Change Build command to make -f client.mk Change Build (incremental build) from all to build
Troubleshooting
In case your Eclipse IDE is slow, make sure that the Project->Build Automatically option is turned off. Mozilla projects have a considerable size and the make compiler has to parse every subfolder when a change occurs. This is a painful operation while developing.
Other Links
MozillaTeam/Develop/EclipseEnv (last edited 2008-08-06 16:59:59 by localhost)