recently we wanted to download compile Mozilla Thunderbird source on windows as we were planning to write a extension a small utility after a R&D we were able to compile the source code i thought of writing in my site so that others like me can get benefited from this post below are the steps on how to do it
Download all the required software's
--> Download and install Visual Studios 2005 (referred to as VC8 on Mozilla sites). you can also download visual studio express editon which is free which has limited tools
--> Then download and install the Mozilla Build Package 1.1 from the below mentioned link.
The package should install everything into c:\mozilla-build directory by default.
--> Once these two things are done, run the
start-msvc71.bat (if you have VC.NEt)
start-msvc8.bat (if you have VC 2005)
start-msvc9.bat (if you have VC 2008)
in the c:\mozilla-build directory which will open up an application window with MINGW32 (referred to as MSYS).
Note: MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell.
Downloading source code and making ready to compile
Now that the MSYS window is open (it will look something like command prompt), navigate your way back to the root c:\
Once you are in c:\ do the following in the MSYS console window:
a. Make a new directory called proj, using the below command.
b. Navigate into proj directory.
c. Open a connection with mozilla cvs server, with the below mentioned command.
cvs -d :pserver:email@example.com:/cvsroot co mozilla/client.mk
d. Navigate into the new mozilla directory that was created by the cvs.
e. Download the source code from CVS.
make -f client.mk checkout MOZ_CO_PROJECT=mail.
Note: Instead of “ mail”, we can give
browser( to download firefox source code )
suite( to download SeaMonkey source code)
calendar( to download sunbird source code)
minimo( to download source code of standalone browser for small devices)
camino( the native browser for macintosh)
all( check out source code for all the above projects ,plus some other utilities)
Create MOZ file ".mozconfig" which contains all the build options
Once all the source code is downloaded. Create a ".mozconfig" file in the c:\proj\mozilla directory and fill it with your build options.
# Options for client.mk.
# Options for 'configure' (same as command-line options).
[Note: for windows XP wpcapi.h is not supporting to overcome this issue we need to addd additional parameter in .mozconfig file
Once the MOZ file is created and pasted in the thunderbird source code directory
--> make -f client.mk build MOZ_CO_PROJECT=mail
the above statements will build the source code
Final Step is to Creating the Installer
Once the source code is built, hopefully with no errors, you should have a directory called "obj-i686-pc-mingw32" or something similar. To run Thunderbird, run Thunderbird located in c:\proj\mozilla\obj-i686-pc-mingw32\dist\bin
If you would like to make an installer, you can type make installer in the c:\proj\mozilla\obj-i686-pc-mingw32 directory.
if any reader finds any mistake in the above steps or if there is still better way to achieve this please let us know