Lab 2 - Building Firefox for Desktop from source on Windows 10


Not a pretty sight if I can say so myself. After hours of waiting, seeing "Error 2" and not knowing where to go or what to do can be frustrating. But how did I get here?

Relatively speaking, when following the instructions posted on Building Firefox for Windows, everything went smoothly. Windows 10 is up to date? Check. Visual Studio 2017 is installed? Check. Rust and MozillaBuild are all installed as well? Check and check.

Getting the source with Mercurial was a process that took quite a while, but that too went without any hitches. The problem came on attempting to build the code. Everything went well until we got to the image that you can see above. A Unicode error stops the building process from going ahead. When attempting to change the file "config.data", by substituting the single backslash with a double backslash on line 238, the issue still persists since the file gets rewritten every time one attempts to build.

Thus far I have not found a way to fix this problem. I will continue trying other things (currently attempting to move the Android folder out of the Users directory to somewhere else, this will take an hour or so due to the sheer amount of files in there).

UPDATE 1 (September 14, 3:35PM): Changing the Android folder's location does not make a difference. Changing the
ANDROID_TOOLS environment variable's path within the System does not change things either.

UPDATE 2 (September 14, 7:57PM): I was able to get Firefox to get on with the building process without outputting an error messafe! It was all thanks to the bug fixes found here. Our Professor David shared a link in which folks reported a similar instance to what we had happening on my computer. By digging further into the code and changing things where I felt was appropriate (and here I wish I kept track of everything that I did end up fixing, because it wasn't all that straight forward) I was able to get the build to actually run! Will update again soon again, hopefully with the good news that I was actually able to run Firefox locally!

UPDATE 3 (September 14, 10:48PM): I was finally graced with this line right here:


Not bad... only 3 hours right?

One quick command later, and I am finally seeing Firefox running locally on my laptop:


Here's a shot of about:buildconfig:


After this I got cracking playing around with the code as per the lab's specifications. This was honestly the shortest part of this lab. Within minutes I got to look cat gifs in full screen on a new window (mind you, I'm more of a dog person but I'll let it slide this one time), I changed some of the CSS, the height of my tabs, I added a GIF to the tabs toolbar, and lastly modified the label for my menu from "New Window" to its Portuguese translation, "Janela Nova". You can see the shots of it all happening bellow:



As for my final thoughts, I enjoyed this. I actually got a lot of help thanks to our Professor pointing me in the right direction. This lab is very good for those who just can't give up when they see a problem. The actual coding in this is very simple, but getting everything to work can be a nightmare. Don't feel discouraged, keep trying until everything works. I can guarantee that you will feel very satisfied in the end!

Popular posts from this blog

Lab 4 - Finding my first Open Source bug

Lab 5 - Getting a Thimble testing environment to run