This document was imported from MDN and contained very outdated/incorrect information, and much of the information here is duplicated from the existing `mach` documentation. For the little content that isn't already expressed in the existing documentation in a better way, merge it into `python/mach/docs`.
The unique content is mainly in the FAQ, so I added a new page for that.
Differential Revision: https://phabricator.services.mozilla.com/D91455
This is a requirement anyway, and the bootstrap script will yell at you if it can't find `hg` (or `git`, if it's necessary), but we can be more specific about this requirement here so people don't waste any more time than necessary.
Differential Revision: https://phabricator.services.mozilla.com/D90172
Today the docs tell you to directly clone `mozilla-central`, which is a weird departure from what we do in the other per-platform documents for no real reason. Instead, reference the standalone `bootstrap.py` script as we do for Linux and macOS.
Also, do a little scan and replace references to `mozilla-central` with `mozilla-unified` where appropriate.
Differential Revision: https://phabricator.services.mozilla.com/D88051
There's a Windows Defender CLI (`Get-MpComputerStatus`) available, but MozillaBuild
can't (easily) access PowerShell. So, instead, we find Windows Defender status and path exclusions
by checking the registry at HKLM\SOFTWARE\Microsoft\Windows Defender.
Determining if Windows Defender is "on" or not is a surprisingly vague task.
Not only does it encompass a lot of components (of which Ricky and I believe "Real-time protection"
is the part slowing down the build), but there's (at least?) two different kinds of "disabled"
states that it can be in:
* If "disabled" via Settings, it will turn itself back on after a reboot
* If an antivirus is installed, it will turn itself off permanently
Unfortunately, disabling "Real-time protection" in Settings doesn't affect any registry keys, but
I'm opting to ignore this because I doubt many users are manually disabling this protection before
each build. The repercussion of this is that users may be incorrectly warned "your Firefox
directory isn't excluded from Windows Defender!".
Focusing on the antivirus use case and querying the registry I found that:
* Querying the `IsServiceRunning` value wasn't sufficient because new Windows installations didn't have that key
* Querying the `DisableRealtimeMonitoring` value was inconsistent - it can be missing, and not always because an antivirus removed it
* Querying the `DisableAntiVirus` value doesn't _sound_ accurate (we care about Real-time Protection), but it's consistently "off" for non-AV machines, and "on" for machines with an AV installed. So, this is our winner!
TL;DR: there may be some "false positive" warnings about excluding the Firefox srcdir, but they're
accurate for my test cases and workaround-able (just add the exclusion to Windows Defender).
Also, this patch updates our Windows Defender docs to make them:
* More easily link-able
* Have direct advice to resolve the issue
Differential Revision: https://phabricator.services.mozilla.com/D85952
`bootstrap` won't be able to install them for you forever (and it isn't really properly capable of installing it for you at this very moment), and installing Python 3 as well as Python 2 is increasingly non-trivial on arbitrary OS'es, so we need to document things properly here.
Specific guidance on how to use `brew` to install Python 2 on macOS is included here. I also go into more depth on the situation on Linux and explicitly point people to the existence of `pyenv` with basic usage information, which should fill in the gaps left by the OS package managers.
Also, update some documentation to prefer the `python3` binary to the `python` binary (which is often Python 2), and fix some broken links.
Differential Revision: https://phabricator.services.mozilla.com/D82611
Also delete a bunch of dead code that was apparently meant to be useful for subclassing, but there's no subclasses of `DebianBootstrapper` in tree.
Differential Revision: https://phabricator.services.mozilla.com/D82073
On a new machine the instructions didn't fully work for me. I suspect that `libpulse-dev:i686` -> `i386` might have been a typo, and I also needed `libx11-xcb-dev:i386`.
Differential Revision: https://phabricator.services.mozilla.com/D81560