electron.gyp 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. {
  2. 'variables': {
  3. 'project_name%': 'electron',
  4. 'product_name%': 'Electron',
  5. 'company_name%': 'GitHub, Inc',
  6. 'company_abbr%': 'github',
  7. 'version%': '1.7.0',
  8. 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c',
  9. },
  10. 'includes': [
  11. 'filenames.gypi',
  12. 'vendor/native_mate/native_mate_files.gypi',
  13. ],
  14. 'target_defaults': {
  15. 'defines': [
  16. 'ATOM_PRODUCT_NAME="<(product_name)"',
  17. 'ATOM_PROJECT_NAME="<(project_name)"',
  18. ],
  19. 'conditions': [
  20. ['OS=="mac"', {
  21. 'mac_framework_dirs': [
  22. '<(source_root)/external_binaries',
  23. ],
  24. }],
  25. ],
  26. },
  27. 'targets': [
  28. {
  29. 'target_name': '<(project_name)',
  30. 'type': 'executable',
  31. 'dependencies': [
  32. 'js2asar',
  33. 'app2asar',
  34. '<(project_name)_lib',
  35. ],
  36. 'sources': [
  37. '<@(app_sources)',
  38. ],
  39. 'include_dirs': [
  40. '.',
  41. ],
  42. 'conditions': [
  43. ['OS=="mac"', {
  44. 'product_name': '<(product_name)',
  45. 'mac_bundle': 1,
  46. 'dependencies!': [
  47. '<(project_name)_lib',
  48. ],
  49. 'dependencies': [
  50. '<(project_name)_framework',
  51. '<(project_name)_helper',
  52. ],
  53. 'xcode_settings': {
  54. 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name)',
  55. 'INFOPLIST_FILE': 'atom/browser/resources/mac/Info.plist',
  56. 'LD_RUNPATH_SEARCH_PATHS': [
  57. '@executable_path/../Frameworks',
  58. ],
  59. },
  60. 'mac_bundle_resources': [
  61. '<@(bundle_sources)',
  62. ],
  63. 'copies': [
  64. {
  65. 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
  66. 'files': [
  67. '<(PRODUCT_DIR)/<(product_name) Helper.app',
  68. '<(PRODUCT_DIR)/<(product_name) Framework.framework',
  69. ],
  70. },
  71. ],
  72. 'postbuilds': [
  73. {
  74. # This postbuid step is responsible for creating the following
  75. # helpers:
  76. #
  77. # <(product_name) EH.app and <(product_name) NP.app are created
  78. # from <(product_name).app.
  79. #
  80. # The EH helper is marked for an executable heap. The NP helper
  81. # is marked for no PIE (ASLR).
  82. 'postbuild_name': 'Make More Helpers',
  83. 'action': [
  84. 'tools/mac/make_more_helpers.sh',
  85. 'Frameworks',
  86. '<(product_name)',
  87. ],
  88. },
  89. # The application doesn't have real localizations, it just has
  90. # empty .lproj directories, which is enough to convince Cocoa
  91. # that Electron supports those languages.
  92. {
  93. 'postbuild_name': 'Make Empty Localizations',
  94. 'variables': {
  95. 'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
  96. 'locale_dirs': [
  97. '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
  98. ],
  99. },
  100. 'action': [
  101. 'tools/mac/make_locale_dirs.sh',
  102. '<@(locale_dirs)',
  103. ],
  104. },
  105. ],
  106. 'conditions': [
  107. ['mas_build==0', {
  108. 'copies': [
  109. {
  110. 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
  111. 'files': [
  112. 'external_binaries/Squirrel.framework',
  113. 'external_binaries/ReactiveCocoa.framework',
  114. 'external_binaries/Mantle.framework',
  115. ],
  116. },
  117. ],
  118. }],
  119. ],
  120. }], # OS!="mac"
  121. ['OS=="win"', {
  122. 'include_dirs': [
  123. '<(libchromiumcontent_dir)/gen/ui/resources',
  124. ],
  125. 'msvs_settings': {
  126. 'VCManifestTool': {
  127. 'EmbedManifest': 'true',
  128. 'AdditionalManifestFiles': 'atom/browser/resources/win/atom.manifest',
  129. },
  130. 'VCLinkerTool': {
  131. # Chrome builds with this minimum environment which makes e.g.
  132. # GetSystemMetrics(SM_CXSIZEFRAME) return Windows XP/2003
  133. # compatible metrics. See: https://crbug.com/361720
  134. #
  135. # The following two settings translate to a linker flag
  136. # of /SUBSYSTEM:WINDOWS,5.02
  137. 'MinimumRequiredVersion': '5.02',
  138. 'SubSystem': '2',
  139. },
  140. },
  141. 'copies': [
  142. {
  143. 'variables': {
  144. 'conditions': [
  145. ['libchromiumcontent_component', {
  146. 'copied_libraries': [
  147. '<@(libchromiumcontent_shared_libraries)',
  148. '<@(libchromiumcontent_shared_v8_libraries)',
  149. ],
  150. }, {
  151. 'copied_libraries': [
  152. '<(libchromiumcontent_dir)/ffmpeg.dll',
  153. ],
  154. }],
  155. ],
  156. },
  157. 'destination': '<(PRODUCT_DIR)',
  158. 'files': [
  159. '<@(copied_libraries)',
  160. '<(libchromiumcontent_dir)/locales',
  161. '<(libchromiumcontent_dir)/libEGL.dll',
  162. '<(libchromiumcontent_dir)/libGLESv2.dll',
  163. '<(libchromiumcontent_dir)/icudtl.dat',
  164. '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
  165. '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
  166. '<(libchromiumcontent_dir)/content_shell.pak',
  167. '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
  168. '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
  169. '<(libchromiumcontent_dir)/natives_blob.bin',
  170. '<(libchromiumcontent_dir)/snapshot_blob.bin',
  171. 'external_binaries/d3dcompiler_47.dll',
  172. ],
  173. },
  174. ],
  175. }, {
  176. 'dependencies': [
  177. 'vendor/breakpad/breakpad.gyp:dump_syms#host',
  178. ],
  179. }], # OS=="win"
  180. ['OS=="linux"', {
  181. 'copies': [
  182. {
  183. 'variables': {
  184. 'conditions': [
  185. ['libchromiumcontent_component', {
  186. 'copied_libraries': [
  187. '<(PRODUCT_DIR)/lib/libnode.so',
  188. '<@(libchromiumcontent_shared_libraries)',
  189. '<@(libchromiumcontent_shared_v8_libraries)',
  190. ],
  191. }, {
  192. 'copied_libraries': [
  193. '<(PRODUCT_DIR)/lib/libnode.so',
  194. '<(libchromiumcontent_dir)/libffmpeg.so',
  195. ],
  196. }],
  197. ],
  198. },
  199. 'destination': '<(PRODUCT_DIR)',
  200. 'files': [
  201. '<@(copied_libraries)',
  202. '<(libchromiumcontent_dir)/locales',
  203. '<(libchromiumcontent_dir)/icudtl.dat',
  204. '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
  205. '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
  206. '<(libchromiumcontent_dir)/content_shell.pak',
  207. '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
  208. '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
  209. '<(libchromiumcontent_dir)/natives_blob.bin',
  210. '<(libchromiumcontent_dir)/snapshot_blob.bin',
  211. ],
  212. },
  213. ],
  214. }], # OS=="linux"
  215. ],
  216. }, # target <(project_name)
  217. {
  218. 'target_name': '<(project_name)_lib',
  219. 'type': 'static_library',
  220. 'dependencies': [
  221. 'atom_js2c',
  222. 'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
  223. 'brightray/brightray.gyp:brightray',
  224. 'vendor/node/node.gyp:node',
  225. ],
  226. 'defines': [
  227. # We need to access internal implementations of Node.
  228. 'NODE_WANT_INTERNALS=1',
  229. 'NODE_SHARED_MODE',
  230. # This is defined in skia/skia_common.gypi.
  231. 'SK_SUPPORT_LEGACY_GETTOPDEVICE',
  232. # Disable warnings for g_settings_list_schemas.
  233. 'GLIB_DISABLE_DEPRECATION_WARNINGS',
  234. # Defined in Chromium but not exposed in its gyp file.
  235. 'V8_USE_EXTERNAL_STARTUP_DATA',
  236. 'V8_SHARED',
  237. 'USING_V8_SHARED',
  238. 'USING_V8_PLATFORM_SHARED',
  239. 'USING_V8_BASE_SHARED',
  240. ],
  241. 'sources': [
  242. '<@(lib_sources)',
  243. ],
  244. 'include_dirs': [
  245. '.',
  246. 'chromium_src',
  247. 'brightray',
  248. 'vendor/native_mate',
  249. # Include atom_natives.h.
  250. '<(SHARED_INTERMEDIATE_DIR)',
  251. # Include directories for uv and node.
  252. 'vendor/node/src',
  253. 'vendor/node/deps/http_parser',
  254. 'vendor/node/deps/uv/include',
  255. # The `node.h` is using `#include"v8.h"`.
  256. '<(libchromiumcontent_src_dir)/v8/include',
  257. # The `node.h` is using `#include"ares.h"`.
  258. 'vendor/node/deps/cares/include',
  259. # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
  260. '<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
  261. # The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
  262. '<(libchromiumcontent_src_dir)/third_party/libyuv/include',
  263. # The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
  264. '<(libchromiumcontent_src_dir)/third_party/',
  265. '<(libchromiumcontent_src_dir)/components/cdm',
  266. '<(libchromiumcontent_src_dir)/third_party/widevine',
  267. ],
  268. 'direct_dependent_settings': {
  269. 'include_dirs': [
  270. '.',
  271. ],
  272. },
  273. 'export_dependent_settings': [
  274. 'brightray/brightray.gyp:brightray',
  275. ],
  276. 'conditions': [
  277. ['libchromiumcontent_component', {
  278. 'link_settings': {
  279. 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
  280. },
  281. }],
  282. ['OS=="win"', {
  283. 'sources': [
  284. '<@(lib_sources_win)',
  285. ],
  286. 'link_settings': {
  287. 'libraries': [
  288. '-limm32.lib',
  289. '-loleacc.lib',
  290. '-lcomctl32.lib',
  291. '-lcomdlg32.lib',
  292. '-lwininet.lib',
  293. '-lwinmm.lib',
  294. '-lcrypt32.lib',
  295. '-luiautomationcore.lib',
  296. ],
  297. },
  298. 'dependencies': [
  299. # Node is built as static_library on Windows, so we also need to
  300. # include its dependencies here.
  301. 'vendor/node/deps/cares/cares.gyp:cares',
  302. 'vendor/node/deps/http_parser/http_parser.gyp:http_parser',
  303. 'vendor/node/deps/uv/uv.gyp:libuv',
  304. 'vendor/node/deps/zlib/zlib.gyp:zlib',
  305. # Build with breakpad support.
  306. 'vendor/breakpad/breakpad.gyp:breakpad_handler',
  307. 'vendor/breakpad/breakpad.gyp:breakpad_sender',
  308. ],
  309. }], # OS=="win"
  310. ['OS=="mac" and mas_build==0', {
  311. 'dependencies': [
  312. 'vendor/crashpad/client/client.gyp:crashpad_client',
  313. 'vendor/crashpad/handler/handler.gyp:crashpad_handler',
  314. ],
  315. 'link_settings': {
  316. # Do not link with QTKit for mas build.
  317. 'libraries': [
  318. '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
  319. ],
  320. },
  321. 'xcode_settings': {
  322. # ReactiveCocoa which is used by Squirrel requires using __weak.
  323. 'CLANG_ENABLE_OBJC_WEAK': 'YES',
  324. },
  325. }], # OS=="mac" and mas_build==0
  326. ['OS=="mac" and mas_build==1', {
  327. 'defines': [
  328. 'MAS_BUILD',
  329. ],
  330. 'sources!': [
  331. 'atom/browser/auto_updater_mac.mm',
  332. 'atom/common/crash_reporter/crash_reporter_mac.h',
  333. 'atom/common/crash_reporter/crash_reporter_mac.mm',
  334. ],
  335. }], # OS=="mac" and mas_build==1
  336. ['OS=="linux"', {
  337. 'sources': [
  338. '<@(lib_sources_linux)',
  339. '<@(lib_sources_nss)',
  340. ],
  341. 'link_settings': {
  342. 'ldflags': [
  343. # Make binary search for libraries under current directory, so we
  344. # don't have to manually set $LD_LIBRARY_PATH:
  345. # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
  346. '-rpath \$$ORIGIN',
  347. # Make native module dynamic loading work.
  348. '-rdynamic',
  349. ],
  350. },
  351. # Required settings of using breakpad.
  352. 'cflags_cc': [
  353. '-Wno-empty-body',
  354. '-Wno-reserved-user-defined-literal',
  355. ],
  356. 'include_dirs': [
  357. 'vendor/breakpad/src',
  358. ],
  359. 'dependencies': [
  360. 'vendor/breakpad/breakpad.gyp:breakpad_client',
  361. ],
  362. }], # OS=="linux"
  363. ],
  364. }, # target <(product_name)_lib
  365. {
  366. 'target_name': 'js2asar',
  367. 'type': 'none',
  368. 'actions': [
  369. {
  370. 'action_name': 'js2asar',
  371. 'variables': {
  372. 'conditions': [
  373. ['OS=="mac"', {
  374. 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
  375. },{
  376. 'resources_path': '<(PRODUCT_DIR)/resources',
  377. }],
  378. ],
  379. },
  380. 'inputs': [
  381. '<@(js_sources)',
  382. ],
  383. 'outputs': [
  384. '<(resources_path)/electron.asar',
  385. ],
  386. 'action': [
  387. 'python',
  388. 'tools/js2asar.py',
  389. '<@(_outputs)',
  390. 'lib',
  391. '<@(_inputs)',
  392. ],
  393. }
  394. ],
  395. }, # target js2asar
  396. {
  397. 'target_name': 'app2asar',
  398. 'type': 'none',
  399. 'actions': [
  400. {
  401. 'action_name': 'app2asar',
  402. 'variables': {
  403. 'conditions': [
  404. ['OS=="mac"', {
  405. 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
  406. },{
  407. 'resources_path': '<(PRODUCT_DIR)/resources',
  408. }],
  409. ],
  410. },
  411. 'inputs': [
  412. '<@(default_app_sources)',
  413. ],
  414. 'outputs': [
  415. '<(resources_path)/default_app.asar',
  416. ],
  417. 'action': [
  418. 'python',
  419. 'tools/js2asar.py',
  420. '<@(_outputs)',
  421. 'default_app',
  422. '<@(_inputs)',
  423. ],
  424. }
  425. ],
  426. }, # target app2asar
  427. {
  428. 'target_name': 'atom_js2c_copy',
  429. 'type': 'none',
  430. 'copies': [
  431. {
  432. 'destination': '<(js2c_input_dir)',
  433. 'files': [
  434. '<@(js2c_sources)',
  435. ],
  436. },
  437. ],
  438. }, # target atom_js2c_copy
  439. {
  440. 'target_name': 'atom_browserify',
  441. 'type': 'none',
  442. 'dependencies': [
  443. # depend on this target to ensure the '<(js2c_input_dir)' is created
  444. 'atom_js2c_copy',
  445. ],
  446. 'variables': {
  447. 'sandbox_args': [
  448. './lib/sandboxed_renderer/init.js',
  449. '-r',
  450. './lib/sandboxed_renderer/api/exports/electron.js:electron',
  451. '-r',
  452. './lib/sandboxed_renderer/api/exports/fs.js:fs',
  453. '-r',
  454. './lib/sandboxed_renderer/api/exports/os.js:os',
  455. '-r',
  456. './lib/sandboxed_renderer/api/exports/path.js:path',
  457. '-r',
  458. './lib/sandboxed_renderer/api/exports/child_process.js:child_process'
  459. ],
  460. 'isolated_args': [
  461. 'lib/isolated_renderer/init.js',
  462. ]
  463. },
  464. 'actions': [
  465. {
  466. 'action_name': 'atom_browserify_sandbox',
  467. 'inputs': [
  468. '<!@(python tools/list-browserify-deps.py <(sandbox_args))'
  469. ],
  470. 'outputs': [
  471. '<(js2c_input_dir)/preload_bundle.js',
  472. ],
  473. 'action': [
  474. 'npm',
  475. 'run',
  476. '--silent',
  477. 'browserify',
  478. '--',
  479. '<@(sandbox_args)',
  480. '-o',
  481. '<@(_outputs)',
  482. ],
  483. },
  484. {
  485. 'action_name': 'atom_browserify_isolated_context',
  486. 'inputs': [
  487. '<!@(python tools/list-browserify-deps.py <(isolated_args))'
  488. ],
  489. 'outputs': [
  490. '<(js2c_input_dir)/isolated_bundle.js',
  491. ],
  492. 'action': [
  493. 'npm',
  494. 'run',
  495. '--silent',
  496. 'browserify',
  497. '--',
  498. '<@(isolated_args)',
  499. '-o',
  500. '<@(_outputs)',
  501. ],
  502. },
  503. ],
  504. }, # target atom_browserify
  505. {
  506. 'target_name': 'atom_js2c',
  507. 'type': 'none',
  508. 'dependencies': [
  509. 'atom_js2c_copy',
  510. 'atom_browserify',
  511. ],
  512. 'actions': [
  513. {
  514. 'action_name': 'atom_js2c',
  515. 'inputs': [
  516. # List all input files that should trigger a rebuild with js2c
  517. '<@(js2c_sources)',
  518. '<(js2c_input_dir)/preload_bundle.js',
  519. '<(js2c_input_dir)/isolated_bundle.js',
  520. ],
  521. 'outputs': [
  522. '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
  523. ],
  524. 'action': [
  525. 'python',
  526. 'tools/js2c.py',
  527. '<@(_outputs)',
  528. '<(js2c_input_dir)',
  529. ],
  530. }
  531. ],
  532. }, # target atom_js2c
  533. ],
  534. 'conditions': [
  535. ['OS=="mac"', {
  536. 'targets': [
  537. {
  538. 'target_name': '<(project_name)_framework',
  539. 'product_name': '<(product_name) Framework',
  540. 'type': 'shared_library',
  541. 'dependencies': [
  542. '<(project_name)_lib',
  543. ],
  544. 'sources': [
  545. '<@(framework_sources)',
  546. ],
  547. 'include_dirs': [
  548. '.',
  549. 'vendor',
  550. '<(libchromiumcontent_src_dir)',
  551. ],
  552. 'export_dependent_settings': [
  553. '<(project_name)_lib',
  554. ],
  555. 'link_settings': {
  556. 'libraries': [
  557. '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
  558. '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
  559. '$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
  560. '$(SDKROOT)/System/Library/Frameworks/Security.framework',
  561. '$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework',
  562. ],
  563. },
  564. 'mac_bundle': 1,
  565. 'mac_bundle_resources': [
  566. 'atom/common/resources/mac/MainMenu.xib',
  567. '<(libchromiumcontent_dir)/content_shell.pak',
  568. '<(libchromiumcontent_dir)/icudtl.dat',
  569. '<(libchromiumcontent_dir)/natives_blob.bin',
  570. '<(libchromiumcontent_dir)/snapshot_blob.bin',
  571. '<(PRODUCT_DIR)/pdf_viewer_resources.pak',
  572. ],
  573. 'xcode_settings': {
  574. 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
  575. 'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
  576. 'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
  577. 'LD_RUNPATH_SEARCH_PATHS': [
  578. '@loader_path/Libraries',
  579. ],
  580. 'OTHER_LDFLAGS': [
  581. '-ObjC',
  582. ],
  583. },
  584. 'copies': [
  585. {
  586. 'variables': {
  587. 'conditions': [
  588. ['libchromiumcontent_component', {
  589. 'copied_libraries': [
  590. '<(PRODUCT_DIR)/libnode.dylib',
  591. '<@(libchromiumcontent_shared_libraries)',
  592. '<@(libchromiumcontent_shared_v8_libraries)',
  593. ],
  594. }, {
  595. 'copied_libraries': [
  596. '<(PRODUCT_DIR)/libnode.dylib',
  597. '<(libchromiumcontent_dir)/libffmpeg.dylib',
  598. ],
  599. }],
  600. ],
  601. },
  602. 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
  603. 'files': [
  604. '<@(copied_libraries)',
  605. ],
  606. },
  607. ],
  608. 'postbuilds': [
  609. {
  610. 'postbuild_name': 'Fix path of libnode',
  611. 'action': [
  612. 'install_name_tool',
  613. '-change',
  614. '/usr/local/lib/libnode.dylib',
  615. '@rpath/libnode.dylib',
  616. '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
  617. ],
  618. },
  619. {
  620. 'postbuild_name': 'Add symlinks for framework subdirectories',
  621. 'action': [
  622. 'tools/mac/create-framework-subdir-symlinks.sh',
  623. '<(product_name) Framework',
  624. 'Libraries',
  625. ],
  626. },
  627. {
  628. 'postbuild_name': 'Copy locales',
  629. 'action': [
  630. 'tools/mac/copy-locales.py',
  631. '-d',
  632. '<(libchromiumcontent_dir)/locales',
  633. '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
  634. '<@(locales)',
  635. ],
  636. },
  637. ],
  638. 'conditions': [
  639. ['mas_build==0', {
  640. 'link_settings': {
  641. 'libraries': [
  642. 'external_binaries/Squirrel.framework',
  643. 'external_binaries/ReactiveCocoa.framework',
  644. 'external_binaries/Mantle.framework',
  645. ],
  646. },
  647. 'copies': [
  648. {
  649. 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
  650. 'files': [
  651. '<(PRODUCT_DIR)/crashpad_handler',
  652. ],
  653. },
  654. ],
  655. }],
  656. ],
  657. }, # target framework
  658. {
  659. 'target_name': '<(project_name)_helper',
  660. 'product_name': '<(product_name) Helper',
  661. 'type': 'executable',
  662. 'dependencies': [
  663. '<(project_name)_framework',
  664. ],
  665. 'sources': [
  666. '<@(app_sources)',
  667. ],
  668. 'include_dirs': [
  669. '.',
  670. ],
  671. 'mac_bundle': 1,
  672. 'xcode_settings': {
  673. 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
  674. 'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
  675. 'LD_RUNPATH_SEARCH_PATHS': [
  676. '@executable_path/../../..',
  677. ],
  678. },
  679. }, # target helper
  680. ],
  681. }], # OS!="mac"
  682. ],
  683. }