commit 270117e72392782392ac41dd385d34f94ec23078
parent 4deba823ed0da02abd43961c1d027aae4ac07f92
Author: Mike Perry <mikeperry-git@torproject.org>
Date: Mon, 6 May 2013 15:51:06 -0700
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
Diffstat:
21 files changed, 61 insertions(+), 24 deletions(-)
diff --git a/browser/config/mozconfigs/base-browser b/browser/config/mozconfigs/base-browser
@@ -18,9 +18,6 @@ ac_add_options --enable-base-browser-update
ac_add_options --enable-bundled-fonts
-# See bug #41587
-ac_add_options --disable-updater
-
ac_add_options --disable-tests
ac_add_options --disable-debug
@@ -48,5 +45,3 @@ ac_add_options --disable-legacy-profile-creation
if test -z "$WASI_SYSROOT"; then
ac_add_options --without-wasm-sandboxed-libraries
fi
-
-ac_add_options --with-relative-data-dir=BaseBrowser/Data/Browser
diff --git a/browser/config/mozconfigs/tor-browser b/browser/config/mozconfigs/tor-browser
@@ -0,0 +1,18 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+# If building outside tor-browser-build, you might want to customize this value.
+# On Linux, it influences the WM_CLASS value, which is shown on GNOME's ALT-TAB,
+# for example.
+# We customize it in tor-browser-build because we include the channel name, just
+# like Firefox does.
+# export MOZ_APP_REMOTINGNAME="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 --with-distribution-id=org.torproject
diff --git a/browser/config/mozconfigs/tor-browser-android b/browser/config/mozconfigs/tor-browser-android
@@ -0,0 +1,7 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser-android
+
+mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
+
+if test -n "$LOCAL_DEV_BUILD"; then
+ ac_add_options --with-branding=mobile/android/branding/tb-nightly
+fi
diff --git a/browser/moz.configure b/browser/moz.configure
@@ -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)
imply_option("MOZ_PROFILE_MIGRATOR", False)
diff --git a/mobile/android/geckoview/build.gradle b/mobile/android/geckoview/build.gradle
@@ -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 'boolean', "TOR_BROWSER", mozconfig.substs.TOR_BROWSER ? 'true' : 'false';
// 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}\"";
diff --git a/moz.configure b/moz.configure
@@ -1003,6 +1003,13 @@ set_define("BASE_BROWSER_VERSION", base_browser_version)
set_define("BASE_BROWSER_VERSION_QUOTED", base_browser_version_quoted)
+# Tor Browser additions.
+
+# We always want Tor Browser to be defined. Since we do not need any
+# value for it, just always set it to True.
+set_define("TOR_BROWSER", True)
+
+
# Please do not add configure checks from here on.
diff --git a/mozconfig-android-aarch64 b/mozconfig-android-aarch64
@@ -1,4 +1,4 @@
-. $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
diff --git a/mozconfig-android-armv7 b/mozconfig-android-armv7
@@ -1,4 +1,4 @@
-. $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
diff --git a/mozconfig-android-x86 b/mozconfig-android-x86
@@ -1,4 +1,4 @@
-. $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
diff --git a/mozconfig-android-x86_64 b/mozconfig-android-x86_64
@@ -1,4 +1,4 @@
-. $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
diff --git a/mozconfig-linux-aarch64 b/mozconfig-linux-aarch64
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=aarch64-unknown-linux-gnu
diff --git a/mozconfig-linux-aarch64-dev b/mozconfig-linux-aarch64-dev
@@ -1,4 +1,4 @@
-. $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
@@ -8,6 +8,8 @@
ac_add_options --enable-linker=lld
export MOZILLA_OFFICIAL=
+export MOZ_APP_REMOTINGNAME="Tor Browser Dev"
+ac_add_options --with-branding=browser/branding/tb-nightly
ac_add_options --enable-default-toolkit=cairo-gtk3
diff --git a/mozconfig-linux-arm b/mozconfig-linux-arm
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=arm-linux-gnueabihf
diff --git a/mozconfig-linux-i686 b/mozconfig-linux-i686
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=i686-linux-gnu
diff --git a/mozconfig-linux-x86_64 b/mozconfig-linux-x86_64
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
# Moz switched to lld for all Linux targets in Bug 1839739.
ac_add_options --enable-linker=lld
diff --git a/mozconfig-linux-x86_64-asan b/mozconfig-linux-x86_64-asan
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
export CFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
export CXXFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
diff --git a/mozconfig-linux-x86_64-dev b/mozconfig-linux-x86_64-dev
@@ -1,4 +1,4 @@
-. $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
@@ -8,6 +8,8 @@
ac_add_options --enable-linker=lld
export MOZILLA_OFFICIAL=
+export MOZ_APP_REMOTINGNAME="Tor Browser Dev"
+ac_add_options --with-branding=browser/branding/tb-nightly
ac_add_options --enable-default-toolkit=cairo-gtk3
diff --git a/mozconfig-macos b/mozconfig-macos
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --enable-strip
@@ -11,5 +11,4 @@ ac_add_options --disable-update-agent
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
-# For base-browser we do not enable portable mode on macOS.
-ac_add_options --without-relative-data-dir
+ac_add_options --with-relative-data-dir=../TorBrowser-Data/Browser
diff --git a/mozconfig-macos-dev b/mozconfig-macos-dev
@@ -1,4 +1,4 @@
-. $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 macOS builds
@@ -21,3 +21,9 @@ ac_add_options --disable-update-agent
ac_add_options --disable-eme
ac_add_options --enable-tests
+
+ac_add_options --with-relative-data-dir=../TorBrowser-Data/Browser
+
+#copied from the diff between mozconfig-linux-x86_64 and mozconfig-linux-x86_64-dev
+export MOZ_APP_REMOTINGNAME="Tor Browser Dev"
+ac_add_options --with-branding=browser/branding/tb-nightly
diff --git a/mozconfig-windows-i686 b/mozconfig-windows-i686
@@ -1,4 +1,4 @@
-. $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-
diff --git a/mozconfig-windows-x86_64 b/mozconfig-windows-x86_64
@@ -1,4 +1,4 @@
-. $topsrcdir/browser/config/mozconfigs/base-browser
+. $topsrcdir/browser/config/mozconfigs/tor-browser
ac_add_options --target=x86_64-w64-mingw32
ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-