Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Unified Diff: remoting/remoting.gyp

Issue 18323017: Localized Chromoting Host on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/remoting.gyp
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index 94bb83d4c7b65b02c1c32799fba795a527633272..b57338ecee1739d85310b16879d3ac0ea61f7450 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',
@@ -249,6 +295,10 @@
'target_defaults': {
'defines': [
+ 'BINARY_CORE=1',
+ 'BINARY_DESKTOP=2',
+ 'BINARY_HOST_ME2ME=3',
+ 'BINARY_HOST_PLUGIN=4',
],
'include_dirs': [
'..', # Root of Chrome checkout
@@ -659,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',
@@ -678,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"', {
@@ -715,18 +767,18 @@
}], # OS=="mac"
[ 'OS=="win"', {
'defines': [
+ 'BINARY=BINARY_HOST_PLUGIN',
'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',
],
}],
@@ -1343,12 +1395,15 @@
'target_name': 'remoting_console',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
+ 'defines': [
+ 'BINARY=BINARY_HOST_ME2ME',
+ ],
'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': {
@@ -1401,6 +1456,7 @@
'_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
'_ATL_NO_AUTOMATIC_NAMESPACE',
'_ATL_NO_EXCEPTIONS',
+ 'BINARY=BINARY_CORE',
'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
'HOST_IMPLEMENTATION',
@@ -1415,8 +1471,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',
@@ -1426,12 +1484,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',
@@ -1462,7 +1520,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',
@@ -1535,15 +1592,52 @@
], # 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.jinja2'
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'version',
+ 'extension': 'jinja2',
+ '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': [
+ 'BINARY=BINARY_DESKTOP',
+ ],
'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': {
@@ -1602,12 +1696,15 @@
'product_name': 'remoting_host',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
+ 'defines': [
+ 'BINARY=BINARY_HOST_ME2ME',
+ ],
'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': {
@@ -1653,7 +1750,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.jinja2'
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'localize',
+ 'extension': 'jinja2',
+ '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',
@@ -1688,70 +1818,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.jinja2'
],
'rules': [
{
'rule_name': 'version',
- 'extension': 'ver',
+ 'extension': 'jinja2',
'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'
@@ -1977,10 +2095,13 @@
],
'conditions': [
['OS=="win"', {
- 'sources': [
- 'host/remoting_host_messages.mc',
+ 'dependencies': [
+ 'remoting_host_messages',
],
'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
+ 'sources': [
+ '<(_output_dir)/remoting_host_messages.mc',
+ ],
'include_dirs': [
'<(_output_dir)',
],
@@ -1989,8 +2110,8 @@
'<(_output_dir)',
],
},
- # Rule to run the message compiler.
'rules': [
+ # Rule to run the message compiler.
{
'rule_name': 'message_compiler',
'extension': 'mc',
@@ -2004,6 +2125,7 @@
'mc.exe',
'-h', '<(_output_dir)',
'-r', '<(_output_dir)/.',
+ '-u',
'<(RULE_INPUT_PATH)',
],
'process_outputs_as_sources': 1,
@@ -2166,6 +2288,9 @@
'sources': [
'base/resources_unittest.cc',
'host/plugin/host_script_object.cc',
+ 'host/win/core.rc.jinja2',
+ 'host/win/host_messages.mc.jinja2',
+ 'host/win/version.rc.jinja2',
'webapp/butter_bar.js',
'webapp/client_screen.js',
'webapp/error.js',

Powered by Google App Engine
This is Rietveld 408576698