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

Commit 28d2c862 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '2249-master-update_to_127' into 'master'

Update to 127.0.6533.103

See merge request !71
parents bc81daf9 ffe4edd6
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
FROM ubuntu:20.04
FROM ubuntu:20.04


ENV CHROMIUM_DIR "/srv/chromium"
ENV CHROMIUM_DIR "/srv/chromium"
ENV CHROMIUM_VER "123.0.6312.122"
ENV CHROMIUM_VER "127.0.6533.103"


RUN dpkg --add-architecture i386
RUN dpkg --add-architecture i386


@@ -10,6 +10,9 @@ RUN apt-get update &&\
    apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils ccache jq python3 \
    apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils ccache jq python3 \
    python-is-python3 sed tzdata build-essential lib32gcc-9-dev g++-multilib dos2unix wiggle git curl
    python-is-python3 sed tzdata build-essential lib32gcc-9-dev g++-multilib dos2unix wiggle git curl


RUN apt-get update &&\
    apt-get -y install p7zip-full

RUN mkdir ${CHROMIUM_DIR}
RUN mkdir ${CHROMIUM_DIR}


RUN curl -s https://raw.githubusercontent.com/chromium/chromium/${CHROMIUM_VER}/build/install-build-deps.py \
RUN curl -s https://raw.githubusercontent.com/chromium/chromium/${CHROMIUM_VER}/build/install-build-deps.py \
+27 −12
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ chromium_url=https://github.com/chromium/chromium.git
clean=0
clean=0
gsync=0
gsync=0
history=1
history=1
patchonly=0
arch=""
arch=""


usage() {
usage() {
@@ -25,13 +26,15 @@ usage() {
    echo "    -u Show this message"
    echo "    -u Show this message"
    echo "    -s Sync source"
    echo "    -s Sync source"
    echo "    -h Sync without history"
    echo "    -h Sync without history"
    echo "    -p Apply patches - Only after synced"
    echo
    echo
    exit 1
    exit 1
}
}


build() {
build() {
    echo ">> [$(date)] Head commit: $(git show -s --format=%s)"
    echo ">> [$(date)] Head commit: $(git show -s --format=%s)"
    apks="TrichromeChrome TrichromeLibrary TrichromeWebView TrichromeChrome6432 \
    apks="ChromePublic MonochromePublic SystemWebView TrichromeChrome \
        TrichromeLibrary TrichromeWebView TrichromeChrome6432 \
        TrichromeLibrary6432 TrichromeWebView6432"
        TrichromeLibrary6432 TrichromeWebView6432"
    build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" "
    build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" "


@@ -65,6 +68,7 @@ build() {
    gn gen "out/$1" --args="$build_args"
    gn gen "out/$1" --args="$build_args"
    if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then
    if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then
        build_targets="trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk"
        build_targets="trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk"
        build_targets="$build_targets chrome_public_apk system_webview_apk monochrome_public_apk"
    else
    else
        build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk"
        build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk"
    fi
    fi
@@ -91,12 +95,10 @@ build() {
    gn gen "out/$1" --args="$build_args"
    gn gen "out/$1" --args="$build_args"
    ninja -C out/$1 $build_targets
    ninja -C out/$1 $build_targets


    for apk in $apks; do
    # Create the 7z archive
        if [ -f "out/${1}/apks/$apk.apk" ]; then
    echo ">> [$(date)] Creating archive with debug apks"
            echo ">> [$(date)] Moving debug $apk for ${apk_arch} to output folder"
    archive_name="${root_dir}/apks/${apk_arch}/browser_${apk_arch}_debug_apks.7z"
            mv "out/${1}/apks/$apk.apk" "${root_dir}/apks/${apk_arch}/$(echo "$apk" | sed 's/[0-9]*//g')_debug.apk"
    7z a -t7z -mx=9 "$archive_name" "out/${1}/apks"/*.apk
        fi
    done
}
}


setup_ccache() {
setup_ccache() {
@@ -134,7 +136,13 @@ patch() {
rename() {
rename() {
    cd $chromium_dir/src
    cd $chromium_dir/src


    replacements=("Chrome browser=Browser" "Chrome=Browser" "Bromite=Browser" "Cromite=Browser")
    replacements=(
        "Chrome browser=Browser"
        "Chrome=Browser"
        "Bromite=Browser"
        "Cromite=Browser"
        "Google Password Manager=Password Manager"
    )


    for replacement in "${replacements[@]}"; do
    for replacement in "${replacements[@]}"; do
        replaced_string=${replacement%%=*}
        replaced_string=${replacement%%=*}
@@ -175,9 +183,9 @@ sync() {
        fi
        fi
    fi
    fi
    if [ $history -eq 1 ]; then
    if [ $history -eq 1 ]; then
        gclient sync -D --nohooks -R
        gclient sync -D --nohooks -R --force
    else
    else
        gclient sync --no-history -D --nohooks -R
        gclient sync --no-history -D --nohooks -R --force
    fi
    fi
    gclient runhooks
    gclient runhooks
    patch
    patch
@@ -208,13 +216,14 @@ init_repo(){
    fi
    fi
}
}


while getopts ":a:cur:sh" opt; do
while getopts ":a:cur:shp" opt; do
    case $opt in
    case $opt in
    a) arch="$OPTARG" ;;
    a) arch="$OPTARG" ;;
    c) clean=1 ;;
    c) clean=1 ;;
    u) usage ;;
    u) usage ;;
    s) gsync=1  ;;
    s) gsync=1  ;;
    h) history=0 ;;
    h) history=0 ;;
    p) patchonly=1 ;;
    :)
    :)
        echo "Option -$OPTARG requires an argument"
        echo "Option -$OPTARG requires an argument"
        echo
        echo
@@ -266,6 +275,12 @@ if [ $gsync -eq 1 ]; then
        init_repo
        init_repo
    fi
    fi
    sync
    sync
elif [ $patchonly -eq 1 ]; then
    cd $chromium_dir/src
    git fetch origin refs/tags/$chromium_version
    git checkout main
    git reset --hard FETCH_HEAD
    patch
fi
fi


cd $chromium_dir/src
cd $chromium_dir/src

build/.gitignore

0 → 100644
+2 −0
Original line number Original line Diff line number Diff line
cromite/
+6 −3
Original line number Original line Diff line number Diff line
@@ -4,7 +4,6 @@ build_contextual_search=false
build_with_tflite_lib=false
build_with_tflite_lib=false
chrome_pgo_phase=0
chrome_pgo_phase=0
dcheck_always_on=false
dcheck_always_on=false
debuggable_apks=false
dfmify_dev_ui=false
dfmify_dev_ui=false
disable_android_lint=true
disable_android_lint=true
disable_fieldtrial_testing_config=true
disable_fieldtrial_testing_config=true
@@ -18,10 +17,12 @@ enable_mdns=false
enable_mse_mpeg2ts_stream_parser=true
enable_mse_mpeg2ts_stream_parser=true
enable_nacl=false
enable_nacl=false
enable_openxr=false
enable_openxr=false
enable_platform_dolby_vision=true
enable_platform_dolby_vision=false
enable_platform_dts_audio=false
enable_platform_encrypted_dolby_vision=false
enable_platform_hevc=true
enable_platform_hevc=true
enable_remoting=false
enable_reporting=false
enable_reporting=false
enable_remoting=false
enable_vr=false
enable_vr=false
exclude_unwind_tables=false
exclude_unwind_tables=false
ffmpeg_branding="Chrome"
ffmpeg_branding="Chrome"
@@ -39,10 +40,12 @@ use_cfi_cast=true
use_debug_fission=true
use_debug_fission=true
use_errorprone_java_compiler=false
use_errorprone_java_compiler=false
use_official_google_api_keys=false
use_official_google_api_keys=false
use_relr_relocations=false
use_rtti=false
use_rtti=false
use_stable_package_name_for_trichrome=false
use_stable_package_name_for_trichrome=false
use_sysroot=false
use_sysroot=false
use_thin_lto=false
use_thin_lto=false
use_v8_context_snapshot=false


chrome_public_manifest_package = "foundation.e.browser"
chrome_public_manifest_package = "foundation.e.browser"
trichrome_library_package = "org.chromium.trichromelibrary"
trichrome_library_package = "org.chromium.trichromelibrary"
+18 −0
Original line number Original line Diff line number Diff line
#!/bin/bash

if [ -d cromite ]; then
    cd cromite
    git fetch origin v127.0.6533.94-5fe9b924075b8c565742b4844362e71aaa9ec0d8
    git reset --hard FETCH_HEAD
    cd ..
else
    git clone https://gitlab.e.foundation/e/os/cromite.git -b v127.0.6533.94-5fe9b924075b8c565742b4844362e71aaa9ec0d8 cromite --depth=1
fi

cromite_patches_list=$(cat "cromite_patches_list.txt")
for file in $cromite_patches_list; do
    cp cromite/build/patches/$file "cromite_patches/$file"
done

echo "Copy done"
Loading