tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.configure (2402B)


      1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
      2 # vim: set filetype=python:
      3 # This Source Code Form is subject to the terms of the Mozilla Public
      4 # License, v. 2.0. If a copy of the MPL was not distributed with this
      5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      6 
      7 imply_option("MOZ_PLACES", True)
      8 # tor-browser#32493
      9 imply_option("MOZ_SERVICES_HEALTHREPORT", False)
     10 imply_option("MOZ_SERVICES_SYNC", True)
     11 imply_option("MOZ_DEDICATED_PROFILES", False)
     12 imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", False)
     13 # tor-browser#33734
     14 imply_option("MOZ_NORMANDY", False)
     15 imply_option("MOZ_PROFILE_MIGRATOR", False)
     16 
     17 
     18 imply_option("MOZ_APP_VENDOR", "Tor Project")
     19 imply_option("MOZ_APP_ID", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
     20 # Include the DevTools client, not just the server (which is the default)
     21 imply_option("MOZ_DEVTOOLS", "all")
     22 imply_option("BROWSER_CHROME_URL", "chrome://browser/content/browser.xhtml")
     23 
     24 option(
     25     "--disable-browser-newtab-as-addon",
     26     default=True,
     27     help="Disable bundling newtab as a built-in addon",
     28 )
     29 
     30 
     31 @depends("--disable-browser-newtab-as-addon")
     32 def browser_newtab_as_addon(value):
     33     if value:
     34         return True
     35 
     36 
     37 set_config("BROWSER_NEWTAB_AS_ADDON", browser_newtab_as_addon)
     38 set_define("BROWSER_NEWTAB_AS_ADDON", browser_newtab_as_addon)
     39 
     40 
     41 with only_when(target_has_linux_kernel & compile_environment):
     42     option(env="MOZ_NO_PIE_COMPAT", help="Enable non-PIE wrapper")
     43 
     44     set_config("MOZ_NO_PIE_COMPAT", depends_if("MOZ_NO_PIE_COMPAT")(lambda _: True))
     45 
     46 
     47 @depends(target, update_channel, have_64_bit, moz_debug, moz_automation)
     48 @imports(_from="os", _import="environ")
     49 def requires_stub_installer(
     50     target, update_channel, have_64_bit, moz_debug, moz_automation
     51 ):
     52     if target.kernel != "WINNT":
     53         return False
     54     if have_64_bit:
     55         return False
     56     if update_channel not in ("nightly", "nightly-try", "aurora", "beta", "release"):
     57         return False
     58 
     59     if moz_debug:
     60         return False
     61 
     62     # Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
     63     if moz_automation and not environ.get("USE_STUB_INSTALLER"):
     64         die(
     65             "STUB installer expected to be enabled but "
     66             "USE_STUB_INSTALLER is not specified in the environment"
     67         )
     68 
     69     return False
     70 
     71 
     72 imply_option("MOZ_STUB_INSTALLER", True, when=requires_stub_installer)
     73 
     74 include("../toolkit/moz.configure")