MozillaBuild: Difference between revisions

5,347 bytes added ,  26 January 2024
→‎Windows Terminal: Add setting the environment variable "USE_MINTTY": "0" since the MozillaBuild 4.1 requires that set to not escape the Windows terminal.
(→‎Current Version: use HTTPS for download link)
(→‎Windows Terminal: Add setting the environment variable "USE_MINTTY": "0" since the MozillaBuild 4.1 requires that set to not escape the Windows terminal.)
 
(45 intermediate revisions by 16 users not shown)
Line 1: Line 1:
=== Overview ===
=== Overview ===
MozillaBuild is a meta-installer that provides everything needed to build Mozilla on Windows, sans Visual C++. Its source lives in http://hg.mozilla.org/mozilla-build/. Bugs should be filed in [https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org&component=MozillaBuild mozilla.org :: MozillaBuild].  For information about building Mozilla on Win32, [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites see the Mozilla Developer Center page].
MozillaBuild is a meta-installer that provides everything needed to build Mozilla on Windows, sans Visual C++. Its source lives in https://hg.mozilla.org/mozilla-build/. Bugs should be filed in [https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org&component=MozillaBuild mozilla.org :: MozillaBuild].  For information about building Mozilla on Win32, [https://firefox-source-docs.mozilla.org/setup/windows_build.html#building-firefox-on-windows see the Firefox Source Docs page].


=== Current Version ===
=== Current Version ===
The current version of MozillaBuild is 1.6.1. It is available on [https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe ftp.mozilla.org].
The current version of MozillaBuild is 4.1. It is available on [https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe ftp.mozilla.org].
 
=== To Upgrade From A Previous Version ===
 
Upgrading from an earlier MozillaBuild installation is straightforward but each step is important.
 
# Delete your current MozillaBuild environment by moving your MozillaBuild folder into the trash. If you can't remove the existing installation, you probably have a terminal open or watchman or ssh-agent running. Terminate that process and try again.
# Install the new MozillaBuild release.
# 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 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",
    "environment":
    {
        "USE_MINTTY": "0"
    },
}
 
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 ===
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>], 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. 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 (As of 4.0.2) modifies only one Windows registry value: <code>HKEY_CURRENT_USER\Console\VirtualTerminalLevel=1</code>. This is set to ensure that [https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences Virtual Terminal Processing] is enabled for all terminals so that [https://en.wikipedia.org/wiki/ANSI_escape_code ANSI escape sequences] are parsed correctly.
 
===== 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.
* 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.
* As of MozillaBuild 4.0, [https://cygwin.com/cygwin-ug-net/cygpath.html <code>cygpath</code>] can be used to convert between path types:
 
To convert from a Windows path to a Unix-y one, such as using MozillaBuild to edit a file printed by <code>hg</code> (<b>remember to use single-quotes here!</b>)
 
$ cygpath -u 'C:\mozilla-source\mozilla-unified\README.txt'
/c/mozilla-source/mozilla-unified/README.txt
 
To convert from a Unix-y path to a Windows one, such as for copying a path printed by MozillaBuild to open in your Windows-native IDE:
 
$ cygpath -w '/c/mozilla-source/mozilla-unified/README.txt'
C:\mozilla-source\mozilla-unified\README.txt


=== Release Notes ===
=== Release Notes ===
Release notes can usually be found on Ted's blog: http://blog.mozilla.com/ted/category/mozillabuild/


* [http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/277b013415354af6 MozillaBuild 1.6]
* [https://groups.google.com/a/mozilla.org/g/dev-platform/c/hF51Q3j6ca8 MozillaBuild 4.1]
* [http://groups.google.com/group/mozilla.dev.platform/msg/85c060d5f5f3c202 MozillaBuild 1.5.1]: added YASM for WebM code in Firefox 4.
* [https://groups.google.com/a/mozilla.org/g/dev-platform/c/E9E53vZBfZI MozillaBuild 4.0.2]
* [https://groups.google.com/a/mozilla.org/g/dev-platform/c/R4RyMxexyU8 MozillaBuild 4.0.1]
* [https://groups.google.com/a/mozilla.org/g/dev-platform/c/0GHhML7tY6c MozillaBuild 4.0]
* [https://groups.google.com/a/mozilla.org/g/dev-platform/c/MzWYQ0NtXos MozillaBuild 3.4]
* [https://groups.google.com/d/msg/mozilla.dev.platform/oQk9k9-co54/k5FaAMg2BwAJ MozillaBuild 3.3]
* [https://groups.google.com/d/msg/mozilla.dev.platform/yJY5Ra0vJLQ/SsK9O-eoDgAJ MozillaBuild 3.2]
* [https://groups.google.com/d/msg/mozilla.dev.platform/Hy-LPWqJxd8/N1-AzRfhBAAJ MozillaBuild 3.1.1]
* [https://groups.google.com/d/msg/mozilla.dev.platform/C_S6HXcz7g0/6fIcnCF8BQAJ MozillaBuild 3.1]
* [https://groups.google.com/d/msg/mozilla.dev.platform/goLGqnPfAMI/-79pncxxBwAJ MozillaBuild 3.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/j4MUKzoDOlQ/gHH7w495AgAJ MozillaBuild 2.2.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/qpO21XQaNV8/-D5mNKqnCAAJ MozillaBuild 2.1.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/xJjMtp1_GV0/-zVzSMuDNVcJ MozillaBuild 2.0.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/XnFg0p1DJVI/laRQeGJDviwJ MozillaBuild 1.11.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/rslz21w1vng/P0jvA5y4vL4J MozillaBuild 1.10.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/cUqsdWEWIcw/HDyhJMz3-ysJ MozillaBuild 1.9.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/_9U6160_oyA/dWWpklVicwkJ MozillaBuild 1.8.0]
* [https://groups.google.com/d/msg/mozilla.dev.platform/XRecAHF-H28/aSbrdKJLUNoJ MozillaBuild 1.7]
* [https://groups.google.com/d/msg/mozilla.dev.platform/J3sBNBU1SvY/THhkqOCAvvYJ MozillaBuild 1.6]
* [https://groups.google.com/d/msg/mozilla.dev.platform/s7PsRYJyHbI/AsLz9dVgwIUJ MozillaBuild 1.5.1]: added YASM for WebM code in Firefox 4.
* [http://blog.mozilla.com/ted/2010/07/22/mozillabuild-1-5/ MozillaBuild 1.5]: Mercurial 1.5.4, Python 2.6.5, and support for Visual Studio 2010.
* [http://blog.mozilla.com/ted/2010/07/22/mozillabuild-1-5/ MozillaBuild 1.5]: Mercurial 1.5.4, Python 2.6.5, and support for Visual Studio 2010.
* [http://blog.mozilla.com/ted/2009/07/24/mozillabuild-1-4/ MozillaBuild 1.4]: Windows x64 compatibility and other.
* [http://blog.mozilla.com/ted/2009/07/24/mozillabuild-1-4/ MozillaBuild 1.4]: Windows x64 compatibility and other.
Line 15: Line 82:
* [[MozillaBuild:ReleaseNotes:1.2]]
* [[MozillaBuild:ReleaseNotes:1.2]]


(there are no release notes for 1.1 and below.)
There are no release notes for 1.1 and below.


=== Historic Versions ===
=== Historic Versions ===
Old versions of MozillaBuild can also be found on [ftp://ftp.mozilla.org/pub/mozilla/libraries/win32 ftp.mozilla.org].
Old versions of MozillaBuild can also be found on [https://ftp.mozilla.org/pub/mozilla/libraries/win32/ ftp.mozilla.org].