2021-10-26 07:18:13 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-04-20 17:07:06 -04:00
|
|
|
# Copyright (c) 2022 Alex313031.
|
2022-04-11 11:47:10 -04:00
|
|
|
|
2022-04-09 04:11:10 -04:00
|
|
|
YEL='\033[1;33m' # Yellow
|
2022-06-06 19:32:22 -04:00
|
|
|
RED='\033[1;31m' # Red
|
|
|
|
GRE='\033[1;32m' # Green
|
|
|
|
c0=$'\033[0m' # Reset Text
|
|
|
|
bold=$'\033[1m' # Bold Text
|
|
|
|
underline=$'\033[4m' # Underline Text
|
|
|
|
|
|
|
|
# Error handling
|
|
|
|
yell() { echo "$0: $*" >&2; }
|
|
|
|
die() { yell "$*"; exit 111; }
|
|
|
|
try() { "$@" || die "${RED}Failed $*"; }
|
2022-04-09 04:11:10 -04:00
|
|
|
|
|
|
|
printf "\n" &&
|
|
|
|
printf "${YEL}Creating build output directory...\n" &&
|
|
|
|
tput sgr0 &&
|
|
|
|
|
2021-10-29 06:58:28 -03:00
|
|
|
mkdir -v -p $HOME/chromium/src/out/thorium/ &&
|
2022-04-09 04:11:10 -04:00
|
|
|
printf "\n" &&
|
|
|
|
|
2022-05-18 17:25:10 -04:00
|
|
|
printf "${YEL}Copying Thorium source files over the Chromium tree...\n" &&
|
2022-04-09 04:11:10 -04:00
|
|
|
tput sgr0 &&
|
2021-10-28 13:53:43 -03:00
|
|
|
|
2022-05-25 15:39:35 -04:00
|
|
|
cp -r -v BUILD.gn $HOME/chromium/src/ &&
|
2022-05-12 09:55:21 -04:00
|
|
|
cp -r -v ash/. $HOME/chromium/src/ash/ &&
|
2022-05-12 09:48:39 -04:00
|
|
|
cp -r -v base/. $HOME/chromium/src/base/ &&
|
2021-10-26 07:18:13 -03:00
|
|
|
cp -r -v build/. $HOME/chromium/src/build/ &&
|
|
|
|
cp -r -v chrome/. $HOME/chromium/src/chrome/ &&
|
2022-06-14 01:09:35 -04:00
|
|
|
cp -r -v components/. $HOME/chromium/src/components/ &&
|
|
|
|
cp -r -v extensions/. $HOME/chromium/src/extensions/ &&
|
2021-10-26 07:18:13 -03:00
|
|
|
cp -r -v content/. $HOME/chromium/src/content/ &&
|
|
|
|
cp -r -v media/. $HOME/chromium/src/media/ &&
|
2021-10-28 10:47:38 -03:00
|
|
|
cp -r -v net/. $HOME/chromium/src/net/ &&
|
2021-11-11 22:58:30 -03:00
|
|
|
cp -r -v sandbox/. $HOME/chromium/src/sandbox/ &&
|
2021-11-30 17:04:46 -03:00
|
|
|
cp -r -v third_party/. $HOME/chromium/src/third_party/ &&
|
2022-01-25 18:07:09 -03:00
|
|
|
cp -r -v tools/. $HOME/chromium/src/tools/ &&
|
2021-10-26 07:18:13 -03:00
|
|
|
cp -r -v ui/. $HOME/chromium/src/ui/ &&
|
|
|
|
cp -r -v v8/. $HOME/chromium/src/v8/ &&
|
2022-06-24 03:38:55 -04:00
|
|
|
cp -r -v thorium_shell/. $HOME/chromium/src/out/thorium/ &&
|
2022-02-11 17:53:38 -03:00
|
|
|
cp -r -v pak_src/bin/pak $HOME/chromium/src/out/thorium/ &&
|
|
|
|
cp -r -v pak_src/bin/pak-win/. $HOME/chromium/src/out/thorium/ &&
|
2021-10-26 07:18:13 -03:00
|
|
|
|
2022-06-06 19:32:22 -04:00
|
|
|
printf "${GRE}Done!\n" &&
|
2022-04-09 04:11:10 -04:00
|
|
|
printf "\n" &&
|
|
|
|
|
|
|
|
printf "${YEL}Setting NINJA_SUMMARIZE_BUILD=1 and aliases to download the PGO Profiles for supported targets, and the gsync alias.\n" &&
|
2022-04-20 17:07:06 -04:00
|
|
|
|
|
|
|
export NINJA_SUMMARIZE_BUILD=1 &&
|
|
|
|
|
2022-04-22 15:37:47 -04:00
|
|
|
export EDITOR=nano &&
|
|
|
|
|
|
|
|
export VISUAL=nano &&
|
|
|
|
|
2022-05-09 04:06:08 -04:00
|
|
|
alias origin='git checkout -f origin/main' &&
|
|
|
|
|
|
|
|
alias rebase='git rebase-update' &&
|
|
|
|
|
2022-06-06 19:32:22 -04:00
|
|
|
alias args='gn args out/thorium' &&
|
2022-05-09 04:06:08 -04:00
|
|
|
|
|
|
|
alias gnls='gn ls out/thorium' &&
|
|
|
|
|
2022-04-20 17:07:06 -04:00
|
|
|
alias gsync='gclient sync --with_branch_heads --with_tags -f -R -D' &&
|
|
|
|
|
2022-05-09 04:06:08 -04:00
|
|
|
alias runhooks='gclient runhooks' &&
|
|
|
|
|
2022-04-20 17:07:06 -04:00
|
|
|
alias pgo='python3 tools/update_pgo_profiles.py --target=linux update --gs-url-base=chromium-optimization-profiles/pgo_profiles' &&
|
|
|
|
|
|
|
|
alias pgow='python3 tools/update_pgo_profiles.py --target=win64 update --gs-url-base=chromium-optimization-profiles/pgo_profiles' &&
|
|
|
|
|
|
|
|
alias pgom='python3 tools/update_pgo_profiles.py --target=mac update --gs-url-base=chromium-optimization-profiles/pgo_profiles' &&
|
|
|
|
|
2022-04-09 04:11:10 -04:00
|
|
|
printf "\n" &&
|
|
|
|
|
2022-05-18 17:25:10 -04:00
|
|
|
printf "${YEL}Dropping you to ~/chromium/src\n" &&
|
2022-04-09 04:11:10 -04:00
|
|
|
printf "\n" &&
|
|
|
|
|
|
|
|
printf "${YEL}Look in this file to see the aliases and what they're for.\n" &&
|
|
|
|
printf "\n" &&
|
|
|
|
|
2022-06-06 19:32:22 -04:00
|
|
|
printf "${GRE}Enjoy Thorium!\n" &&
|
2022-04-09 04:11:10 -04:00
|
|
|
printf "\n" &&
|
|
|
|
tput sgr0 &&
|
|
|
|
|
2022-06-06 19:32:22 -04:00
|
|
|
cd ~/chromium/src &&
|
2021-10-26 07:18:13 -03:00
|
|
|
|
|
|
|
exit 0
|