Visual Studio project generation for Mozilla Firefox

Recently, the Mozilla Firefox build interface, aka mach, was enhanced with a great feature for Windows developers: the ability to generate Visual Studio project files. Such project files are not maintained in mozilla-central, hence the need for a way to generate them.

Thanks to the awesome work done by Gregory Szorc, generating project files using mach is as simple as issuing the following command:

./mach build-backend backend=VisualStudio

The solution file will be available in your object directory, under the msvc folder (i.e. objdir/msvc/mozilla.sln).


Mercurial and patch queues for dummies

Lately I’ve started contributing to Mozilla Firefox with some patches (yay! It’s an awesome project… consider contributing 😉 ). It was a good excuse to practice with Mercurial, the distributed revision control software used by Mozilla. I’m mainly a Git user and I have to admit I was a little puzzled at first and had to adapt to the new workflow.

In this article I will try to answer some of the questions I had during my learning phase. Well, maybe just recapping it for my own use 🙂

How can I create a new patch in the queue?

hg qnew patchname.patch

How can I update the currently active patch with the latest changes to the files?

hg qrefresh

How can I un-apply a patch from the codebase?

hg qpop patchname.patch

How can I un-apply all the patches from the codebase?

hg qpop -a

How can I remove a patch from the patch queue?

hg qpop patchname.patch
hg qremove patchname.patch

How can I sync my local repository if I’ve got some patches applied?

hg qpop -a

hg pull -u

hg qpush -a

How can I move a patch to the top of my patch queue?

hg qpush –move patchname.patch

How can I merge two patches?

hg qgoto firstpatch.patch

hg qfold secondpatch.patch


Cross-compilation in cygwin for the Raspberry-Pi: ./configure and CMake

I’m having a lot of fun these days with my Raspberry-pi! Since I’ve already built my own tool chain to cross-compile from my Windows plus Cygwin machine and setup my IDE to compile and debug my software using it, I finally started to compile some projects. Unfortunately I had to face a couple of problems: how to make the ./configure script use my tool chain to generate Raspberry-Pi binaries in cygwin? Also, how to make CMake use the aforementioned tool chain in cygwin?