2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 01:19:09 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2018-05-18 23:03:24 +03:00
|
|
|
include('../components/telemetry/telemetry-constants.mozbuild')
|
|
|
|
|
2017-04-09 12:43:43 +03:00
|
|
|
with Files('**'):
|
|
|
|
BUG_COMPONENT = ('Toolkit', 'Startup and Profile System')
|
|
|
|
|
2014-02-07 01:00:20 +04:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
TEST_DIRS += ['test/win']
|
|
|
|
|
|
|
|
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
|
2016-07-27 23:20:58 +03:00
|
|
|
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
2017-05-17 09:22:08 +03:00
|
|
|
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
|
2013-03-12 21:17:46 +04:00
|
|
|
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsINativeAppSupport.idl',
|
2018-09-24 17:55:37 +03:00
|
|
|
'nsIXREDirProvider.idl',
|
2013-03-12 21:17:46 +04:00
|
|
|
]
|
|
|
|
|
2013-03-12 21:20:41 +04:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIWinAppHelper.idl',
|
|
|
|
]
|
|
|
|
|
2013-11-19 06:47:43 +04:00
|
|
|
XPIDL_MODULE = 'xulapp'
|
2013-03-19 22:47:00 +04:00
|
|
|
|
2017-01-10 21:34:38 +03:00
|
|
|
EXPORTS += [
|
|
|
|
'nsAppRunner.h',
|
|
|
|
'nsIAppStartupNotifier.h',
|
|
|
|
]
|
2015-01-15 01:24:09 +03:00
|
|
|
|
2018-04-20 02:22:41 +03:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'AutoSQLiteLifetime.h',
|
|
|
|
'Bootstrap.h',
|
|
|
|
'CmdLineAndEnvUtils.h',
|
|
|
|
'SafeMode.h',
|
|
|
|
]
|
2016-12-15 10:46:18 +03:00
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
|
|
|
EXPORTS += ['EventTracer.h']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
2018-01-31 00:23:10 +03:00
|
|
|
EXPORTS.mozilla += [
|
2019-09-22 00:01:01 +03:00
|
|
|
'ModuleEvaluator_windows.h',
|
|
|
|
'ModuleVersionInfo_windows.h',
|
2018-04-20 02:22:41 +03:00
|
|
|
'PolicyChecks.h',
|
2018-01-31 00:23:10 +03:00
|
|
|
'WinDllServices.h',
|
2019-08-28 05:17:49 +03:00
|
|
|
'WinTokenUtils.h',
|
2018-01-31 00:23:10 +03:00
|
|
|
]
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2019-07-24 19:05:46 +03:00
|
|
|
'/toolkit/mozapps/update/common/updateutils_win.cpp',
|
2019-09-22 00:01:01 +03:00
|
|
|
'ModuleEvaluator_windows.cpp',
|
|
|
|
'ModuleVersionInfo_windows.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsNativeAppSupportWin.cpp',
|
2018-01-31 00:23:10 +03:00
|
|
|
'WinDllServices.cpp',
|
2019-08-28 05:17:49 +03:00
|
|
|
'WinTokenUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
2017-01-10 21:34:38 +03:00
|
|
|
DEFINES['PROXY_PRINTING'] = 1
|
|
|
|
LOCAL_INCLUDES += [
|
2017-11-10 05:03:43 +03:00
|
|
|
'../components/printingui',
|
2017-01-10 21:34:38 +03:00
|
|
|
]
|
2019-01-16 02:10:00 +03:00
|
|
|
if CONFIG['MOZ_LAUNCHER_PROCESS']:
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'LauncherRegistryInfo.h',
|
|
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'LauncherRegistryInfo.cpp',
|
|
|
|
]
|
2013-04-16 23:24:43 +04:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-08-22 10:55:59 +04:00
|
|
|
'MacApplicationDelegate.mm',
|
|
|
|
'MacAutoreleasePool.mm',
|
|
|
|
'MacLaunchHelper.mm',
|
2019-01-31 01:28:56 +03:00
|
|
|
'nsCommandLineServiceMac.mm',
|
2013-08-22 10:55:59 +04:00
|
|
|
'nsNativeAppSupportCocoa.mm',
|
2016-05-25 05:25:23 +03:00
|
|
|
'updaterfileutils_osx.mm',
|
2013-08-22 10:55:59 +04:00
|
|
|
]
|
2017-01-10 21:34:38 +03:00
|
|
|
DEFINES['PROXY_PRINTING'] = 1
|
|
|
|
LOCAL_INCLUDES += [
|
2017-11-10 05:03:43 +03:00
|
|
|
'../components/printingui',
|
2017-01-10 21:34:38 +03:00
|
|
|
]
|
2015-03-19 05:23:28 +03:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsNativeAppSupportDefault.cpp',
|
|
|
|
'UIKitDirProvider.mm',
|
|
|
|
]
|
2019-08-21 15:25:42 +03:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsNativeAppSupportUnix.cpp',
|
|
|
|
]
|
|
|
|
else:
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsNativeAppSupportDefault.cpp',
|
|
|
|
]
|
|
|
|
|
2019-02-06 22:09:06 +03:00
|
|
|
if CONFIG['MOZ_HAS_REMOTE']:
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'../components/remote',
|
|
|
|
]
|
|
|
|
|
2019-08-21 15:25:42 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
|
2014-06-16 12:54:00 +04:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsGDKErrorHandler.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if CONFIG['MOZ_X11']:
|
2017-01-13 10:50:58 +03:00
|
|
|
EXPORTS += ['nsX11ErrorHandler.h']
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsX11ErrorHandler.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsAndroidStartup.cpp',
|
|
|
|
]
|
|
|
|
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
Bug 1458314 - Move the update directory to an installation specific location r=rstrong
This change applies to Windows only.
Firefox will need to migrate the directory from the old location to the new location. This will be done only once by setting the pref `app.update.migrated.updateDir2.<install path hash>` to `true` once migration has completed.
Note: The pref name app.update.migrated.updateDir has already been used, thus the '2' suffix. It can be found in ESR24.
This also removes the old handling fallback for generating the update directory path. Since xulrunner is no longer supported, this should no longer be needed. If neither the vendor nor app name are defined, it falls back to the literal string "Mozilla".
The code to generate the update directory path and the installation hash have been moved to the updatecommon library. This will allow those functions to be used in Firefox, the Mozilla Maintenance Service, the Mozilla Maintenance Service Installer, and TestAUSHelper.
Additionally, the function that generates the update directory path now has extra functionality. It creates the update directory, sets the permissions on it and, optionally, recursively sets the permissions on everything within.
This patch adds functionality that allows Firefox to set permissions on the new update directory on write failure. It attempts to set the permissions itself and, if that fails and the maintenance service is enabled, it calls into the maintenance service to try from there. If a write fails and the permissions cannot be fixed, the user is prompted to reinstall.
Differential Revision: https://phabricator.services.mozilla.com/D4249
--HG--
rename : toolkit/mozapps/update/updater/win_dirent.cpp => toolkit/mozapps/update/common/win_dirent.cpp
rename : toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js => toolkit/mozapps/update/tests/unit_aus_update/updateDirectoryMigrate.js
extra : moz-landing-system : lando
2018-10-24 00:41:04 +03:00
|
|
|
'/toolkit/mozapps/update/common/commonupdatedir.cpp',
|
2017-09-29 14:25:06 +03:00
|
|
|
'AutoSQLiteLifetime.cpp',
|
2016-12-15 10:46:18 +03:00
|
|
|
'Bootstrap.cpp',
|
2019-01-14 20:27:34 +03:00
|
|
|
'CmdLineAndEnvUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'CreateAppData.cpp',
|
2017-01-10 21:34:38 +03:00
|
|
|
'nsAppStartupNotifier.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsConsoleWriter.cpp',
|
2017-01-10 21:34:38 +03:00
|
|
|
'nsEmbeddingModule.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsNativeAppSupportBase.cpp',
|
|
|
|
'nsSigHandlers.cpp',
|
|
|
|
'nsXREDirProvider.cpp',
|
|
|
|
]
|
|
|
|
|
2015-10-27 00:37:32 +03:00
|
|
|
# nsAppRunner.cpp and ProfileReset.cpp cannot be built in unified mode because
|
|
|
|
# they pull in OS X system headers.
|
2013-12-04 02:01:16 +04:00
|
|
|
# nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
|
|
|
|
SOURCES += [
|
2018-08-21 17:53:03 +03:00
|
|
|
'../../other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp',
|
2013-12-04 02:01:16 +04:00
|
|
|
'nsAppRunner.cpp',
|
|
|
|
'nsEmbedFunctions.cpp',
|
2015-10-27 00:37:32 +03:00
|
|
|
'ProfileReset.cpp',
|
2013-12-04 02:01:16 +04:00
|
|
|
]
|
|
|
|
|
2018-06-04 12:19:09 +03:00
|
|
|
if CONFIG['MOZ_X11']:
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'glxtest.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'EventTracer.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_UPDATER']:
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
2013-12-04 02:01:16 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsUpdateDriver.cpp',
|
|
|
|
]
|
2013-08-22 10:56:01 +04:00
|
|
|
|
2017-01-10 21:34:38 +03:00
|
|
|
if CONFIG['MOZ_PDF_PRINTING']:
|
|
|
|
DEFINES['PROXY_PRINTING'] = 1
|
|
|
|
LOCAL_INCLUDES += [
|
2017-11-10 05:03:43 +03:00
|
|
|
'../components/printingui',
|
2017-01-10 21:34:38 +03:00
|
|
|
]
|
|
|
|
|
2019-01-25 02:32:56 +03:00
|
|
|
XPCOM_MANIFESTS += [
|
|
|
|
'components.conf',
|
|
|
|
]
|
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2018-06-04 12:19:09 +03:00
|
|
|
if CONFIG['MOZ_X11']:
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['USE_GLX_TEST'] = True
|
|
|
|
|
2018-03-31 03:17:24 +03:00
|
|
|
for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
|
2019-01-16 02:10:00 +03:00
|
|
|
'MOZ_APP_VENDOR', 'MOZ_APP_VERSION', 'OS_TARGET',
|
|
|
|
'MOZ_WIDGET_TOOLKIT'):
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES[var] = '"%s"' % CONFIG[var]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
|
|
|
DEFINES['MOZ_UPDATER'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
DEFINES['WIN32_LEAN_AND_MEAN'] = True
|
|
|
|
DEFINES['UNICODE'] = True
|
|
|
|
DEFINES['_UNICODE'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
|
|
|
DEFINES['ANDROID_PACKAGE_NAME'] = '"%s"' % CONFIG['ANDROID_PACKAGE_NAME']
|
|
|
|
|
|
|
|
if CONFIG['TARGET_XPCOM_ABI']:
|
|
|
|
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
|
|
|
|
CONFIG['TARGET_XPCOM_ABI'])
|
|
|
|
|
|
|
|
if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
|
|
|
|
DEFINES['HAVE_USR_LIB64_DIR'] = True
|
|
|
|
|
|
|
|
DEFINES['GRE_MILESTONE'] = CONFIG['GRE_MILESTONE']
|
2018-05-18 23:03:24 +03:00
|
|
|
DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']
|
2013-11-27 17:55:07 +04:00
|
|
|
|
|
|
|
for var in ('APP_VERSION', 'APP_ID'):
|
|
|
|
DEFINES[var] = CONFIG['MOZ_%s' % var]
|
|
|
|
|
2015-07-10 19:12:54 +03:00
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
|
|
|
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
|
|
|
|
|
2014-02-16 00:24:59 +04:00
|
|
|
LOCAL_INCLUDES += [
|
2018-08-21 17:53:03 +03:00
|
|
|
'../../other-licenses/nsis/Contrib/CityHash/cityhash',
|
2017-01-10 21:34:38 +03:00
|
|
|
'../components/find',
|
|
|
|
'../components/printingui/ipc',
|
|
|
|
'../components/windowwatcher',
|
2019-01-15 21:29:22 +03:00
|
|
|
'../mozapps/update/common',
|
2014-02-16 00:24:59 +04:00
|
|
|
'../profile',
|
|
|
|
'/config',
|
|
|
|
'/dom/base',
|
2017-01-10 21:34:38 +03:00
|
|
|
'/dom/commandhandler',
|
2014-02-16 00:24:59 +04:00
|
|
|
'/dom/ipc',
|
2017-01-10 21:34:38 +03:00
|
|
|
'/dom/webbrowserpersist',
|
2014-02-16 00:24:59 +04:00
|
|
|
'/testing/gtest/mozilla',
|
|
|
|
'/toolkit/crashreporter',
|
|
|
|
'/xpcom/build',
|
|
|
|
]
|
|
|
|
|
2016-05-15 18:35:22 +03:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/security/sandbox/chromium',
|
|
|
|
'/security/sandbox/chromium-shim',
|
|
|
|
]
|
|
|
|
|
2016-11-09 00:23:47 +03:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'Linux':
|
|
|
|
USE_LIBS += [
|
|
|
|
'mozsandbox',
|
|
|
|
]
|
|
|
|
|
2015-01-08 05:33:32 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/widget',
|
|
|
|
'/widget/cocoa',
|
2019-05-08 01:16:14 +03:00
|
|
|
'/xpcom/base',
|
2015-01-08 05:33:32 +03:00
|
|
|
]
|
|
|
|
|
2014-07-24 19:55:33 +04:00
|
|
|
CXXFLAGS += CONFIG['TK_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
|
|
|
|
2019-08-21 15:25:42 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
|
2014-07-24 19:55:33 +04:00
|
|
|
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
|
2016-02-09 09:16:25 +03:00
|
|
|
|
2016-02-09 08:36:07 +03:00
|
|
|
DEFINES['TOPOBJDIR'] = TOPOBJDIR
|
2016-02-09 09:16:25 +03:00
|
|
|
FINAL_TARGET_PP_FILES += [
|
|
|
|
'platform.ini'
|
|
|
|
]
|
2016-05-11 10:00:01 +03:00
|
|
|
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
2016-05-11 10:00:01 +03:00
|
|
|
CXXFLAGS += ['-Wno-error=shadow']
|
2016-08-16 08:01:02 +03:00
|
|
|
|
|
|
|
if CONFIG['MOZ_IPDL_TESTS']:
|
|
|
|
DEFINES['MOZ_IPDL_TESTS'] = True
|
2019-03-19 02:52:31 +03:00
|
|
|
|
|
|
|
if CONFIG['MOZ_PROFILE_GENERATE']:
|
|
|
|
DEFINES['MOZ_PROFILE_GENERATE'] = True
|
2019-05-25 00:16:55 +03:00
|
|
|
|
|
|
|
if CONFIG['ENABLE_TESTS']:
|
|
|
|
DIRS += ['test/gtest']
|