This repository has been archived by the owner on Jun 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
BUILD.gn
155 lines (144 loc) · 5.73 KB
/
BUILD.gn
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
action("brave-extension") {
# Need this to fire re-pack if changed, nevertheless extension is repacked on each 2nd build
inputs = [
"app/actions/cosmeticFilterActions.ts",
"app/actions/runtimeActions.ts",
"app/actions/shieldsPanelActions.ts",
"app/actions/tabActions.ts",
"app/actions/webNavigationActions.ts",
"app/actions/windowActions.ts",
"app/assets/img/shields-off.png",
"app/assets/img/shields-off@2x.png",
"app/assets/img/shields-off@3x.png",
"app/assets/img/shields-on.png",
"app/assets/img/shields-on@2x.png",
"app/assets/img/shields-on@3x.png",
"app/background.ts",
"app/background/actions/cosmeticFilterActions.ts",
"app/background/actions/runtimeActions.ts",
"app/background/actions/shieldsPanelActions.ts",
"app/background/actions/tabActions.ts",
"app/background/actions/webNavigationActions.ts",
"app/background/actions/windowActions.ts",
"app/background/api/browserActionAPI.ts",
"app/background/api/cosmeticFilterAPI.ts",
"app/background/api/localeAPI.ts",
"app/background/api/shieldsAPI.ts",
"app/background/api/tabsAPI.ts",
"app/background/events.ts",
"app/background/events/cosmeticFilterEvents.ts",
"app/background/events/runtimeEvents.ts",
"app/background/events/shieldsEvents.ts",
"app/background/events/tabsEvents.ts",
"app/background/events/windowsEvents.ts",
"app/background/reducers.ts",
"app/background/reducers/cosmeticFilterReducer.ts",
"app/background/reducers/runtimeReducer.ts",
"app/background/reducers/shieldsPanelReducer.ts",
"app/background/store.ts",
"app/braveShieldsPanel.tsx",
"app/components/braveShields/braveShields.tsx",
"app/components/braveShields/footer.tsx",
"app/components/braveShields/header.tsx",
"app/components/braveShields/interfaceControls.tsx",
"app/components/braveShields/privacyControls.tsx",
"app/components/braveShields/blockedResources/blockedResources.tsx",
"app/components/braveShields/blockedResources/scriptsList.tsx",
"app/components/braveShields/blockedResources/staticList.tsx",
"app/constants/cosmeticFilterTypes.ts",
"app/constants/resourceIdentifiers.ts",
"app/constants/runtimeActionTypes.ts",
"app/constants/shieldsPanelTypes.ts",
"app/constants/tabTypes.ts",
"app/constants/webNavigationTypes.ts",
"app/constants/windowTypes.ts",
"app/containers/braveShields.tsx",
"app/content.ts",
"app/helpers/arrayUtils.ts",
"app/helpers/urlUtils.ts",
"app/helpers/shieldsUtils.ts",
"app/state/shieldsPanelState.ts",
"app/types/actions/cosmeticFilterActions.ts",
"app/types/actions/index.ts",
"app/types/actions/runtimeActions.ts",
"app/types/actions/shieldsPanelActions.ts",
"app/types/actions/tabActions.ts",
"app/types/actions/webNavigationActions.ts",
"app/types/actions/windowActions.ts",
"app/types/adblock/adblockTypes.ts",
"app/types/constants/cosmeticFilterTypes.ts",
"app/types/constants/resourceIdentifiers.ts",
"app/types/constants/shieldsPanelTypes.ts",
"app/types/constants/tabTypes.ts",
"app/types/constants/webNavigationTypes.ts",
"app/types/constants/windowTypes.ts",
"app/types/global/chrome.d.ts",
"app/types/global/react-chrome-redux.d.ts",
"app/types/global/tests.d.ts",
"app/types/other/blockTypes.ts",
"app/types/other/noScriptInfo.ts",
"app/types/state/mainState.ts",
"app/types/state/shieldsPannelState.ts",
"app/views/background.pug",
"app/views/braveShieldsPanel.pug",
"app/views/inject.pug",
]
script = "py-scripts/build-brave-extension.py"
build_dir = "${root_gen_dir}/brave_extension"
args = [ "--output_dir", rebase_path("//brave/browser/resources/brave_extension"),
"--brave_extension_dir", rebase_path("."),
"--build_dir", rebase_path(build_dir) ]
outputs = [
"$build_dir/background.html",
"$build_dir/manifest.json",
"$build_dir/js/background.bundle.js",
"$build_dir/js/content.bundle.js",
"$build_dir/js/braveShieldsPanel.bundle.js",
"$build_dir/braveShieldsPanel.html",
"$build_dir/bravelizer.css",
"$build_dir/removeEmptyElements.css",
"$build_dir/siteHack-marketwatch.com.css",
"$build_dir/siteHack-glennbeck.com.js",
"$build_dir/siteHack-coinmarketcap.com.css",
"$build_dir/img/icon-16.png",
"$build_dir/img/icon-32.png",
"$build_dir/img/icon-48.png",
"$build_dir/img/icon-64.png",
"$build_dir/img/icon-128.png",
"$build_dir/img/icon-256.png",
"$build_dir/img/shields-off.png",
"$build_dir/img/shields-off@2x.png",
"$build_dir/img/shields-off@3x.png",
"$build_dir/img/shields-on.png",
"$build_dir/img/shields-on@2x.png",
"$build_dir/img/shields-on@3x.png",
"$build_dir/_locales/en_US/messages.json",
]
# For macOS deps is bounded in //chrome:chrome_framework
# For Windows installer copying is done in \\chrome\tools\build\win\create_installer_archive.py
# Deps below is used for Linux and debugging environment output dir on Windows
if (!is_mac) {
deps = [":copy-extension-localization"]
}
}
if (is_mac) {
bundle_data("brave_extension_framework_bundle_data") {
sources = [ "$root_out_dir/resources/brave_extension" ]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
public_deps = [ ":copy-extension-localization" ]
}
}
action("copy-extension-localization") {
script = "py-scripts/copy-brave-extension-localization.py"
# changes of something from the list below makes script re-run
sources = [
"//brave/vendor/brave-extension/app/_locales/en_US/messages.json",
]
resources_target_dir = "$root_build_dir/resources"
args = [
rebase_path("$resources_target_dir"),
]
outputs = [
"$resources_target_dir/brave_extension",
]
}