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 'tizen/build/common.gypi',
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',
234 'tizen/loader/prelauncher.h',
235 'tizen/loader/prelauncher.cc',
243 }, # target <(project_name)
245 'target_name': '<(project_name)_lib',
246 'type': 'static_library',
249 'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
250 'vendor/brightray/brightray.gyp:brightray',
251 'vendor/node/node.gyp:node',
254 # We need to access internal implementations of Node.
255 'NODE_WANT_INTERNALS=1',
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',
265 'USING_V8_PLATFORM_SHARED',
266 'USING_V8_BASE_SHARED',
267 # Remove this after enable_plugins becomes a feature flag.
269 'USE_PROPRIETARY_CODECS',
278 'vendor/native_mate',
279 # Include atom_natives.h.
280 '<(SHARED_INTERMEDIATE_DIR)',
281 # Include directories for uv and node.
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',
299 'direct_dependent_settings': {
304 'export_dependent_settings': [
305 'vendor/brightray/brightray.gyp:brightray',
308 ['libchromiumcontent_component', {
310 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
315 '<@(lib_sources_win)',
326 '-luiautomationcore.lib',
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',
341 ['OS=="mac" and mas_build==0', {
343 'vendor/crashpad/client/client.gyp:crashpad_client',
344 'vendor/crashpad/handler/handler.gyp:crashpad_handler',
347 # Do not link with QTKit for mas build.
349 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
353 # ReactiveCocoa which is used by Squirrel requires using __weak.
354 'CLANG_ENABLE_OBJC_WEAK': 'YES',
356 }], # OS=="mac" and mas_build==0
357 ['OS=="mac" and mas_build==1', {
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',
366 }], # OS=="mac" and mas_build==1
369 '<@(lib_sources_linux)',
370 '<@(lib_sources_nss)',
372 # Required settings of using breakpad.
375 '-Wno-reserved-user-defined-literal',
378 'vendor/breakpad/src',
381 'vendor/breakpad/breakpad.gyp:breakpad_client',
385 'cflags': [ '-fPIC' ],
386 'cflags_cc': [ '-fPIC' ],
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',
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',
408 ['tizen_product_tv==1', {
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',
423 'chromium_src/chrome/browser/icon_loader_efllinux.cc',
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
432 # Make native module dynamic loading work.
437 ['desktop_linux==1 or is_tizen==1', {
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'],
444 }], # desktop_linux==1
446 }, # target <(product_name)_lib
448 'target_name': 'electron_shell_copy',
452 'destination': '<(PRODUCT_DIR)',
454 '<(DEPTH)/efl/build/desktop/electron.sh',
455 '<(DEPTH)/efl/build/desktop/launch.sh',
459 }, # target atom_js2c_copy
461 'target_name': 'js2asar',
465 'action_name': 'js2asar',
469 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
471 'resources_path': '<(PRODUCT_DIR)/resources',
479 '<(resources_path)/electron.asar',
492 'target_name': 'app2asar',
496 'action_name': 'app2asar',
500 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
502 'resources_path': '<(PRODUCT_DIR)/resources',
507 '<@(default_app_sources)',
510 '<(resources_path)/default_app.asar',
523 'target_name': 'atom_js2c_copy',
527 'destination': '<(js2c_input_dir)',
533 }, # target atom_js2c_copy
535 'target_name': 'atom_browserify',
538 # depend on this target to ensure the '<(js2c_input_dir)' is created
543 './lib/sandboxed_renderer/init.js',
545 './lib/sandboxed_renderer/api/exports/electron.js:electron',
547 './lib/sandboxed_renderer/api/exports/fs.js:fs',
549 './lib/sandboxed_renderer/api/exports/os.js:os',
551 './lib/sandboxed_renderer/api/exports/path.js:path',
553 './lib/sandboxed_renderer/api/exports/child_process.js:child_process'
556 'lib/isolated_renderer/init.js',
561 'action_name': 'atom_browserify_sandbox',
563 '<!@(python tools/list-browserify-deps.py <(sandbox_args))'
566 '<(js2c_input_dir)/preload_bundle.js',
580 'action_name': 'atom_browserify_isolated_context',
582 '<!@(python tools/list-browserify-deps.py <(isolated_args))'
585 '<(js2c_input_dir)/isolated_bundle.js',
599 }, # target atom_browserify
601 'target_name': 'atom_js2c',
609 'action_name': 'atom_js2c',
611 # List all input files that should trigger a rebuild with js2c
613 '<(js2c_input_dir)/preload_bundle.js',
614 '<(js2c_input_dir)/isolated_bundle.js',
617 '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
627 }, # target atom_js2c
633 'target_name': '<(project_name)_framework',
634 'product_name': '<(product_name) Framework',
635 'type': 'shared_library',
637 '<(project_name)_lib',
640 '<@(framework_sources)',
645 '<(libchromiumcontent_src_dir)',
647 'export_dependent_settings': [
648 '<(project_name)_lib',
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',
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',
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',
683 ['libchromiumcontent_component', {
684 'copied_libraries': [
685 '<(PRODUCT_DIR)/libnode.dylib',
686 '<@(libchromiumcontent_shared_libraries)',
687 '<@(libchromiumcontent_shared_v8_libraries)',
690 'copied_libraries': [
691 '<(PRODUCT_DIR)/libnode.dylib',
692 '<(libchromiumcontent_dir)/libffmpeg.dylib',
697 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
699 '<@(copied_libraries)',
705 'postbuild_name': 'Fix path of libnode',
709 '/usr/local/lib/libnode.dylib',
710 '@rpath/libnode.dylib',
711 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
715 'postbuild_name': 'Add symlinks for framework subdirectories',
717 'tools/mac/create-framework-subdir-symlinks.sh',
718 '<(product_name) Framework',
723 'postbuild_name': 'Copy locales',
725 'tools/mac/copy-locales.py',
727 '<(libchromiumcontent_dir)/locales',
728 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
737 'external_binaries/Squirrel.framework',
738 'external_binaries/ReactiveCocoa.framework',
739 'external_binaries/Mantle.framework',
744 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
746 '<(PRODUCT_DIR)/crashpad_handler',
752 }, # target framework
754 'target_name': '<(project_name)_helper',
755 'product_name': '<(product_name) Helper',
756 'type': 'executable',
758 '<(project_name)_framework',
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/../../..',