-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathmoz.configure
85 lines (69 loc) · 3.32 KB
/
moz.configure
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
# -*- Mode: python; c-basic-offset: 4; 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/.
# Base name appears to be primarily used for storage directory names or registry
# names. e.g.
#
# - https://searchfox.org/comm-central/source/mozilla/toolkit/mozapps/update/common/commonupdatedir.cpp#580
# - https://searchfox.org/comm-central/source/mozilla/toolkit/mozapps/defaultagent/Policy.cpp#33
imply_option("MOZ_APP_BASENAME", "Dot")
set_config("MOZ_APPUPDATE_HOST", "updates.dothq.org")
add_old_configure_assignment("MOZ_BRANDING_DIRECTORY", "dot/branding/official")
add_old_configure_assignment("MOZ_OFFICIAL_BRANDING_DIRECTORY", "dot/branding/official")
# What does this mean? It's causing mozbuild/configure to die:
# mozbuild.configure.ConfigureError: `--enable-default-browser-agent`, emitted from `/home/ajvincent/debugging/mozilla-coroner/mozilla-central/comm/newapp/moz.configure` line 16, is unknown.
#
# Does this have anything to do with the default browser agent task responsible
# for reporting the users default browser to mozilla on windows?
# https://firefox-source-docs.mozilla.org/toolkit/mozapps/defaultagent/default-browser-agent/index.html
imply_option("--enable-default-browser-agent", False)
imply_option("--with-ccache", "sccache")
@depends(build_environment, "--help")
def dot_paths(build_env, _):
topsrcdir = build_env.topsrcdir
return namespace(
topsrcdir=topsrcdir
)
@template
def set_defconf(k, v):
set_config(k, v)
set_define(k, v)
add_old_configure_assignment(k, v)
set_defconf("topsrcdir", dot_paths.topsrcdir)
@depends(build_environment, build_project)
@imports(_from="os.path", _import="exists")
@imports(_from="__builtin__", _import="open")
# presumably for --version
def dot_version(build_env, app_path):
version_file = os.path.join(build_env.topsrcdir, "dot", "app", "config",
"version.txt")
version_file_display = os.path.join(build_env.topsrcdir, "dot", "app",
"config", "version_display.txt")
rv = []
for f in [version_file, version_file_display]:
if exists(f):
f_value = open(f).read().strip()
else:
f_value = "unknown"
rv.append(f_value)
return namespace(version=rv[0], version_display=rv[1])
set_defconf("DOT_APP_VERSION", dot_version.version)
set_defconf("DOT_APP_VERSION_DISPLAY", dot_version.version_display)
with only_when(compile_environment):
@depends(target)
def default_user_appdir(target):
if target.kernel in ("WINNT", "Darwin"):
return "Dot HQ"
return ".dothq"
imply_option("--with-user-appdir", default_user_appdir, reason="Dot HQ")
imply_option("MOZ_SERVICES_SYNC", True)
imply_option("MOZ_TELEMETRY_REPORTING", False)
imply_option("MOZ_NORMANDY", False)
imply_option("MOZ_SERVICES_HEALTHREPORT", False)
imply_option("--enable-crashreporter", False)
# this is required to define mozilla::components::History::GetServiceHelper in objdir/xpcom/components/Components.h
imply_option("MOZ_PLACES", True)
# This allows us to build the toolkit, including Spidermonkey.
include("../toolkit/moz.configure")