-
-
Save sasajib/f7c2c821e8c8415b788cf2f5cb7d6e4c to your computer and use it in GitHub Desktop.
Compile headless shell (Chromium)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on: | |
# http://www.zackarychapple.guru/chrome/2016/08/24/chrome-headless.html | |
# https://www.chromium.org/developers/how-tos/get-the-code | |
# https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
apt-get update | |
apt-get install -y curl git htop man unzip vim wget python | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH=$PATH:`pwd`/depot_tools | |
mkdir Chromium && cd Chromium | |
fetch --no-history chromium | |
cd src | |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | |
./build/install-build-deps.sh --no-prompt | |
gclient runhooks | |
mkdir -p out/Headless | |
echo 'import("//build/args/headless.gn")' > out/Headless/args.gn | |
echo 'is_debug = false' >> out/Headless/args.gn | |
gn gen out/Headless | |
ninja -C out/Headless headless_shell | |
tar -zcvf ChromeHeadless.tar.gz out/Headless | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment