Home | History | Annotate | Download | only in remoting
      1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 {
      6   'variables': {
      7     'chromium_code': 1,
      8 
      9     # Set this to run the jscompile checks after building the webapp.
     10     'run_jscompile%': 0,
     11 
     12     'variables': {
     13       'conditions': [
     14         # Enable the multi-process host on Windows by default.
     15         ['OS=="win"', {
     16           'remoting_multi_process%': 1,
     17         }, {
     18           'remoting_multi_process%': 0,
     19         }],
     20       ],
     21     },
     22 
     23     'remoting_multi_process%': '<(remoting_multi_process)',
     24     'remoting_rdp_session%': 1,
     25 
     26     'remoting_localize_path': 'tools/build/remoting_localize.py',
     27 
     28     'branding_path': '../remoting/branding_<(branding)',
     29 
     30     'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
     31 
     32     'conditions': [
     33       ['OS=="mac"', {
     34         'mac_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_BUNDLE_ID@")',
     35         'mac_creator': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_CREATOR@")',
     36       }],
     37       ['OS=="win"', {
     38         # Each CLSID is a hash of the current version string salted with an
     39         # arbitrary GUID. This ensures that the newly installed COM classes will
     40         # be used during/after upgrade even if there are old instances running
     41         # already.
     42         # The IDs are not random to avoid rebuilding host when it's not
     43         # necessary.
     44         'daemon_controller_clsid':
     45             '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'655bd819-c08c-4b04-80c2-f160739ff6ef\'), \'<(version_full)\')")',
     46         'rdp_desktop_session_clsid':
     47             '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'6a7699f0-ee43-43e7-aa30-a6738f9bd470\'), \'<(version_full)\')")',
     48       }],
     49     ],
     50     'remoting_locales': [
     51       'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es',
     52       'es-419', 'et', 'fi', 'fil', 'fr', 'he', 'hi', 'hr', 'hu', 'id',
     53       'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT',
     54       'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi',
     55       'zh-CN', 'zh-TW',
     56     ],
     57     'remoting_host_locale_files': [
     58       # Build the list of .pak files generated from remoting_strings.grd.
     59       '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x '
     60           '<(PRODUCT_DIR) <(remoting_locales))',
     61     ],
     62     'remoting_webapp_locale_files': [
     63       # Build the list of .json files generated from remoting_strings.grd.
     64       '<!@pymod_do_main(remoting_localize --locale_output '
     65           '"<(webapp_locale_dir)/@{json_suffix}/messages.json" '
     66           '--print_only <(remoting_locales))',
     67     ],
     68   },
     69 
     70   'includes': [
     71     '../chrome/js_unittest_vars.gypi',
     72     'remoting_android.gypi',
     73     'remoting_client.gypi',
     74     'remoting_host.gypi',
     75     'remoting_srcs.gypi',
     76     'remoting_test.gypi',
     77     'remoting_version.gypi',
     78     'remoting_webapp_files.gypi',
     79   ],
     80 
     81   'target_defaults': {
     82     'defines': [
     83       'BINARY_CORE=1',
     84       'BINARY_DESKTOP=2',
     85       'BINARY_HOST_ME2ME=3',
     86       'BINARY_NATIVE_MESSAGING_HOST=4',
     87       'BINARY_REMOTE_ASSISTANCE_HOST=5',
     88     ],
     89     'include_dirs': [
     90       '..',  # Root of Chrome checkout
     91     ],
     92     'variables': {
     93       'win_debug_RuntimeChecks': '0',
     94     },
     95     'conditions': [
     96       ['OS=="mac" and mac_breakpad==1', {
     97         'defines': [
     98           'REMOTING_ENABLE_BREAKPAD'
     99         ],
    100       }],
    101       ['OS=="win" and buildtype == "Official"', {
    102         'defines': [
    103           'REMOTING_ENABLE_BREAKPAD'
    104         ],
    105       }],
    106       ['OS=="win" and remoting_multi_process != 0 and \
    107           remoting_rdp_session != 0', {
    108         'defines': [
    109           'REMOTING_RDP_SESSION',
    110         ],
    111       }],
    112       ['remoting_multi_process != 0', {
    113         'defines': [
    114           'REMOTING_MULTI_PROCESS',
    115         ],
    116       }],
    117     ],
    118   },
    119 
    120   'targets': [
    121     {
    122       'target_name': 'remoting_breakpad',
    123       'type': 'static_library',
    124       'variables': { 'enable_wexit_time_destructors': 1, },
    125       'dependencies': [
    126         '../base/base.gyp:base',
    127       ],
    128       'sources': [
    129         'base/breakpad.h',
    130         'base/breakpad_linux.cc',
    131         'base/breakpad_mac.mm',
    132         'base/breakpad_win.cc',
    133       ],
    134       'conditions': [
    135         ['OS=="mac"', {
    136           'dependencies': [
    137             '../breakpad/breakpad.gyp:breakpad',
    138           ],
    139         }],
    140         ['OS=="win"', {
    141           'dependencies': [
    142             '../breakpad/breakpad.gyp:breakpad_handler',
    143           ],
    144         }],
    145       ],
    146     },  # end of target 'remoting_breakpad'
    147 
    148     {
    149       'target_name': 'remoting_resources',
    150       'type': 'none',
    151       'dependencies': [
    152         'remoting_webapp_html',
    153       ],
    154       'variables': {
    155         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
    156         'grit_resource_ids': 'resources/resource_ids',
    157         'sources': [
    158           '<(SHARED_INTERMEDIATE_DIR)/main.html',
    159           'base/resources_unittest.cc',
    160           'host/continue_window_mac.mm',
    161           'host/disconnect_window_mac.mm',
    162           'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
    163           'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
    164           'host/win/core.rc.jinja2',
    165           'host/win/host_messages.mc.jinja2',
    166           'host/win/version.rc.jinja2',
    167           'resources/play_store_resources.cc',
    168           'webapp/background.js',
    169           'webapp/butter_bar.js',
    170           'webapp/client_screen.js',
    171           'webapp/error.js',
    172           'webapp/host_list.js',
    173           'webapp/host_setup_dialog.js',
    174           'webapp/host_table_entry.js',
    175           'webapp/manifest.json.jinja2',
    176           'webapp/paired_client_manager.js',
    177           'webapp/remoting.js',
    178           'webapp/window_frame.js',
    179         ],
    180       },
    181       'actions': [
    182         {
    183           'action_name': 'verify_resources',
    184           'inputs': [
    185             'resources/remoting_strings.grd',
    186             'tools/verify_resources.py',
    187             '<@(sources)'
    188           ],
    189           'outputs': [
    190             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
    191           ],
    192           'action': [
    193             'python',
    194             'tools/verify_resources.py',
    195             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
    196             '-r', 'resources/remoting_strings.grd',
    197             '<@(sources)',
    198          ],
    199         },
    200         {
    201           'action_name': 'remoting_strings',
    202           'variables': {
    203             'grit_grd_file': 'resources/remoting_strings.grd',
    204           },
    205           'includes': [ '../build/grit_action.gypi' ],
    206         },
    207         {
    208           'action_name': 'copy_locales',
    209           'variables': {
    210             'copy_output_dir%': '<(PRODUCT_DIR)',
    211           },
    212           'inputs': [
    213             'tools/build/remoting_copy_locales.py',
    214             '<!@pymod_do_main(remoting_copy_locales -i -p <(OS) -g <(grit_out_dir) <(remoting_locales))'
    215           ],
    216           'outputs': [
    217             '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(copy_output_dir) <(remoting_locales))'
    218           ],
    219           'action': [
    220             'python', 'tools/build/remoting_copy_locales.py',
    221             '-p', '<(OS)',
    222             '-g', '<(grit_out_dir)',
    223             '-x', '<(copy_output_dir)/.',
    224             '<@(remoting_locales)',
    225           ],
    226         }
    227       ],
    228       'includes': [ '../build/grit_target.gypi' ],
    229     },  # end of target 'remoting_resources'
    230 
    231     {
    232       'target_name': 'remoting_base',
    233       'type': 'static_library',
    234       'variables': { 'enable_wexit_time_destructors': 1, },
    235       'dependencies': [
    236         '../base/base.gyp:base',
    237         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
    238         '../media/media.gyp:media',
    239         '../media/media.gyp:shared_memory_support',
    240         '../net/net.gyp:net',
    241         '../third_party/libvpx/libvpx.gyp:libvpx',
    242         '../third_party/libyuv/libyuv.gyp:libyuv',
    243         '../third_party/opus/opus.gyp:opus',
    244         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
    245         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
    246         '../ui/base/ui_base.gyp:ui_base',
    247         '../ui/gfx/gfx.gyp:gfx',
    248         '../ui/gfx/gfx.gyp:gfx_geometry',
    249         'proto/chromotocol.gyp:chromotocol_proto_lib',
    250         'remoting_resources',
    251       ],
    252       'export_dependent_settings': [
    253         '../base/base.gyp:base',
    254         '../net/net.gyp:net',
    255         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
    256         'proto/chromotocol.gyp:chromotocol_proto_lib',
    257       ],
    258       # This target needs a hard dependency because dependent targets
    259       # depend on chromotocol_proto_lib for headers.
    260       'hard_dependency': 1,
    261       'sources': [
    262         '<@(remoting_base_sources)',
    263       ],
    264     },  # end of target 'remoting_base'
    265 
    266     {
    267       'target_name': 'remoting_protocol',
    268       'type': 'static_library',
    269       'variables': { 'enable_wexit_time_destructors': 1, },
    270       'dependencies': [
    271         '../base/base.gyp:base',
    272         '../crypto/crypto.gyp:crypto',
    273         '../jingle/jingle.gyp:jingle_glue',
    274         '../jingle/jingle.gyp:notifier',
    275         '../net/net.gyp:net',
    276         '../third_party/libjingle/libjingle.gyp:libjingle',
    277         'remoting_base',
    278       ],
    279       'export_dependent_settings': [
    280         '../third_party/libjingle/libjingle.gyp:libjingle',
    281       ],
    282       'sources': [
    283         '<@(remoting_protocol_sources)',
    284       ],
    285     },  # end of target 'remoting_protocol'
    286   ],  # end of targets
    287 }
    288