2013-04-01 11:36:59 -07:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 13:19:09 -08: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/.
|
|
|
|
|
|
|
|
TEST_DIRS += ['test']
|
2013-03-12 10:17:46 -07:00
|
|
|
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsINativeAppSupport.idl',
|
|
|
|
]
|
|
|
|
|
2013-03-12 10:20:41 -07:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIWinAppHelper.idl',
|
|
|
|
]
|
|
|
|
|
2013-11-18 18:47:43 -08:00
|
|
|
XPIDL_MODULE = 'xulapp'
|
2013-03-19 11:47:00 -07:00
|
|
|
|
2013-04-16 12:24:43 -07:00
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
|
|
|
EXPORTS += ['EventTracer.h']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
EXPORTS += ['nsWindowsDllInterceptor.h']
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsNativeAppSupportWin.cpp',
|
|
|
|
]
|
2013-04-16 12:24:43 -07:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
EXPORTS += ['MacQuirks.h']
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsCommandLineServiceMac.cpp',
|
|
|
|
]
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-08-21 23:55:59 -07:00
|
|
|
'MacApplicationDelegate.mm',
|
|
|
|
'MacAutoreleasePool.mm',
|
|
|
|
'MacLaunchHelper.mm',
|
|
|
|
'nsNativeAppSupportCocoa.mm',
|
|
|
|
]
|
2013-04-16 12:24:43 -07:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
|
|
|
|
EXPORTS += ['nsQAppInstance.h']
|
2013-10-31 18:30:45 -07:00
|
|
|
GENERATED_SOURCES += [
|
2013-10-29 17:19:15 -07:00
|
|
|
'moc_nsNativeAppSupportQt.cpp',
|
2013-10-31 18:30:45 -07:00
|
|
|
]
|
|
|
|
SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsNativeAppSupportQt.cpp',
|
|
|
|
'nsQAppInstance.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsNativeAppSupportOS2.cpp',
|
|
|
|
]
|
2013-06-10 05:36:26 -07:00
|
|
|
elif CONFIG['MOZ_ENABLE_GTK']:
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsNativeAppSupportUnix.cpp',
|
|
|
|
]
|
|
|
|
else:
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsNativeAppSupportDefault.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsX11ErrorHandler.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsAndroidStartup.cpp',
|
|
|
|
]
|
|
|
|
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'CreateAppData.cpp',
|
|
|
|
'nsConsoleWriter.cpp',
|
|
|
|
'nsNativeAppSupportBase.cpp',
|
|
|
|
'nsSigHandlers.cpp',
|
|
|
|
'nsXREDirProvider.cpp',
|
2013-10-23 16:05:43 -07:00
|
|
|
'ProfileReset.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
2013-12-03 14:01:16 -08:00
|
|
|
# nsAppRunner.cpp cannot be built in unified mode because it pulls in OS X system headers.
|
|
|
|
# nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
|
|
|
|
SOURCES += [
|
|
|
|
'nsAppRunner.cpp',
|
|
|
|
'nsEmbedFunctions.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-23 14:54:15 -07:00
|
|
|
if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'glxtest.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'EventTracer.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_UPDATER']:
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
2013-12-03 14:01:16 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'nsUpdateDriver.cpp',
|
|
|
|
]
|
2013-08-21 23:56:01 -07:00
|
|
|
|
2013-08-21 23:56:01 -07:00
|
|
|
MSVC_ENABLE_PGO = True
|
|
|
|
|
2013-08-15 06:02:09 -07:00
|
|
|
LIBRARY_NAME = 'xulapp_s'
|
|
|
|
|
2013-10-02 10:17:55 -07:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-18 18:47:14 -08:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 05:55:07 -08:00
|
|
|
|
|
|
|
if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
|
|
|
|
DEFINES['USE_GLX_TEST'] = True
|
|
|
|
|
2014-01-12 13:45:41 -08:00
|
|
|
for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_VERSION', 'OS_TARGET',
|
2013-11-27 05:55:07 -08:00
|
|
|
'MOZ_WIDGET_TOOLKIT'):
|
|
|
|
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_XPCOM_ABI'] = '"%s"' % CONFIG['TARGET_XPCOM_ABI']
|
|
|
|
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
|
|
|
|
CONFIG['TARGET_XPCOM_ABI'])
|
|
|
|
|
|
|
|
if CONFIG['WRAP_SYSTEM_INCLUDES']:
|
|
|
|
DEFINES['WRAP_SYSTEM_INCLUDES'] = True
|
|
|
|
|
|
|
|
if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
|
|
|
|
DEFINES['HAVE_USR_LIB64_DIR'] = True
|
|
|
|
|
|
|
|
DEFINES['GRE_MILESTONE'] = CONFIG['GRE_MILESTONE']
|
|
|
|
|
|
|
|
for var in ('APP_VERSION', 'APP_ID'):
|
|
|
|
DEFINES[var] = CONFIG['MOZ_%s' % var]
|
|
|
|
|
|
|
|
if CONFIG['MOZILLA_OFFICIAL']:
|
|
|
|
DEFINES['MOZILLA_OFFICIAL'] = True
|