[Tizen] Add prelauncher
[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           'dependencies': [
225             '<(DEPTH)/efl/build/system.gyp:ecore',
226             '<(DEPTH)/efl/build/system.gyp:launchpad',
227             'atom/app/loader/loader.gyp:*',
228           ],
229           'ldflags': [
230             '-pie',
231             '-export-dynamic',
232           ],
233           'cflags': [ '-fPIC' ],
234           'cflags_cc': [ '-fPIC' ],
235         }],  # is_tizen==1
236       ],
237     },  # target <(project_name)
238     {
239       'target_name': '<(project_name)_lib',
240       'type': 'static_library',
241       'dependencies': [
242         'atom_js2c',
243         'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
244         'vendor/brightray/brightray.gyp:brightray',
245         'vendor/node/node.gyp:node',
246       ],
247       'defines': [
248         # We need to access internal implementations of Node.
249         'NODE_WANT_INTERNALS=1',
250         'NODE_SHARED_MODE',
251         # This is defined in skia/skia_common.gypi.
252         'SK_SUPPORT_LEGACY_GETTOPDEVICE',
253         # Disable warnings for g_settings_list_schemas.
254         'GLIB_DISABLE_DEPRECATION_WARNINGS',
255         # Defined in Chromium but not exposed in its gyp file.
256         'V8_USE_EXTERNAL_STARTUP_DATA',
257         'V8_SHARED',
258         'USING_V8_SHARED',
259         'USING_V8_PLATFORM_SHARED',
260         'USING_V8_BASE_SHARED',
261         # Remove this after enable_plugins becomes a feature flag.
262         'ENABLE_PLUGINS',
263         'USE_PROPRIETARY_CODECS',
264       ],
265       'sources': [
266         '<@(lib_sources)',
267       ],
268       'include_dirs': [
269         '.',
270         'chromium_src',
271         'vendor/brightray',
272         'vendor/native_mate',
273         # Include atom_natives.h.
274         '<(SHARED_INTERMEDIATE_DIR)',
275         # Include directories for uv and node.
276         'vendor/node/src',
277         'vendor/node/deps/http_parser',
278         'vendor/node/deps/uv/include',
279         # The `node.h` is using `#include"v8.h"`.
280         '<(libchromiumcontent_src_dir)/v8/include',
281         # The `node.h` is using `#include"ares.h"`.
282         'vendor/node/deps/cares/include',
283         # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
284         '<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
285         # The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
286         '<(libchromiumcontent_src_dir)/third_party/libyuv/include',
287         # The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
288         '<(libchromiumcontent_src_dir)/third_party/',
289         '<(libchromiumcontent_src_dir)/components/cdm',
290         '<(libchromiumcontent_src_dir)/third_party/widevine',
291         '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
292       ],
293       'direct_dependent_settings': {
294         'include_dirs': [
295           '.',
296         ],
297       },
298       'export_dependent_settings': [
299         'vendor/brightray/brightray.gyp:brightray',
300       ],
301       'conditions': [
302         ['libchromiumcontent_component', {
303           'link_settings': {
304             'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
305           },
306         }],
307         ['OS=="win"', {
308           'sources': [
309             '<@(lib_sources_win)',
310           ],
311           'link_settings': {
312             'libraries': [
313               '-limm32.lib',
314               '-loleacc.lib',
315               '-lcomctl32.lib',
316               '-lcomdlg32.lib',
317               '-lwininet.lib',
318               '-lwinmm.lib',
319               '-lcrypt32.lib',
320               '-luiautomationcore.lib',
321             ],
322           },
323           'dependencies': [
324             # Node is built as static_library on Windows, so we also need to
325             # include its dependencies here.
326             'vendor/node/deps/cares/cares.gyp:cares',
327             'vendor/node/deps/http_parser/http_parser.gyp:http_parser',
328             'vendor/node/deps/uv/uv.gyp:libuv',
329             'vendor/node/deps/zlib/zlib.gyp:zlib',
330             # Build with breakpad support.
331             'vendor/breakpad/breakpad.gyp:breakpad_handler',
332             'vendor/breakpad/breakpad.gyp:breakpad_sender',
333           ],
334         }],  # OS=="win"
335         ['OS=="mac" and mas_build==0', {
336           'dependencies': [
337             'vendor/crashpad/client/client.gyp:crashpad_client',
338             'vendor/crashpad/handler/handler.gyp:crashpad_handler',
339           ],
340           'link_settings': {
341             # Do not link with QTKit for mas build.
342             'libraries': [
343               '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
344             ],
345           },
346           'xcode_settings': {
347             # ReactiveCocoa which is used by Squirrel requires using __weak.
348             'CLANG_ENABLE_OBJC_WEAK': 'YES',
349           },
350         }],  # OS=="mac" and mas_build==0
351         ['OS=="mac" and mas_build==1', {
352           'defines': [
353             'MAS_BUILD',
354           ],
355           'sources!': [
356             'atom/browser/auto_updater_mac.mm',
357             'atom/common/crash_reporter/crash_reporter_mac.h',
358             'atom/common/crash_reporter/crash_reporter_mac.mm',
359           ],
360         }],  # OS=="mac" and mas_build==1
361         ['OS=="linux"', {
362           'sources': [
363             '<@(lib_sources_linux)',
364             '<@(lib_sources_nss)',
365           ],
366           # Required settings of using breakpad.
367           'cflags_cc': [
368             '-Wno-empty-body',
369             '-Wno-reserved-user-defined-literal',
370           ],
371           'include_dirs': [
372             'vendor/breakpad/src',
373           ],
374           'dependencies': [
375             'vendor/breakpad/breakpad.gyp:breakpad_client',
376           ],
377         }],  # OS=="linux"
378         ['is_tizen==1', {
379           'cflags': [ '-fPIC' ],
380           'cflags_cc': [ '-fPIC' ],
381         }],  # is_tizen==1
382         ['use_efl==1', {
383           'conditions': [
384             ['is_tizen==1', {
385               'dependencies': [
386                 '<(DEPTH)/efl/build/system.gyp:elementary',
387                 '<(DEPTH)/efl/build/system.gyp:efl-extension',
388                 '<(DEPTH)/efl/build/system.gyp:evas',
389                 '<(DEPTH)/efl/build/system.gyp:icu',
390                 'electron_shell_copy',
391               ],
392             }, {
393               'dependencies': [
394                 '<(DEPTH)/efl/build/system.gyp:ecore-x',
395                 '<(DEPTH)/efl/build/system.gyp:elocation',
396                 '<(DEPTH)/efl/build/system.gyp:elementary',
397                 '<(DEPTH)/efl/build/system.gyp:evas',
398                 '<(DEPTH)/efl/build/system.gyp:icu',
399                 'electron_shell_copy',
400               ],
401             }],
402             ['tizen_product_tv==1', {
403               'dependencies': [
404                 '<(DEPTH)/efl/build/system.gyp:elementary',
405                 '<(DEPTH)/efl/build/system.gyp:efl-extension',
406                 '<(DEPTH)/efl/build/system.gyp:evas',
407                 '<(DEPTH)/efl/build/system.gyp:icu',
408                 '<(DEPTH)/efl/build/system.gyp:vd-win-util',
409                 'electron_shell_copy',
410               ],
411             }],
412           ],
413           'defines': [
414             'USE_SYSTEM_ICU',
415           ],
416           'sources': [
417             'chromium_src/chrome/browser/icon_loader_efllinux.cc',
418           ],
419         }, {
420           'link_settings': {
421             'ldflags': [
422               # Make binary search for libraries under current directory, so we
423               # don't have to manually set $LD_LIBRARY_PATH:
424               # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
425               '-rpath \$$ORIGIN',
426               # Make native module dynamic loading work.
427               '-rdynamic',
428             ],
429           },
430         }],  # use_efl==1
431         ['desktop_linux==1 or is_tizen==1', {
432           'sources/': [
433             # chromium-efl supports only tizen webrtc using CAPI
434             # which is not working on desktop linux.
435             ['exclude', 'atom/browser/api/atom_api_desktop_capturer.cc'],
436             ['exclude', 'atom/browser/api/atom_api_desktop_capturer.h'],
437           ],
438         }],  # desktop_linux==1
439       ],
440     },  # target <(product_name)_lib
441     {
442       'target_name': 'electron_shell_copy',
443       'type': 'none',
444       'copies': [
445         {
446           'destination': '<(PRODUCT_DIR)',
447           'files': [
448             '<(DEPTH)/efl/build/desktop/electron.sh',
449             '<(DEPTH)/efl/build/desktop/launch.sh',
450           ],
451         },
452       ],
453     },  # target atom_js2c_copy
454     {
455       'target_name': 'js2asar',
456       'type': 'none',
457       'actions': [
458         {
459           'action_name': 'js2asar',
460           'variables': {
461             'conditions': [
462               ['OS=="mac"', {
463                 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
464               },{
465                 'resources_path': '<(PRODUCT_DIR)/resources',
466               }],
467             ],
468           },
469           'inputs': [
470             '<@(js_sources)',
471           ],
472           'outputs': [
473             '<(resources_path)/electron.asar',
474           ],
475           'action': [
476             'python',
477             'tools/js2asar.py',
478             '<@(_outputs)',
479             'lib',
480             '<@(_inputs)',
481           ],
482         }
483       ],
484     },  # target js2asar
485     {
486       'target_name': 'app2asar',
487       'type': 'none',
488       'actions': [
489         {
490           'action_name': 'app2asar',
491           'variables': {
492             'conditions': [
493               ['OS=="mac"', {
494                 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
495               },{
496                 'resources_path': '<(PRODUCT_DIR)/resources',
497               }],
498             ],
499           },
500           'inputs': [
501             '<@(default_app_sources)',
502           ],
503           'outputs': [
504             '<(resources_path)/default_app.asar',
505           ],
506           'action': [
507             'python',
508             'tools/js2asar.py',
509             '<@(_outputs)',
510             'default_app',
511             '<@(_inputs)',
512           ],
513         }
514       ],
515     },  # target app2asar
516     {
517       'target_name': 'atom_js2c_copy',
518       'type': 'none',
519       'copies': [
520         {
521           'destination': '<(js2c_input_dir)',
522           'files': [
523             '<@(js2c_sources)',
524           ],
525         },
526       ],
527     },  # target atom_js2c_copy
528     {
529       'target_name': 'atom_browserify',
530       'type': 'none',
531       'dependencies': [
532         # depend on this target to ensure the '<(js2c_input_dir)' is created
533         'atom_js2c_copy',
534       ],
535       'variables': {
536         'sandbox_args': [
537           './lib/sandboxed_renderer/init.js',
538           '-r',
539           './lib/sandboxed_renderer/api/exports/electron.js:electron',
540           '-r',
541           './lib/sandboxed_renderer/api/exports/fs.js:fs',
542           '-r',
543           './lib/sandboxed_renderer/api/exports/os.js:os',
544           '-r',
545           './lib/sandboxed_renderer/api/exports/path.js:path',
546           '-r',
547           './lib/sandboxed_renderer/api/exports/child_process.js:child_process'
548         ],
549         'isolated_args': [
550           'lib/isolated_renderer/init.js',
551         ]
552       },
553       'actions': [
554         {
555           'action_name': 'atom_browserify_sandbox',
556           'inputs': [
557             '<!@(python tools/list-browserify-deps.py <(sandbox_args))'
558           ],
559           'outputs': [
560             '<(js2c_input_dir)/preload_bundle.js',
561           ],
562           'action': [
563             'npm',
564             'run',
565             '--silent',
566             'browserify',
567             '--',
568             '<@(sandbox_args)',
569             '-o',
570             '<@(_outputs)',
571           ],
572         },
573         {
574           'action_name': 'atom_browserify_isolated_context',
575           'inputs': [
576             '<!@(python tools/list-browserify-deps.py <(isolated_args))'
577           ],
578           'outputs': [
579             '<(js2c_input_dir)/isolated_bundle.js',
580           ],
581           'action': [
582             'npm',
583             'run',
584             '--silent',
585             'browserify',
586             '--',
587             '<@(isolated_args)',
588             '-o',
589             '<@(_outputs)',
590           ],
591         },
592       ],
593     },  # target atom_browserify
594     {
595       'target_name': 'atom_js2c',
596       'type': 'none',
597       'dependencies': [
598         'atom_js2c_copy',
599         'atom_browserify',
600       ],
601       'actions': [
602         {
603           'action_name': 'atom_js2c',
604           'inputs': [
605             # List all input files that should trigger a rebuild with js2c
606             '<@(js2c_sources)',
607             '<(js2c_input_dir)/preload_bundle.js',
608             '<(js2c_input_dir)/isolated_bundle.js',
609           ],
610           'outputs': [
611             '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
612           ],
613           'action': [
614             'python',
615             'tools/js2c.py',
616             '<@(_outputs)',
617             '<(js2c_input_dir)',
618           ],
619         }
620       ],
621     },  # target atom_js2c
622   ],
623   'conditions': [
624     ['OS=="mac"', {
625       'targets': [
626         {
627           'target_name': '<(project_name)_framework',
628           'product_name': '<(product_name) Framework',
629           'type': 'shared_library',
630           'dependencies': [
631             '<(project_name)_lib',
632           ],
633           'sources': [
634             '<@(framework_sources)',
635           ],
636           'include_dirs': [
637             '.',
638             'vendor',
639             '<(libchromiumcontent_src_dir)',
640           ],
641           'export_dependent_settings': [
642             '<(project_name)_lib',
643           ],
644           'link_settings': {
645             'libraries': [
646               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
647               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
648               '$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
649               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
650               '$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework',
651             ],
652           },
653           'mac_bundle': 1,
654           'mac_bundle_resources': [
655             'atom/common/resources/mac/MainMenu.xib',
656             '<(libchromiumcontent_dir)/content_shell.pak',
657             '<(libchromiumcontent_dir)/icudtl.dat',
658             '<(libchromiumcontent_dir)/natives_blob.bin',
659             '<(libchromiumcontent_dir)/snapshot_blob.bin',
660             '<(PRODUCT_DIR)/pdf_viewer_resources.pak',
661           ],
662           'xcode_settings': {
663             'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
664             'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
665             'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
666             'LD_RUNPATH_SEARCH_PATHS': [
667               '@loader_path/Libraries',
668             ],
669             'OTHER_LDFLAGS': [
670               '-ObjC',
671             ],
672           },
673           'copies': [
674             {
675               'variables': {
676                 'conditions': [
677                   ['libchromiumcontent_component', {
678                     'copied_libraries': [
679                       '<(PRODUCT_DIR)/libnode.dylib',
680                       '<@(libchromiumcontent_shared_libraries)',
681                       '<@(libchromiumcontent_shared_v8_libraries)',
682                     ],
683                   }, {
684                     'copied_libraries': [
685                       '<(PRODUCT_DIR)/libnode.dylib',
686                       '<(libchromiumcontent_dir)/libffmpeg.dylib',
687                     ],
688                   }],
689                 ],
690               },
691               'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
692               'files': [
693                 '<@(copied_libraries)',
694               ],
695             },
696           ],
697           'postbuilds': [
698             {
699               'postbuild_name': 'Fix path of libnode',
700               'action': [
701                 'install_name_tool',
702                 '-change',
703                 '/usr/local/lib/libnode.dylib',
704                 '@rpath/libnode.dylib',
705                 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
706               ],
707             },
708             {
709               'postbuild_name': 'Add symlinks for framework subdirectories',
710               'action': [
711                 'tools/mac/create-framework-subdir-symlinks.sh',
712                 '<(product_name) Framework',
713                 'Libraries',
714               ],
715             },
716             {
717               'postbuild_name': 'Copy locales',
718               'action': [
719                 'tools/mac/copy-locales.py',
720                 '-d',
721                 '<(libchromiumcontent_dir)/locales',
722                 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
723                 '<@(locales)',
724               ],
725             },
726           ],
727           'conditions': [
728             ['mas_build==0', {
729               'link_settings': {
730                 'libraries': [
731                   'external_binaries/Squirrel.framework',
732                   'external_binaries/ReactiveCocoa.framework',
733                   'external_binaries/Mantle.framework',
734                 ],
735               },
736               'copies': [
737                 {
738                   'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
739                   'files': [
740                     '<(PRODUCT_DIR)/crashpad_handler',
741                   ],
742                 },
743               ],
744             }],
745           ],
746         },  # target framework
747         {
748           'target_name': '<(project_name)_helper',
749           'product_name': '<(product_name) Helper',
750           'type': 'executable',
751           'dependencies': [
752             '<(project_name)_framework',
753           ],
754           'sources': [
755             '<@(app_sources)',
756           ],
757           'include_dirs': [
758             '.',
759           ],
760           'mac_bundle': 1,
761           'xcode_settings': {
762             'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
763             'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
764             'LD_RUNPATH_SEARCH_PATHS': [
765               '@executable_path/../../..',
766             ],
767           },
768         },  # target helper
769       ],
770     }],  # OS!="mac"
771   ],
772 }