BUILD.gn 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281
  1. import("//build/config/locales.gni")
  2. import("//build/config/ui.gni")
  3. import("//build/config/win/manifest.gni")
  4. import("//components/spellcheck/spellcheck_build_features.gni")
  5. import("//content/public/app/mac_helpers.gni")
  6. import("//pdf/features.gni")
  7. import("//ppapi/buildflags/buildflags.gni")
  8. import("//printing/buildflags/buildflags.gni")
  9. import("//testing/test.gni")
  10. import("//third_party/ffmpeg/ffmpeg_options.gni")
  11. import("//tools/generate_library_loader/generate_library_loader.gni")
  12. import("//tools/grit/grit_rule.gni")
  13. import("//tools/grit/repack.gni")
  14. import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
  15. import("//v8/gni/snapshot_toolchain.gni")
  16. import("build/asar.gni")
  17. import("build/extract_symbols.gni")
  18. import("build/npm.gni")
  19. import("build/templated_file.gni")
  20. import("build/tsc.gni")
  21. import("build/webpack/webpack.gni")
  22. import("buildflags/buildflags.gni")
  23. import("electron_paks.gni")
  24. import("filenames.auto.gni")
  25. import("filenames.gni")
  26. import("filenames.hunspell.gni")
  27. if (is_mac) {
  28. import("//build/config/mac/rules.gni")
  29. import("//third_party/icu/config.gni")
  30. import("//ui/gl/features.gni")
  31. import("//v8/gni/v8.gni")
  32. import("build/rules.gni")
  33. }
  34. if (is_linux) {
  35. import("//build/config/linux/pkg_config.gni")
  36. pkg_config("gio_unix") {
  37. packages = [ "gio-unix-2.0" ]
  38. }
  39. pkg_config("libnotify_config") {
  40. packages = [
  41. "glib-2.0",
  42. "gdk-pixbuf-2.0",
  43. ]
  44. }
  45. }
  46. branding = read_file("shell/app/BRANDING.json", "json")
  47. electron_project_name = branding.project_name
  48. electron_product_name = branding.product_name
  49. electron_mac_bundle_id = branding.mac_bundle_id
  50. if (is_mas_build) {
  51. assert(is_mac,
  52. "It doesn't make sense to build a MAS build on a non-mac platform")
  53. }
  54. config("branding") {
  55. defines = [
  56. "ELECTRON_PRODUCT_NAME=\"$electron_product_name\"",
  57. "ELECTRON_PROJECT_NAME=\"$electron_project_name\"",
  58. ]
  59. }
  60. config("electron_lib_config") {
  61. include_dirs = [ "." ]
  62. }
  63. # We geneate the definitions twice here, once in //electron/electron.d.ts
  64. # and once in $target_gen_dir
  65. # The one in $target_gen_dir is used for the actual TSC build later one
  66. # and the one in //electron/electron.d.ts is used by your IDE (vscode)
  67. # for typescript prompting
  68. npm_action("build_electron_definitions") {
  69. script = "gn-typescript-definitions"
  70. args = [ rebase_path("$target_gen_dir/tsc/typings/electron.d.ts") ]
  71. inputs = auto_filenames.api_docs + [ "yarn.lock" ]
  72. outputs = [ "$target_gen_dir/tsc/typings/electron.d.ts" ]
  73. }
  74. webpack_build("electron_browser_bundle") {
  75. deps = [ ":build_electron_definitions" ]
  76. inputs = auto_filenames.browser_bundle_deps
  77. config_file = "//electron/build/webpack/webpack.config.browser.js"
  78. out_file = "$target_gen_dir/js2c/browser_init.js"
  79. }
  80. webpack_build("electron_renderer_bundle") {
  81. deps = [ ":build_electron_definitions" ]
  82. inputs = auto_filenames.renderer_bundle_deps
  83. config_file = "//electron/build/webpack/webpack.config.renderer.js"
  84. out_file = "$target_gen_dir/js2c/renderer_init.js"
  85. }
  86. webpack_build("electron_worker_bundle") {
  87. deps = [ ":build_electron_definitions" ]
  88. inputs = auto_filenames.worker_bundle_deps
  89. config_file = "//electron/build/webpack/webpack.config.worker.js"
  90. out_file = "$target_gen_dir/js2c/worker_init.js"
  91. }
  92. webpack_build("electron_sandboxed_renderer_bundle") {
  93. deps = [ ":build_electron_definitions" ]
  94. inputs = auto_filenames.sandbox_bundle_deps
  95. config_file = "//electron/build/webpack/webpack.config.sandboxed_renderer.js"
  96. out_file = "$target_gen_dir/js2c/sandbox_bundle.js"
  97. }
  98. webpack_build("electron_isolated_renderer_bundle") {
  99. deps = [ ":build_electron_definitions" ]
  100. inputs = auto_filenames.isolated_bundle_deps
  101. config_file = "//electron/build/webpack/webpack.config.isolated_renderer.js"
  102. out_file = "$target_gen_dir/js2c/isolated_bundle.js"
  103. }
  104. webpack_build("electron_content_script_bundle") {
  105. deps = [ ":build_electron_definitions" ]
  106. inputs = auto_filenames.content_script_bundle_deps
  107. config_file = "//electron/build/webpack/webpack.config.content_script.js"
  108. out_file = "$target_gen_dir/js2c/content_script_bundle.js"
  109. }
  110. copy("atom_js2c_copy") {
  111. sources = [
  112. "lib/common/asar.js",
  113. "lib/common/asar_init.js",
  114. ]
  115. outputs = [ "$target_gen_dir/js2c/{{source_file_part}}" ]
  116. }
  117. action("atom_js2c") {
  118. deps = [
  119. ":atom_js2c_copy",
  120. ":electron_browser_bundle",
  121. ":electron_content_script_bundle",
  122. ":electron_isolated_renderer_bundle",
  123. ":electron_renderer_bundle",
  124. ":electron_sandboxed_renderer_bundle",
  125. ":electron_worker_bundle",
  126. ]
  127. webpack_sources = [
  128. "$target_gen_dir/js2c/browser_init.js",
  129. "$target_gen_dir/js2c/content_script_bundle.js",
  130. "$target_gen_dir/js2c/isolated_bundle.js",
  131. "$target_gen_dir/js2c/renderer_init.js",
  132. "$target_gen_dir/js2c/sandbox_bundle.js",
  133. "$target_gen_dir/js2c/worker_init.js",
  134. ]
  135. sources = webpack_sources + [
  136. "$target_gen_dir/js2c/asar.js",
  137. "$target_gen_dir/js2c/asar_init.js",
  138. ]
  139. inputs = sources + [ "//third_party/electron_node/tools/js2c.py" ]
  140. outputs = [ "$root_gen_dir/atom_natives.cc" ]
  141. script = "tools/js2c.py"
  142. args = [ rebase_path("//third_party/electron_node") ] +
  143. rebase_path(outputs, root_build_dir) +
  144. rebase_path(sources, root_build_dir)
  145. }
  146. target_gen_default_app_js = "$target_gen_dir/js/default_app"
  147. typescript_build("default_app_js") {
  148. deps = [ ":build_electron_definitions" ]
  149. type_root = rebase_path("$target_gen_dir/tsc/electron/typings")
  150. sources = filenames.default_app_ts_sources
  151. output_gen_dir = target_gen_default_app_js
  152. output_dir_name = "default_app"
  153. tsconfig = "tsconfig.default_app.json"
  154. }
  155. copy("default_app_static") {
  156. sources = filenames.default_app_static_sources
  157. outputs = [ "$target_gen_default_app_js/{{source}}" ]
  158. }
  159. copy("default_app_octicon_deps") {
  160. sources = filenames.default_app_octicon_sources
  161. outputs = [ "$target_gen_default_app_js/electron/default_app/octicon/{{source_file_part}}" ]
  162. }
  163. asar("default_app_asar") {
  164. deps = [
  165. ":default_app_js",
  166. ":default_app_octicon_deps",
  167. ":default_app_static",
  168. ]
  169. root = "$target_gen_default_app_js/electron/default_app"
  170. sources = get_target_outputs(":default_app_js") +
  171. get_target_outputs(":default_app_static") +
  172. get_target_outputs(":default_app_octicon_deps")
  173. outputs = [ "$root_out_dir/resources/default_app.asar" ]
  174. }
  175. grit("resources") {
  176. source = "electron_resources.grd"
  177. outputs = [
  178. "grit/electron_resources.h",
  179. "electron_resources.pak",
  180. ]
  181. # Mojo manifest overlays are generated.
  182. source_is_generated = true
  183. grit_flags = [
  184. "-E",
  185. "target_gen_dir=" + rebase_path(target_gen_dir, root_build_dir),
  186. ]
  187. deps = [ ":copy_shell_devtools_discovery_page" ]
  188. output_dir = "$target_gen_dir"
  189. }
  190. copy("copy_shell_devtools_discovery_page") {
  191. sources = [ "//content/shell/resources/shell_devtools_discovery_page.html" ]
  192. outputs = [ "$target_gen_dir/shell_devtools_discovery_page.html" ]
  193. }
  194. if (is_linux) {
  195. generate_library_loader("libnotify_loader") {
  196. name = "LibNotifyLoader"
  197. output_h = "libnotify_loader.h"
  198. output_cc = "libnotify_loader.cc"
  199. header = "<libnotify/notify.h>"
  200. config = ":libnotify_config"
  201. functions = [
  202. "notify_is_initted",
  203. "notify_init",
  204. "notify_get_server_caps",
  205. "notify_get_server_info",
  206. "notify_notification_new",
  207. "notify_notification_add_action",
  208. "notify_notification_set_image_from_pixbuf",
  209. "notify_notification_set_timeout",
  210. "notify_notification_set_urgency",
  211. "notify_notification_set_hint_string",
  212. "notify_notification_show",
  213. "notify_notification_close",
  214. ]
  215. }
  216. }
  217. source_set("manifests") {
  218. sources = [
  219. "//electron/shell/app/manifests.cc",
  220. "//electron/shell/app/manifests.h",
  221. ]
  222. include_dirs = [ "//electron" ]
  223. deps = [
  224. "//electron/shell/common/api:mojo",
  225. "//printing/buildflags",
  226. "//services/service_manager/public/cpp",
  227. ]
  228. }
  229. npm_action("electron_version_args") {
  230. script = "generate-version-json"
  231. outputs = [ "$target_gen_dir/electron_version.args" ]
  232. args = rebase_path(outputs)
  233. inputs = [
  234. "ELECTRON_VERSION",
  235. "script/generate-version-json.js",
  236. ]
  237. }
  238. templated_file("electron_version_header") {
  239. deps = [ ":electron_version_args" ]
  240. template = "build/templates/electron_version.tmpl"
  241. output = "$target_gen_dir/electron_version.h"
  242. args_files = get_target_outputs(":electron_version_args")
  243. }
  244. source_set("electron_lib") {
  245. configs += [ "//v8:external_startup_data" ]
  246. configs += [ "//third_party/electron_node:node_internals" ]
  247. public_configs = [
  248. ":branding",
  249. ":electron_lib_config",
  250. ]
  251. deps = [
  252. ":atom_js2c",
  253. ":electron_version_header",
  254. ":manifests",
  255. ":resources",
  256. "buildflags",
  257. "chromium_src:chrome",
  258. "chromium_src:chrome_spellchecker",
  259. "shell/common/api:mojo",
  260. "//base:base_static",
  261. "//base/allocator:buildflags",
  262. "//chrome/app/resources:platform_locale_settings",
  263. "//chrome/services/printing/public/mojom",
  264. "//components/certificate_transparency",
  265. "//components/language/core/browser",
  266. "//components/net_log",
  267. "//components/network_hints/browser",
  268. "//components/network_hints/common:mojo_bindings",
  269. "//components/network_hints/renderer",
  270. "//components/network_session_configurator/common",
  271. "//components/prefs",
  272. "//components/viz/host",
  273. "//components/viz/service",
  274. "//content/public/browser",
  275. "//content/public/child",
  276. "//content/public/common:service_names",
  277. "//content/public/gpu",
  278. "//content/public/renderer",
  279. "//content/public/utility",
  280. "//device/bluetooth",
  281. "//device/bluetooth/public/cpp",
  282. "//gin",
  283. "//media/capture/mojom:video_capture",
  284. "//media/mojo/mojom",
  285. "//net:extras",
  286. "//net:net_resources",
  287. "//ppapi/host",
  288. "//ppapi/proxy",
  289. "//ppapi/shared_impl",
  290. "//printing/buildflags",
  291. "//services/device/public/cpp/geolocation",
  292. "//services/device/public/mojom",
  293. "//services/proxy_resolver:lib",
  294. "//services/video_capture/public/mojom:constants",
  295. "//services/viz/privileged/mojom/compositing",
  296. "//skia",
  297. "//third_party/blink/public:blink",
  298. "//third_party/boringssl",
  299. "//third_party/electron_node:node_lib",
  300. "//third_party/leveldatabase",
  301. "//third_party/libyuv",
  302. "//third_party/webrtc_overrides:webrtc_component",
  303. "//third_party/widevine/cdm:headers",
  304. "//ui/base/idle",
  305. "//ui/events:dom_keycode_converter",
  306. "//ui/gl",
  307. "//ui/native_theme",
  308. "//ui/shell_dialogs",
  309. "//ui/views",
  310. "//v8",
  311. "//v8:v8_libplatform",
  312. ]
  313. public_deps = [
  314. "//base",
  315. "//base:i18n",
  316. "//content/public/app:both",
  317. ]
  318. include_dirs = [
  319. "chromium_src",
  320. ".",
  321. "$target_gen_dir",
  322. # TODO(nornagon): replace usage of SchemeRegistry by an actually exported
  323. # API of blink, then remove this from the include_dirs.
  324. "//third_party/blink/renderer",
  325. ]
  326. defines = [ "V8_DEPRECATION_WARNINGS" ]
  327. libs = []
  328. if (is_linux) {
  329. defines += [ "GDK_DISABLE_DEPRECATION_WARNINGS" ]
  330. }
  331. extra_source_filters = []
  332. if (!is_linux) {
  333. extra_source_filters += [
  334. "*\bx/*",
  335. "*_x11.h",
  336. "*_x11.cc",
  337. "*_gtk.h",
  338. "*_gtk.cc",
  339. "*\blibrary_loaders/*",
  340. ]
  341. }
  342. if (!is_win) {
  343. extra_source_filters += [
  344. "*\bwin_*.h",
  345. "*\bwin_*.cc",
  346. ]
  347. }
  348. if (!is_posix) {
  349. extra_source_filters += [
  350. "*_posix.cc",
  351. "*_posix.h",
  352. ]
  353. }
  354. if (is_mac) {
  355. extra_source_filters += [
  356. "*_views.cc",
  357. "*_views.h",
  358. "*\bviews/*",
  359. ]
  360. }
  361. set_sources_assignment_filter(
  362. sources_assignment_filter + extra_source_filters)
  363. sources = filenames.lib_sources
  364. set_sources_assignment_filter(sources_assignment_filter)
  365. if (is_component_build) {
  366. defines += [ "NODE_SHARED_MODE" ]
  367. }
  368. if (enable_fake_location_provider) {
  369. sources += [
  370. "shell/browser/fake_location_provider.cc",
  371. "shell/browser/fake_location_provider.h",
  372. ]
  373. }
  374. if (is_mac) {
  375. deps += [
  376. "//components/remote_cocoa/app_shim",
  377. "//content/common:mac_helpers",
  378. "//ui/accelerated_widget_mac",
  379. ]
  380. libs = [
  381. "AVFoundation.framework",
  382. "Carbon.framework",
  383. "LocalAuthentication.framework",
  384. "QuartzCore.framework",
  385. "Quartz.framework",
  386. "Security.framework",
  387. "SecurityInterface.framework",
  388. "ServiceManagement.framework",
  389. "StoreKit.framework",
  390. ]
  391. sources += [
  392. "shell/browser/ui/views/autofill_popup_view.cc",
  393. "shell/browser/ui/views/autofill_popup_view.h",
  394. ]
  395. if (is_mas_build) {
  396. sources += [ "shell/browser/api/atom_api_app_mas.mm" ]
  397. sources -= [
  398. "shell/browser/auto_updater_mac.mm",
  399. "shell/common/crash_reporter/crash_reporter_mac.h",
  400. "shell/common/crash_reporter/crash_reporter_mac.mm",
  401. ]
  402. defines += [ "MAS_BUILD" ]
  403. } else {
  404. libs += [
  405. "Squirrel.framework",
  406. "ReactiveCocoa.framework",
  407. "Mantle.framework",
  408. ]
  409. cflags_objcc = [
  410. "-F",
  411. rebase_path("external_binaries", root_build_dir),
  412. ]
  413. # ReactiveCocoa which is used by Squirrel requires using __weak.
  414. cflags_objcc += [ "-fobjc-weak" ]
  415. }
  416. }
  417. if (is_linux) {
  418. deps += [
  419. ":libnotify_loader",
  420. "//build/config/linux/gtk",
  421. "//chrome/browser/ui/libgtkui",
  422. "//dbus",
  423. "//device/bluetooth",
  424. "//third_party/breakpad:client",
  425. "//ui/events/devices/x11",
  426. "//ui/events/platform/x11",
  427. "//ui/views/controls/webview",
  428. "//ui/wm",
  429. ]
  430. configs += [ ":gio_unix" ]
  431. include_dirs += [ "//third_party/breakpad" ]
  432. configs += [ "//build/config/linux:x11" ]
  433. defines += [
  434. # Disable warnings for g_settings_list_schemas.
  435. "GLIB_DISABLE_DEPRECATION_WARNINGS",
  436. ]
  437. sources += filenames.lib_sources_nss
  438. sources += [
  439. "shell/browser/ui/gtk_util.cc",
  440. "shell/browser/ui/gtk_util.h",
  441. ]
  442. }
  443. if (is_win) {
  444. libs += [ "dwmapi.lib" ]
  445. deps += [
  446. "//ui/native_theme:native_theme_browser",
  447. "//ui/views/controls/webview",
  448. "//ui/wm",
  449. "//ui/wm/public",
  450. ]
  451. public_deps += [
  452. "//sandbox/win:sandbox",
  453. "//third_party/crashpad/crashpad/handler",
  454. ]
  455. }
  456. if ((is_mac && !is_mas_build) || is_win) {
  457. sources += [
  458. "shell/common/crash_reporter/crash_reporter_crashpad.cc",
  459. "shell/common/crash_reporter/crash_reporter_crashpad.h",
  460. ]
  461. deps += [ "//third_party/crashpad/crashpad/client" ]
  462. }
  463. if (enable_plugins) {
  464. deps += [ "chromium_src:plugins" ]
  465. sources += [
  466. "shell/renderer/pepper_helper.cc",
  467. "shell/renderer/pepper_helper.h",
  468. ]
  469. }
  470. if (enable_run_as_node) {
  471. sources += [
  472. "shell/app/node_main.cc",
  473. "shell/app/node_main.h",
  474. ]
  475. }
  476. if (enable_osr) {
  477. sources += [
  478. "shell/browser/osr/osr_host_display_client.cc",
  479. "shell/browser/osr/osr_host_display_client.h",
  480. "shell/browser/osr/osr_host_display_client_mac.mm",
  481. "shell/browser/osr/osr_render_widget_host_view.cc",
  482. "shell/browser/osr/osr_render_widget_host_view.h",
  483. "shell/browser/osr/osr_video_consumer.cc",
  484. "shell/browser/osr/osr_video_consumer.h",
  485. "shell/browser/osr/osr_view_proxy.cc",
  486. "shell/browser/osr/osr_view_proxy.h",
  487. "shell/browser/osr/osr_web_contents_view.cc",
  488. "shell/browser/osr/osr_web_contents_view.h",
  489. "shell/browser/osr/osr_web_contents_view_mac.mm",
  490. ]
  491. deps += [
  492. "//components/viz/service",
  493. "//services/viz/public/mojom",
  494. "//ui/compositor",
  495. ]
  496. }
  497. if (enable_remote_module) {
  498. sources += [
  499. "shell/common/api/remote/object_life_monitor.cc",
  500. "shell/common/api/remote/object_life_monitor.h",
  501. "shell/common/api/remote/remote_callback_freer.cc",
  502. "shell/common/api/remote/remote_callback_freer.h",
  503. "shell/common/api/remote/remote_object_freer.cc",
  504. "shell/common/api/remote/remote_object_freer.h",
  505. ]
  506. }
  507. if (enable_desktop_capturer) {
  508. if (is_component_build && !is_linux) {
  509. # On windows the implementation relies on unexported
  510. # DxgiDuplicatorController class. On macOS the implementation
  511. # relies on unexported webrtc::GetWindowOwnerPid method.
  512. deps += [ "//third_party/webrtc/modules/desktop_capture" ]
  513. }
  514. sources += [
  515. "shell/browser/api/atom_api_desktop_capturer.cc",
  516. "shell/browser/api/atom_api_desktop_capturer.h",
  517. ]
  518. }
  519. if (enable_view_api) {
  520. sources += [
  521. "shell/browser/api/views/atom_api_box_layout.cc",
  522. "shell/browser/api/views/atom_api_box_layout.h",
  523. "shell/browser/api/views/atom_api_button.cc",
  524. "shell/browser/api/views/atom_api_button.h",
  525. "shell/browser/api/views/atom_api_label_button.cc",
  526. "shell/browser/api/views/atom_api_label_button.h",
  527. "shell/browser/api/views/atom_api_layout_manager.cc",
  528. "shell/browser/api/views/atom_api_layout_manager.h",
  529. "shell/browser/api/views/atom_api_md_text_button.cc",
  530. "shell/browser/api/views/atom_api_md_text_button.h",
  531. "shell/browser/api/views/atom_api_resize_area.cc",
  532. "shell/browser/api/views/atom_api_resize_area.h",
  533. "shell/browser/api/views/atom_api_text_field.cc",
  534. "shell/browser/api/views/atom_api_text_field.h",
  535. ]
  536. }
  537. if (enable_basic_printing) {
  538. sources += [
  539. "shell/browser/printing/print_preview_message_handler.cc",
  540. "shell/browser/printing/print_preview_message_handler.h",
  541. "shell/renderer/printing/print_render_frame_helper_delegate.cc",
  542. "shell/renderer/printing/print_render_frame_helper_delegate.h",
  543. ]
  544. deps += [ "//components/printing/common:mojo_interfaces" ]
  545. }
  546. deps += [ "shell/common/extensions/api:extensions_features" ]
  547. deps += [ "shell/common/extensions/api" ]
  548. deps += [
  549. "//components/pref_registry",
  550. "//components/user_prefs",
  551. "//extensions/browser",
  552. "//extensions/browser:core_api_provider",
  553. "//extensions/common",
  554. "//extensions/common:core_api_provider",
  555. "//extensions/renderer",
  556. ]
  557. if (enable_electron_extensions) {
  558. sources += filenames.lib_sources_extensions
  559. }
  560. if (enable_pdf) {
  561. # Printing depends on some //pdf code, so it needs to be built even if the
  562. # pdf viewer isn't enabled.
  563. deps += [ "//pdf" ]
  564. }
  565. if (enable_pdf_viewer) {
  566. deps += [
  567. "//components/pdf/browser",
  568. "//components/pdf/renderer",
  569. ]
  570. sources += [
  571. "shell/browser/electron_pdf_web_contents_helper_client.cc",
  572. "shell/browser/electron_pdf_web_contents_helper_client.h",
  573. ]
  574. }
  575. }
  576. electron_paks("packed_resources") {
  577. if (is_mac) {
  578. output_dir = "$root_gen_dir/electron_repack"
  579. copy_data_to_bundle = true
  580. } else {
  581. output_dir = root_out_dir
  582. }
  583. }
  584. if (is_mac) {
  585. electron_framework_name = "$electron_product_name Framework"
  586. electron_helper_name = "$electron_product_name Helper"
  587. electron_login_helper_name = "$electron_product_name Login Helper"
  588. electron_framework_version = "A"
  589. electron_version = read_file("ELECTRON_VERSION", "trim string")
  590. mac_xib_bundle_data("electron_xibs") {
  591. sources = [ "shell/common/resources/mac/MainMenu.xib" ]
  592. }
  593. bundle_data("electron_framework_resources") {
  594. public_deps = [ ":packed_resources" ]
  595. sources = []
  596. if (icu_use_data_file) {
  597. sources += [ "$root_out_dir/icudtl.dat" ]
  598. public_deps += [ "//third_party/icu:icudata" ]
  599. }
  600. if (v8_use_external_startup_data) {
  601. public_deps += [ "//v8" ]
  602. if (use_v8_context_snapshot) {
  603. sources += [ "$root_out_dir/v8_context_snapshot.bin" ]
  604. public_deps += [ "//tools/v8_context_snapshot" ]
  605. } else {
  606. sources += [ "$root_out_dir/snapshot_blob.bin" ]
  607. }
  608. }
  609. outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
  610. }
  611. if (!is_component_build) {
  612. bundle_data("electron_framework_libraries") {
  613. sources = []
  614. public_deps = []
  615. if (is_component_ffmpeg) {
  616. sources += [ "$root_out_dir/libffmpeg.dylib" ]
  617. public_deps += [ "//third_party/ffmpeg:ffmpeg" ]
  618. }
  619. outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
  620. }
  621. } else {
  622. group("electron_framework_libraries") {
  623. }
  624. }
  625. if (use_egl) {
  626. # Add the ANGLE .dylibs in the Libraries directory of the Framework.
  627. bundle_data("electron_angle_binaries") {
  628. sources = [
  629. "$root_out_dir/egl_intermediates/libEGL.dylib",
  630. "$root_out_dir/egl_intermediates/libGLESv2.dylib",
  631. ]
  632. outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
  633. public_deps = [ "//ui/gl:angle_library_copy" ]
  634. }
  635. # Add the SwiftShader .dylibs in the Libraries directory of the Framework.
  636. bundle_data("electron_swiftshader_binaries") {
  637. sources = [
  638. "$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib",
  639. "$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib",
  640. ]
  641. outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
  642. public_deps = [ "//ui/gl:swiftshader_library_copy" ]
  643. }
  644. }
  645. group("electron_angle_library") {
  646. if (use_egl) {
  647. deps = [ ":electron_angle_binaries" ]
  648. }
  649. }
  650. group("electron_swiftshader_library") {
  651. if (use_egl) {
  652. deps = [ ":electron_swiftshader_binaries" ]
  653. }
  654. }
  655. bundle_data("electron_crashpad_helper") {
  656. sources = [ "$root_out_dir/crashpad_handler" ]
  657. outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
  658. public_deps = [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ]
  659. }
  660. mac_framework_bundle("electron_framework") {
  661. output_name = electron_framework_name
  662. framework_version = electron_framework_version
  663. framework_contents = [
  664. "Resources",
  665. "Libraries",
  666. ]
  667. public_deps = [
  668. ":electron_framework_libraries",
  669. ":electron_lib",
  670. ]
  671. deps = [
  672. ":electron_angle_library",
  673. ":electron_framework_libraries",
  674. ":electron_framework_resources",
  675. ":electron_swiftshader_library",
  676. ":electron_xibs",
  677. ]
  678. if (!is_mas_build) {
  679. deps += [ ":electron_crashpad_helper" ]
  680. }
  681. info_plist = "shell/common/resources/mac/Info.plist"
  682. extra_substitutions = [
  683. "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.framework",
  684. "ELECTRON_VERSION=$electron_version",
  685. ]
  686. include_dirs = [ "." ]
  687. sources = filenames.framework_sources
  688. if (enable_osr) {
  689. libs += [ "IOSurface.framework" ]
  690. }
  691. ldflags = [
  692. "-F",
  693. rebase_path("external_binaries", root_build_dir),
  694. "-Wl,-install_name,@rpath/$output_name.framework/$output_name",
  695. "-rpath",
  696. "@loader_path/Libraries",
  697. ]
  698. if (is_component_build) {
  699. ldflags += [
  700. "-rpath",
  701. "@executable_path/../../../../../..",
  702. ]
  703. }
  704. }
  705. template("electron_helper_app") {
  706. mac_app_bundle(target_name) {
  707. assert(defined(invoker.helper_name_suffix))
  708. output_name = electron_helper_name + invoker.helper_name_suffix
  709. deps = [ ":electron_framework+link" ]
  710. if (!is_mas_build) {
  711. deps += [ "//sandbox/mac:seatbelt" ]
  712. }
  713. defines = [ "HELPER_EXECUTABLE" ]
  714. sources = filenames.app_sources
  715. sources += [ "shell/common/atom_constants.cc" ]
  716. include_dirs = [ "." ]
  717. info_plist = "shell/renderer/resources/mac/Info.plist"
  718. extra_substitutions =
  719. [ "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.helper" ]
  720. ldflags = [
  721. "-rpath",
  722. "@executable_path/../../..",
  723. ]
  724. if (is_component_build) {
  725. ldflags += [
  726. "-rpath",
  727. "@executable_path/../../../../../..",
  728. ]
  729. }
  730. }
  731. }
  732. foreach(helper_params, content_mac_helpers) {
  733. _helper_target = helper_params[0]
  734. _helper_bundle_id = helper_params[1]
  735. _helper_suffix = helper_params[2]
  736. electron_helper_app("electron_helper_app_${_helper_target}") {
  737. helper_name_suffix = _helper_suffix
  738. }
  739. }
  740. bundle_data("electron_app_framework_bundle_data") {
  741. sources = [ "$root_out_dir/$electron_framework_name.framework" ]
  742. if (!is_mas_build) {
  743. sources += [
  744. "external_binaries/Mantle.framework",
  745. "external_binaries/ReactiveCocoa.framework",
  746. "external_binaries/Squirrel.framework",
  747. ]
  748. }
  749. outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
  750. public_deps = [ ":electron_framework+link" ]
  751. foreach(helper_params, content_mac_helpers) {
  752. sources +=
  753. [ "$root_out_dir/${electron_helper_name}${helper_params[2]}.app" ]
  754. public_deps += [ ":electron_helper_app_${helper_params[0]}" ]
  755. }
  756. }
  757. mac_app_bundle("electron_login_helper") {
  758. output_name = electron_login_helper_name
  759. sources = filenames.login_helper_sources
  760. include_dirs = [ "." ]
  761. libs = [ "AppKit.framework" ]
  762. info_plist = "shell/app/resources/mac/loginhelper-Info.plist"
  763. extra_substitutions =
  764. [ "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.loginhelper" ]
  765. }
  766. bundle_data("electron_login_helper_app") {
  767. public_deps = [ ":electron_login_helper" ]
  768. sources = [ "$root_out_dir/$electron_login_helper_name.app" ]
  769. outputs =
  770. [ "{{bundle_contents_dir}}/Library/LoginItems/{{source_file_part}}" ]
  771. }
  772. action("electron_app_lproj_dirs") {
  773. outputs = []
  774. foreach(locale, locales_as_mac_outputs) {
  775. outputs += [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ]
  776. }
  777. script = "build/mac/make_locale_dirs.py"
  778. args = rebase_path(outputs)
  779. }
  780. foreach(locale, locales_as_mac_outputs) {
  781. bundle_data("electron_app_strings_${locale}_bundle_data") {
  782. sources = [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ]
  783. outputs = [ "{{bundle_resources_dir}}/$locale.lproj" ]
  784. public_deps = [ ":electron_app_lproj_dirs" ]
  785. }
  786. }
  787. group("electron_app_strings_bundle_data") {
  788. public_deps = []
  789. foreach(locale, locales_as_mac_outputs) {
  790. public_deps += [ ":electron_app_strings_${locale}_bundle_data" ]
  791. }
  792. }
  793. bundle_data("electron_app_resources") {
  794. public_deps = [
  795. ":default_app_asar",
  796. ":electron_app_strings_bundle_data",
  797. ]
  798. sources = [
  799. "$root_out_dir/resources/default_app.asar",
  800. "shell/browser/resources/mac/electron.icns",
  801. ]
  802. outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
  803. }
  804. mac_app_bundle("electron_app") {
  805. output_name = electron_product_name
  806. sources = filenames.app_sources
  807. sources += [ "shell/common/atom_constants.cc" ]
  808. include_dirs = [ "." ]
  809. deps = [
  810. ":electron_app_framework_bundle_data",
  811. ":electron_app_resources",
  812. ]
  813. if (is_mas_build) {
  814. deps += [ ":electron_login_helper_app" ]
  815. }
  816. info_plist = "shell/browser/resources/mac/Info.plist"
  817. extra_substitutions = [
  818. "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id",
  819. "ELECTRON_VERSION=$electron_version",
  820. ]
  821. ldflags = [
  822. "-rpath",
  823. "@executable_path/../Frameworks",
  824. ]
  825. }
  826. if (enable_dsyms) {
  827. extract_symbols("electron_framework_syms") {
  828. binary = "$root_out_dir/$electron_framework_name.framework/Versions/$electron_framework_version/$electron_framework_name"
  829. symbol_dir = "$root_out_dir/breakpad_symbols"
  830. dsym_file = "$root_out_dir/$electron_framework_name.dSYM/Contents/Resources/DWARF/$electron_framework_name"
  831. deps = [ ":electron_framework" ]
  832. }
  833. foreach(helper_params, content_mac_helpers) {
  834. _helper_target = helper_params[0]
  835. _helper_bundle_id = helper_params[1]
  836. _helper_suffix = helper_params[2]
  837. extract_symbols("electron_helper_syms_${_helper_target}") {
  838. binary = "$root_out_dir/$electron_helper_name${_helper_suffix}.app/Contents/MacOS/$electron_helper_name${_helper_suffix}"
  839. symbol_dir = "$root_out_dir/breakpad_symbols"
  840. dsym_file = "$root_out_dir/$electron_helper_name${_helper_suffix}.dSYM/Contents/Resources/DWARF/$electron_helper_name${_helper_suffix}"
  841. deps = [ ":electron_helper_app_${_helper_target}" ]
  842. }
  843. }
  844. extract_symbols("electron_app_syms") {
  845. binary = "$root_out_dir/$electron_product_name.app/Contents/MacOS/$electron_product_name"
  846. symbol_dir = "$root_out_dir/breakpad_symbols"
  847. dsym_file = "$root_out_dir/$electron_product_name.dSYM/Contents/Resources/DWARF/$electron_product_name"
  848. deps = [ ":electron_app" ]
  849. }
  850. extract_symbols("swiftshader_egl_syms") {
  851. binary = "$root_out_dir/libswiftshader_libEGL.dylib"
  852. symbol_dir = "$root_out_dir/breakpad_symbols"
  853. dsym_file = "$root_out_dir/libswiftshader_libEGL.dylib.dSYM/Contents/Resources/DWARF/libswiftshader_libEGL.dylib"
  854. deps =
  855. [ "//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL" ]
  856. }
  857. extract_symbols("swiftshader_gles_syms") {
  858. binary = "$root_out_dir/libswiftshader_libGLESv2.dylib"
  859. symbol_dir = "$root_out_dir/breakpad_symbols"
  860. dsym_file = "$root_out_dir/libswiftshader_libGLESv2.dylib.dSYM/Contents/Resources/DWARF/libswiftshader_libGLESv2.dylib"
  861. deps = [
  862. "//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2",
  863. ]
  864. }
  865. extract_symbols("crashpad_handler_syms") {
  866. binary = "$root_out_dir/crashpad_handler"
  867. symbol_dir = "$root_out_dir/breakpad_symbols"
  868. dsym_file = "$root_out_dir/crashpad_handler.dSYM/Contents/Resources/DWARF/crashpad_handler"
  869. deps = [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ]
  870. }
  871. group("electron_symbols") {
  872. deps = [
  873. ":crashpad_handler_syms",
  874. ":electron_app_syms",
  875. ":electron_framework_syms",
  876. ":swiftshader_egl_syms",
  877. ":swiftshader_gles_syms",
  878. ]
  879. foreach(helper_params, content_mac_helpers) {
  880. _helper_target = helper_params[0]
  881. deps += [ ":electron_helper_syms_${_helper_target}" ]
  882. }
  883. }
  884. } else {
  885. group("electron_symbols") {
  886. }
  887. }
  888. } else {
  889. windows_manifest("electron_app_manifest") {
  890. sources = [
  891. "shell/browser/resources/win/disable_window_filtering.manifest",
  892. "shell/browser/resources/win/dpi_aware.manifest",
  893. as_invoker_manifest,
  894. common_controls_manifest,
  895. default_compatibility_manifest,
  896. ]
  897. }
  898. executable("electron_app") {
  899. output_name = electron_project_name
  900. sources = filenames.app_sources
  901. include_dirs = [ "." ]
  902. deps = [
  903. ":default_app_asar",
  904. ":electron_app_manifest",
  905. ":electron_lib",
  906. ":packed_resources",
  907. "//content:sandbox_helper_win",
  908. "//electron/buildflags",
  909. "//ui/strings",
  910. ]
  911. data = []
  912. data += [ "$root_out_dir/resources.pak" ]
  913. data += [ "$root_out_dir/chrome_100_percent.pak" ]
  914. if (enable_hidpi) {
  915. data += [ "$root_out_dir/chrome_200_percent.pak" ]
  916. }
  917. foreach(locale, locales) {
  918. data += [ "$root_out_dir/locales/$locale.pak" ]
  919. }
  920. if (!is_mac) {
  921. data += [ "$root_out_dir/resources/default_app.asar" ]
  922. }
  923. public_deps = [ "//tools/v8_context_snapshot:v8_context_snapshot" ]
  924. if (is_win) {
  925. sources += [
  926. # TODO: we should be generating our .rc files more like how chrome does
  927. "shell/browser/resources/win/atom.rc",
  928. "shell/browser/resources/win/resource.h",
  929. ]
  930. libs = [
  931. "comctl32.lib",
  932. "uiautomationcore.lib",
  933. "wtsapi32.lib",
  934. ]
  935. configs += [ "//build/config/win:windowed" ]
  936. ldflags = [
  937. # Windows 7 doesn't have these DLLs.
  938. # TODO: are there other DLLs we need to list here to be win7
  939. # compatible?
  940. "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
  941. "/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
  942. ]
  943. # This is to support renaming of electron.exe. node-gyp has hard-coded
  944. # executable names which it will recognise as node. This module definition
  945. # file claims that the electron executable is in fact named "node.exe",
  946. # which is one of the executable names that node-gyp recognizes.
  947. # See https://github.com/nodejs/node-gyp/commit/52ceec3a6d15de3a8f385f43dbe5ecf5456ad07a
  948. ldflags += [ "/DEF:" + rebase_path("build/electron.def", root_build_dir) ]
  949. inputs = [
  950. "shell/browser/resources/win/atom.ico",
  951. "build/electron.def",
  952. ]
  953. }
  954. if (is_linux) {
  955. ldflags = [ "-pie" ]
  956. if (!is_component_build && is_component_ffmpeg) {
  957. configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
  958. }
  959. }
  960. }
  961. if (is_official_build) {
  962. if (is_linux) {
  963. _target_executable_suffix = ""
  964. _target_shared_library_suffix = ".so"
  965. } else if (is_win) {
  966. _target_executable_suffix = ".exe"
  967. _target_shared_library_suffix = ".dll"
  968. }
  969. extract_symbols("electron_app_symbols") {
  970. binary = "$root_out_dir/$electron_project_name$_target_executable_suffix"
  971. symbol_dir = "$root_out_dir/breakpad_symbols"
  972. deps = [ ":electron_app" ]
  973. }
  974. extract_symbols("swiftshader_egl_symbols") {
  975. binary = "$root_out_dir/swiftshader/libEGL$_target_shared_library_suffix"
  976. symbol_dir = "$root_out_dir/breakpad_symbols"
  977. deps =
  978. [ "//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL" ]
  979. }
  980. extract_symbols("swiftshader_gles_symbols") {
  981. binary =
  982. "$root_out_dir/swiftshader/libGLESv2$_target_shared_library_suffix"
  983. symbol_dir = "$root_out_dir/breakpad_symbols"
  984. deps = [
  985. "//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2",
  986. ]
  987. }
  988. group("electron_symbols") {
  989. deps = [
  990. ":electron_app_symbols",
  991. ":swiftshader_egl_symbols",
  992. ":swiftshader_gles_symbols",
  993. ]
  994. }
  995. }
  996. }
  997. test("shell_browser_ui_unittests") {
  998. sources = [
  999. "//electron/shell/browser/ui/accelerator_util_unittests.cc",
  1000. "//electron/shell/browser/ui/run_all_unittests.cc",
  1001. ]
  1002. configs += [ ":electron_lib_config" ]
  1003. deps = [
  1004. ":electron_lib",
  1005. "//base",
  1006. "//base/test:test_support",
  1007. "//testing/gmock",
  1008. "//testing/gtest",
  1009. "//ui/base",
  1010. "//ui/strings",
  1011. ]
  1012. if (is_mac) {
  1013. # Resolve paths owing to different test executable locations
  1014. ldflags = [
  1015. "-F",
  1016. rebase_path("external_binaries", root_build_dir),
  1017. "-rpath",
  1018. "@loader_path",
  1019. "-rpath",
  1020. "@executable_path/" + rebase_path("external_binaries", root_build_dir),
  1021. ]
  1022. }
  1023. }
  1024. template("dist_zip") {
  1025. _runtime_deps_target = "${target_name}__deps"
  1026. _runtime_deps_file =
  1027. "$root_out_dir/gen.runtime/" + get_label_info(target_name, "dir") + "/" +
  1028. get_label_info(target_name, "name") + ".runtime_deps"
  1029. group(_runtime_deps_target) {
  1030. forward_variables_from(invoker,
  1031. [
  1032. "deps",
  1033. "data_deps",
  1034. "data",
  1035. "testonly",
  1036. ])
  1037. write_runtime_deps = _runtime_deps_file
  1038. }
  1039. action(target_name) {
  1040. script = "//electron/build/zip.py"
  1041. deps = [ ":$_runtime_deps_target" ]
  1042. forward_variables_from(invoker,
  1043. [
  1044. "outputs",
  1045. "testonly",
  1046. ])
  1047. flatten = false
  1048. if (defined(invoker.flatten)) {
  1049. flatten = invoker.flatten
  1050. }
  1051. args = rebase_path(outputs + [ _runtime_deps_file ], root_build_dir) + [
  1052. target_cpu,
  1053. target_os,
  1054. "$flatten",
  1055. ]
  1056. }
  1057. }
  1058. copy("electron_license") {
  1059. sources = [ "LICENSE" ]
  1060. outputs = [ "$root_build_dir/{{source_file_part}}" ]
  1061. }
  1062. copy("chromium_licenses") {
  1063. deps = [ "//components/resources:about_credits" ]
  1064. sources = [ "$root_gen_dir/components/resources/about_credits.html" ]
  1065. outputs = [ "$root_build_dir/LICENSES.chromium.html" ]
  1066. }
  1067. group("licenses") {
  1068. data_deps = [
  1069. ":chromium_licenses",
  1070. ":electron_license",
  1071. ]
  1072. }
  1073. copy("electron_version") {
  1074. sources = [ "ELECTRON_VERSION" ]
  1075. outputs = [ "$root_build_dir/version" ]
  1076. }
  1077. dist_zip("electron_dist_zip") {
  1078. data_deps = [
  1079. ":electron_app",
  1080. ":electron_version",
  1081. ":licenses",
  1082. ]
  1083. if (is_linux) {
  1084. data_deps += [ "//sandbox/linux:chrome_sandbox" ]
  1085. }
  1086. outputs = [ "$root_build_dir/dist.zip" ]
  1087. }
  1088. dist_zip("electron_ffmpeg_zip") {
  1089. data_deps = [ "//third_party/ffmpeg" ]
  1090. outputs = [ "$root_build_dir/ffmpeg.zip" ]
  1091. }
  1092. dist_zip("electron_chromedriver_zip") {
  1093. testonly = true
  1094. data_deps = [
  1095. ":licenses",
  1096. "//chrome/test/chromedriver",
  1097. ]
  1098. outputs = [ "$root_build_dir/chromedriver.zip" ]
  1099. }
  1100. mksnapshot_deps = [
  1101. ":licenses",
  1102. "//tools/v8_context_snapshot:v8_context_snapshot_generator",
  1103. "//v8:mksnapshot($v8_snapshot_toolchain)",
  1104. ]
  1105. group("electron_mksnapshot") {
  1106. public_deps = mksnapshot_deps
  1107. }
  1108. dist_zip("electron_mksnapshot_zip") {
  1109. data_deps = mksnapshot_deps
  1110. outputs = [ "$root_build_dir/mksnapshot.zip" ]
  1111. }
  1112. copy("hunspell_dictionaries") {
  1113. sources = hunspell_dictionaries + hunspell_licenses
  1114. outputs = [ "$target_gen_dir/electron_hunspell/{{source_file_part}}" ]
  1115. }
  1116. dist_zip("hunspell_dictionaries_zip") {
  1117. data_deps = [ ":hunspell_dictionaries" ]
  1118. flatten = true
  1119. outputs = [ "$root_build_dir/hunspell_dictionaries.zip" ]
  1120. }
  1121. group("electron") {
  1122. public_deps = [ ":electron_app" ]
  1123. }