Skip to content
Snippets Groups Projects
Verified Commit ec2caef7 authored by Mike Perry's avatar Mike Perry Committed by Pier Angelo Vendrame
Browse files

TB3: Tor Browser's official .mozconfigs.

Also:
Add an --enable-tor-browser-data-outside-app-dir configure option

Add --with-tor-browser-version configure option

Bug 31457: disable per-installation profiles

The dedicated profiles (per-installation) feature does not interact
well with our bundled profiles on Linux and Windows, and it also causes
multiple profiles to be created on macOS under TorBrowser-Data.

Bug 31935: Disable profile downgrade protection.

Since Tor Browser does not support more than one profile, disable
the prompt and associated code that offers to create one when a
version downgrade situation is detected.

Add --enable-tor-browser-update build option

Bug 40793: moved Tor configuration options from old-configure.in to moz.configure

Bug 41584: Move some configuration options to base-browser level
parent d967a1fd
Branches
Tags
1 merge request!522Bug 41584: Move some configuration options to base-browser level (tor-browser part)
Showing
with 114 additions and 19 deletions
......@@ -87,6 +87,9 @@ if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]:
# Impacts `/toolkit/content/license.html`.
DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = True
if CONFIG["TOR_BROWSER_UPDATE"]:
DEFINES["TOR_BROWSER_UPDATE"] = 1
JAR_MANIFESTS += ["jar.mn"]
GeneratedFile(
......
......@@ -41,5 +41,3 @@ ac_add_options MOZ_TELEMETRY_REPORTING=
if test -z "$WASI_SYSROOT"; then
ac_add_options --without-wasm-sandboxed-libraries
fi
ac_add_options --with-relative-data-dir=BaseBrowser/Data/Browser
. $topsrcdir/browser/config/mozconfigs/base-browser
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
ac_add_options --with-relative-data-dir=TorBrowser/Data/Browser
# This is not needed with the relative data directory, but it is when you
# disable it, otherwise it is "Mozilla" (on Windows and macOS) or ".mozilla" on
# Unix systems.
# It is used, for example, for GetProductDirectory.
# ac_add_options --with-user-appdir=TorProject
# ac_add_options --with-user-appdir=.torproject
ac_add_options --enable-tor-browser-update
ac_add_options --with-distribution-id=org.torproject
. $topsrcdir/browser/config/mozconfigs/base-browser-android
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
ac_add_options --disable-tor-browser-update
ac_add_options --disable-verify-mar
if test ! -z "$LOCAL_DEV_BUILD"; then
ac_add_options --with-tor-browser-version=dev-build
fi
......@@ -82,6 +82,10 @@ endif
endif
endif
ifdef TOR_BROWSER_UPDATE
DEFINES += -DTOR_BROWSER_UPDATE
endif
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
DEFINES += -DMOZ_SHARED_MOZGLUE=1
endif
......
......@@ -8,8 +8,8 @@ imply_option("MOZ_PLACES", True)
# tor-browser#32493
imply_option("MOZ_SERVICES_HEALTHREPORT", False)
imply_option("MOZ_SERVICES_SYNC", True)
imply_option("MOZ_DEDICATED_PROFILES", True)
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True)
imply_option("MOZ_DEDICATED_PROFILES", False)
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", False)
# tor-browser#33734
imply_option("MOZ_NORMANDY", False)
......
......@@ -46,6 +46,7 @@ android {
buildConfigField 'String', "MOZ_APP_DISPLAYNAME", "\"${mozconfig.substs.MOZ_APP_DISPLAYNAME}\"";
buildConfigField 'String', "MOZ_APP_UA_NAME", "\"${mozconfig.substs.MOZ_APP_UA_NAME}\"";
buildConfigField 'String', "MOZ_UPDATE_CHANNEL", "\"${mozconfig.substs.MOZ_UPDATE_CHANNEL}\"";
buildConfigField 'String', "TOR_BROWSER_VERSION", "\"${mozconfig.substs.TOR_BROWSER_VERSION}\"";
// MOZILLA_VERSION is oddly quoted from autoconf, but we don't have to handle it specially in Gradle.
buildConfigField 'String', "MOZILLA_VERSION", "\"${mozconfig.substs.MOZILLA_VERSION}\"";
......
......@@ -1044,6 +1044,69 @@ def relative_data_dir(value, target):
set_define("RELATIVE_DATA_DIR", relative_data_dir)
# Tor additions.
option(
"--with-tor-browser-version",
nargs=1,
help="Set Tor Browser version, e.g., 7.0a1"
)
@depends("--with-tor-browser-version")
def tor_browser_version(value):
if not value:
die("--with-tor-browser-version is required for Tor Browser.")
return value[0]
@depends("--with-tor-browser-version")
def tor_browser_version_quoted(value):
if not value:
die("--with-tor-browser-version is required for Tor Browser.")
return '"{}"'.format(value[0])
set_config("TOR_BROWSER_VERSION", tor_browser_version)
set_define("TOR_BROWSER_VERSION", tor_browser_version)
set_define("TOR_BROWSER_VERSION_QUOTED", tor_browser_version_quoted)
option(
"--enable-tor-browser-update",
help="Enable Tor Browser update"
)
@depends("--enable-tor-browser-update")
def tor_browser_update(value):
if value:
return True
set_config("TOR_BROWSER_UPDATE", tor_browser_update)
set_define("TOR_BROWSER_UPDATE", tor_browser_update)
add_old_configure_assignment("TOR_BROWSER_UPDATE", tor_browser_update)
option(
"--enable-tor-browser-data-outside-app-dir",
help="Enable Tor Browser data outside of app directory"
)
@depends("--enable-tor-browser-data-outside-app-dir")
def tor_browser_data_outside_app_dir(value):
if value:
return True
set_define(
"TOR_BROWSER_DATA_OUTSIDE_APP_DIR", tor_browser_data_outside_app_dir)
add_old_configure_assignment(
"TOR_BROWSER_DATA_OUTSIDE_APP_DIR", tor_browser_data_outside_app_dir)
# Please do not add configure checks from here on.
# Fallthrough to autoconf-based configure
......
. $topsrcdir/browser/config/mozconfigs/base-browser-android
. $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-aarch64-linux-android
ac_add_options --target=aarch64-linux-android
......@@ -10,14 +10,13 @@ if test -n "$LOCAL_DEV_BUILD"; then
# You must use the "default" bogus channel for dev builds
ac_add_options --enable-update-channel=default
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --with-tor-browser-version=dev-build
else
# We want to have a similar fat .aar versioning as Mozilla and make it clear
# we are on the beta channel for GeckoView
ac_add_options --enable-update-channel=beta
fi
ac_add_options --with-tor-browser-version=dev-build
ac_add_options --with-java-bin-path=$JAVA_HOME/bin
ac_add_options --with-android-sdk=$ANDROID_HOME
ac_add_options --with-gradle=$GRADLE_HOME/bin/gradle
. $topsrcdir/browser/config/mozconfigs/base-browser-android
. $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm-linux-androideabi
ac_add_options --target=arm-linux-androideabi
. $topsrcdir/browser/config/mozconfigs/base-browser-android
. $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-i386-linux-android
ac_add_options --target=i686-linux-android
. $topsrcdir/browser/config/mozconfigs/base-browser-android
. $topsrcdir/browser/config/mozconfigs/tor-browser-android
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-linux-android
ac_add_options --target=x86_64-linux-android
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=arm-linux-gnueabihf
......
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=i686-linux-gnu
......
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --enable-default-toolkit=cairo-gtk3
......
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
export CFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
export CXXFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
......
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
# This mozconfig file is not used in official builds.
# It is only intended to be used when doing incremental Linux builds
# during development.
export MOZILLA_OFFICIAL=
ac_add_options --with-branding=browser/branding/tb-nightly
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --disable-strip
ac_add_options --disable-install-strip
ac_add_options --disable-tor-browser-update
ac_add_options --with-tor-browser-version=dev-build
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --enable-strip
# See bug #41131
ac_add_options --disable-update-agent
# For base-browser we do not enable portable mode on macOS.
ac_add_options --without-relative-data-dir
ac_add_options --enable-tor-browser-data-outside-app-dir
. $topsrcdir/browser/config/mozconfigs/base-browser
. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=i686-w64-mingw32
ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment