add build tools
This commit is contained in:
parent
225e19cf99
commit
42aeb97f46
2 changed files with 89 additions and 0 deletions
70
build/build-from-repos.sh
Normal file
70
build/build-from-repos.sh
Normal file
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
|
||||
# this script assumes that in
|
||||
# ~/bromite ---> there is the bromite repo
|
||||
# ~/chromium ---> there is the chromium repo
|
||||
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
cd ~
|
||||
|
||||
echo -e ${RED} -------- download bromite repo ${NC}
|
||||
mkdir ~/bromite
|
||||
cd ~/bromite
|
||||
git fetch
|
||||
git pull
|
||||
|
||||
VERSION=$( cat ~/bromite/build/RELEASE )
|
||||
echo -e ${RED} -------- lastest version is: $VERSION ${NC}
|
||||
|
||||
|
||||
echo -e ${RED} -------- download chromium repo ${NC}
|
||||
mkdir ~/chromium
|
||||
cd ~/chromium
|
||||
fetch --nohooks --no-history android
|
||||
|
||||
|
||||
cd src
|
||||
|
||||
# cleanup repo!
|
||||
git reset
|
||||
git reset --hard HEAD
|
||||
git clean -fdx
|
||||
git fetch --depth 2 https://chromium.googlesource.com/chromium/src.git +refs/tags/$VERSION:chromium_$VERSION
|
||||
git tag
|
||||
git checkout .
|
||||
git clean -fdx
|
||||
git checkout $VERSION
|
||||
|
||||
echo -e ${RED} -------- git current status ${NC}
|
||||
git status
|
||||
git log
|
||||
|
||||
echo -e ${RED} -------- sync other chromium repos ${NC}
|
||||
gclient sync -D
|
||||
|
||||
# remove origin for chromium
|
||||
git remote remove origin
|
||||
|
||||
echo -e ${RED} ------- apply patchs ${NC}
|
||||
for file in $(cat ~/bromite/build/patches_list.txt) ; do
|
||||
echo -e ${RED} " -> Apply $file" ${NC}
|
||||
|
||||
REPL="0,/^---/s//FILE:"$file"\n---/"
|
||||
cat ~/bromite/build/patches/$file | sed $REPL | git am
|
||||
|
||||
echo " "
|
||||
done
|
||||
|
||||
# install builds deps
|
||||
sudo build/install-build-deps-android.sh
|
||||
gclient runhooks
|
||||
|
||||
# generate ninja files and autogenerated files
|
||||
gn gen --args="$(cat ~/bromite/build/GN_ARGS) target_cpu=\"arm64\" " out/arm64
|
||||
|
||||
# build time!
|
||||
date
|
||||
autoninja -C out/arm64 chrome_modern_public_apk
|
||||
date
|
19
build/export-all-patch.sh
Normal file
19
build/export-all-patch.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=$(cat ~/bromite/build/RELEASE)
|
||||
CURRENT_RELEASE=$(git -C ~/chromium/src/ rev-parse --verify refs/tags/$VERSION)
|
||||
|
||||
ALLPATCHS=$(git -C ~/chromium/src/ rev-list HEAD...$CURRENT_RELEASE)
|
||||
|
||||
for patch in $ALLPATCHS; do
|
||||
|
||||
PATCH_FILE=$(git -C ~/chromium/src/ show -s $patch | grep FILE: | sed 's/FILE://g' | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||
|
||||
echo Exporting $patch $PATCH_FILE
|
||||
|
||||
git -C ~/chromium/src/ format-patch -1 --keep-subject --stdout --full-index --zero-commit --no-signature $patch >~/bromite/build/patches/$PATCH_FILE
|
||||
sed -i '/^index/d' ~/bromite/build/patches/$PATCH_FILE
|
||||
sed -i '/^From 0000000000000000000000000000000000000000/d' ~/bromite/build/patches/$PATCH_FILE
|
||||
sed -i '/^FILE:/d' ~/bromite/build/patches/$PATCH_FILE
|
||||
|
||||
done
|
Loading…
Add table
Reference in a new issue