1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# 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/.
include("../components/telemetry/telemetry-constants.mozbuild")
with Files("**"):
BUG_COMPONENT = ("Toolkit", "Startup and Profile System")
if CONFIG["OS_ARCH"] == "WINNT":
TEST_DIRS += ["test/win"]
MOCHITEST_MANIFESTS += ["test/mochitest.toml"]
BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell.toml"]
MARIONETTE_MANIFESTS += ["test/marionette/marionette.toml"]
XPIDL_SOURCES += [
"nsINativeAppSupport.idl",
"nsIXREDirProvider.idl",
]
if CONFIG["OS_ARCH"] == "WINNT":
XPIDL_SOURCES += [
"nsIWinAppHelper.idl",
]
XPIDL_MODULE = "xulapp"
EXPORTS += [
"nsAppRunner.h",
]
EXPORTS.mozilla += [
"AutoSQLiteLifetime.h",
"Bootstrap.h",
"CmdLineAndEnvUtils.h",
"GeckoArgs.h",
"MultiInstanceLock.h",
"SafeMode.h",
]
if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
EXPORTS += ["EventTracer.h"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
EXPORTS.mozilla += [
"AssembleCmdLine.h",
"DllPrefetchExperimentRegistryInfo.h",
"PolicyChecks.h",
"WinTokenUtils.h",
]
UNIFIED_SOURCES += [
"/toolkit/mozapps/update/common/pathhash.cpp",
"/toolkit/mozapps/update/common/updateutils_win.cpp",
"DllPrefetchExperimentRegistryInfo.cpp",
"nsNativeAppSupportWin.cpp",
"WinTokenUtils.cpp",
]
DEFINES["PROXY_PRINTING"] = 1
LOCAL_INCLUDES += [
"../components/printingui",
]
if CONFIG["MOZ_LAUNCHER_PROCESS"]:
EXPORTS.mozilla += [
"LauncherRegistryInfo.h",
]
UNIFIED_SOURCES += [
"LauncherRegistryInfo.cpp",
]
DIRS += [
"dllservices",
]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
EXPORTS.mozilla += [
"MacRunFromDmgUtils.h",
]
UNIFIED_SOURCES += [
"MacApplicationDelegate.mm",
"MacAutoreleasePool.mm",
"MacLaunchHelper.mm",
"MacRunFromDmgUtils.mm",
"nsCommandLineServiceMac.mm",
"nsNativeAppSupportCocoa.mm",
"updaterfileutils_osx.mm",
]
DEFINES["PROXY_PRINTING"] = 1
LOCAL_INCLUDES += [
"../components/printingui",
]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
UNIFIED_SOURCES += [
"nsNativeAppSupportDefault.cpp",
"UIKitDirProvider.mm",
]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
UNIFIED_SOURCES += [
"nsNativeAppSupportUnix.cpp",
]
CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"]
else:
UNIFIED_SOURCES += [
"nsNativeAppSupportDefault.cpp",
]
if CONFIG["MOZ_HAS_REMOTE"]:
LOCAL_INCLUDES += [
"../components/remote",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
UNIFIED_SOURCES += [
"nsGDKErrorHandler.cpp",
]
LOCAL_INCLUDES += [
"/widget",
"/widget/gtk",
]
if CONFIG["MOZ_X11"]:
EXPORTS += ["nsX11ErrorHandler.h"]
UNIFIED_SOURCES += [
"nsX11ErrorHandler.cpp",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
UNIFIED_SOURCES += [
"nsAndroidStartup.cpp",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
UNIFIED_SOURCES += [
"MultiInstanceLock.cpp",
]
UNIFIED_SOURCES += [
"/toolkit/mozapps/update/common/commonupdatedir.cpp",
"AutoSQLiteLifetime.cpp",
"Bootstrap.cpp",
"CmdLineAndEnvUtils.cpp",
"CreateAppData.cpp",
"nsConsoleWriter.cpp",
"nsNativeAppSupportBase.cpp",
"nsSigHandlers.cpp",
"nsXREDirProvider.cpp",
]
# nsAppRunner.cpp and ProfileReset.cpp cannot be built in unified mode because
# they pull in OS X system headers.
# nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
SOURCES += [
"../../other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp",
"nsAppRunner.cpp",
"nsEmbedFunctions.cpp",
"ProfileReset.cpp",
]
if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
UNIFIED_SOURCES += [
"EventTracer.cpp",
]
if CONFIG["MOZ_UPDATER"]:
if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
UNIFIED_SOURCES += [
"nsUpdateDriver.cpp",
"nsUpdateSyncManager.cpp",
]
if CONFIG["MOZ_PDF_PRINTING"]:
DEFINES["PROXY_PRINTING"] = 1
LOCAL_INCLUDES += [
"../components/printingui",
]
XPCOM_MANIFESTS += [
"components.conf",
]
include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
DEFINES["USE_GLX_TEST"] = True
DIRS += ["glxtest"]
for var in (
"MOZ_APP_NAME",
"MOZ_APP_BASENAME",
"MOZ_APP_DISPLAYNAME",
"MOZ_APP_VENDOR",
"MOZ_APP_VERSION",
"OS_TARGET",
"MOZ_WIDGET_TOOLKIT",
):
DEFINES[var] = '"%s"' % CONFIG[var]
if CONFIG["MOZ_DEFAULT_BROWSER_AGENT"] and CONFIG["OS_ARCH"] == "WINNT":
DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]
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"]
DEFINES["MOZ_DISTRIBUTION_ID"] = '"%s"' % CONFIG["MOZ_DISTRIBUTION_ID"]
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"]
DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"]
for var in ("APP_VERSION", "APP_ID"):
DEFINES[var] = CONFIG["MOZ_%s" % var]
if CONFIG["MOZ_BUILD_APP"] == "browser":
DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
if CONFIG["MOZ_USE_NSS_FOR_MAR"]:
DEFINES["MAR_NSS"] = True
LOCAL_INCLUDES += [
"../../other-licenses/nsis/Contrib/CityHash/cityhash",
"../components/find",
"../components/printingui/ipc",
"../components/windowwatcher",
"../mozapps/update/common",
"../profile",
"/config",
"/dom/base",
"/dom/commandhandler",
"/dom/ipc",
"/dom/webbrowserpersist",
"/testing/gtest/mozilla",
"/toolkit/crashreporter",
"/xpcom/build",
]
if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
LOCAL_INCLUDES += [
"/security/sandbox/chromium",
"/security/sandbox/chromium-shim",
]
if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "Linux":
USE_LIBS += [
"mozsandbox",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [
"/widget",
"/widget/cocoa",
"/xpcom/base",
]
CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
DEFINES["TOPOBJDIR"] = TOPOBJDIR
if not CONFIG["MOZ_ARTIFACT_BUILDS"]:
FINAL_TARGET_PP_FILES += ["platform.ini"]
if CONFIG["ENABLE_TESTS"]:
DIRS += ["test/gtest"]
|