Preparing Windows
Building on windows is significantly more complex than building on macos or linux. This guide will walk you through preparing your Windows machine for building a Firefox fork. Before building, you should be aware that only Windows 10 or 11 are officially supported, but you might be able to get other versions to work.
Installing Dependencies
The first thing you will need to do is install Microsoft's c++ build tools. You will need to download Build Tools for Visual Studio 2022. The following will need to be installed:
In the Workloads tab
Desktop development with C++
In the Individual components tab
MSVC v143 - VS 2022 C++ x64/x86 build tools.
Windows 11 SDK (at least 10.0.22000.0) or Windows 10 SDK (at least 10.0.19041.0).
C++ ATL for v143 build tools (x86 and x64).
Python 3.10 (or later) for v143 build tools (Microsoft Store version recommended)
Note: If this guide ever gets out of date, you can get the latest build requirements from Mozilla's docs
You will need to install MozillaBuild. Next, install Git. You will need to set the following specific options on install to ensure high performance:
Configuring the line ending conversions must be: Checkout as-is, commit as-is
Enable experimental built-in file system monitor
Install NodeJS on your system. This should also install chocolatey. If it does not, install it manually. To install the final two dependencies, run:
You should be good to return back to the main Getting Started docs
Additional packages required for releasing
If you are creating binaries to target windows, you will need nsis (which mach calls makensisu
for some reason, even though the binary is makensis
):
Note that you will also have to provide a path to nsis on your system. For mine it is:
Troubleshooting Common Issues on Windows 11
Checking for the existence of the mach
command
mach
commandIf you encounter a FileNotFoundError
related to the mach
command while running samurai bootstrap
, follow these steps:
Ensure that the
mach
command is correctly installed.Verify that the
mach
command exists in the expected location:<project_root>/.engine/mach
.If the
mach
command is not found, reinstall the necessary dependencies and try again.
Ensuring samurai.json
is correctly configured
samurai.json
is correctly configuredIf you encounter issues related to brandConfig
being undefined while running samurai set brand stable
or samurai build
, follow these steps:
Open your
samurai.json
configuration file.Ensure that the
brands
key is correctly defined and includes the necessary properties for your brand.Verify that the
release
key within thebrands
configuration includes thedisplayVersion
property.If the
brandConfig
is still undefined, provide a default value or a clear error message in your configuration.
By following these troubleshooting steps, you should be able to resolve common issues encountered while using Samurai on Windows 11.
Last updated