2016-09-29 12:38:51 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
|
|
|
<!ENTITY chromium-download-http "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-&chromium-version;.tar.xz">
|
|
|
|
<!ENTITY chromium-download-ftp " ">
|
2017-06-30 07:52:16 +08:00
|
|
|
<!ENTITY chromium-md5sum "249b4ce6844d5e2424967287c638c55c">
|
2017-06-25 09:57:18 +08:00
|
|
|
<!ENTITY chromium-size "507 MB">
|
2017-06-30 07:52:16 +08:00
|
|
|
<!ENTITY chromium-buildsize "5.9 GB">
|
2017-04-24 01:32:31 +08:00
|
|
|
<!ENTITY chromium-time "94 SBU (with 4 threads)">
|
2016-10-29 15:29:37 +08:00
|
|
|
<!-- Ninja defaults to parallel build unless supplying -j1, SBU measured on
|
|
|
|
dual core, hyperthreaded CPU (4 threads). -->
|
2016-09-29 12:38:51 +08:00
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="chromium" xreflabel="Chromium-&chromium-version;">
|
|
|
|
<?dbhtml filename="chromium.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>Chromium-&chromium-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="chromium">
|
|
|
|
<primary sortas="a-Chromium">Chromium</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to Chromium</title>
|
|
|
|
|
|
|
|
<para><application>Chromium</application> is an open-source browser project
|
|
|
|
that aims to build a safer, faster, and more stable way for all users to
|
|
|
|
experience the web.</para>
|
|
|
|
|
2017-02-23 05:28:29 +08:00
|
|
|
&lfs80_checked;
|
2016-09-29 12:38:51 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP): <ulink url="&chromium-download-http;"/></para>
|
|
|
|
</listitem>
|
2017-02-06 03:53:40 +08:00
|
|
|
<listitem>
|
2016-09-29 12:38:51 +08:00
|
|
|
<para>Download (FTP): <ulink url="&chromium-download-ftp;"/></para>
|
2017-02-06 03:53:40 +08:00
|
|
|
</listitem>
|
2016-09-29 12:38:51 +08:00
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: &chromium-md5sum;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: &chromium-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated disk space required: &chromium-buildsize;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated build time: &chromium-time;</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
2017-06-30 07:52:16 +08:00
|
|
|
<bridgehead renderas="sect4">Required missing freetype2 source:</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP):</para>
|
|
|
|
<para>
|
|
|
|
<ulink url="&sources-anduin-http;/other/chromium-freetype2.tar.xz"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: a3edf5b35664b9882ec1575dfa33ee55</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: 1.1 MB</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2017-05-26 09:30:36 +08:00
|
|
|
<bridgehead renderas="sect4">Required patch to fix build issues with
|
|
|
|
<application>gcc-7.1.0</application>:</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-gcc7-1.patch"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2017-06-25 09:57:18 +08:00
|
|
|
<bridgehead renderas="sect4">Required patch to fix build issues with
|
|
|
|
<application>linux-4.6.x</application>:</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-kernel_dmabuf-1.patch"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2017-06-30 07:52:16 +08:00
|
|
|
<bridgehead renderas="sect4">Required patch to fix build issues with
|
|
|
|
<application>freetype-2.8</application>:</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-skia_clip-1.patch"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2017-03-19 17:02:00 +08:00
|
|
|
<bridgehead renderas="sect4">Recommended patch to use the system
|
|
|
|
<application>FFmpeg</application>:</bridgehead>
|
2016-09-29 12:38:51 +08:00
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2017-03-19 10:36:11 +08:00
|
|
|
<para>
|
2017-03-19 17:02:00 +08:00
|
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-system_ffmpeg-1.patch"/>
|
2016-09-29 12:38:51 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
2017-03-19 17:02:00 +08:00
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional Chrome binaries to extract the
|
|
|
|
<application>WideVine</application> plug-in (Netflix) support:</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
2016-09-29 12:38:51 +08:00
|
|
|
<listitem>
|
2017-03-19 17:02:00 +08:00
|
|
|
<para>Download (HTTP):</para>
|
2017-03-19 10:36:11 +08:00
|
|
|
<para>
|
2017-03-19 17:02:00 +08:00
|
|
|
<ulink url="http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_&chromium-version;-1_amd64.deb"/>
|
2017-03-19 10:36:11 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2017-06-30 07:52:16 +08:00
|
|
|
<para>Download MD5 sum: a32680dc081331e722fd17d2bd68fb00</para>
|
2017-03-19 17:02:00 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2017-06-30 07:52:16 +08:00
|
|
|
<para>Download size: 59 MB</para>
|
2017-03-19 17:02:00 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP):</para>
|
2017-03-19 10:36:11 +08:00
|
|
|
<para>
|
|
|
|
<ulink url="http://mirror.retrosnub.co.uk/apt/google/pool/main/g/google-chrome-stable/google-chrome-stable_48.0.2564.116-1_i386.deb"/>
|
|
|
|
</para>
|
2016-10-29 15:29:37 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2017-03-19 17:02:00 +08:00
|
|
|
<para>Download MD5 sum: 895e877b9bfe5da05a061369c2078626</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: 45 MB</para>
|
2016-09-29 12:38:51 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Chromium Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
|
|
<para role="required">
|
|
|
|
<xref linkend="alsa-lib"/>,
|
|
|
|
<xref linkend="cups"/>,
|
|
|
|
<xref linkend="desktop-file-utils"/>,
|
|
|
|
<xref linkend="dbus"/>,
|
2016-09-29 15:00:06 +08:00
|
|
|
<xref linkend="perl-file-basedir"/>,
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="gtk2"/>,
|
|
|
|
<xref linkend="hicolor-icon-theme"/>,
|
2016-10-08 05:10:47 +08:00
|
|
|
<xref linkend="mitkrb"/>,
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="mesa"/>,
|
|
|
|
<xref linkend="ninja"/>,
|
2017-04-24 01:32:31 +08:00
|
|
|
<xref linkend="nodejs"/>,
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="nss"/>,
|
2016-10-08 05:10:47 +08:00
|
|
|
<xref linkend="python2"/>,
|
|
|
|
<xref linkend="usbutils"/>, and
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="x-window-system"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
2017-03-19 10:36:11 +08:00
|
|
|
<xref linkend="ffmpeg"/>,
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="flac"/>,
|
2016-10-29 15:29:37 +08:00
|
|
|
<xref linkend="git"/>,
|
2017-04-24 01:32:31 +08:00
|
|
|
<!-- <xref linkend="icu"/>, -->
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="libevent"/>,
|
|
|
|
<xref linkend="libexif"/>,
|
2017-03-19 10:36:11 +08:00
|
|
|
<xref linkend="libjpeg"/>,
|
|
|
|
<xref linkend="libpng"/>,
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="libsecret"/>,
|
2017-04-24 01:32:31 +08:00
|
|
|
<!-- <xref linkend="libvpx"/>, -->
|
2016-10-29 15:29:37 +08:00
|
|
|
<xref linkend="libwebp"/>,
|
2016-09-29 12:38:51 +08:00
|
|
|
<xref linkend="pciutils"/>,
|
|
|
|
<xref linkend="pulseaudio"/>,
|
|
|
|
<xref linkend="xdg-utils"/>, and
|
|
|
|
<xref linkend="yasm"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
2016-10-29 15:29:37 +08:00
|
|
|
<xref linkend="GConf"/>,
|
2017-04-24 01:32:31 +08:00
|
|
|
<xref linkend="icu"/> (currently broken),
|
2016-10-29 15:29:37 +08:00
|
|
|
<xref linkend="gnome-keyring"/>,
|
2017-04-24 01:32:31 +08:00
|
|
|
<xref linkend="libvpx"/> (currently broken),
|
2017-06-25 09:57:18 +08:00
|
|
|
<xref linkend="libxml2"/> (currently broken),
|
2016-10-08 05:10:47 +08:00
|
|
|
<ulink url="https://devel.freebsoft.org/speechd">speech-dispatcher</ulink>
|
2016-09-29 12:38:51 +08:00
|
|
|
(for the screen reader), and
|
|
|
|
<ulink url="https://google.github.io/snappy">snappy</ulink>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
|
|
<ulink url="&blfs-wiki;/chromium"/></para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Chromium</title>
|
|
|
|
|
2017-05-26 09:30:36 +08:00
|
|
|
<para>Apply a patch to fix errors with building with
|
|
|
|
<application>GCC-7.1.0</application>:</para>
|
|
|
|
|
|
|
|
<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-gcc7-1.patch</userinput></screen>
|
|
|
|
|
2017-06-25 09:57:18 +08:00
|
|
|
<para>Apply a patch to fix an issue when building against Linux-4.6:</para>
|
|
|
|
|
|
|
|
<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-kernel_dmabuf-1.patch</userinput></screen>
|
|
|
|
|
2017-06-30 07:52:16 +08:00
|
|
|
<para>Apply a patch to fix an issue when building against Linux-4.6:</para>
|
|
|
|
|
|
|
|
<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-skia_clip-1.patch</userinput></screen>
|
|
|
|
|
|
|
|
<para>Apply a patch to allow use of the system
|
|
|
|
<application>FFmpeg</application>:</para>
|
2016-10-29 15:29:37 +08:00
|
|
|
|
2017-03-19 10:36:11 +08:00
|
|
|
<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-system_ffmpeg-1.patch</userinput></screen>
|
2016-10-29 15:29:37 +08:00
|
|
|
|
2017-06-30 07:52:16 +08:00
|
|
|
<para>Extract the missing freetype soruce:</para>
|
|
|
|
|
|
|
|
<screen><userinput>tar -xf ../chromium-freetype.tar.xz</userinput></screen>
|
|
|
|
|
2017-06-25 09:57:18 +08:00
|
|
|
<!-- <para>Fix a build issue with GCC-7:</para>
|
2016-10-29 15:29:37 +08:00
|
|
|
|
2017-03-24 13:33:16 +08:00
|
|
|
<screen><userinput>sed 's/^config("compiler") {/&\ncflags_cc = [ "-fno-delete-null-pointer-checks" ]/' \
|
2017-06-25 09:57:18 +08:00
|
|
|
-i build/config/linux/BUILD.gn</userinput></screen> -->
|
2016-10-29 15:29:37 +08:00
|
|
|
|
2017-03-24 13:33:16 +08:00
|
|
|
<para>Enable the use of the
|
2016-10-29 15:29:37 +08:00
|
|
|
<ulink url="http://www.widevine.com/">WideVine</ulink> plugin, needed for
|
2017-03-24 13:33:16 +08:00
|
|
|
Netflix support (see the WideVine section below). Define an
|
2016-10-29 15:29:37 +08:00
|
|
|
available product name ("Pinkie Pie" in this case) with the following
|
|
|
|
command:</para>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2017-03-24 13:33:16 +08:00
|
|
|
<screen><userinput>sed 's/WIDEVINE_CDM_AVAILABLE/&\n\n#define WIDEVINE_CDM_VERSION_STRING "Pinkie Pie"/' \
|
2016-09-29 12:38:51 +08:00
|
|
|
-i third_party/widevine/cdm/stub/widevine_cdm_version.h</userinput></screen>
|
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<para>Remove third-party build files that interfere with system versions:</para>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
2016-10-08 05:10:47 +08:00
|
|
|
Chromium uses many external projects, the selections below are not set
|
2016-10-29 15:29:37 +08:00
|
|
|
in stone, however they have been tested thoroughly. With Chromium
|
2017-06-25 09:57:18 +08:00
|
|
|
&chromium-version;, system versions of icu, libvpx, libxml2, and zlib
|
2017-03-19 10:36:11 +08:00
|
|
|
are known to break the build at this time.
|
2017-06-25 09:57:18 +08:00
|
|
|
<!-- icu: Not at 59 internally -->
|
|
|
|
<!-- libvpx: breaks build in gfx -->
|
|
|
|
<!-- libxml2: breaks build with ui -->
|
2017-03-19 10:36:11 +08:00
|
|
|
<!-- zlib requires libminizip -->
|
2016-10-29 15:29:37 +08:00
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
|
|
|
|
<!-- Again, thanks to Arch, this is much better than listing all the needed
|
|
|
|
shipped libs required to use the remove_bundled_files.py script -->
|
2017-04-24 01:32:31 +08:00
|
|
|
<!--<screen><userinput>for LIB in ffmpeg flac harfbuzz-ng icu libevent libjpeg \
|
2017-04-16 23:40:02 +08:00
|
|
|
libjpeg_turbo libpng libvpx libwebp libxslt yasm; do
|
2017-03-19 10:36:11 +08:00
|
|
|
find -type f -path "*third_party/$LIB/*" \
|
|
|
|
\! -path "*third_party/$LIB/chromium/*" \
|
|
|
|
\! -path "*third_party/$LIB/google/*" \
|
2017-04-24 01:32:31 +08:00
|
|
|
\! -path "*base/third_party/icu/*" \
|
|
|
|
\! -path "*base/third_party/libevent/*" \
|
|
|
|
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
|
|
|
|
-delete
|
|
|
|
done && -->
|
|
|
|
<screen><userinput>for LIB in ffmpeg flac harfbuzz-ng libevent libjpeg \
|
2017-06-25 09:57:18 +08:00
|
|
|
libjpeg_turbo libpng libwebp<!-- libxml libvpx--> libxslt yasm; do
|
2017-04-24 01:32:31 +08:00
|
|
|
find -type f -path "*third_party/$LIB/*" \
|
|
|
|
\! -path "*third_party/$LIB/chromium/*" \
|
|
|
|
\! -path "*third_party/$LIB/google/*" \
|
2017-03-19 10:36:11 +08:00
|
|
|
\! -path "*base/third_party/libevent/*" \
|
2016-10-29 15:29:37 +08:00
|
|
|
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
|
|
|
|
-delete
|
|
|
|
done &&
|
|
|
|
|
|
|
|
python build/linux/unbundle/replace_gn_files.py \
|
2017-06-25 09:57:18 +08:00
|
|
|
--system-libraries ffmpeg flac harfbuzz-ng<!-- icu--> libevent libjpeg \
|
|
|
|
libpng libwebp<!-- libxml libvpx--> libxslt yasm &&
|
2017-03-19 10:36:11 +08:00
|
|
|
python third_party/libaddressinput/chromium/tools/update-strings.py</userinput></screen>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<para><application>Chromium</application> uses an internal tool, <ulink
|
|
|
|
url="https://chromium.googlesource.com/chromium/src/tools/gn">gn</ulink>,
|
|
|
|
to generate the <application>Ninja</application> build files. Complete
|
|
|
|
configuration of the build using the following commands:</para>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
2016-09-29 12:38:51 +08:00
|
|
|
<!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
|
2016-10-29 15:29:37 +08:00
|
|
|
The Google API Key and OAuth tokens below are specific to LFS. If using
|
|
|
|
these instructions for another distro, or if you intend to distribute
|
|
|
|
binary copies of the software using these instructions, please obtain
|
|
|
|
your own keys following the instructions located at
|
2016-09-29 12:38:51 +08:00
|
|
|
<ulink url="http://www.chromium.org/developers/how-tos/api-keys"/>.
|
|
|
|
<!-- BLFS Devs, register an account at Google with your
|
|
|
|
@linuxfromscratch.org email address, and I'll make you an administrator
|
2016-10-29 15:29:37 +08:00
|
|
|
for the 'Chromium for LFS' project (where the API and OAuth keys were
|
|
|
|
created for use in the book).-->
|
2016-09-29 12:38:51 +08:00
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
|
2017-03-24 13:33:16 +08:00
|
|
|
<screen><userinput>GN_CONFIG=('google_api_key="AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ"'
|
|
|
|
'google_default_client_id="595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com"'
|
|
|
|
'google_default_client_secret="5ntt6GbbkjnTVXx-MSxbmx5e"'
|
2016-10-29 15:29:37 +08:00
|
|
|
'clang_use_chrome_plugins=false'
|
|
|
|
'enable_hangout_services_extension=true'
|
|
|
|
'enable_nacl=false'
|
|
|
|
'enable_nacl_nonsfi=false'
|
2017-06-25 09:57:18 +08:00
|
|
|
'enable_swiftshader=false'
|
2016-10-29 15:29:37 +08:00
|
|
|
'enable_widevine=true'
|
|
|
|
'fatal_linker_warnings=false'
|
|
|
|
'ffmpeg_branding="Chrome"'
|
|
|
|
'fieldtrial_testing_like_official_build=true'
|
|
|
|
'is_debug=false'
|
|
|
|
'is_clang=false'
|
|
|
|
'link_pulseaudio=true'
|
|
|
|
'linux_use_bundled_binutils=false'
|
|
|
|
'proprietary_codecs=true'
|
|
|
|
'remove_webcore_debug_symbols=true'
|
|
|
|
'symbol_level=0'
|
|
|
|
'treat_warnings_as_errors=false'
|
|
|
|
'use_allocator="none"'
|
|
|
|
'use_cups=true'
|
|
|
|
'use_gconf=false'
|
|
|
|
'use_gnome_keyring=false'
|
|
|
|
'use_gold=false'
|
|
|
|
'use_gtk3=false'
|
|
|
|
'use_kerberos=true'
|
|
|
|
'use_pulseaudio=true'
|
|
|
|
'use_sysroot=false')</userinput></screen>
|
|
|
|
|
|
|
|
<para>Build <application>gn</application> and use it to prepare the
|
|
|
|
<application>Ninja</application> build files:</para>
|
|
|
|
|
2017-06-25 09:57:18 +08:00
|
|
|
<screen><userinput>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}" &&
|
2016-10-29 15:29:37 +08:00
|
|
|
out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</userinput></screen>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2017-05-26 09:30:36 +08:00
|
|
|
<warning>
|
|
|
|
<para>Ninja, by default, sets the number of jobs to the number of
|
|
|
|
availalble threads. If your machine is memory constrained, with regard to
|
|
|
|
number of threads, you should reduce the number of jobs by passing the
|
|
|
|
<parameter>-j#</parameter> switch to the <command>ninja</command> command
|
|
|
|
below. Plan for roughly 1.25GB per thread while linking
|
|
|
|
<application>WebKit</application> to avoid out of memery errors.</para>
|
|
|
|
</warning>
|
|
|
|
|
2016-09-29 12:38:51 +08:00
|
|
|
<para>Build <application>Chromium</application> using the following
|
2017-04-24 01:32:31 +08:00
|
|
|
commands:</para>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2017-04-24 01:32:31 +08:00
|
|
|
<screen><userinput>mkdir -p third_party/node/linux/node-linux-x64/bin &&
|
|
|
|
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ &&
|
|
|
|
ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter</userinput></screen>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
|
|
|
<para>This package was already tested as part of the build.</para>
|
|
|
|
|
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user,
|
|
|
|
install the pacakage:</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>install -vDm755 out/Release/chrome \
|
2017-02-06 03:53:40 +08:00
|
|
|
/usr/lib/chromium/chromium &&
|
2016-09-29 12:38:51 +08:00
|
|
|
install -vDm4755 out/Release/chrome_sandbox \
|
2017-02-06 03:53:40 +08:00
|
|
|
/usr/lib/chromium/chrome-sandbox &&
|
2016-09-29 12:38:51 +08:00
|
|
|
install -vDm755 out/Release/chromedriver \
|
2017-02-06 03:53:40 +08:00
|
|
|
/usr/lib/chromium/chromedriver &&
|
|
|
|
ln -svf /usr/lib/chromium/chromium /usr/bin &&
|
|
|
|
ln -svf /usr/lib/chromium/chromedriver /usr/bin/ &&
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2017-05-27 23:14:54 +08:00
|
|
|
install -vm644 out/Release/icudtl.dat /usr/lib/chromium/ &&
|
2016-10-29 15:29:37 +08:00
|
|
|
install -vDm644 out/Release/gen/content/content_resources.pak \
|
2017-02-06 03:53:40 +08:00
|
|
|
/usr/lib/chromium/ &&
|
2017-05-27 23:14:54 +08:00
|
|
|
install -vm644 out/Release/{*.pak,*.bin} \
|
|
|
|
/usr/lib/chromium/ &&
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2017-02-06 03:53:40 +08:00
|
|
|
cp -av out/Release/locales /usr/lib/chromium/ &&
|
|
|
|
chown -Rv root:root /usr/lib/chromium/locales &&
|
2016-09-29 12:38:51 +08:00
|
|
|
|
|
|
|
install -vDm644 out/Release/chrome.1 \
|
|
|
|
/usr/share/man/man1/chromium.1</userinput></screen>
|
|
|
|
|
|
|
|
<para>While still the <systemitem class="username">root</systemitem> user,
|
|
|
|
install icons and the .desktop file:</para>
|
|
|
|
|
2017-02-22 22:22:59 +08:00
|
|
|
<screen role="root"><userinput>for size in 16 32; do
|
2016-09-29 12:38:51 +08:00
|
|
|
install -vDm644 \
|
|
|
|
"chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
|
|
|
|
"/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
|
|
|
done &&
|
|
|
|
|
|
|
|
for size in 22 24 48 64 128 256; do
|
|
|
|
install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
|
|
|
|
"/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
|
|
|
done &&
|
|
|
|
|
|
|
|
cat > /usr/share/applications/chromium.desktop << "EOF"
|
|
|
|
[Desktop Entry]
|
|
|
|
Encoding=UTF-8
|
|
|
|
Name=Chromium Web Browser
|
|
|
|
Comment=Access the Internet
|
|
|
|
GenericName=Web Browser
|
|
|
|
Exec=chromium %u
|
|
|
|
Terminal=false
|
|
|
|
Type=Application
|
|
|
|
Icon=chromium
|
|
|
|
Categories=GTK;Network;WebBrowser;
|
|
|
|
MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<bridgehead renderas="sect3">Extracting the WideVine plugin from Chrome</bridgehead>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
|
|
|
<para>Extract the downloaded deb file with the following commands:</para>
|
|
|
|
|
2017-02-06 03:53:40 +08:00
|
|
|
<screen><userinput>mkdir temp &&
|
|
|
|
cd temp &&
|
2017-03-19 17:02:00 +08:00
|
|
|
case $(uname -m) in
|
|
|
|
x86_64) ar -x ../../google-chrome-stable_&chromium-version;-1_amd64.deb
|
|
|
|
;;
|
2017-05-26 09:30:36 +08:00
|
|
|
i?86) ar -x ../../google-chrome-stable_48.0.2564.116-1_i386.deb
|
2017-03-19 17:02:00 +08:00
|
|
|
;;
|
|
|
|
esac</userinput></screen>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2017-03-24 13:33:16 +08:00
|
|
|
<para>As the <systemitem class="username">root</systemitem> user, enable
|
|
|
|
the WideVine plugin with the following commands:</para>
|
|
|
|
|
|
|
|
<!-- Note that libwidevinecdmadapter.so is not in the tarball. It is
|
|
|
|
created only if enable_widevine=true i sset in GN_CONFIG -->
|
2016-10-29 15:29:37 +08:00
|
|
|
|
2017-03-24 13:33:16 +08:00
|
|
|
<screen role="root"><userinput>tar -xf data.tar.xz &&
|
|
|
|
install -vm755 ../out/Release/libwidevinecdmadapter.so /usr/lib/chromium/ &&
|
|
|
|
install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/</userinput></screen>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<para><command>GN_CONFIG=(...)</command>: this array contains
|
2016-09-29 12:38:51 +08:00
|
|
|
all of the defines used in the build.</para>
|
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<para><command>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}"</command>:
|
|
|
|
this command replaces defines in the gn files with the values contained in
|
|
|
|
<envar>${GN_CONFIG[@]}</envar>.</para>
|
2016-09-29 12:38:51 +08:00
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<para><command>out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</command>:
|
|
|
|
this command runs a Google provided configuration script
|
|
|
|
<application>gn</application> on the source tree to produce
|
2016-09-29 12:38:51 +08:00
|
|
|
a <application>Ninja</application> configuration suitable for the build
|
|
|
|
machine.</para>
|
|
|
|
|
2017-04-24 01:32:31 +08:00
|
|
|
<para><command>mkdir...ln -s /usr/bin/node
|
|
|
|
third_party/node/linux/node-linux-x64/bin/</command>: these commands
|
|
|
|
replaced the local <application>Node.js</application> (no longer available)
|
|
|
|
with the system installed <application>Node.js</application>.</para>
|
|
|
|
|
2016-10-29 15:29:37 +08:00
|
|
|
<para><command>ar -x ../../google-chrome-stable*.deb</command>:
|
2016-09-29 12:38:51 +08:00
|
|
|
the <command>ar</command> utility is used to extract Debian archives.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
2017-03-19 17:02:00 +08:00
|
|
|
<seg>/usr/lib/chromium/chromium,
|
2016-09-29 12:38:51 +08:00
|
|
|
/usr/lib/chromium/chromedriver, and
|
|
|
|
/usr/lib/chromium/chrome-sandbox</seg>
|
|
|
|
<seg>none</seg>
|
2017-03-19 17:02:00 +08:00
|
|
|
<seg>/usr/lib/chromium</seg>
|
2016-09-29 12:38:51 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="chromium-lib">
|
|
|
|
<term><command>/usr/lib/chromium/chromium</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para> is the main chromium executable.</para>
|
|
|
|
<indexterm zone="chromium chromium-lib">
|
|
|
|
<primary sortas="b-chromiumlib">chromium</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="chromedriver">
|
2017-06-30 07:52:16 +08:00
|
|
|
<term><command>/usr/lib/chromium/chromedriver</command></term>
|
2016-09-29 12:38:51 +08:00
|
|
|
<listitem>
|
|
|
|
<para> is a
|
|
|
|
<ulink url="http://www.seleniumhq.org/projects/webdriver/">
|
|
|
|
WebDriver</ulink> for Chromium.</para>
|
|
|
|
<indexterm zone="chromium chromedriver">
|
|
|
|
<primary sortas="b-chromedriver">chromedriver</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="chrome-sandbox">
|
|
|
|
<term><command>/usr/lib/chromium/chrome-sandbox</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para> creates a sandboxed environment for running untrusted
|
|
|
|
code (plugins).</para>
|
|
|
|
<indexterm zone="chromium chrome-sandbox">
|
|
|
|
<primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|