MozillaBuild: Difference between revisions

Jump to navigation Jump to search
Update for MozillaBuild 4.0 changes. The MSYS tools are newer, so remove a bunch of disclaimers. Update references to the MSYS2 directory, and add a section explaining to integrate with Windows Terminal
(MozillaBuild 3.4 Release)
(Update for MozillaBuild 4.0 changes. The MSYS tools are newer, so remove a bunch of disclaimers. Update references to the MSYS2 directory, and add a section explaining to integrate with Windows Terminal)
Line 12: Line 12:
# Install the new MozillaBuild release.  
# Install the new MozillaBuild release.  
# If you had previously enabled Mintty, you will need to do so again by adding <tt>SET USE_MINTTY=1</tt> to the top of start-shell.bat.
# If you had previously enabled Mintty, you will need to do so again by adding <tt>SET USE_MINTTY=1</tt> to the top of start-shell.bat.
# Run <tt>./mach vcs-setup --update-only</tt> to ensure that the version-control-tools repository is current (<b>Mercurial extensions may break otherwise</b>).
# Clobber any trees you have by running <tt>./mach clobber</tt> (<b>build errors may occur otherwise</b>).
# Clobber any trees you have by running <tt>./mach clobber</tt> (<b>build errors may occur otherwise</b>).
# Re-run <tt>./mach bootstrap</tt> to ensure that your Rust toolchain is up-to-date.
# Re-run <tt>./mach bootstrap</tt> to ensure that your tools are up-to-date. Ensure that you agree to run the Mercurial Configuration Wizard to ensure that its extensions are up-to-date.
 
=== Windows Terminal ===
 
It's possible to use Windows Terminal instead of the Command Prompt when using MozillaBuild.
To do so, add the following profile to the Windows Terminal settings JSON file:
 
{
    "name": "MozillaBuild",
    "commandline": "C:/mozilla-build/start-shell.bat -here",
}
 
Note that:
* The <code>-here</code> flag can only be provided for MozillaBuild 4.0 and newer. Remove it from <code>commandline</code> if you're using MozillaBuild 3.4 or earlier.
* Additionally, [https://bugzilla.mozilla.org/show_bug.cgi?id=1748762 the <code>"startingDirectory"</code> option and the <code>wt -d</code> flag don't work] unless <code>-here</code> is provided.


=== Technical Details ===
=== Technical Details ===
The MozillaBuild package contains other software prerequisites necessary for building Mozilla, including the MSYS build environment,  
The MozillaBuild package contains other software prerequisites necessary for building Mozilla, including [https://www.msys2.org/ an MSYS2 environment],  
[https://www.mercurial-scm.org/ <code>Mercurial</code>], CVS, Python, YASM, NSIS, and UPX, as well as optional but useful tools such as wget and emacs.
[https://www.mercurial-scm.org/ <code>Mercurial</code>], Python, NSIS, and UPX, as well as optional but useful tools such as wget and emacs.
Note that the "UNIX-like" environment provided by MozillaBuild is only really useful for building and committing to the Mozilla source. Most command line tools you would expect in a modern Linux distribution are not present, and those tools that are provided can be as much as a decade or so old (especially those provided by MSYS). It's the old tools in particular that can cause problems since they often don't behave as expected, are buggy, or don't support command line arguments that have been taken for granted for years. For example, copying a source tree using <code>cp -rf src1 src2</code> does not work correctly because of an old version of cp (it gives "cp: will not create hard link" errors for some files). In short, MozillaBuild supports essential developer interactions with the Mozilla code, but beyond that don't be surprised if it trips you up in all sorts of exciting and unexpected ways.
Note that the "UNIX-like" environment provided by MozillaBuild is only really useful for building and committing to the Mozilla source. Many command line tools you would expect in a modern Linux distribution are not present, and it's not possible to install them with a package manager.


MozillaBuild does not modify the Windows registry.
MozillaBuild does not modify the Windows registry.
Line 25: Line 38:
===== Command Prompt Tips and Caveats =====
===== Command Prompt Tips and Caveats =====
* To paste into this window, you must right-click on the window's title bar, move your cursor to the “Edit” menu, and click “Paste”. You can also set “Quick Edit Mode” in the “Properties” menu and right-click the window to paste your selection.
* To paste into this window, you must right-click on the window's title bar, move your cursor to the “Edit” menu, and click “Paste”. You can also set “Quick Edit Mode” in the “Properties” menu and right-click the window to paste your selection.
* The MSYS root directory is located in <code>/c/mozilla-build/msys</code> if you used the default installation directory.
* The MSYS2 root directory is located at<code>/c/mozilla-build/msys2/</code> (assuming the default installation directory).
** For MozillaBuild 3.4 and older, the MSYS root directory can be found at <code>/c/mozilla-build/msys/</code> instead.


=== Release Notes ===
=== Release Notes ===
26

edits

Navigation menu