Browse Source

Build script adjust

tags/91.0.4472.77-1-webview^0 91.0.4472.77-1-webview
wchen342 2 weeks ago
parent
commit
ce9e17e0b5
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
2 changed files with 17 additions and 5 deletions
  1. +1
    -1
      build.sh
  2. +16
    -4
      bundle_generate_apk.sh

+ 1
- 1
build.sh View File

@ -362,7 +362,7 @@ mkdir "${apk_out_folder}"
pushd src
if [[ "$TARGET" != "all" ]]; then
ninja -C "${output_folder}" "${TARGET_EXPANDED}"
if [[ "$TARGET" == "trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "chrome_modern_target" ]] || [[ "$TARGET" == "trichrome_webview_target" ]]; then
if [[ "$TARGET" == "trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "chrome_modern_target" ]] || [[ "$TARGET" == "trichrome_chrome_apk_target" ]] || [[ "$TARGET" == "trichrome_webview_target" ]]; then
../bundle_generate_apk.sh -o "${output_folder}" -a "${ARCH}" -t "${TARGET_EXPANDED}"
fi
find . -iname "*.apk" -exec cp -f {} ../"${apk_out_folder}" \;


+ 16
- 4
bundle_generate_apk.sh View File

@ -71,7 +71,7 @@ if [[ "$ARCH" != "arm64" ]] && [[ "$ARCH" != "arm" ]] && [[ "$ARCH" != "x86" ]];
fi
if [[ "$TARGET" != "$chrome_modern_target" ]] && [[ "$TARGET" != "$trichrome_chrome_bundle_target" ]] && [[ "$TARGET" != "$trichrome_chrome_64_bundle_target" ]] \
&& [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]]; then
&& [[ "$TARGET" != "$trichrome_chrome_apk_target" ]] && [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]]; then
echo "Wrong target"
exit 4
fi
@ -94,6 +94,18 @@ case "$TARGET" in
FILENAME="TrichromeChrome64"
FILENAME_OUT="TrichromeChrome"
;;
"$trichrome_chrome_apk_target")
FILENAME="TrichromeChrome"
FILENAME_OUT="TrichromeChrome"
;;
"$trichrome_webview_target")
FILENAME="TrichromeWebView"
FILENAME_OUT="TrichromeWebView"
;;
"$trichrome_webview_64_target")
FILENAME="TrichromeWebView64"
FILENAME_OUT="TrichromeWebView"
;;
*)
echo "Filename parsing error"
exit 3
@ -108,15 +120,15 @@ rm -rf release
mkdir release
cd release
if [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]]; then
if [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]] && [[ "$TARGET" != "$trichrome_chrome_apk_target" ]]; then
$BUNDLETOOL build-apks --aapt2 $AAPT2 --bundle ../"$FILENAME".aab --output "$FILENAME".apks --mode=universal --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc
unzip "$FILENAME".apks universal.apk
mv universal.apk "${FILENAME_OUT}".apk
$APKSIGNER sign --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc --in "${FILENAME_OUT}".apk --out "${FILENAME_OUT}".apk
fi
if [[ "$TARGET" == "$trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "$trichrome_webview_target" ]]; then
for app in TrichromeLibrary TrichromeWebView; do
if [[ "$TARGET" == "$trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "$trichrome_webview_target" ]] || [[ "$TARGET" == "$trichrome_chrome_apk_target" ]]; then
for app in TrichromeLibrary TrichromeWebView TrichromeChrome; do
if [ -f "../${app}.apk" ]; then
$APKSIGNER sign --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc --in "../${app}.apk" --out "${app}.apk"
fi


Loading…
Cancel
Save