-
Notifications
You must be signed in to change notification settings - Fork 3
/
sync-and-compile.sh
64 lines (50 loc) · 2.13 KB
/
sync-and-compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#fetch --nohooks android
# Chromium
#
# Versions
# 73 = alpha
# 72 = beta
# 71 = stable
#
#
# https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/WBSeL0E6-70
# https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/e0zOss0bHaU
# https://www.chromium.org/developers/how-tos/build-instructions-android-webview
# https://github.com/scheib/chromium/blob/master/docs/android_build_instructions.md
# https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md
#
DATE=`eval date +%Y`-`eval date +%m`-`eval date +%d`-`eval date +%H`-`eval date +%M`
ROOT="/home/andi/chromium"
cd "${ROOT}/src"
gclient sync --with_branch_heads
git fetch
PATCHPATH="/home/andi/chromium/patches/72"
git checkout 72.0.3626.38
gclient sync
for patches in "${PATCHPATH[@]}"; do
cd "${ROOT}/src"
git am --whitespace=nowarn "${patches}"/*
cd "${ROOT}/src"
done
rm -rf out
echo "Setting default jdk to 1.8"
echo 3 | sudo /usr/bin/update-alternatives --config java > /dev/null
echo 3 | sudo /usr/bin/update-alternatives --config javac > /dev/null
echo 3 | sudo /usr/bin/update-alternatives --config javadoc > /dev/null
echo 3 | sudo /usr/bin/update-alternatives --config javap > /dev/null
echo 3 | sudo /usr/bin/update-alternatives --config jar > /dev/null
echo 3 | sudo /usr/bin/update-alternatives --config jarsigner > /dev/null
gn gen '--args=target_os="android" is_debug=false symbol_level=0 enable_nacl=false remove_webcore_debug_symbols=true' out/Default
autoninja -C out/Default monochrome_public_apk
autoninja -C out/Default chrome_modern_public_apk
autoninja -C out/Default chrome_public_apk
PUBLICAPK=$DATE-public
mkdir -p $ROOT/$PUBLICAPK
mv $ROOT/src/out/Default/apks/*.apk $ROOT/$PUBLICAPK/
gn gen '--args=target_os="android" is_debug=false symbol_level=0 enable_nacl=false remove_webcore_debug_symbols=true proprietary_codecs=true ffmpeg_branding="Chrome"' out/Default
autoninja -C out/Default monochrome_public_apk
autoninja -C out/Default chrome_modern_public_apk
autoninja -C out/Default chrome_public_apk
PRIVATEAPK=$DATE-private
mkdir -p $ROOT/$PRIVATEAPK
mv $ROOT/src/out/Default/apks/*.apk $ROOT/$PRIVATEAPK/