r3dfox build guide (Unofficial)

The modern Firefox based browser for Windows Vista/7/8+ made by us, Eclipse Community!
User avatar
TSNH
Posts: 34
Joined: 01 May 2024, 09:08
OS: Windows Vista x64
Has thanked: 12 times
Been thanked: 4 times
Poland

r3dfox build guide (Unofficial)

Unread post by TSNH »

r3dfox build guide (Unofficial)


There is now an official guide available
https://board.eclipse.cx/viewtopic.php?t=812






Original unofficial guide:
UNDER CONSTRUCTION
r3dfox is a fully open-source web browser by @K4sum1 based on Firefox, but compatible with Windows Vista, 7, 8.0, 8.1 with additional features such as support for Aero Glass, no telemetry/spyware, per-site useragent overrides, custom browser css styling, however it tries to remain as close to stock Firefox as possible.

The building process was tested with the following configuration:
• Windows 10 Redstone 5 (aka version 1809) x64 Vmware virtual machine on Windows 8.0 host
• Intel Core I5-12600. 6 cores 12 threads total, 6 threads allocated to the virtual machine
• 16GB RAM total, 8GB allocated to the virtual machine

Preparing the build enviroment

1. Get Windows 10 or 11 preferably as a virtual machine (vmware, virtualbox etc)

2. Disable any antivirus protections you may have, you don’t want it to scan almost a million files from the source or break something. https://firefox-source-docs.mozilla.org/setup/windows_build.html#ensure-antivirus-exclusions

3. Follow the steps for building standard firefox:
4. Install Rust the standard way https://www.rust-lang.org/

5. Get eRust – a custom Rust with improved support for Windows Vista https://github.com/Eclipse-Community/eRust/releases/tag/e1.77.2

6. Extract it somewhere, for example “C:\mozilla-build\erust” (after extracting this folder should contain “lib”, “bin” and “share” folders)

7. Open cmd or powershell and run

Code: Select all

rustup toolchain link erust ’C:\mozilla-build\erust'
to add eRust as a toolchain

8. And “rustup toolchain list” to see your toolchains

9. Assuming that you don’t want to build other Rust other than r3dfox on your current system you can set eRust as the default toolchin, run

Code: Select all

rustup default erust
(if you do not want to make it the default, see "rustup override --help" to see how to set separate toolchains for each directory)

10. Download https://github.com/Eclipse-Community/r3dfox/releases/download/v128.0.2-2/r3dfox-7-RTM-fix.7z and extract to "C:\VC++"

Building

1. Download .zip source code of the release that you want to build https://github.com/Eclipse-Community/r3dfox/releases

2. Clear source code of standard Firefox which (assuming you bootstrapped with the default settings) resides in “C:\mozilla-source\mozilla-unified”

3. Extract zipped r3dfox to “C:\mozilla-source\mozilla-unified” After extracting mozilla-unified should contain many folders (including “browser”, “build”, “cap”) not a single folder that contains them

4. Go to “C:\mozilla-source\mozilla-unified\mozconfigs” and copy one of the mozconfig files to “C:\mozilla-source\mozilla-unified”, either “mozconfig-win-x64” or “mozconfig-win-x86” depending on whether you want to build x64 or 32-bit version.

5. Rename the new copy of “mozconfig-win-x64” or “ mozconfig-win-x86” to plain “mozconfig”

6. Open the new mozconfig file in notepad, x64 is assumed here, it will look like this (this is the original file but you will need to make changes):

Code: Select all

## mozconfig for compiling r3dfox Browser for Windows natively

##Uncomment PGO for release build

# x64 build
ac_add_options --target=x86_64 

# Please do not redistribute this build with official branding if you are not part of Eclipse Community.
ac_add_options --with-app-name=r3dfox
ac_add_options --with-app-basename=r3dfox
# For ESR enable the below and disable the above
#ac_add_options --with-branding=browser/branding/esr
#ac_add_options --with-app-name=r3dfox_esr
#ac_add_options --with-app-basename="r3dfox ESR"
# For potential nightly experimentation enable the below and disable the above.
#ac_add_options --with-branding=browser/branding/nightly
#ac_add_options --with-app-name=plasmafox
#ac_add_options --with-app-basename=Plasmafox
ac_add_options --enable-official-branding

# Updater stuffs
ac_add_options --disable-update-agent
ac_add_options --disable-updater
# Enable if update server and signatures are figured out
#ac_add_options --enable-nss-mar

# 16 jobs for 16 cores
mk_add_options MOZ_MAKE_FLAGS="-j16"

# Build only r3dfox
ac_add_options --enable-application=browser
ac_add_options --disable-artifact-builds
export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason

# Package VC++ DLLs
export WIN32_REDIST_DIR="C:/VC++/x64"
export WIN_UCRT_REDIST_DIR="C:/VC++/x64"

# Optimization settings
ac_add_options --disable-debug
ac_add_options --disable-debug-js-modules
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --enable-clang-plugin
ac_add_options --enable-hardening
ac_add_options --enable-install-strip
ac_add_options --enable-jemalloc
ac_add_options --enable-lto
ac_add_options --enable-optimize="-Qunused-arguments -O2 -msse2 -Xclang -O3"
ac_add_options --enable-release
ac_add_options --enable-rust-simd
ac_add_options --enable-strip
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
mk_add_options MOZ_OPTIMIZE=1
export MOZILLA_OFFICIAL=1
export STRIP_FLAGS="--strip-debug --strip-unneeded"

# Media settings
ac_add_options --disable-eme
ac_add_options --enable-av1
ac_add_options --enable-jxl
ac_add_options --enable-raw
ac_add_options --enable-webrtc

# Add-ons
ac_add_options --allow-addon-sideload
ac_add_options --with-unsigned-addon-scopes=app,system

# Client settings
ac_add_options --disable-backgroundtasks
ac_add_options --disable-bits-download
ac_add_options --disable-crashreporter
ac_add_options --disable-default-browser-agent
ac_add_options --disable-maintenance-service
ac_add_options --disable-notification-server
ac_add_options --disable-parental-controls
ac_add_options --without-wasm-sandboxed-libraries
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Set -Copt-level=3
export OPT_LEVEL="3"
ac_add_options OPT_LEVEL="3"
export RUSTC_OPT_LEVEL="3"
ac_add_options RUSTC_OPT_LEVEL="3"

# Enable LTO
export MOZ_LTO=1
ac_add_options MOZ_LTO=1
export MOZ_PGO=1
ac_add_options MOZ_PGO=1

if test "$GEN_PGO"; then
    ac_add_options --enable-profile-generate
elif test "$USE_PGO"; then
    ac_add_options --enable-profile-use=cross
fi

# Compiler, Linker, and Rust flags
export CFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export CPPFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export CXXFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export LDFLAGS="-Wl,-O3 -msse2"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-cpu=athlon64 -C target-feature=+sse2 -C codegen-units=1 -Z tune-cpu=athlon64"
export VERBOSE=1

7. If you want to share your build online you cannot use official r3dfox branding for licensing reasons and therefore you have to make the following changes to mozconfig:
Comment out official branding with #

Code: Select all

#ac_add_options --with-app-name=r3dfox
#ac_add_options --with-app-basename=r3dfox
Add unofficial branding

Code: Select all

ac_add_options --with-branding=browser/branding/nightly
ac_add_options --with-app-name=Nightly
ac_add_options --with-app-basename=Nightly
8. Adjust

Code: Select all

mk_add_options MOZ_MAKE_FLAGS="-j16"
Based on the number of cpu threads your building machine has, for me as I have assigned 6 threads to my virtual machine, this would be

Code: Select all

mk_add_options MOZ_MAKE_FLAGS="-j6"
9. Save file

12. Run start-shell.bat in "C:\mozilla-build" (default location) to open MozillaBuild shell and in the command line shell that opens run the following:

Code: Select all

cd c:/mozilla-source/mozilla-unified
This clears leftovers from previous build attempts

Code: Select all

./mach clobber
This reconfigures dependences (internet connection required)

Code: Select all

./mach bootstrap
14. When you are ready to build run

Code: Select all

./mach build
15. Wait 15-120 minutes

16. If you want to get zip package run

Code: Select all

./mach package
@K4sum1 you may use any parts of this guide in your official guide if you ever want to create one or just edit this one to fix errors, make an update, or add more info
Last edited by TSNH on 09 Mar 2025, 17:51, edited 27 times in total.

User avatar
TSNH
Posts: 34
Joined: 01 May 2024, 09:08
OS: Windows Vista x64
Has thanked: 12 times
Been thanked: 4 times
Poland

r3dfox build guide (Unofficial)

Unread post by TSNH »

Common errors and solutions

Code: Select all

ERROR: The windows rust crate source in
n 0.52.0, but expected 0.58.0
Solution: delete "%userprofile%\.mozbuild" folder with all of its contents and than run "./mach bootstrap" with standard Firefox source to recreate it and than again with r3dfox, bootstrapping may not fully work with r3dfox source

Code: Select all

r 0:01.16 W Exception when writing resource usage file: [Errno 2] No such file or directory: 'C:/mozi
lla-source/mozilla-unified/obj-x86_64-pc-windows-msvc/instrumented\\.mozbuild\\profile_build_resourc
es.json'
Solution: remove ac_add_options --enable-bootstrap from the mozconfig.
Last edited by TSNH on 11 Nov 2024, 20:17, edited 2 times in total.

User avatar
K4sum1
Lazy Owner
Posts: 1184
Joined: 11 Jan 2021, 07:40
Location: ur dads house
OS: Windows 8.1 x64
Has thanked: 810 times
Been thanked: 439 times
Contact:
United States of America

r3dfox build guide (Unofficial)

Unread post by K4sum1 »

Uh btw Plasmafox is not meant to be unofficial branding
I don't know what I'm doing hit album by Brad Sucks

User avatar
TSNH
Posts: 34
Joined: 01 May 2024, 09:08
OS: Windows Vista x64
Has thanked: 12 times
Been thanked: 4 times
Poland

r3dfox build guide (Unofficial)

Unread post by TSNH »

K4sum1 wrote: 11 Nov 2024, 18:38 Uh btw Plasmafox is not meant to be unofficial branding
Which one is unofficial then, I mean kinda like New Moon is for Pale Moon, Snake (Serpent previously) for Basilisk
For now I called it Nightly as in stock Firefox I believe

User avatar
K4sum1
Lazy Owner
Posts: 1184
Joined: 11 Jan 2021, 07:40
Location: ur dads house
OS: Windows 8.1 x64
Has thanked: 810 times
Been thanked: 439 times
Contact:
United States of America

r3dfox build guide (Unofficial)

Unread post by K4sum1 »

There's not really any unofficial branding currently aside from the stock Mozilla Developer Preview unofficial branding that gets applied if no branding is specified.
I don't know what I'm doing hit album by Brad Sucks

User avatar
TSNH
Posts: 34
Joined: 01 May 2024, 09:08
OS: Windows Vista x64
Has thanked: 12 times
Been thanked: 4 times
Poland

r3dfox build guide (Unofficial)

Unread post by TSNH »

What does

Code: Select all

# Package VC++ DLLs
export WIN32_REDIST_DIR="C:/VC++/x64"
export WIN_UCRT_REDIST_DIR="C:/VC++/x64"
do?
because it doesn't seem to add Win7 RTM fix to the main executable directory as I initially thought

User avatar
K4sum1
Lazy Owner
Posts: 1184
Joined: 11 Jan 2021, 07:40
Location: ur dads house
OS: Windows 8.1 x64
Has thanked: 810 times
Been thanked: 439 times
Contact:
United States of America

r3dfox build guide (Unofficial)

Unread post by K4sum1 »

That's how it should work but idk. Maybe try pulling the dlls from a current r3dfox release as maybe the 7 RTM fix is missing something making it not work.
I don't know what I'm doing hit album by Brad Sucks

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest