BUILD.gn 37 KB

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