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"
37 "AutoSQLiteLifetime.h",
39 "CmdLineAndEnvUtils.h",
41 "MultiInstanceLock.h",
45 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
46 EXPORTS += ["EventTracer.h"]
48 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
51 "DllPrefetchExperimentRegistryInfo.h",
56 "/toolkit/mozapps/update/common/pathhash.cpp",
57 "/toolkit/mozapps/update/common/updateutils_win.cpp",
58 "DllPrefetchExperimentRegistryInfo.cpp",
59 "nsNativeAppSupportWin.cpp",
62 DEFINES["PROXY_PRINTING"] = 1
64 "../components/printingui",
66 if CONFIG["MOZ_LAUNCHER_PROCESS"]:
68 "LauncherRegistryInfo.h",
71 "LauncherRegistryInfo.cpp",
76 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
78 "MacRunFromDmgUtils.h",
81 "MacApplicationDelegate.mm",
82 "MacAutoreleasePool.mm",
84 "MacRunFromDmgUtils.mm",
85 "nsCommandLineServiceMac.mm",
86 "nsNativeAppSupportCocoa.mm",
87 "updaterfileutils_osx.mm",
89 DEFINES["PROXY_PRINTING"] = 1
91 "../components/printingui",
93 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
95 "nsNativeAppSupportDefault.cpp",
96 "UIKitDirProvider.mm",
98 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
100 "nsNativeAppSupportUnix.cpp",
102 CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"]
105 "nsNativeAppSupportDefault.cpp",
108 if CONFIG["MOZ_HAS_REMOTE"]:
110 "../components/remote",
113 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
115 "nsGDKErrorHandler.cpp",
118 if CONFIG["MOZ_X11"]:
119 EXPORTS += ["nsX11ErrorHandler.h"]
121 "nsX11ErrorHandler.cpp",
124 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
126 "nsAndroidStartup.cpp",
129 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
131 "MultiInstanceLock.cpp",
135 "/toolkit/mozapps/update/common/commonupdatedir.cpp",
136 "AutoSQLiteLifetime.cpp",
138 "CmdLineAndEnvUtils.cpp",
140 "nsConsoleWriter.cpp",
141 "nsNativeAppSupportBase.cpp",
143 "nsXREDirProvider.cpp",
146 # nsAppRunner.cpp and ProfileReset.cpp cannot be built in unified mode because
147 # they pull in OS X system headers.
148 # nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
150 "../../other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp",
152 "nsEmbedFunctions.cpp",
156 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
161 if CONFIG["MOZ_UPDATER"]:
162 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
164 "nsUpdateDriver.cpp",
165 "nsUpdateSyncManager.cpp",
168 if CONFIG["MOZ_PDF_PRINTING"]:
169 DEFINES["PROXY_PRINTING"] = 1
171 "../components/printingui",
178 include("/ipc/chromium/chromium-config.mozbuild")
180 FINAL_LIBRARY = "xul"
182 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
183 DEFINES["USE_GLX_TEST"] = True
189 "MOZ_APP_DISPLAYNAME",
193 "MOZ_WIDGET_TOOLKIT",
195 DEFINES[var] = '"%s"' % CONFIG[var]
197 if CONFIG["MOZ_DEFAULT_BROWSER_AGENT"] and CONFIG["OS_ARCH"] == "WINNT":
198 DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]
200 if CONFIG["MOZ_UPDATER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
201 DEFINES["MOZ_UPDATER"] = True
203 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
204 DEFINES["WIN32_LEAN_AND_MEAN"] = True
205 DEFINES["UNICODE"] = True
206 DEFINES["_UNICODE"] = True
208 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
209 DEFINES["ANDROID_PACKAGE_NAME"] = '"%s"' % CONFIG["ANDROID_PACKAGE_NAME"]
211 DEFINES["MOZ_DISTRIBUTION_ID"] = '"%s"' % CONFIG["MOZ_DISTRIBUTION_ID"]
213 if CONFIG["TARGET_XPCOM_ABI"]:
214 DEFINES["TARGET_OS_ABI"] = '"%s_%s"' % (
216 CONFIG["TARGET_XPCOM_ABI"],
219 if CONFIG["OS_ARCH"] == "Linux" and "lib64" in CONFIG["libdir"]:
220 DEFINES["HAVE_USR_LIB64_DIR"] = True
222 DEFINES["GRE_MILESTONE"] = CONFIG["GRE_MILESTONE"]
223 DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"]
225 for var in ("APP_VERSION", "APP_ID"):
226 DEFINES[var] = CONFIG["MOZ_%s" % var]
228 if CONFIG["MOZ_BUILD_APP"] == "browser":
229 DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
231 if CONFIG["MOZ_USE_NSS_FOR_MAR"]:
232 DEFINES["MAR_NSS"] = True
235 "../../other-licenses/nsis/Contrib/CityHash/cityhash",
236 "../components/find",
237 "../components/printingui/ipc",
238 "../components/windowwatcher",
239 "../mozapps/update/common",
243 "/dom/commandhandler",
245 "/dom/webbrowserpersist",
246 "/testing/gtest/mozilla",
247 "/toolkit/crashreporter",
251 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
253 "/security/sandbox/chromium",
254 "/security/sandbox/chromium-shim",
257 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "Linux":
262 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
269 CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
270 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
272 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
273 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
274 CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
276 DEFINES["TOPOBJDIR"] = TOPOBJDIR
277 FINAL_TARGET_PP_FILES += ["platform.ini"]
279 if CONFIG["ENABLE_TESTS"]:
280 DIRS += ["test/gtest"]