Bug 1602840 add build switch for sideloading addons r=zombie

Differential Revision: https://phabricator.services.mozilla.com/D57660

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Shane Caraveo 2020-01-16 22:13:31 +00:00
Родитель bf4ed5643e
Коммит f4e8956a36
3 изменённых файлов: 35 добавлений и 1 удалений

Просмотреть файл

@ -278,6 +278,20 @@ this.AppConstants = Object.freeze({
return result; return result;
}, },
MOZ_ALLOW_ADDON_SIDELOAD:
#ifdef MOZ_ALLOW_ADDON_SIDELOAD
true,
#else
false,
#endif
MOZ_ALLOW_LEGACY_EXTENSIONS:
#ifdef MOZ_ALLOW_LEGACY_EXTENSIONS
true,
#else
false,
#endif
MENUBAR_CAN_AUTOHIDE: MENUBAR_CAN_AUTOHIDE:
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef MENUBAR_CAN_AUTOHIDE
true, true,

Просмотреть файл

@ -287,7 +287,8 @@ for var in ('ANDROID_PACKAGE_NAME',
'OMNIJAR_NAME'): 'OMNIJAR_NAME'):
DEFINES[var] = CONFIG[var] DEFINES[var] = CONFIG[var]
for var in ('MOZ_SYSTEM_NSS', for var in ('MOZ_ALLOW_ADDON_SIDELOAD',
'MOZ_SYSTEM_NSS',
'MOZ_UNSIGNED_APP_SCOPE', 'MOZ_UNSIGNED_APP_SCOPE',
'MOZ_UNSIGNED_SYSTEM_SCOPE', 'MOZ_UNSIGNED_SYSTEM_SCOPE',
'MOZ_UPDATER'): 'MOZ_UPDATER'):

Просмотреть файл

@ -1233,6 +1233,25 @@ def unsigned_addon_scopes(scopes):
set_config('MOZ_UNSIGNED_APP_SCOPE', unsigned_addon_scopes.app) set_config('MOZ_UNSIGNED_APP_SCOPE', unsigned_addon_scopes.app)
set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system) set_config('MOZ_UNSIGNED_SYSTEM_SCOPE', unsigned_addon_scopes.system)
# Addon sideloading
# ==============================================================
@depends(update_channel)
def addon_sideload_allowed_default(update_channel):
if update_channel == 'esr':
return True
option('--allow-addon-sideload', default=addon_sideload_allowed_default,
help='Addon sideloading is allowed')
@depends('--allow-addon-sideload')
def addon_sideload_allowed(value):
allowed = bool(value)
if allowed:
return True
set_config('MOZ_ALLOW_ADDON_SIDELOAD', addon_sideload_allowed)
# Launcher process (Windows only) # Launcher process (Windows only)
# ============================================================== # ==============================================================