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

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

Browser: Build legacy targets

parent 678a3f47
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -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 \
+7 −7
Original line number Original line Diff line number Diff line
@@ -33,7 +33,8 @@ usage() {


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}\" "


@@ -67,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
@@ -93,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() {