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',
12 'vendor/native_mate/native_mate_files.gypi',
16 'ATOM_PRODUCT_NAME="<(product_name)"',
17 'ATOM_PROJECT_NAME="<(project_name)"',
21 'mac_framework_dirs': [
22 '<(source_root)/external_binaries',
29 'target_name': '<(project_name)',
34 '<(project_name)_lib',
44 'product_name': '<(product_name)',
47 '<(project_name)_lib',
50 '<(project_name)_framework',
51 '<(project_name)_helper',
54 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name)',
55 'INFOPLIST_FILE': 'atom/browser/resources/mac/Info.plist',
56 'LD_RUNPATH_SEARCH_PATHS': [
57 '@executable_path/../Frameworks',
60 'mac_bundle_resources': [
65 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
67 '<(PRODUCT_DIR)/<(product_name) Helper.app',
68 '<(PRODUCT_DIR)/<(product_name) Framework.framework',
74 # This postbuid step is responsible for creating the following
77 # <(product_name) EH.app and <(product_name) NP.app are created
78 # from <(product_name).app.
80 # The EH helper is marked for an executable heap. The NP helper
81 # is marked for no PIE (ASLR).
82 'postbuild_name': 'Make More Helpers',
84 'vendor/brightray/tools/mac/make_more_helpers.sh',
89 # The application doesn't have real localizations, it just has
90 # empty .lproj directories, which is enough to convince Cocoa
91 # that Electron supports those languages.
93 'postbuild_name': 'Make Empty Localizations',
95 'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
97 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
101 'tools/mac/make_locale_dirs.sh',
110 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
112 'external_binaries/Squirrel.framework',
113 'external_binaries/ReactiveCocoa.framework',
114 'external_binaries/Mantle.framework',
123 '<(libchromiumcontent_dir)/gen/ui/resources',
127 'EmbedManifest': 'true',
128 'AdditionalManifestFiles': 'atom/browser/resources/win/atom.manifest',
131 # Chrome builds with this minimum environment which makes e.g.
132 # GetSystemMetrics(SM_CXSIZEFRAME) return Windows XP/2003
133 # compatible metrics. See: https://crbug.com/361720
135 # The following two settings translate to a linker flag
136 # of /SUBSYSTEM:WINDOWS,5.02
137 'MinimumRequiredVersion': '5.02',
145 ['libchromiumcontent_component', {
146 'copied_libraries': [
147 '<@(libchromiumcontent_shared_libraries)',
148 '<@(libchromiumcontent_shared_v8_libraries)',
151 'copied_libraries': [
152 '<(libchromiumcontent_dir)/ffmpeg.dll',
157 'destination': '<(PRODUCT_DIR)',
159 '<@(copied_libraries)',
160 '<(libchromiumcontent_dir)/locales',
161 '<(libchromiumcontent_dir)/libEGL.dll',
162 '<(libchromiumcontent_dir)/libGLESv2.dll',
163 '<(libchromiumcontent_dir)/icudtl.dat',
164 '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
165 '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
166 '<(libchromiumcontent_dir)/content_shell.pak',
167 '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
168 '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
169 '<(libchromiumcontent_dir)/natives_blob.bin',
170 '<(libchromiumcontent_dir)/snapshot_blob.bin',
171 'external_binaries/d3dcompiler_47.dll',
177 'vendor/breakpad/breakpad.gyp:dump_syms#host',
185 ['libchromiumcontent_component', {
186 'copied_libraries': [
187 '<(PRODUCT_DIR)/lib/libnode.so',
188 '<@(libchromiumcontent_shared_libraries)',
189 '<@(libchromiumcontent_shared_v8_libraries)',
192 'copied_libraries': [
193 '<(PRODUCT_DIR)/lib/libnode.so',
194 '<(libchromiumcontent_dir)/libffmpeg.so',
199 'destination': '<(PRODUCT_DIR)',
201 '<@(copied_libraries)',
202 '<(libchromiumcontent_dir)/locales',
203 '<(libchromiumcontent_dir)/icudtl.dat',
204 '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
205 '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
206 '<(libchromiumcontent_dir)/content_shell.pak',
207 '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
208 '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
209 '<(libchromiumcontent_dir)/natives_blob.bin',
210 '<(libchromiumcontent_dir)/snapshot_blob.bin',
216 }, # target <(project_name)
218 'target_name': '<(project_name)_lib',
219 'type': 'static_library',
222 'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
223 'vendor/brightray/brightray.gyp:brightray',
224 'vendor/node/node.gyp:node',
227 # We need to access internal implementations of Node.
228 'NODE_WANT_INTERNALS=1',
230 # This is defined in skia/skia_common.gypi.
231 'SK_SUPPORT_LEGACY_GETTOPDEVICE',
232 # Disable warnings for g_settings_list_schemas.
233 'GLIB_DISABLE_DEPRECATION_WARNINGS',
234 # Defined in Chromium but not exposed in its gyp file.
235 'V8_USE_EXTERNAL_STARTUP_DATA',
238 'USING_V8_PLATFORM_SHARED',
239 'USING_V8_BASE_SHARED',
240 # Remove this after enable_plugins becomes a feature flag.
242 'USE_PROPRIETARY_CODECS',
251 'vendor/native_mate',
252 # Include atom_natives.h.
253 '<(SHARED_INTERMEDIATE_DIR)',
254 # Include directories for uv and node.
256 'vendor/node/deps/http_parser',
257 'vendor/node/deps/uv/include',
258 # The `node.h` is using `#include"v8.h"`.
259 '<(libchromiumcontent_src_dir)/v8/include',
260 # The `node.h` is using `#include"ares.h"`.
261 'vendor/node/deps/cares/include',
262 # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
263 '<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
264 # The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
265 '<(libchromiumcontent_src_dir)/third_party/libyuv/include',
266 # The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
267 '<(libchromiumcontent_src_dir)/third_party/',
268 '<(libchromiumcontent_src_dir)/components/cdm',
269 '<(libchromiumcontent_src_dir)/third_party/widevine',
271 'direct_dependent_settings': {
276 'export_dependent_settings': [
277 'vendor/brightray/brightray.gyp:brightray',
280 ['libchromiumcontent_component', {
282 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
287 '<@(lib_sources_win)',
298 '-luiautomationcore.lib',
302 # Node is built as static_library on Windows, so we also need to
303 # include its dependencies here.
304 'vendor/node/deps/cares/cares.gyp:cares',
305 'vendor/node/deps/http_parser/http_parser.gyp:http_parser',
306 'vendor/node/deps/uv/uv.gyp:libuv',
307 'vendor/node/deps/zlib/zlib.gyp:zlib',
308 # Build with breakpad support.
309 'vendor/breakpad/breakpad.gyp:breakpad_handler',
310 'vendor/breakpad/breakpad.gyp:breakpad_sender',
313 ['OS=="mac" and mas_build==0', {
315 'vendor/crashpad/client/client.gyp:crashpad_client',
316 'vendor/crashpad/handler/handler.gyp:crashpad_handler',
319 # Do not link with QTKit for mas build.
321 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
325 # ReactiveCocoa which is used by Squirrel requires using __weak.
326 'CLANG_ENABLE_OBJC_WEAK': 'YES',
328 }], # OS=="mac" and mas_build==0
329 ['OS=="mac" and mas_build==1', {
334 'atom/browser/auto_updater_mac.mm',
335 'atom/common/crash_reporter/crash_reporter_mac.h',
336 'atom/common/crash_reporter/crash_reporter_mac.mm',
338 }], # OS=="mac" and mas_build==1
341 '<@(lib_sources_linux)',
342 '<@(lib_sources_nss)',
346 # Make binary search for libraries under current directory, so we
347 # don't have to manually set $LD_LIBRARY_PATH:
348 # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
350 # Make native module dynamic loading work.
354 # Required settings of using breakpad.
357 '-Wno-reserved-user-defined-literal',
360 'vendor/breakpad/src',
363 'vendor/breakpad/breakpad.gyp:breakpad_client',
367 }, # target <(product_name)_lib
369 'target_name': 'js2asar',
373 'action_name': 'js2asar',
377 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
379 'resources_path': '<(PRODUCT_DIR)/resources',
387 '<(resources_path)/electron.asar',
400 'target_name': 'app2asar',
404 'action_name': 'app2asar',
408 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
410 'resources_path': '<(PRODUCT_DIR)/resources',
415 '<@(default_app_sources)',
418 '<(resources_path)/default_app.asar',
431 'target_name': 'atom_js2c_copy',
435 'destination': '<(js2c_input_dir)',
441 }, # target atom_js2c_copy
443 'target_name': 'atom_browserify',
446 # depend on this target to ensure the '<(js2c_input_dir)' is created
451 './lib/sandboxed_renderer/init.js',
453 './lib/sandboxed_renderer/api/exports/electron.js:electron',
455 './lib/sandboxed_renderer/api/exports/fs.js:fs',
457 './lib/sandboxed_renderer/api/exports/os.js:os',
459 './lib/sandboxed_renderer/api/exports/path.js:path',
461 './lib/sandboxed_renderer/api/exports/child_process.js:child_process'
464 'lib/isolated_renderer/init.js',
469 'action_name': 'atom_browserify_sandbox',
471 '<!@(python tools/list-browserify-deps.py <(sandbox_args))'
474 '<(js2c_input_dir)/preload_bundle.js',
488 'action_name': 'atom_browserify_isolated_context',
490 '<!@(python tools/list-browserify-deps.py <(isolated_args))'
493 '<(js2c_input_dir)/isolated_bundle.js',
507 }, # target atom_browserify
509 'target_name': 'atom_js2c',
517 'action_name': 'atom_js2c',
519 # List all input files that should trigger a rebuild with js2c
521 '<(js2c_input_dir)/preload_bundle.js',
522 '<(js2c_input_dir)/isolated_bundle.js',
525 '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
535 }, # target atom_js2c
541 'target_name': '<(project_name)_framework',
542 'product_name': '<(product_name) Framework',
543 'type': 'shared_library',
545 '<(project_name)_lib',
548 '<@(framework_sources)',
553 '<(libchromiumcontent_src_dir)',
555 'export_dependent_settings': [
556 '<(project_name)_lib',
560 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
561 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
562 '$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
563 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
564 '$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework',
568 'mac_bundle_resources': [
569 'atom/common/resources/mac/MainMenu.xib',
570 '<(libchromiumcontent_dir)/content_shell.pak',
571 '<(libchromiumcontent_dir)/icudtl.dat',
572 '<(libchromiumcontent_dir)/natives_blob.bin',
573 '<(libchromiumcontent_dir)/snapshot_blob.bin',
574 '<(PRODUCT_DIR)/pdf_viewer_resources.pak',
577 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
578 'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
579 'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
580 'LD_RUNPATH_SEARCH_PATHS': [
581 '@loader_path/Libraries',
591 ['libchromiumcontent_component', {
592 'copied_libraries': [
593 '<(PRODUCT_DIR)/libnode.dylib',
594 '<@(libchromiumcontent_shared_libraries)',
595 '<@(libchromiumcontent_shared_v8_libraries)',
598 'copied_libraries': [
599 '<(PRODUCT_DIR)/libnode.dylib',
600 '<(libchromiumcontent_dir)/libffmpeg.dylib',
605 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
607 '<@(copied_libraries)',
613 'postbuild_name': 'Fix path of libnode',
617 '/usr/local/lib/libnode.dylib',
618 '@rpath/libnode.dylib',
619 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
623 'postbuild_name': 'Add symlinks for framework subdirectories',
625 'tools/mac/create-framework-subdir-symlinks.sh',
626 '<(product_name) Framework',
631 'postbuild_name': 'Copy locales',
633 'tools/mac/copy-locales.py',
635 '<(libchromiumcontent_dir)/locales',
636 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
645 'external_binaries/Squirrel.framework',
646 'external_binaries/ReactiveCocoa.framework',
647 'external_binaries/Mantle.framework',
652 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
654 '<(PRODUCT_DIR)/crashpad_handler',
660 }, # target framework
662 'target_name': '<(project_name)_helper',
663 'product_name': '<(product_name) Helper',
664 'type': 'executable',
666 '<(project_name)_framework',
676 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
677 'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
678 'LD_RUNPATH_SEARCH_PATHS': [
679 '@executable_path/../../..',