Skip to content

Instantly share code, notes, and snippets.

@timonweb
Forked from corysimmons/headless-chromium-mac.md
Created November 26, 2016 19:49
Show Gist options
  • Save timonweb/67b95f2aa40e982fe21a69e96b105d8d to your computer and use it in GitHub Desktop.
Save timonweb/67b95f2aa40e982fe21a69e96b105d8d to your computer and use it in GitHub Desktop.
Instructions for how to build Headless Chromium on Mac.

Doesn't work yet.

Build

  • brew install ninja
  • mkdir -p ~/chromium
  • cd ~/chromium
  • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  • export $PATH=$PWD/depot_tools:$PATH (shell specific)
  • fetch --no-history chromium --nosvn=True
  • cd src
  • mkdir -p out/release
  • echo 'import("//build/args/headless.gn")' > out/release/args.gn
  • echo 'is_debug = false' >> out/release/args.gn
  • gn gen out/release
  • ninja -C out/release headless
  • ln -s ~/chromium/out/release/headless /usr/local/bin/headless-chromium

Usage

  • headless-chromium ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment