3 'project_name%': 'electron',
4 'product_name%': 'Electron',
5 'company_name%': 'GitHub, Inc',
6 'company_abbr%': 'github',
11 'vendor/native_mate/native_mate_files.gypi',
15 'ATOM_PRODUCT_NAME="<(product_name)"',
16 'ATOM_PROJECT_NAME="<(project_name)"',
20 'mac_framework_dirs': [
21 '<(source_root)/external_binaries',
28 'target_name': '<(project_name)',
33 '<(project_name)_lib',
43 'product_name': '<(product_name)',
46 '<(project_name)_lib',
49 '<(project_name)_framework',
50 '<(project_name)_helper',
53 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name)',
54 'INFOPLIST_FILE': 'atom/browser/resources/mac/Info.plist',
55 'LD_RUNPATH_SEARCH_PATHS': [
56 '@executable_path/../Frameworks',
59 'mac_bundle_resources': [
64 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
66 '<(PRODUCT_DIR)/<(product_name) Helper.app',
67 '<(PRODUCT_DIR)/<(product_name) Framework.framework',
73 # This postbuid step is responsible for creating the following
76 # <(product_name) EH.app and <(product_name) NP.app are created
77 # from <(product_name).app.
79 # The EH helper is marked for an executable heap. The NP helper
80 # is marked for no PIE (ASLR).
81 'postbuild_name': 'Make More Helpers',
83 'vendor/brightray/tools/mac/make_more_helpers.sh',
88 # The application doesn't have real localizations, it just has
89 # empty .lproj directories, which is enough to convince Cocoa
90 # that Electron supports those languages.
92 'postbuild_name': 'Make Empty Localizations',
94 'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
96 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
100 'tools/mac/make_locale_dirs.sh',
109 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks',
111 'external_binaries/Squirrel.framework',
112 'external_binaries/ReactiveCocoa.framework',
113 'external_binaries/Mantle.framework',
122 '<(libchromiumcontent_dir)/gen/ui/resources',
126 'EmbedManifest': 'true',
127 'AdditionalManifestFiles': 'atom/browser/resources/win/atom.manifest',
134 ['libchromiumcontent_component', {
135 'copied_libraries': [
136 '<@(libchromiumcontent_shared_libraries)',
137 '<@(libchromiumcontent_shared_v8_libraries)',
140 'copied_libraries': [
141 '<(libchromiumcontent_dir)/ffmpeg.dll',
146 'destination': '<(PRODUCT_DIR)',
148 '<@(copied_libraries)',
149 '<(libchromiumcontent_dir)/locales',
150 '<(libchromiumcontent_dir)/libEGL.dll',
151 '<(libchromiumcontent_dir)/libGLESv2.dll',
152 '<(libchromiumcontent_dir)/icudtl.dat',
153 '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
154 '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
155 '<(libchromiumcontent_dir)/content_shell.pak',
156 '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
157 '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
158 '<(libchromiumcontent_dir)/natives_blob.bin',
159 '<(libchromiumcontent_dir)/snapshot_blob.bin',
160 'external_binaries/d3dcompiler_47.dll',
161 'external_binaries/xinput1_3.dll',
167 'vendor/breakpad/breakpad.gyp:dump_syms#host',
175 ['libchromiumcontent_component', {
176 'copied_libraries': [
177 '<(PRODUCT_DIR)/lib/libnode.so',
178 '<@(libchromiumcontent_shared_libraries)',
179 '<@(libchromiumcontent_shared_v8_libraries)',
182 'copied_libraries': [
183 '<(PRODUCT_DIR)/lib/libnode.so',
184 '<(libchromiumcontent_dir)/libffmpeg.so',
189 'destination': '<(PRODUCT_DIR)',
191 '<@(copied_libraries)',
192 '<(libchromiumcontent_dir)/locales',
193 '<(libchromiumcontent_dir)/icudtl.dat',
194 '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
195 '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
196 '<(libchromiumcontent_dir)/content_shell.pak',
197 '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
198 '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
199 '<(libchromiumcontent_dir)/natives_blob.bin',
200 '<(libchromiumcontent_dir)/snapshot_blob.bin',
206 }, # target <(project_name)
208 'target_name': '<(project_name)_lib',
209 'type': 'static_library',
212 'vendor/brightray/brightray.gyp:brightray',
213 'vendor/node/node.gyp:node',
216 # We need to access internal implementations of Node.
217 'NODE_WANT_INTERNALS=1',
219 # This is defined in skia/skia_common.gypi.
220 'SK_SUPPORT_LEGACY_GETTOPDEVICE',
221 # Disable warnings for g_settings_list_schemas.
222 'GLIB_DISABLE_DEPRECATION_WARNINGS',
223 # Defined in Chromium but not exposed in its gyp file.
224 'V8_USE_EXTERNAL_STARTUP_DATA',
226 'ENABLE_PEPPER_CDMS',
227 'USE_PROPRIETARY_CODECS',
236 'vendor/native_mate',
237 # Include atom_natives.h.
238 '<(SHARED_INTERMEDIATE_DIR)',
239 # Include directories for uv and node.
241 'vendor/node/deps/http_parser',
242 'vendor/node/deps/uv/include',
243 # The `node.h` is using `#include"v8.h"`.
244 '<(libchromiumcontent_src_dir)/v8/include',
245 # The `node.h` is using `#include"ares.h"`.
246 'vendor/node/deps/cares/include',
247 # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
248 '<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
249 # The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
250 '<(libchromiumcontent_src_dir)/third_party/libyuv/include',
251 # The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
252 '<(libchromiumcontent_src_dir)/third_party/',
253 '<(libchromiumcontent_src_dir)/components/cdm',
254 '<(libchromiumcontent_src_dir)/third_party/widevine',
256 'direct_dependent_settings': {
261 'export_dependent_settings': [
262 'vendor/brightray/brightray.gyp:brightray',
265 ['libchromiumcontent_component', {
267 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
272 '<@(lib_sources_win)',
286 # Node is built as static_library on Windows, so we also need to
287 # include its dependencies here.
288 'vendor/node/deps/cares/cares.gyp:cares',
289 'vendor/node/deps/http_parser/http_parser.gyp:http_parser',
290 'vendor/node/deps/uv/uv.gyp:libuv',
291 'vendor/node/deps/zlib/zlib.gyp:zlib',
292 # Build with breakpad support.
293 'vendor/breakpad/breakpad.gyp:breakpad_handler',
294 'vendor/breakpad/breakpad.gyp:breakpad_sender',
297 ['OS=="mac" and mas_build==0', {
299 'vendor/crashpad/client/client.gyp:crashpad_client',
300 'vendor/crashpad/handler/handler.gyp:crashpad_handler',
303 # Do not link with QTKit for mas build.
305 '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
309 # ReactiveCocoa which is used by Squirrel requires using __weak.
310 'CLANG_ENABLE_OBJC_WEAK': 'YES',
312 }], # OS=="mac" and mas_build==0
313 ['OS=="mac" and mas_build==1', {
318 'atom/browser/auto_updater_mac.mm',
319 'atom/common/crash_reporter/crash_reporter_mac.h',
320 'atom/common/crash_reporter/crash_reporter_mac.mm',
322 }], # OS=="mac" and mas_build==1
325 '<@(lib_sources_nss)',
329 # Make binary search for libraries under current directory, so we
330 # don't have to manually set $LD_LIBRARY_PATH:
331 # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
333 # Make native module dynamic loading work.
337 # Required settings of using breakpad.
340 '-Wno-reserved-user-defined-literal',
343 'vendor/breakpad/src',
346 'vendor/breakpad/breakpad.gyp:breakpad_client',
350 }, # target <(product_name)_lib
352 'target_name': 'js2asar',
356 'action_name': 'js2asar',
360 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
362 'resources_path': '<(PRODUCT_DIR)/resources',
370 '<(resources_path)/electron.asar',
383 'target_name': 'app2asar',
387 'action_name': 'app2asar',
391 'resources_path': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
393 'resources_path': '<(PRODUCT_DIR)/resources',
398 '<@(default_app_sources)',
401 '<(resources_path)/default_app.asar',
414 'target_name': 'atom_js2c',
418 'action_name': 'atom_js2c',
423 '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
433 }, # target atom_js2c
439 'target_name': '<(project_name)_framework',
440 'product_name': '<(product_name) Framework',
441 'type': 'shared_library',
443 '<(project_name)_lib',
446 '<@(framework_sources)',
451 '<(libchromiumcontent_src_dir)',
453 'export_dependent_settings': [
454 '<(project_name)_lib',
458 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
459 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
463 'mac_bundle_resources': [
464 'atom/common/resources/mac/MainMenu.xib',
465 '<(libchromiumcontent_dir)/content_shell.pak',
466 '<(libchromiumcontent_dir)/icudtl.dat',
467 '<(libchromiumcontent_dir)/natives_blob.bin',
468 '<(libchromiumcontent_dir)/snapshot_blob.bin',
471 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
472 'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
473 'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
474 'LD_RUNPATH_SEARCH_PATHS': [
475 '@loader_path/Libraries',
485 ['libchromiumcontent_component', {
486 'copied_libraries': [
487 '<(PRODUCT_DIR)/libnode.dylib',
488 '<@(libchromiumcontent_shared_libraries)',
489 '<@(libchromiumcontent_shared_v8_libraries)',
492 'copied_libraries': [
493 '<(PRODUCT_DIR)/libnode.dylib',
494 '<(libchromiumcontent_dir)/libffmpeg.dylib',
499 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
501 '<@(copied_libraries)',
507 'postbuild_name': 'Fix path of libnode',
511 '/usr/local/lib/libnode.dylib',
512 '@rpath/libnode.dylib',
513 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
517 'postbuild_name': 'Fix path of ffmpeg',
521 '/usr/local/lib/libffmpeg.dylib',
522 '@rpath/libffmpeg.dylib',
523 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
527 'postbuild_name': 'Add symlinks for framework subdirectories',
529 'tools/mac/create-framework-subdir-symlinks.sh',
530 '<(product_name) Framework',
535 'postbuild_name': 'Copy locales',
537 'tools/mac/copy-locales.py',
539 '<(libchromiumcontent_dir)/locales',
540 '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Resources',
549 'external_binaries/Squirrel.framework',
550 'external_binaries/ReactiveCocoa.framework',
551 'external_binaries/Mantle.framework',
556 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Resources',
558 '<(PRODUCT_DIR)/crashpad_handler',
564 }, # target framework
566 'target_name': '<(project_name)_helper',
567 'product_name': '<(product_name) Helper',
568 'type': 'executable',
570 '<(project_name)_framework',
580 'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
581 'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
582 'LD_RUNPATH_SEARCH_PATHS': [
583 '@executable_path/../../..',