3 'project_name%': 'electron',
4 'product_name%': 'Electron',
5 'company_name%': 'GitHub, Inc',
6 'company_abbr%': 'github',
8 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c',
13 'vendor/native_mate/native_mate_files.gypi',
17 'ATOM_PRODUCT_NAME="<(product_name)"',
18 'ATOM_PROJECT_NAME="<(project_name)"',
22 'mac_framework_dirs': [
23 '<(source_root)/external_binaries',
30 'target_name': '<(project_name)',
35 '<(project_name)_lib',
43 '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
47 'product_name': '<(product_name)',
50 '<(project_name)_lib',
53 '<(project_name)_framework',
54 '<(project_name)_helper',
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',
63 'mac_bundle_resources': [
68 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
70 '<(PRODUCT_DIR)/<(product_name) Helper.app',
71 '<(PRODUCT_DIR)/<(product_name) Framework.framework',
77 # This postbuid step is responsible for creating the following
80 # <(product_name) EH.app and <(product_name) NP.app are created
81 # from <(product_name).app.
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',
87 'vendor/brightray/tools/mac/make_more_helpers.sh',
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.
96 'postbuild_name': 'Make Empty Localizations',
98 'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
100 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
104 'tools/mac/make_locale_dirs.sh',
113 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
115 'external_binaries/Squirrel.framework',
116 'external_binaries/ReactiveCocoa.framework',
117 'external_binaries/Mantle.framework',
126 '<(libchromiumcontent_dir)/gen/ui/resources',
130 'EmbedManifest': 'true',
131 'AdditionalManifestFiles': 'atom/browser/resources/win/atom.manifest',
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
138 # The following two settings translate to a linker flag
139 # of /SUBSYSTEM:WINDOWS,5.02
140 'MinimumRequiredVersion': '5.02',
148 ['libchromiumcontent_component', {
149 'copied_libraries': [
150 '<@(libchromiumcontent_shared_libraries)',
151 '<@(libchromiumcontent_shared_v8_libraries)',
154 'copied_libraries': [
155 '<(libchromiumcontent_dir)/ffmpeg.dll',
160 'destination': '<(PRODUCT_DIR)',
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',
180 'vendor/breakpad/breakpad.gyp:dump_syms#host',
188 ['libchromiumcontent_component', {
189 'copied_libraries': [
190 '<(PRODUCT_DIR)/lib/libnode.so',
191 '<@(libchromiumcontent_shared_libraries)',
192 '<@(libchromiumcontent_shared_v8_libraries)',
195 'copied_libraries': [
196 '<(PRODUCT_DIR)/lib/libnode.so',
197 # '<(libchromiumcontent_dir)/libffmpeg.so',
202 'destination': '<(PRODUCT_DIR)',
204 ['desktop_linux==0', {
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',
213 '<@(copied_libraries)',
214 '<(libchromiumcontent_dir)/content_shell.pak',
215 '<(libchromiumcontent_dir)/natives_blob.bin',
216 '<(libchromiumcontent_dir)/snapshot_blob.bin',
225 '<(DEPTH)/efl/build/system.gyp:ecore',
226 '<(DEPTH)/efl/build/system.gyp:launchpad',
227 'atom/app/loader/loader.gyp:*',
233 'cflags': [ '-fPIC' ],
234 'cflags_cc': [ '-fPIC' ],
237 }, # target <(project_name)
239 'target_name': '<(project_name)_lib',
240 'type': 'static_library',
243 'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
244 'vendor/brightray/brightray.gyp:brightray',
245 'vendor/node/node.gyp:node',
248 # We need to access internal implementations of Node.
249 'NODE_WANT_INTERNALS=1',
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',
259 'USING_V8_PLATFORM_SHARED',
260 'USING_V8_BASE_SHARED',
261 # Remove this after enable_plugins becomes a feature flag.
263 'USE_PROPRIETARY_CODECS',
272 'vendor/native_mate',
273 # Include atom_natives.h.
274 '<(SHARED_INTERMEDIATE_DIR)',
275 # Include directories for uv and node.
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',
293 'direct_dependent_settings': {
298 'export_dependent_settings': [
299 'vendor/brightray/brightray.gyp:brightray',
302 ['libchromiumcontent_component', {
304 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
309 '<@(lib_sources_win)',
320 '-luiautomationcore.lib',
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',
335 ['OS=="mac" and mas_build==0', {
337 'vendor/crashpad/client/client.gyp:crashpad_client',
338 'vendor/crashpad/handler/handler.gyp:crashpad_handler',
341 # Do not link with QTKit for mas build.
343 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
347 # ReactiveCocoa which is used by Squirrel requires using __weak.
348 'CLANG_ENABLE_OBJC_WEAK': 'YES',
350 }], # OS=="mac" and mas_build==0
351 ['OS=="mac" and mas_build==1', {
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',
360 }], # OS=="mac" and mas_build==1
363 '<@(lib_sources_linux)',
364 '<@(lib_sources_nss)',
366 # Required settings of using breakpad.
369 '-Wno-reserved-user-defined-literal',
372 'vendor/breakpad/src',
375 'vendor/breakpad/breakpad.gyp:breakpad_client',
379 'cflags': [ '-fPIC' ],
380 'cflags_cc': [ '-fPIC' ],
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',
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',
402 ['tizen_product_tv==1', {
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',
417 'chromium_src/chrome/browser/icon_loader_efllinux.cc',
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
426 # Make native module dynamic loading work.
431 ['desktop_linux==1 or is_tizen==1', {
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'],
438 }], # desktop_linux==1
440 }, # target <(product_name)_lib
442 'target_name': 'electron_shell_copy',
446 'destination': '<(PRODUCT_DIR)',
448 '<(DEPTH)/efl/build/desktop/electron.sh',
449 '<(DEPTH)/efl/build/desktop/launch.sh',
453 }, # target atom_js2c_copy
455 'target_name': 'js2asar',
459 'action_name': 'js2asar',
463 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
465 'resources_path': '<(PRODUCT_DIR)/resources',
473 '<(resources_path)/electron.asar',
486 'target_name': 'app2asar',
490 'action_name': 'app2asar',
494 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
496 'resources_path': '<(PRODUCT_DIR)/resources',
501 '<@(default_app_sources)',
504 '<(resources_path)/default_app.asar',
517 'target_name': 'atom_js2c_copy',
521 'destination': '<(js2c_input_dir)',
527 }, # target atom_js2c_copy
529 'target_name': 'atom_browserify',
532 # depend on this target to ensure the '<(js2c_input_dir)' is created
537 './lib/sandboxed_renderer/init.js',
539 './lib/sandboxed_renderer/api/exports/electron.js:electron',
541 './lib/sandboxed_renderer/api/exports/fs.js:fs',
543 './lib/sandboxed_renderer/api/exports/os.js:os',
545 './lib/sandboxed_renderer/api/exports/path.js:path',
547 './lib/sandboxed_renderer/api/exports/child_process.js:child_process'
550 'lib/isolated_renderer/init.js',
555 'action_name': 'atom_browserify_sandbox',
557 '<!@(python tools/list-browserify-deps.py <(sandbox_args))'
560 '<(js2c_input_dir)/preload_bundle.js',
574 'action_name': 'atom_browserify_isolated_context',
576 '<!@(python tools/list-browserify-deps.py <(isolated_args))'
579 '<(js2c_input_dir)/isolated_bundle.js',
593 }, # target atom_browserify
595 'target_name': 'atom_js2c',
603 'action_name': 'atom_js2c',
605 # List all input files that should trigger a rebuild with js2c
607 '<(js2c_input_dir)/preload_bundle.js',
608 '<(js2c_input_dir)/isolated_bundle.js',
611 '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
621 }, # target atom_js2c
627 'target_name': '<(project_name)_framework',
628 'product_name': '<(product_name) Framework',
629 'type': 'shared_library',
631 '<(project_name)_lib',
634 '<@(framework_sources)',
639 '<(libchromiumcontent_src_dir)',
641 'export_dependent_settings': [
642 '<(project_name)_lib',
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',
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',
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',
677 ['libchromiumcontent_component', {
678 'copied_libraries': [
679 '<(PRODUCT_DIR)/libnode.dylib',
680 '<@(libchromiumcontent_shared_libraries)',
681 '<@(libchromiumcontent_shared_v8_libraries)',
684 'copied_libraries': [
685 '<(PRODUCT_DIR)/libnode.dylib',
686 '<(libchromiumcontent_dir)/libffmpeg.dylib',
691 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
693 '<@(copied_libraries)',
699 'postbuild_name': 'Fix path of libnode',
703 '/usr/local/lib/libnode.dylib',
704 '@rpath/libnode.dylib',
705 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
709 'postbuild_name': 'Add symlinks for framework subdirectories',
711 'tools/mac/create-framework-subdir-symlinks.sh',
712 '<(product_name) Framework',
717 'postbuild_name': 'Copy locales',
719 'tools/mac/copy-locales.py',
721 '<(libchromiumcontent_dir)/locales',
722 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
731 'external_binaries/Squirrel.framework',
732 'external_binaries/ReactiveCocoa.framework',
733 'external_binaries/Mantle.framework',
738 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
740 '<(PRODUCT_DIR)/crashpad_handler',
746 }, # target framework
748 'target_name': '<(project_name)_helper',
749 'product_name': '<(product_name) Helper',
750 'type': 'executable',
752 '<(project_name)_framework',
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/../../..',