Created
April 25, 2021 11:40
-
-
Save alixaxel/d7ce1d33c6745adc0b50f5bec27bf4bc to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
export PATH="$PATH:/srv/source/depot_tools" | |
mkdir -p /srv/{build,source}/chromium | |
cd /srv/source && \ | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
cd /srv/source/chromium && \ | |
fetch chromium | |
cd /srv/source/chromium/src && \ | |
git checkout 362f49f9988c8051e610ed5e21047a5876e9915f | |
cd /srv/source/chromium && \ | |
gclient sync --with_branch_heads | |
cd /srv/source/chromium/src/content/browser && \ | |
perl -p -i -e 's~^(\s+)PLOG[(]WARNING[)] << "poll";$~\1PLOG(WARNING) << "poll"; failed_polls = 0;~g' sandbox_ipc_linux.cc && \ | |
perl -p -i -e 's~^( )(\s*)(CHECK[(]render_process_host->InSameStoragePartition[(]|BrowserContext::GetStoragePartition[(]browser_context, site_instance,|false /[*] can_create [*]/[)][)][)];)$~\1// \2\3~g' renderer_host/render_process_host_impl.cc | |
mkdir -p /srv/source/chromium/src/out/Headless && \ | |
cd /srv/source/chromium/src/out/Headless && \ | |
echo '' > args.gn | |
echo 'import("//build/args/headless.gn")' >> args.gn | |
echo 'blink_symbol_level = 0' >> args.gn | |
echo 'disable_ftp_support = true' >> args.gn | |
echo 'disable_histogram_support = false' >> args.gn | |
echo 'enable_basic_print_dialog = false' >> args.gn | |
echo 'enable_basic_printing = true' >> args.gn | |
echo 'enable_keystone_registration_framework = false' >> args.gn | |
echo 'enable_linux_installer = false' >> args.gn | |
echo 'enable_media_remoting = false' >> args.gn | |
echo 'enable_media_remoting_rpc = false' >> args.gn | |
echo 'enable_nacl = false' >> args.gn | |
echo 'enable_one_click_signin = false' >> args.gn | |
echo 'ffmpeg_branding = "Chrome"' >> args.gn | |
echo 'headless_use_embedded_resources = true' >> args.gn | |
echo 'icu_use_data_file = false' >> args.gn | |
echo 'is_component_build = false' >> args.gn | |
echo 'is_debug = false' >> args.gn | |
echo 'proprietary_codecs = true' >> args.gn | |
echo 'symbol_level = 0' >> args.gn | |
echo 'target_cpu = "x64"' >> args.gn | |
echo 'target_os = "linux"' >> args.gn | |
echo 'use_bundled_fontconfig = true' >> args.gn | |
echo 'use_cups = false' >> args.gn | |
echo 'use_pulseaudio = false' >> args.gn | |
echo 'use_sysroot = true' >> args.gn | |
echo 'v8_target_cpu = "x64"' >> args.gn | |
cd /srv/source/chromium/src && \ | |
gn gen out/Headless && \ | |
autoninja -C out/Headless headless_shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment