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/.
7 include("../components/telemetry/telemetry-constants.mozbuild")
10 BUG_COMPONENT = ("Toolkit", "Startup and Profile System")
12 if CONFIG["OS_ARCH"] == "WINNT":
13 TEST_DIRS += ["test/win"]
15 MOCHITEST_MANIFESTS += ["test/mochitest.ini"]
16 BROWSER_CHROME_MANIFESTS += ["test/browser.ini"]
17 XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell.ini"]
18 MARIONETTE_UNIT_MANIFESTS += ["test/marionette/marionette.ini"]
21 "nsINativeAppSupport.idl",
22 "nsIXREDirProvider.idl",
25 if CONFIG["OS_ARCH"] == "WINNT":
27 "nsIWinAppHelper.idl",
30 XPIDL_MODULE = "xulapp"
34 "nsIAppStartupNotifier.h",
38 "AutoSQLiteLifetime.h",
40 "CmdLineAndEnvUtils.h",
42 "MultiInstanceLock.h",
46 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
47 EXPORTS += ["EventTracer.h"]
49 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
52 "DllPrefetchExperimentRegistryInfo.h",
57 "/toolkit/mozapps/update/common/pathhash.cpp",
58 "/toolkit/mozapps/update/common/updateutils_win.cpp",
59 "DllPrefetchExperimentRegistryInfo.cpp",
60 "nsNativeAppSupportWin.cpp",
63 DEFINES["PROXY_PRINTING"] = 1
65 "../components/printingui",
67 if CONFIG["MOZ_LAUNCHER_PROCESS"]:
69 "LauncherRegistryInfo.h",
72 "LauncherRegistryInfo.cpp",
77 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
79 "MacRunFromDmgUtils.h",
82 "MacApplicationDelegate.mm",
83 "MacAutoreleasePool.mm",
85 "MacRunFromDmgUtils.mm",
86 "nsCommandLineServiceMac.mm",
87 "nsNativeAppSupportCocoa.mm",
88 "updaterfileutils_osx.mm",
90 DEFINES["PROXY_PRINTING"] = 1
92 "../components/printingui",
94 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
96 "nsNativeAppSupportDefault.cpp",
97 "UIKitDirProvider.mm",
99 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
101 "nsNativeAppSupportUnix.cpp",
103 CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"]
106 "nsNativeAppSupportDefault.cpp",
109 if CONFIG["MOZ_HAS_REMOTE"]:
111 "../components/remote",
114 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
116 "nsGDKErrorHandler.cpp",
119 if CONFIG["MOZ_X11"]:
120 EXPORTS += ["nsX11ErrorHandler.h"]
122 "nsX11ErrorHandler.cpp",
125 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
127 "nsAndroidStartup.cpp",
130 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
132 "MultiInstanceLock.cpp",
136 "/toolkit/mozapps/update/common/commonupdatedir.cpp",
137 "AutoSQLiteLifetime.cpp",
139 "CmdLineAndEnvUtils.cpp",
141 "nsAppStartupNotifier.cpp",
142 "nsConsoleWriter.cpp",
143 "nsEmbeddingModule.cpp",
144 "nsNativeAppSupportBase.cpp",
146 "nsXREDirProvider.cpp",
149 # nsAppRunner.cpp and ProfileReset.cpp cannot be built in unified mode because
150 # they pull in OS X system headers.
151 # nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
153 "../../other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp",
155 "nsEmbedFunctions.cpp",
159 if CONFIG["MOZ_X11"]:
164 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
169 if CONFIG["MOZ_UPDATER"]:
170 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
172 "nsUpdateDriver.cpp",
173 "nsUpdateSyncManager.cpp",
176 if CONFIG["MOZ_PDF_PRINTING"]:
177 DEFINES["PROXY_PRINTING"] = 1
179 "../components/printingui",
186 include("/ipc/chromium/chromium-config.mozbuild")
188 FINAL_LIBRARY = "xul"
190 if CONFIG["MOZ_X11"]:
191 DEFINES["USE_GLX_TEST"] = True
196 "MOZ_APP_DISPLAYNAME",
200 "MOZ_WIDGET_TOOLKIT",
202 DEFINES[var] = '"%s"' % CONFIG[var]
204 if CONFIG["MOZ_DEFAULT_BROWSER_AGENT"] and CONFIG["OS_ARCH"] == "WINNT":
205 DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]
207 if CONFIG["MOZ_UPDATER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
208 DEFINES["MOZ_UPDATER"] = True
210 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
211 DEFINES["WIN32_LEAN_AND_MEAN"] = True
212 DEFINES["UNICODE"] = True
213 DEFINES["_UNICODE"] = True
215 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
216 DEFINES["ANDROID_PACKAGE_NAME"] = '"%s"' % CONFIG["ANDROID_PACKAGE_NAME"]
218 if CONFIG["TARGET_XPCOM_ABI"]:
219 DEFINES["TARGET_OS_ABI"] = '"%s_%s"' % (
221 CONFIG["TARGET_XPCOM_ABI"],
224 if CONFIG["OS_ARCH"] == "Linux" and "lib64" in CONFIG["libdir"]:
225 DEFINES["HAVE_USR_LIB64_DIR"] = True
227 DEFINES["GRE_MILESTONE"] = CONFIG["GRE_MILESTONE"]
228 DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"]
230 for var in ("APP_VERSION", "APP_ID"):
231 DEFINES[var] = CONFIG["MOZ_%s" % var]
233 if CONFIG["MOZ_BUILD_APP"] == "browser":
234 DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
237 "../../other-licenses/nsis/Contrib/CityHash/cityhash",
238 "../components/find",
239 "../components/printingui/ipc",
240 "../components/windowwatcher",
241 "../mozapps/update/common",
245 "/dom/commandhandler",
247 "/dom/webbrowserpersist",
248 "/testing/gtest/mozilla",
249 "/toolkit/crashreporter",
253 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
255 "/security/sandbox/chromium",
256 "/security/sandbox/chromium-shim",
259 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "Linux":
264 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
271 CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
272 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
274 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
275 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
276 CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
278 DEFINES["TOPOBJDIR"] = TOPOBJDIR
279 FINAL_TARGET_PP_FILES += ["platform.ini"]
281 if CONFIG["MOZ_IPDL_TESTS"]:
282 DEFINES["MOZ_IPDL_TESTS"] = True
284 if CONFIG["ENABLE_TESTS"]:
285 DIRS += ["test/gtest"]
287 if CONFIG["MOZ_BACKGROUNDTASKS"]:
288 DEFINES["MOZ_BACKGROUNDTASKS"] = True
290 REQUIRES_UNIFIED_BUILD = True