Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cba7013 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Browser: allow vanilla chromium build

parent 1fb8af36
Loading
Loading
Loading
Loading
Loading

.vanilla_gclient

0 → 100644
+10 −0
Original line number Diff line number Diff line
solutions = [
  {
    "name": "src",
    "url": "https://chromium.googlesource.com/chromium/src.git",
    "managed": False,
    "custom_deps": {},
    "custom_vars": {},
  },
]
target_os = ["android"]
+28 −11
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ clean=0
gsync=0
history=1
test=0
vanilla=0
arch=""

usage() {
@@ -34,6 +35,10 @@ build() {
    apks="ChromePublic SystemWebView TrichromeChrome32 TrichromeLibrary32 TrichromeWebView32 TrichromeChrome6432 TrichromeLibrary6432 TrichromeWebView6432"
    build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" "

    if [ $vanilla -eq 1 ]; then
        build_args="$(cat "${root_dir}"/build/vanilla.gn_args) target_cpu=\"${1}\" "
    fi

    if [ $1 '==' "x86" ] || [ $1 '==' "x64" ]; then
        build_args+=' is_cfi=false'
        build_args+=' use_cfi_cast=false'
@@ -128,6 +133,12 @@ patch() {
    cd $chromium_dir/src
    echo ">> [$(date)] Applying bromite and /e/ patches"

    if [ $vanilla -eq 1 ]; then
        vanilla_patches_list=$(cat "${root_dir}/build/vanilla_patches_list.txt")
        for file in $vanilla_patches_list; do
            git am -3 --ignore-whitespace "${root_dir}/build/patches/$file"
        done
    else
        bromite_patches_list=$(cat "${root_dir}/bromite/build/bromite_patches_list.txt")
        for file in $bromite_patches_list; do
            git am -3 --ignore-whitespace "${root_dir}/bromite/build/patches/$file"
@@ -137,12 +148,17 @@ patch() {
        for file in $e_patches_list; do
            git am -3 --ignore-whitespace "${root_dir}/build/patches/$file"
        done
    fi
}

sync() {
    echo ">> [$(date)] Syncing chromium $chromium_version"
    cd $chromium_dir
    if [ $vanilla -eq 1 ]; then
        cp ${root_dir}/.vanilla_gclient $chromium_dir/.gclient
    else
        cp ${root_dir}/.config_gclient $chromium_dir/.gclient
    fi
    if [ $history -eq 1 ]; then
        yes | gclient sync -D -R -r $chromium_version
    else
@@ -162,13 +178,14 @@ init_repo(){
    fi
}

while getopts ":a:chr:st" opt; do
while getopts ":a:chr:stv" opt; do
    case $opt in
    a) arch="$OPTARG" ;;
    c) clean=1 ;;
    h) usage ;;
    s) gsync=1 && history=0 ;;
    t) test=1 ;;
    v) vanilla=1 ;;
    :)
        echo "Option -$OPTARG requires an argument"
        echo

build/vanilla.gn_args

0 → 100644
+23 −0
Original line number Diff line number Diff line
target_os = "android"
is_debug = false
is_official_build = true
is_chrome_branded = false
use_official_google_api_keys = false
ffmpeg_branding = "Chrome"
proprietary_codecs = true
enable_resource_allowlist_generation = false
enable_remoting = false
is_component_build = false
symbol_level = 0
enable_nacl = false
blink_symbol_level = 0
webview_devui_show_icon = false
dfmify_dev_ui = false
disable_autofill_assistant_dfm = true
disable_tab_ui_dfm = true
enable_gvr_services = false
disable_fieldtrial_testing_config = true

chrome_public_manifest_package = "foundation.e.browser"
trichrome_library_package = "org.chromium.trichromelibrary"
system_webview_package_name="com.android.webview"
+2 −0
Original line number Diff line number Diff line
0001-add-trichrome-browser-apk-targets.patch
0002-chromium-Add-32-bit-chrome-app-support.patch