Wednesday 26 November 2014

Building Open Source Browser – Firefox on Windows

I followed the instruction to build Firefox in my laptop, which is x64 system, using OS Windows8.1.

First of all, check the prerequisites. 
Check if all of windows build prerequisites are installed in the computer. At this point, I have to install MozillaBuild package. I downloaded and installed the latest version of MozillaBuild in fold c:\mozilla-build.

Second, get the source code.
Mozillar use Mercurial repository to hold the source code.
To get the source code, I have to have Mercurial installed in my laptop. I downloaded and installed TortoiseHg, which a Windows shell extension and a series of applications for the Mercurial distributed revision control system, similar with TortoiseGit and TortoiseSVN. It saves from getting lost in the instruction of Windows Install on mercurial website.

Next, start the building environment.
In folder c:\mozilla-build, type start-shell-msvc2013.bat to setup building environment because I have install visual studio 2013 installed in laptop. Then it enters a linux mode in window power shell.
Running start-shell-msvc2013-x64.bat generated the error in building (4:21.90 configure: error: You are targeting i386 but using the 64-bit compiler).

Following, build the project.
cd into mozilla-central subdirectory in above powder shell, and run command ./mach build. It will take some time to build the project. It takes 3 to 4 hours to build the project. In the end, it will show a success message if the build finishes and succeeds as follows:



Finally, run the project

Run command ./mach run in the same fold as above. Firefox Nightly browser will be started as follows:


No comments:

Post a Comment