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

Commit 2a2cf7db authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Browser: Allow legacy builds

- Make trichrome optional
parent 4830133b
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ chromium_url=https://github.com/chromium/chromium.git
clean=0
gsync=0
history=1
trichrome=0
patchonly=0
arch=""

@@ -27,6 +28,7 @@ usage() {
    echo "    -s Sync source"
    echo "    -h Sync without history"
    echo "    -p Apply patches - Only after synced"
    echo "    -t Build trichrome chromium, webview and library"
    echo
    exit 1
}
@@ -34,7 +36,7 @@ usage() {
build() {
    echo ">> [$(date)] Head commit: $(git show -s --format=%s)"
    apks="TrichromeChrome TrichromeLibrary TrichromeWebView TrichromeChrome6432 \
        TrichromeLibrary6432 TrichromeWebView6432"
        TrichromeLibrary6432 TrichromeWebView6432 ChromePublic SystemWebView"
    build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" "

    apk_arch=${1}
@@ -61,7 +63,9 @@ build() {

    echo ">> [$(date)] Building chromium $chromium_version for $1"
    gn gen "out/$1" --fail-on-unused-args --args="$build_args"
    if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then
    if [[ $trichrome -eq 0 ]]; then
        build_targets="chrome_public_apk system_webview_apk"
    elif [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then
        build_targets="trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk"
    else
        build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk"
@@ -221,7 +225,7 @@ init_repo() {
    fi
}

while getopts ":a:cur:shp" opt; do
while getopts ":a:cur:shpt" opt; do
    case $opt in
    a) arch="$OPTARG" ;;
    c) clean=1 ;;
@@ -229,6 +233,7 @@ while getopts ":a:cur:shp" opt; do
    s) gsync=1 ;;
    h) history=0 ;;
    p) patchonly=1 ;;
    t) trichrome=1 ;;
    :)
        echo "Option -$OPTARG requires an argument"
        echo