electron.gyp 23 KB

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