Pier Angelo Vendrame pushed to branch tor-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
- 
c13ad2e8
by Pier Angelo Vendrame at 2023-03-22T14:18:11+01:00
- 
23624ebe
by Pier Angelo Vendrame at 2023-03-22T14:18:12+01:00
- 
cbc8642f
by Pier Angelo Vendrame at 2023-03-22T14:18:12+01:00
6 changed files:
- browser/config/mozconfigs/base-browser-android
- browser/config/mozconfigs/tor-browser-android
- mozconfig-android-all
- tools/torbrowser/Makefile
- + tools/torbrowser/fataar.py
- − tools/torbrowser/fataar.sh
Changes:
| ... | ... | @@ -38,6 +38,7 @@ ac_add_options MOZ_TELEMETRY_REPORTING= | 
| 38 | 38 |  if test -n "$LOCAL_DEV_BUILD"; then
 | 
| 39 | 39 |      # You must use the "default" bogus channel for dev builds
 | 
| 40 | 40 |      ac_add_options --enable-update-channel=default
 | 
| 41 | +    ac_add_options --with-base-browser-version=dev-build
 | |
| 41 | 42 |  else
 | 
| 42 | 43 |      # We only use beta GeckoView for now, for official builds
 | 
| 43 | 44 |      ac_add_options --enable-update-channel=beta
 | 
| 1 | 1 |  . $topsrcdir/browser/config/mozconfigs/base-browser-android
 | 
| 2 | 2 | |
| 3 | 3 |  mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser" | 
| 4 | - | |
| 5 | -if test ! -z "$LOCAL_DEV_BUILD"; then
 | |
| 6 | -    ac_add_options --with-tor-browser-version=dev-build
 | |
| 7 | -fi | 
| ... | ... | @@ -10,7 +10,7 @@ if test -n "$LOCAL_DEV_BUILD"; then | 
| 10 | 10 |      # You must use the "default" bogus channel for dev builds
 | 
| 11 | 11 |      ac_add_options --enable-update-channel=default
 | 
| 12 | 12 |      ac_add_options --without-wasm-sandboxed-libraries
 | 
| 13 | -    ac_add_options --with-tor-browser-version=dev-build
 | |
| 13 | +    ac_add_options --with-base-browser-version=dev-build
 | |
| 14 | 14 |  else
 | 
| 15 | 15 |      # We want to have a similar fat .aar versioning as Mozilla and make it clear
 | 
| 16 | 16 |      # we are on the beta channel for GeckoView
 | 
| ... | ... | @@ -29,7 +29,7 @@ deploy: | 
| 29 | 29 |  	./deploy.sh $(BINARIES) $(BUILD_OUTPUT)
 | 
| 30 | 30 | |
| 31 | 31 |  fat-aar:
 | 
| 32 | -	./fataar.sh $(DEV_ROOT) $(ARCHS)
 | |
| 32 | +	./fataar.py $(DEV_ROOT) $(ARCHS)
 | |
| 33 | 33 | |
| 34 | 34 |  all: build deploy
 | 
| 35 | 35 | 
| 1 | +#!/usr/bin/env python3
 | |
| 2 | +import os
 | |
| 3 | +import re
 | |
| 4 | +import subprocess
 | |
| 5 | +import sys
 | |
| 6 | + | |
| 7 | + | |
| 8 | +dev_root = sys.argv[1]
 | |
| 9 | +archs_in = re.split("\s+|,", sys.argv[2]) if len(sys.argv) >= 3 else []
 | |
| 10 | +archs_out = []
 | |
| 11 | +env = dict(os.environ)
 | |
| 12 | + | |
| 13 | +env["MOZCONFIG"] = "mozconfig-android-all"
 | |
| 14 | +if "armv7" in archs_in:
 | |
| 15 | +    env["MOZ_ANDROID_FAT_AAR_ARMEABI_V7A"] = (
 | |
| 16 | +        dev_root
 | |
| 17 | +        + "/obj-arm-linux-androideabi/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar"
 | |
| 18 | +    )
 | |
| 19 | +    archs_out.append("armeabi-v7a")
 | |
| 20 | +if "aarch64" in archs_in:
 | |
| 21 | +    env["MOZ_ANDROID_FAT_AAR_ARM64_V8A"] = (
 | |
| 22 | +        dev_root
 | |
| 23 | +        + "/obj-aarch64-linux-android/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar"
 | |
| 24 | +    )
 | |
| 25 | +    archs_out.append("arm64-v8a")
 | |
| 26 | +if "x86" in archs_in or "i686" in archs_in:
 | |
| 27 | +    env["MOZ_ANDROID_FAT_AAR_X86"] = (
 | |
| 28 | +        dev_root
 | |
| 29 | +        + "/obj-i386-linux-android/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar"
 | |
| 30 | +    )
 | |
| 31 | +    archs_out.append("x86")
 | |
| 32 | +if "x86_64" in archs_in or "x86-64" in archs_in:
 | |
| 33 | +    env["MOZ_ANDROID_FAT_AAR_X86_64"] = (
 | |
| 34 | +        dev_root
 | |
| 35 | +        + "/obj-x86_64-linux-android/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar"
 | |
| 36 | +    )
 | |
| 37 | +    archs_out.append("x86_64")
 | |
| 38 | +env["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"] = ",".join(archs_out)
 | |
| 39 | + | |
| 40 | +if not archs_out:
 | |
| 41 | +    print(
 | |
| 42 | +        "The architectures have not specified or are not valid.",
 | |
| 43 | +        file=sys.stderr,
 | |
| 44 | +    )
 | |
| 45 | +    print('Usage: make fat-aar ARCHS="$archs"', file=sys.stderr)
 | |
| 46 | +    print(
 | |
| 47 | +        "Valid architectures are armv7 aarch64 x86 x86_64, and must be separated with a space.",
 | |
| 48 | +        file=sys.stderr,
 | |
| 49 | +    )
 | |
| 50 | +    sys.exit(1)
 | |
| 51 | + | |
| 52 | +subprocess.run(["./mach", "configure"], cwd=dev_root, env=env, check=True)
 | |
| 53 | +subprocess.run(["./mach", "build"], cwd=dev_root, env=env, check=True) | 
| 1 | -#!/bin/bash
 | |
| 2 | -set -e
 | |
| 3 | -DEV_ROOT=$1
 | |
| 4 | -ARCHS=$2
 | |
| 5 | - | |
| 6 | -cd $DEV_ROOT
 | |
| 7 | - | |
| 8 | -glue=""
 | |
| 9 | -if [[ "$ARCHS" == *"armv7"* ]]; then
 | |
| 10 | -	export MOZ_ANDROID_FAT_AAR_ARMEABI_V7A=$DEV_ROOT/obj-arm-linux-androideabi/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar
 | |
| 11 | -	glue="$glue,armeabi-v7a"
 | |
| 12 | -fi
 | |
| 13 | -if [[ "$ARCHS" == *"aarch64"* ]]; then
 | |
| 14 | -	export MOZ_ANDROID_FAT_AAR_ARM64_V8A=$DEV_ROOT/obj-aarch64-linux-android/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar
 | |
| 15 | -	glue="$glue,arm64-v8a"
 | |
| 16 | -fi
 | |
| 17 | -if [[ "$ARCHS" == *"x86"* ]]; then
 | |
| 18 | -	export MOZ_ANDROID_FAT_AAR_X86=$DEV_ROOT/obj-i386-linux-android/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar
 | |
| 19 | -	glue="$glue,x86"
 | |
| 20 | -fi
 | |
| 21 | -if [[ "$ARCHS" == *"x86_64"* ]]; then
 | |
| 22 | -	export MOZ_ANDROID_FAT_AAR_X86_64=$DEV_ROOT/obj-x86_64-linux-android/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar
 | |
| 23 | -	glue="$glue,x86_64"
 | |
| 24 | -fi
 | |
| 25 | -if [ -z "$glue" ]; then
 | |
| 26 | -	echo "The architectures have not specified or are not valid."
 | |
| 27 | -	echo "Usage: make fat-aar ARCHS=\"\$archs\""
 | |
| 28 | -	echo "Valid architectures are armv7 aarch64 x86 x86_64, and must be separated with a space."
 | |
| 29 | -	exit 1
 | |
| 30 | -fi
 | |
| 31 | -export MOZ_ANDROID_FAT_AAR_ARCHITECTURES=${glue:1}
 | |
| 32 | - | |
| 33 | -MOZCONFIG=mozconfig-android-all ./mach configure
 | |
| 34 | -MOZCONFIG=mozconfig-android-all ./mach build |