Chromium Code Reviews| Index: remoting/remoting.gyp |
| diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp |
| index bd877561610f3c4f4af8597a7c41bc4d7bf5735d..8769f3f330884c1ac2dc89b93e8c66d2b6328f9d 100644 |
| --- a/remoting/remoting.gyp |
| +++ b/remoting/remoting.gyp |
| @@ -20,6 +20,8 @@ |
| 'remoting_multi_process%': '<(remoting_multi_process)', |
| 'remoting_rdp_session%': 1, |
| + 'localize_py_path': 'tools/localize.py', |
| + |
| # The |major|, |build| and |patch| versions are inherited from Chrome. |
| # Since Chrome's |minor| version is always '0', we replace it with a |
| # Chromoting-specific patch version. |
| @@ -98,6 +100,50 @@ |
| 'rdp_desktop_session_clsid': '<!(python tools/uuidgen.py 2)', |
| }], |
| ], |
| + 'remoting_languages': [ |
| + '-l', 'ar', |
| + '-l', 'bg', |
| + '-l', 'ca', |
| + '-l', 'cs', |
| + '-l', 'da', |
| + '-l', 'de', |
| + '-l', 'el', |
| + '-l', 'en', |
| + '-l', 'en_GB', |
| + '-l', 'es', |
| + '-l', 'es_419', |
| + '-l', 'et', |
| + '-l', 'fi', |
| + '-l', 'fil', |
| + '-l', 'fr', |
| + '-l', 'he', |
| + '-l', 'hi', |
| + '-l', 'hr', |
| + '-l', 'hu', |
| + '-l', 'id', |
| + '-l', 'it', |
| + '-l', 'ja', |
| + '-l', 'ko', |
| + '-l', 'lt', |
| + '-l', 'lv', |
| + '-l', 'nb', |
| + '-l', 'nl', |
| + '-l', 'pl', |
| + '-l', 'pt_BR', |
| + '-l', 'pt_PT', |
| + '-l', 'ro', |
| + '-l', 'ru', |
| + '-l', 'sk', |
| + '-l', 'sl', |
| + '-l', 'sr', |
| + '-l', 'sv', |
| + '-l', 'th', |
| + '-l', 'tr', |
| + '-l', 'uk', |
| + '-l', 'vi', |
| + '-l', 'zh_CN', |
| + '-l', 'zh_TW', |
| + ], |
| 'remoting_webapp_locale_files': [ |
| '<(webapp_locale_dir)/ar/messages.json', |
| '<(webapp_locale_dir)/bg/messages.json', |
| @@ -663,18 +709,19 @@ |
| 'product_extension': '<(host_plugin_extension)', |
| 'product_prefix': '<(host_plugin_prefix)', |
| 'dependencies': [ |
| + '../net/net.gyp:net', |
| + '../third_party/npapi/npapi.gyp:npapi', |
| 'remoting_base', |
| 'remoting_host', |
| 'remoting_host_event_logger', |
| 'remoting_host_logging', |
| 'remoting_host_setup_base', |
| 'remoting_jingle_glue', |
| - '../net/net.gyp:net', |
| - '../third_party/npapi/npapi.gyp:npapi', |
| ], |
| 'sources': [ |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc', |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', |
| 'base/dispatch_win.h', |
| - 'host/win/core_resource.h', |
| 'host/plugin/host_log_handler.cc', |
| 'host/plugin/host_log_handler.h', |
| 'host/plugin/host_plugin.cc', |
| @@ -682,6 +729,7 @@ |
| 'host/plugin/host_plugin_utils.h', |
| 'host/plugin/host_script_object.cc', |
| 'host/plugin/host_script_object.h', |
| + 'host/win/core_resource.h', |
| ], |
| 'conditions': [ |
| ['OS=="mac"', { |
| @@ -719,18 +767,19 @@ |
| }], # OS=="mac" |
| [ 'OS=="win"', { |
| 'defines': [ |
| + # 4 corresponds to BINARY_HOST_PLUGIN in version.rc.template. |
| + 'BINARY=4', |
|
garykac
2013/07/09 00:34:12
These values can't be made into strings?
BINARY=H
alexeypa (please no reviews)
2013/07/09 01:05:23
Done.
|
| 'ISOLATION_AWARE_ENABLED=1', |
| ], |
| 'dependencies': [ |
| 'remoting_lib_idl', |
| + 'remoting_core_resources', |
| 'remoting_version_resources', |
| ], |
| 'include_dirs': [ |
| '<(INTERMEDIATE_DIR)', |
| ], |
| 'sources': [ |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_plugin_version.rc', |
| - 'host/win/core.rc', |
| 'host/plugin/host_plugin.def', |
| ], |
| }], |
| @@ -1347,12 +1396,16 @@ |
| 'target_name': 'remoting_console', |
| 'type': 'executable', |
| 'variables': { 'enable_wexit_time_destructors': 1, }, |
| + 'defines': [ |
| + # 3 corresponds to BINARY_HOST_ME2ME in version.rc.template. |
| + 'BINARY=3', |
| + ], |
| 'dependencies': [ |
| 'remoting_core', |
| 'remoting_version_resources', |
| ], |
| 'sources': [ |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_version.rc', |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', |
| 'host/win/entry_point.cc', |
| ], |
| 'msvs_settings': { |
| @@ -1405,6 +1458,8 @@ |
| '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS', |
| '_ATL_NO_AUTOMATIC_NAMESPACE', |
| '_ATL_NO_EXCEPTIONS', |
| + # 1 corresponds to BINARY_CORE in version.rc.template. |
| + 'BINARY=1', |
| 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"', |
| 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"', |
| 'HOST_IMPLEMENTATION', |
| @@ -1419,8 +1474,10 @@ |
| '../ipc/ipc.gyp:ipc', |
| '../net/net.gyp:net', |
| '../third_party/webrtc/modules/modules.gyp:desktop_capture', |
| + '../third_party/webrtc/modules/modules.gyp:desktop_capture', |
| 'remoting_base', |
| 'remoting_breakpad', |
| + 'remoting_core_resources', |
| 'remoting_host', |
| 'remoting_host_event_logger', |
| 'remoting_host_logging', |
| @@ -1430,12 +1487,12 @@ |
| 'remoting_me2me_host_static', |
| 'remoting_protocol', |
| 'remoting_version_resources', |
| - '../third_party/webrtc/modules/modules.gyp:desktop_capture', |
| ], |
| 'sources': [ |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc', |
| '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc', |
| '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc', |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_core_version.rc', |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', |
| 'host/chromoting_messages.cc', |
| 'host/chromoting_messages.h', |
| 'host/config_file_watcher.cc', |
| @@ -1466,7 +1523,6 @@ |
| 'host/win/chromoting_module.cc', |
| 'host/win/chromoting_module.h', |
| 'host/win/core.cc', |
| - 'host/win/core.rc', |
| 'host/win/core_resource.h', |
| 'host/win/elevated_controller.cc', |
| 'host/win/elevated_controller.h', |
| @@ -1539,15 +1595,53 @@ |
| ], # actions |
| }, # end of target 'remoting_core_manifest' |
| { |
| + 'target_name': 'remoting_core_resources', |
| + 'type': 'none', |
| + 'dependencies': [ |
| + 'remoting_resources', |
| + ], |
| + 'hard_dependency': 1, |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(SHARED_INTERMEDIATE_DIR)', |
| + ], |
| + }, |
| + 'sources': [ |
| + 'host/win/core.rc.template' |
| + ], |
| + 'rules': [ |
| + { |
| + 'rule_name': 'version', |
| + 'extension': 'template', |
| + 'outputs': [ |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc' |
| + ], |
| + 'action': [ |
| + 'python', |
| + '<(localize_py_path)', |
| + '<@(remoting_languages)', |
| + '--messages_path', '<(webapp_locale_dir)', |
| + '<(RULE_INPUT_PATH)', |
| + '<@(_outputs)', |
| + ], |
| + 'message': 'Localizing the dialogs and strings' |
| + }, |
| + ], |
| + }, # end of target 'remoting_core_resources' |
| + { |
| 'target_name': 'remoting_desktop', |
| 'type': 'executable', |
| 'variables': { 'enable_wexit_time_destructors': 1, }, |
| + 'defines': [ |
| + # 2 corresponds to BINARY_DESKTOP in version.rc.template. |
| + 'BINARY=2', |
| + ], |
| 'dependencies': [ |
| 'remoting_core', |
| 'remoting_version_resources', |
| ], |
| 'sources': [ |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_desktop_version.rc', |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', |
| 'host/win/entry_point.cc', |
| ], |
| 'msvs_settings': { |
| @@ -1606,12 +1700,16 @@ |
| 'product_name': 'remoting_host', |
| 'type': 'executable', |
| 'variables': { 'enable_wexit_time_destructors': 1, }, |
| + 'defines': [ |
| + # 3 corresponds to BINARY_HOST_ME2ME in version.rc.template. |
| + 'BINARY=3', |
| + ], |
| 'dependencies': [ |
| 'remoting_core', |
| 'remoting_version_resources', |
| ], |
| 'sources': [ |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_version.rc', |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', |
| 'host/win/entry_point.cc', |
| ], |
| 'msvs_settings': { |
| @@ -1657,7 +1755,40 @@ |
| }, |
| ], # actions |
| }, # end of target 'remoting_host_manifest' |
| - |
| + { |
| + 'target_name': 'remoting_host_messages', |
| + 'type': 'none', |
| + 'dependencies': [ |
| + 'remoting_resources', |
| + ], |
| + 'hard_dependency': 1, |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(SHARED_INTERMEDIATE_DIR)', |
| + ], |
| + }, |
| + 'sources': [ |
| + 'host/win/host_messages.mc.template' |
| + ], |
| + 'rules': [ |
| + { |
| + 'rule_name': 'localize', |
| + 'extension': 'template', |
| + 'outputs': [ |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc', |
| + ], |
| + 'action': [ |
| + 'python', |
| + '<(localize_py_path)', |
| + '<@(remoting_languages)', |
| + '--messages_path', '<(webapp_locale_dir)', |
| + '<(RULE_INPUT_PATH)', |
| + '<@(_outputs)', |
| + ], |
| + 'message': 'Localizing the event log messages' |
| + }, |
| + ], |
| + }, # end of target 'remoting_host_messages' |
| { |
| 'target_name': 'remoting_host_plugin_manifest', |
| 'type': 'none', |
| @@ -1692,70 +1823,58 @@ |
| ], # actions |
| }, # end of target 'remoting_host_plugin_manifest' |
| - # Generates the version information resources for the Windows binaries. |
| - # The .RC files are generated from the "version.rc.version" template and |
| - # placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting" folder. |
| + # Generates localized the version information resources for the Windows |
| + # binaries. |
| # The substitution strings are taken from: |
| # - build/util/LASTCHANGE - the last source code revision. |
| # - chrome/VERSION - the major, build & patch versions. |
| # - remoting/VERSION - the chromoting patch version (and overrides |
| # for chrome/VERSION). |
| - # - (branding_path) - UI/localizable strings. |
| - # - xxx.ver - per-binary non-localizable strings such as the binary |
| - # name. |
| + # - translated webapp strings |
| { |
| 'target_name': 'remoting_version_resources', |
| 'type': 'none', |
| - 'inputs': [ |
| - '<(branding_path)', |
| - 'version.rc.version', |
| - '<(DEPTH)/build/util/LASTCHANGE', |
| - '<(remoting_version_path)', |
| - '<(chrome_version_path)', |
| + 'dependencies': [ |
| + 'remoting_resources', |
| ], |
| + 'hard_dependency': 1, |
| 'direct_dependent_settings': { |
| 'include_dirs': [ |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting', |
| + '<(SHARED_INTERMEDIATE_DIR)', |
| ], |
| }, |
| 'sources': [ |
| - 'host/plugin/remoting_host_plugin.ver', |
| - 'host/win/remoting_core.ver', |
| - 'host/win/remoting_desktop.ver', |
| - 'host/win/remoting_host.ver', |
| + 'host/win/version.rc.template' |
| ], |
| 'rules': [ |
| { |
| 'rule_name': 'version', |
| - 'extension': 'ver', |
| + 'extension': 'template', |
| 'variables': { |
| 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', |
| - 'template_input_path': 'version.rc.version', |
| }, |
| 'inputs': [ |
| - '<(branding_path)', |
| '<(chrome_version_path)', |
| '<(lastchange_path)', |
| '<(remoting_version_path)', |
| - '<(template_input_path)', |
| ], |
| 'outputs': [ |
| - '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)_version.rc', |
| + '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc', |
| ], |
| 'action': [ |
| 'python', |
| - '<(version_py_path)', |
| - '-f', '<(RULE_INPUT_PATH)', |
| - '-f', '<(chrome_version_path)', |
| + '<(localize_py_path)', |
| + '<@(remoting_languages)', |
| + '-i', '<(chrome_version_path)', |
| # |remoting_version_path| must be after |chrome_version_path| |
| # because it can contain overrides for the version numbers. |
| - '-f', '<(remoting_version_path)', |
| - '-f', '<(branding_path)', |
| - '-f', '<(lastchange_path)', |
| - '<(template_input_path)', |
| + '-i', '<(remoting_version_path)', |
| + '-i', '<(lastchange_path)', |
| + '--messages_path', '<(webapp_locale_dir)', |
| + '<(RULE_INPUT_PATH)', |
| '<@(_outputs)', |
| ], |
| - 'message': 'Generating version information in <@(_outputs)' |
| + 'message': 'Localizing the version information' |
| }, |
| ], |
| }, # end of target 'remoting_version_resources' |
| @@ -1973,6 +2092,7 @@ |
| 'variables': { 'enable_wexit_time_destructors': 1, }, |
| 'dependencies': [ |
| 'remoting_base', |
| + 'remoting_host_messages', |
| ], |
| 'sources': [ |
| 'host/host_event_logger.h', |
| @@ -1981,10 +2101,10 @@ |
| ], |
| 'conditions': [ |
| ['OS=="win"', { |
| + 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host', |
| 'sources': [ |
| - 'host/remoting_host_messages.mc', |
| + '<(_output_dir)/remoting_host_messages.mc', |
| ], |
| - 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host', |
| 'include_dirs': [ |
| '<(_output_dir)', |
| ], |
| @@ -1993,8 +2113,8 @@ |
| '<(_output_dir)', |
| ], |
| }, |
| - # Rule to run the message compiler. |
| 'rules': [ |
| + # Rule to run the message compiler. |
| { |
| 'rule_name': 'message_compiler', |
| 'extension': 'mc', |
| @@ -2008,6 +2128,7 @@ |
| 'mc.exe', |
| '-h', '<(_output_dir)', |
| '-r', '<(_output_dir)/.', |
| + '-u', |
| '<(RULE_INPUT_PATH)', |
| ], |
| 'process_outputs_as_sources': 1, |
| @@ -2170,6 +2291,9 @@ |
| 'sources': [ |
| 'base/resources_unittest.cc', |
| 'host/plugin/host_script_object.cc', |
| + 'host/win/core.rc.template', |
| + 'host/win/host_messages.mc.template', |
| + 'host/win/version.rc.template', |
| 'webapp/butter_bar.js', |
| 'webapp/client_screen.js', |
| 'webapp/error.js', |