Notice for users of the develop branch: The information in this document may be out-of-date or incorrect.
There are two major sections of this document:
This section is for users who are using a supported platform and don't need to customize their build.
These instructions are the ones used for producing the published binaries.
These instructions will create .deb
packages using ungoogled-chromium's variation of Debian's debian
directory.
The build should work on the CPU architectures amd64
, i386
, arm64
, and armhf
.
Install common requirements: # apt install packaging-dev python3 python2 ninja-build
For Debian 9 (stretch):
export UTILIKIT_CONFIG_TYPE=debian_stretch
mkdir build/
mkdir build/sandbox
mkdir build/downloads
./utilikit/prepare_sources.py
./utilikit/substitute_domains.py
./utilikit/generate_build_files.py debian --flavor standard --apply-domain-substitution
cd build/sandbox
dpkg-checkbuilddeps # Checks and reports any additional packages needed
dpkg-buildpackage -b -uc
Packages will appear under build/
.
Deviations for different Debian versions or flavors:
Ubuntu 17.04 (zesty): Same as Debian 9 (stretch)
Ubuntu 16.04 (xenial):
UTILIKIT_CONFIG_TYPE=linux_conservative
--flavor conservative
in generate_build_files.py
Debian 8.0 (jessie) is currently not working at this time, due to utilikit
using Python 3.5 features and the lack of a build configuration that will work on it.
Other versions or derivatives are not officially supported, but it still may be possible to build on them with the settings from one listed above.
These instructions are out-of-date
Google only supports Windows 7 x64 or newer. These instructions are tested on Windows 10 Home x64.
For maximum portability, the build configuration will generate x86 binaries by default. This can be changed to x64 by setting builder.target_cpu = CPUArch.x64
in build.py
.
/usr/bin/patch.exe
from patch-*-x86_64.pkg.tar.xz
/usr/bin/msys-2.0.dll
from msys2-runtime-*-x86_64.pkg.tar.xz
Make sure the following are accessible in PATH
(the PATH overrides feature can be used on the directories containing the actual executable):
python
ninja
patch
gperf
bison
See build.py
for more on customizing the build environment or process.
To make sure that the GN tool builds correctly, make sure you run vcvarsall
in the build command-line with the correct arguments:
vcvarsall amd64_x86
for building x86 binariesvcvarsall amd64
for building x64 binariesThen do the following:
# Change directory to ungoogled-chromium's root directory
path\to\python3 build.py
NOTE: There is no official maintainer for this platform. If there is a problem, please submit a pull request or issue
Tested on macOS 10.11.6
Credits:
.dmg
package)brew install quilt
brew install ninja
See build.py
for more on customizing the build environment or process.
export UTILIKIT_CONFIG_TYPE=macos
./utilikit/check_requirements.py --macos
mkdir build/
mkdir build/sandbox
mkdir build/downloads
./utilikit/prepare_sources.py
./utilikit/substitute_domains.py
./utilikit/generate_build_files.py macos --apply-domain-substitution
cd build/sandbox
./ungoogled_macos/build.sh
This is a WIP
For now, see the instructions for Other Linux distributions. The resulting binary will still use system libraries.
TODO
TODO
There is much freedom in building Chromium with ungoogled-chromium's changes. One may choose to abide more by ungoogled-chromium's general building steps (described in the or more by Google's steps for building Chromium.
DESIGN.md may be a helpful read to gain insights into utilikit
and the project's file structure.
Consult the build instructions on the Chromium homepage for platform-specific building information.
You can use depot_tools
to setup the Chromium source tree in build/sandbox
if utilikit
's source downloading system does not support a configuration. However, please note that this will involve executing Google binaries part of depot_tools
and will run scripts that can download and run more Google binaries.
The main set of patches (listed in resources/configs/common/patch_order
) should work on most, if not all, platforms supported by desktop Chromium. Some patches are there to fix building with certain build flags, so those may not work with other platforms or configurations. However, the patches as they are should apply as long as there is a clean and unmodified source tree.
Domain substitution and source cleaning will break scripts that downloads from Google, and other scripts operating on binary files from the source tree.
This section is targeted towards users who are building for a platform without build instructions or who need additional customizations.
The following is needed to fully use utilikit
:
utilikit
Alternatively, one can obtain Python 2 and Ninja binaries from Google's depot_tools. depot_tools provides additional utilities that may ease the setup of the build environment for certain target configurations.
Additional requirements are listed in the sections for specific platforms.
utilikit
uses a few environment variables to reduce redundancy in command invocations.
Here is a list of variables:
UTILIKIT_CONFIG_TYPE
- The configuration to use. This corresponds to a directory name in resources/configs
UTILIKIT_RESOURCES
- The path to the resources
directory. Defaults to ../resources
, relative to the utilikit
directory.UTILIKIT_DOWNLOADS_DIR
- The path containing downloaded Chromium source archive and other packed dependencies. Defaults to ../build/downloads
, relative to the utilikit
directory.UTILIKIT_SANDBOX_DIR
- The path containing the build sandbox. Defaults to ../build/sandbox
, relative to the utilikit
directory.For Linux users, make sure to export
these variables to make them available to sub-processes.
These steps are employed in the platform-specific building instructions below. Do note, however, that this is only one application of utilikit
.
If you just want the build flags and patches without going through utilikit
, you can use utilikit/export_resources.py
to export them.
Here is a typical build sequence for ungoogled-chromium:
UTILIKIT_*
environment variablesutilikit/check_requirements.py
build/
, build/sandbox/
, build/downloads/
utilikit/prepare_sources.py
utilikit/substitute_domains.py
utilikit
can generate build files for the desired configuration, use the following:
utilikit/generate_build_files.py
tools/gn/bootstrap/bootstrap.py
gn gen
with the GN flagsninja
It should be noted that the build sequence...
All utilities in utilikit
have built-in command-line help. Pass in -h
or --help
for details.
For a list of all utilikit
utilities, see DESIGN.md.