Browse Source

Minor update of script, add CHANGELOG

tags/74.0.3729.169-1^0 74.0.3729.169-1
wchen342 2 years ago
parent
commit
e0b130c7ef
Signed by: wchen342 GPG Key ID: 720B70365E800508
3 changed files with 25 additions and 24 deletions
  1. +2
    -0
      CHANGELOG.md
  2. +2
    -2
      README.md
  3. +21
    -22
      build.sh

+ 2
- 0
CHANGELOG.md View File

@ -0,0 +1,2 @@
# 74.0.3729.169
* first release

+ 2
- 2
README.md View File

@ -15,13 +15,13 @@ For more information on `ungoogled-chromium`, please visit the original repo: [E
*These are the differences between a Linux build of ungoogled-chromium and this Android build.*
* Several binaries are not pruned due to build time error.
* Default configuration build for `arm64` instead of `x64`.
* Default configuration builds for `arm64` instead of `x64`.
## Supported Platforms and Distributions
The current build has been tested on:
* cpu_arch: `x86`, `arm64`
* Android: API 28 (Android 8.1), API 27 (Android 8.0), LineageOS 15.1
* OS: API 28 (Android 8.1), API 27 (Android 8.0), LineageOS 15.1
*This build requires a minimum API 24 (Nougat).*


+ 21
- 22
build.sh View File

@ -2,15 +2,16 @@
set -eux -o pipefail
chromium_version=74.0.3729.169
target=monochrome_public_apk
# Required tools: python2, python3, ninja, git, clang, lld, llvm, curl
# Assuming default python to be python2. This is true on most Linux distributions.
## Clone ungoogled-chromium repo
git clone https://github.com/Eloston/ungoogled-chromium.git -b $chromium_version-1
git clone https://github.com/Eloston/ungoogled-chromium.git -b ${chromium_version}-1
## Clone chromium repo
git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/src.git -b $chromium_version
git clone --depth 1 --no-tags https://chromium.googlesource.com/chromium/src.git -b ${chromium_version}
## Fetch depot-tools
depot_tools_commit=$(grep 'depot_tools.git' src/DEPS | cut -d\' -f8)
@ -18,15 +19,14 @@ mkdir -p depot_tools
pushd depot_tools
git init
git remote add origin https://chromium.googlesource.com/chromium/tools/depot_tools.git
git fetch --depth 1 --no-tags origin $depot_tools_commit
git fetch --depth 1 --no-tags origin ${depot_tools_commit}
git reset --hard FETCH_HEAD
popd
export PATH="$(pwd -P)/depot_tools:$PATH"
## Sync files
## need .gclient under same folder
gclient.py sync --nohooks --no-history --shallow --revision=$chromium_version
gclient.py sync --nohooks --no-history --shallow --revision=${chromium_version}
## Fix repos
@ -35,7 +35,7 @@ mkdir src/third_party/feed/src
pushd src/third_party/feed/src
git init
git remote add origin https://chromium.googlesource.com/feed
git fetch --depth 1 --no-tags origin $feed_commit
git fetch --depth 1 --no-tags origin ${feed_commit}
git reset --hard FETCH_HEAD
popd
@ -44,7 +44,7 @@ mkdir src/third_party/webrtc
pushd src/third_party/webrtc
git init
git remote add origin https://webrtc.googlesource.com/src.git
git fetch --depth 1 --no-tags origin $webrtc_commit
git fetch --depth 1 --no-tags origin ${webrtc_commit}
git reset --hard FETCH_HEAD
popd
@ -53,15 +53,15 @@ mkdir src/third_party/libsync/src
pushd src/third_party/libsync/src
git init
git remote add origin https://chromium.googlesource.com/aosp/platform/system/core/libsync.git
git fetch --depth 1 --no-tags origin $libsync_commit
git fetch --depth 1 --no-tags origin ${libsync_commit}
git reset --hard FETCH_HEAD
popd
GN_COMMIT=9bd94208ec741659d5126b990fdccd35a5c30b1f
gn_commit=9bd94208ec741659d5126b990fdccd35a5c30b1f
mv src/tools/gn src/tools/gn.bak
git clone https://gn.googlesource.com/gn src/tools/gn
pushd src/tools/gn
git checkout $GN_COMMIT
git checkout ${gn_commit}
popd
cp -r src/tools/gn.bak/bootstrap src/tools/gn
@ -78,21 +78,21 @@ python src/build/util/lastchange.py -m SKIA_COMMIT_HASH -s src/third_party/skia
# TODO some pruned binaries are excluded since they will cause android build to fail
patch -p1 --ignore-whitespace -i patches/android-prune-domain-fix.patch --no-backup-if-mismatch
# Remove the cache file if exists
cache_file=domsubcache.tar.gz
if [ -f $cache_file ] ; then
rm $cache_file
cache_file="domsubcache.tar.gz"
if [ -f ${cache_file} ] ; then
rm ${cache_file}
fi
# Ignore the pruning error
python3 ungoogled-chromium/utils/prune_binaries.py src ungoogled-chromium/pruning.list || true
python3 ungoogled-chromium/utils/patches.py apply src ungoogled-chromium/patches
python3 ungoogled-chromium/utils/domain_substitution.py apply -r ungoogled-chromium/domain_regex.list -f ungoogled-chromium/domain_substitution.list -c $cache_file src
python3 ungoogled-chromium/utils/domain_substitution.py apply -r ungoogled-chromium/domain_regex.list -f ungoogled-chromium/domain_substitution.list -c ${cache_file} src
## Extra fixes for Chromium source
## Fix an error in chrome/browser/android/rlz/rlz_ping_handler.cc: line 79, -rlz_lib::kFinancialServer +"about:blank"
# Fix an error in chrome/browser/android/rlz/rlz_ping_handler.cc: line 79, -rlz_lib::kFinancialServer +"about:blank"
patch -p1 --ignore-whitespace -i patches/android-rlz-fix-missing-variable.patch --no-backup-if-mismatch
## Workaround for a building failure caused by safe browsing. The file is pre-generated with safe_browsing_mode=2. See https://github.com/nikolowry/bromite-builder/issues/1
# Workaround for a building failure caused by safe browsing. The file is pre-generated with safe_browsing_mode=2. See https://github.com/nikolowry/bromite-builder/issues/1
# x86
mkdir -p src/out/Default/gen/chrome/common/safe_browsing
cp download_file_types.pb.h src/out/Default/gen/chrome/common/safe_browsing
@ -115,20 +115,20 @@ popd
## Prepare Android SDK/NDK
## This is Sylvain Beucler's libre Android rebuild
# This is Sylvain Beucler's libre Android rebuild
sdk_link="https://android-rebuilds.beuc.net/dl/android-sdk_user.9.0.0_r21_linux-x86.zip"
ndk_link="https://android-rebuilds.beuc.net/dl/android-ndk-r18b-linux-x86_64.tar.bz2"
mkdir android-rebuilds
mkdir android-sdk
mkdir android-ndk
cd android-rebuilds && { curl -O $sdk_link ; curl -O $ndk_link ; cd -; }
cd android-rebuilds && { curl -O ${sdk_link} ; curl -O ${ndk_link} ; cd -; }
unzip -qqo android-rebuilds/android-sdk_user.9.0.0_r21_linux-x86.zip -d android-sdk
tar xjf android-rebuilds/android-ndk-r18b-linux-x86_64.tar.bz2 -C android-ndk
# remove data_space.h, patch native_window.h
mv android-ndk/android-ndk-r18b/sysroot/usr/include/android/data_space.h android-ndk/android-ndk-r18b/sysroot/usr/include/android/data_space.h.bak
patch -p1 --ignore-whitespace -i patches/ndk-native-window.patch --no-backup-if-mismatch
# Create symbol links to sdk folders
# The rebuilt sdk has a different folder structure from the checked out version, so it is easier to create symbol links
# The rebuild sdk has a different folder structure from the checked out version, so it is easier to create symbol links
# Currently extras and tools are not available from the rebuild
pushd src/third_party/android_tools/sdk
rm -rf add-ons emulator licenses platforms sources tools-lint build-tools ndk-bundle platform-tools
@ -141,7 +141,7 @@ popd
## Configure output folder
## patch build/config/android/BUILD.gn
# patch build/config/android/BUILD.gn
patch -p1 --ignore-whitespace -i patches/linker-android-support-remove.patch --no-backup-if-mismatch
cd src
mkdir -p out/Default
@ -150,5 +150,4 @@ tools/gn/out/gn gen out/Default --fail-on-unused-args
## Build
ninja -C out/Default monochrome_public_apk
ninja -C out/Default ${target}

Loading…
Cancel
Save