A somewhat decent CPU. You don't need the most powerful thing ever, it'll just take longer on a slower chip. I've built on systems as far down as a 45w Ivy Bridge i7 without issue. (This was a while ago though.) There also seems to be a cap as to how many cores or maybe just how fast it will build in. 8c16t of Ryzen 5000 builds in ~30-40m without PGO, and 16c32t builds in a similar amount of time. (It has been a while since I last tested if this was the case.)
You'll want at least 16GB of RAM, and for 16GB you'll want a 12-16GB page file for modern versions. I think 128 ESR is fine with a 4-8GB page file. Maybe you could get away with less RAM and a bigger page file, but depending on the storage would mean a slower build. My VM currently uses 20GB RAM and 8GB page file for 147 (latest as of edit), 140, and 16GB RAM and 8GB page file for 128.
You'll want to build on a SSD. NVMe is probably faster than SATA, but I haven't benchmarked the two directly.
Last I checked it is possible to compile on Windows 8.1, but I build inside a VM running Windows X-Lite Micro 10 SE. It's not possible to build on 7 afaik. With X-Lite you can make do with a 64GB drive size.
Software Prerequisites:
Install Git or GitHub Desktop (I use this GitHub Desktop even on 10 as it's portable and doesn't update, this will come up later.)
Clone r3dfox source to your system. You will want to use Git/GitHub Desktop for this or else it may not work. (This will be the most time consuming part, so it's best to start it as soon as possible)
Install MozillaBuild
Download and extract eRust somewhere. For example, I do C:\eRust-(version)
If you want to compile the latest versions, use eRust 1.92.0 for 148+ and eRust 1.86.0 for 137-147 including 140 ESR. For 136 and earlier 1.86.0 may still work, but these were officially built with 1.77.2. eRust is used instead of stock for Vista-8.1 compatibility, and it comes with modified cargo that doesn't error when it sees modified files which is required to build r3dfox.
The Setup:
Add Git to your path. (./mach bootstrap will complain and won't work for whatever reason if you don't do this)
If you use GitHub Desktop it may be better to manually install git, as GitHub Desktop will automatically update and delete it's old copy of git. If you use a fork that doesn't auto update, it works with the included git.
The Git installer should automatically add Git to the path, however if not, here's how to do it. Right click This PC, Properties, Advanced system settings, Environment Variables, double click the Path User variable (should be the first one and highlighted by default), click new, and paste in the git path.
(For older Windows versions, you will only see a basic text box. In this case, add ; to the end if it's not already there, and paste the Git directory after it.)
For normal Git, it's C:\Program Files\Git\cmd
For GitHub Desktop, it's (GitHub Desktop directory)\resources\app\git\cmd
Click OK on both windows and close out of them all.
Download the r3dfox source code, either with GitHub Desktop and pasting it in, or with CLI git:
Code: Select all
git clone https://github.com/Eclipse-Community/r3dfoxRun MozillaBuild
Code: Select all
C:\mozilla-build\start-shell.batMake sure git works by typing git. If it doesn't work, double check the Path, and try rebooting.
cd to the r3dfox source code you downloaded. MozillaBuild uses the Unix style forward slashes instead of Windows style backslashes, so you will need to type it with forward slashes. You can also drag the folder onto the terminal and it will fill in with a working path.
Now to get the system ready to build, you will want to bootstrap here.
Code: Select all
./mach --no-interactive bootstrap --application browserWhen finished it will want you to restart the shell to build. It might be best to also restart here too. So close it and/or restart, reopen start-shell.bat, and cd to the r3dfox directory again.
Now you'll want to install or link the eRust toolchain. Currently it's 1.92.0 so I use this command below to link it. For ESR 140 use 1.86.0, and for ESR 128 and 115, use 1.77.2.
Code: Select all
rustup toolchain link eRust-1.92.0 C:/eRust-1.92.0Code: Select all
rustup default eRust-1.92.0
rustup override set eRust-1.92.0Code: Select all
rustup install 1.92.0
rustup toolchain remove stable
rustup override set 1.92.0
./mach --no-interactive bootstrap --application browser
rustup override set eRust-1.92.0Now you're ready to build r3dfox.
Building:
Note: As of more recent releases, this is broken as written. This is a Mozilla bug. To make the browser build, you will need to add this line to (r3dfox source directory)/browser/moz.configure at the bottom.
Code: Select all
imply_option("MOZ_APP_VENDOR", "Mozilla")Code: Select all
MOZCONFIG=(r3dfox source directory)/mozconfigs/browser-win64 ./mach build
MOZCONFIG=(r3dfox source directory)/mozconfigs/browser-win64 ./mach packageCode: Select all
MOZCONFIG=(r3dfox source directory)/mozconfigs/browser-win32 ./mach build
MOZCONFIG=(r3dfox source directory)/mozconfigs/browser-win32 ./mach packageThis will build r3dfox with the unofficial Mozilla branding, this is probably fine to distribute as Mozilla intended it to be unbranded like this. However if you want to distribute it, you'll probably want to replace it with new branding.
Do note that this will build without PGO. PGO creates a faster, more optimized build, however it doubles the build time. browser-xyz is a unbranded test mozconfig so it's meant to build very close to final, but without PGO. To build with PGO, add these lines after the MOZ_LTO entries near the bottom of the mozconfig.
Code: Select all
export MOZ_PGO=1
ac_add_options MOZ_PGO=1Code: Select all
rustup override set 1.92.0
./mach --no-interactive bootstrap --application browser
rustup override set eRust-1.92.0x64 clobber:
Code: Select all
MOZCONFIG=(r3dfox source directory)/mozconfigs/browser-win64 ./mach clobberCode: Select all
MOZCONFIG=(r3dfox source directory)/mozconfigs/browser-win32 ./mach clobber
