TortoiseHg is a straightforward and multi-platform Mercurial front-end that comes with a workbench that helps you handle repositories and submit commits. With TortoiseHg’s help you can explore repositories in order to maintain and manage different versions of the contained files. Download for macOS. There are several options for installing Git on macOS. Note that any non-source distributions are provided by third parties, and may not be up to date with the latest source release. Install homebrew if you don't already have it, then: $ brew install git. Apple ships a binary package of Git with Xcode.
This document will help you get set up to build Firefox on your owncomputer. Getting set up won’t be difficult, but it can take a while -we need to download a lot of bytes! Even on a fast connection, this cantake ten to fifteen minutes of work, spread out over an hour or two.
The details are further down this page, but this quick-start guideshould get you up and running:
Quick start (Try this first!)
Prerequisites
You will need:
You will need administrator permissions on your machine to install theseprerequisites. (You can verify that you have these permissions in SystemPreferences -> Users & Groups.)
See 1.1 Install Xcode and Xcode command line tools and 1.2Get the local macOS SDK for more information on how toinstall these prerequisites.
Getting the source
Firstly you need to prepare a directory and get the bootstrap scriptthat will do the rest:
If you don’t have Python 3.6 or later or Mercurial installed, see 2.1a Installdependencies via Homebrew for more information on howto do so. Then in your terminal from above start the bootstrapper like this:
… and follow the prompts. This will use mercurial to checkout thesource code. If you prefer to work with git, use this command instead:
If you don’t have Homebrew orPorts installed - software packagemanagers that will let us install some programs we’ll need - you’ll beasked to pick one. Either will work, but most Mozilla developers useHomebrew.
If you don’t let the
bootstrap.py script clone the source for youmake sure you do it manually afterward before moving onto the next step.
Build Firefox!
Now we tie it all together.
In your terminal window,
cd to your Mozilla source directory chosenbefore (mozilla-unified ) and type:
The
./machbootstrap step is a catch-all for any dependencies notcovered in this documentation. If you are working on Firefox frontendsor building Firefox without any changes, select Artifact Builds inthe first question in ./machbootstrap . Artifact builds willcomplete more quickly! Artifact builds are unsuitable for those workingon C++ code.
You’re on your way. Don’t be discouraged if this takes a while; it takessome time even on the fastest modern machines and as much as two hoursor more on older hardware. Firefox is pretty big, because the Web isbig.
Now the Fun Starts
You have the code, you’ve compiled Firefox. Fire it up with
./machrun and you’re ready to start hacking.
Build steps (details)¶
Building on macOS is divided into the following steps:
1.1 Install Xcode and Xcode command line tools¶
You first need to install Xcode, for which you have two options but bothrequire you to sign in with an Apple ID:
Open /Applications/Xcode.app and let it do its initial first run andsetup stuff.
Install the Xcode command line tools byrunning
xcode-select--install in your terminal.
1.2 Get the local macOS SDK¶
Firefox currently requires a local copy of macOS 10.11 SDK to build (allyour other apps will still use your more recent version of this SDK,most probably matching your macOS version).
There are various issues when building the Mozilla source code withother SDKs and that’s why we recommend this specific version.
To get the 10.11 SDK, first download Xcode 7.3.1 from the MoreDownloads for AppleDevelopers page. Oncedownloaded, mount the .dmg file. Then in the Terminal run the following:
2. Install supplementary build tools¶
Mozilla’s source tree requires a number of third-party tools andapplications to build it. You will need to install these before you canbuild anything.
You have the choice of how to install all these components. You can usea package manager like Homebrew or Ports. Or, you can obtain, compile,and install them individually. For simplicity and to save your time,using a package manager is recommended. The following sections describehow to install the packages using existing package managers. Choosewhatever package manager you prefer.
2.1a Install dependencies via Homebrew¶
Homebrew is “the missing package manager formacOS.” It provides a simple command-line interface to install packages,typically by compiling them from source.
The first step is to install Homebrew. See https://brew.sh/
Once you have Homebrew installed, you’ll need to run the following:
Python 2 is never necessary solely to build Firefox, but it is still requiredfor some development tasks (including testing and pushing to
try ). If yoursystem does not already have a Python 2 installed, you can use brew toinstall one:
2.1b Install Dependencies via MacPorts¶
MacPorts is a package manager for macOS. If you are running Homebrew,you can ignore this section.
To install MacPorts, go to their installpage, download the .dmg foryour platform, and install it. If you already have MacPorts installed,ensure it is up to date by running:
The first of these commands will ask for your root password.
Common errors include:
Use MacPorts to install the packages needed for building Firefox:
You’ll then see lots of output as MacPorts builds and installs thesepackages and their dependencies – it takes a while, so go grab a cup ofcoffee.
Note: By default, this will install Python 2.7, which in turn willpull in all of the X11 libraries, which may take a while to build. Youdon’t need any of those to build Firefox; you may want to consideradding +no_tkinter to the install line to build a python withoutsupport for the X11 UI packages. This should result in a much fasterinstall.
Note: With older versions of Xcode (eg 6.4) you may need to useMacPorts to get the proper version of clang, such as clang-3.6 or later.See bugs in Core, Build Config referring to clang.
2.2 Install Mercurial¶
Mozilla’s source code is hosted in Mercurial repositories. You useMercurial to interact with these repositories. There are many ways toinstall Mercurial on macOS:
Once you have installed Mercurial, test it by running:
If this works, congratulations! You’ll want to configure your Mercurialsettings to match other developers. See Getting Mozilla Source CodeUsing Mercurial.
If this fails with the error “
ValueError:unknownlocale:UTF-8 ”,then see theworkaroundson the Mercurial wiki’s Unix Install page.
When trying to clone a repository you may get an HTTP 500 error(internal server error). This seems to be due to something that MacMercurial sends to the server (it’s been observed both with MacPort andselenic.com Mercurial binaries). Try restarting your shell, yourcomputer, or reinstall Mercurial (in that order), then report back herewhat worked, please.
3. Obtain a copy of the Mozilla source code¶
You may want to read Getting Mozilla Source CodeUsing Mercurial for thecomplete instructions.
If you are interested in Firefox development only then run the followingcommand, which will create a new directory,
mozilla-unified , in thecurrent one with the contents of the remote repository.
Below command will take many minutes to run, as it will be copying acouple hundred megabytes of data over the internet.
(If you are building Firefox for Android, you should now return to theAndroid build instructions.)
4. Configure the build options¶
In your checked out source tree create a new file,
mozconfig , whichwill contain your build options. For more on this file, see Configuring Build Options.
To get started quickly, create the file with the following contents:
Firefox no longer builds with gcc 4.8 or earlier, but the build systemshould automatically select clang if it is available in the PATH. Ifthat is not the case, you need to set CC and CXX. For instance, if youinstalled Clang 9 via Homebrew, then you need to have this in your
mozconfig :
5. Build¶
Once you have your
mozconfig file in place, you should be able tobuild!
If the build step works, you should be able to find the builtapplication inside
obj-ff-dbg/dist/ . If building the browser with--enable-debug , the name of the application is NightlyDebug.app .To launch the application, try running the following:
Note: The compiled application may also be named after the branchyou’re building; for example, if you changed these instructions to fetchthe
mozilla-1.9.2 branch, the application will be namedNamoroka.app or NamorokaDebug.app .
![]() Hardware requirements¶
There are no specific hardware requirements, provided that the hardwareaccommodates all of the software requiredto build Firefox. Firefox can take a long time to build, so more CPU,more RAM and lots of fast disks are always recommended.
Software requirements¶
These options are specific to Mozilla builds for macOS. For a moregeneral overview of build options and the
mozconfig file, seeConfiguring Build Options. Forspecific information on configuring to build a universal binary, seeMac OS X Universal Binaries.
The following options, specified with
ac_add_options , are lines thatare intended to be added to your mozconfig file.
For macOS builds, defines are set up as follows:
Macos Mercurial
This requires care when writing code for Unix platforms that excludeMac:
Troubleshooting¶
Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface.
Download now Mercurial
How you can benefit from MercurialDownload Mercurial For Windows
Quick Start
Clone a project and push changes
Mercurial Download Mac Os X El Capitan
Create a project and commit
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |