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