diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-21 22:23:59 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-21 22:23:59 +0000 |
commit | 7c3b3ddc3fe9e1e14a0c477281f626c6363e7bc3 (patch) | |
tree | f69cca402d83877f438801dbc0107f56e30a74b6 | |
parent | 031793ff63e1b27ae8ecc1f8ae8ab0d96a6741e3 (diff) | |
download | chromium_src-7c3b3ddc3fe9e1e14a0c477281f626c6363e7bc3.zip chromium_src-7c3b3ddc3fe9e1e14a0c477281f626c6363e7bc3.tar.gz chromium_src-7c3b3ddc3fe9e1e14a0c477281f626c6363e7bc3.tar.bz2 |
Generating version information for remoting binaries the same way Chrome does it.
Review URL: https://chromiumcodereview.appspot.com/9801005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128073 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | remoting/chromium_branding | 9 | ||||
-rw-r--r-- | remoting/google_chrome_branding | 9 | ||||
-rw-r--r-- | remoting/host/host_service.rc | 42 | ||||
-rw-r--r-- | remoting/host/host_service.ver | 4 | ||||
-rw-r--r-- | remoting/host/plugin/constants.h | 8 | ||||
-rw-r--r-- | remoting/host/plugin/host_plugin.rc | 18 | ||||
-rw-r--r-- | remoting/host/plugin/host_plugin.ver | 5 | ||||
-rw-r--r-- | remoting/host/plugin/host_plugin_version.rc | 45 | ||||
-rw-r--r-- | remoting/host/remoting_me2me_host.ver | 4 | ||||
-rw-r--r-- | remoting/remoting.gyp | 93 | ||||
-rw-r--r-- | remoting/version.rc.version | 65 |
12 files changed, 191 insertions, 112 deletions
@@ -117,6 +117,7 @@ v8.log /remoting/proto/chromotocol_proto_lib.xml /remoting/proto/trace_proto_lib.xml /remoting/remoting_me2me_host.xml +/remoting/remoting_version_resources.xml /remoting/tools/internal/ /rlz /sdch/open-vcdiff diff --git a/remoting/chromium_branding b/remoting/chromium_branding new file mode 100644 index 0000000..f3ac5f0 --- /dev/null +++ b/remoting/chromium_branding @@ -0,0 +1,9 @@ +COMPANY_FULLNAME=The Chromium Authors +PRODUCT_FULLNAME=Chromium +COPYRIGHT=Copyright (C) 2012 The Chromium Authors. All Rights Reserved. +HOST_PLUGIN_FILE_DESCRIPTION=Allow another user to access your computer securely over the Internet. +HOST_PLUGIN_PRODUCT_FULLNAME=Chromoting Host +ME2ME_HOST_FILE_DESCRIPTION=Chromoting Host +ME2ME_HOST_PRODUCT_FULLNAME=Chromoting +SERVICE_FILE_DESCRIPTION=Chromoting Service +SERVICE_PRODUCT_FULLNAME=Chromoting diff --git a/remoting/google_chrome_branding b/remoting/google_chrome_branding new file mode 100644 index 0000000..7a58f39 --- /dev/null +++ b/remoting/google_chrome_branding @@ -0,0 +1,9 @@ +COMPANY_FULLNAME=Google Inc. +PRODUCT_FULLNAME=Chrome Remote Desktop +COPYRIGHT=Copyright (C) 2012 Google Inc. All Rights Reserved. +HOST_PLUGIN_FILE_DESCRIPTION=Allow another user to access your computer securely over the Internet. +HOST_PLUGIN_PRODUCT_FULLNAME=Chrome Remote Desktop Host +ME2ME_HOST_FILE_DESCRIPTION=Chrome Remote Desktop Host +ME2ME_HOST_PRODUCT_FULLNAME=Chrome Remote Desktop +SERVICE_FILE_DESCRIPTION=Chrome Remote Desktop Service +SERVICE_PRODUCT_FULLNAME=Chrome Remote Desktop diff --git a/remoting/host/host_service.rc b/remoting/host/host_service.rc index 983c069..e173708 100644 --- a/remoting/host/host_service.rc +++ b/remoting/host/host_service.rc @@ -49,51 +49,13 @@ END ///////////////////////////////////////////////////////////////////////////// // -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Chromoting Host Service" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "remoting_host_service" - VALUE "LegalCopyright", "Copyright (C) 2012 The Chromium Authors. All rights reserved." - VALUE "OriginalFilename", "remoting_host_service.exe" - VALUE "ProductName", "Chromoting Host Service" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// // String Table // STRINGTABLE BEGIN - IDS_DISPLAY_SERVICE_NAME "Chromoting Host Service" - IDS_SERVICE_DESCRIPTION "This service enables incoming Chromoting connections." + IDS_DISPLAY_SERVICE_NAME "Chrome Remote Desktop Service" + IDS_SERVICE_DESCRIPTION "This service enables incoming connections from Chrome Remote Desktop clients." END #endif // English (U.S.) resources diff --git a/remoting/host/host_service.ver b/remoting/host/host_service.ver new file mode 100644 index 0000000..bc502ef --- /dev/null +++ b/remoting/host/host_service.ver @@ -0,0 +1,4 @@ +BINARY=BINARY_SERVICE +FILE_TYPE=VFT_APP +INTERNAL_NAME=remoting_service.exe +ORIGINAL_FILENAME=remoting_service.exe diff --git a/remoting/host/plugin/constants.h b/remoting/host/plugin/constants.h index 3316406..c3b9f33 100644 --- a/remoting/host/plugin/constants.h +++ b/remoting/host/plugin/constants.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,7 +6,11 @@ #define REMOTING_HOST_PLUGIN_CONSTANTS_H_ // Warning: If you modify any macro in this file, make sure to modify -// remoting/remoting.gyp too. +// the following files too: +// - remoting/remoting.gyp +// - remoting/chromium_branding +// - remoting/google_chrome_branding +// - remoting/host/plugin/host_plugin.ver #define HOST_PLUGIN_DESCRIPTION \ "Allow another user to access your computer securely over the Internet." diff --git a/remoting/host/plugin/host_plugin.rc b/remoting/host/plugin/host_plugin.rc index 5ef6187..612e051 100644 --- a/remoting/host/plugin/host_plugin.rc +++ b/remoting/host/plugin/host_plugin.rc @@ -40,11 +40,6 @@ BEGIN "\0"
END
-3 TEXTINCLUDE
-BEGIN
- "\r#include ""remoting/host/plugin/host_plugin_version.rc""\0"
-END
-
#endif // APSTUDIO_INVOKED
@@ -105,16 +100,3 @@ END #endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#include "remoting/host/plugin/host_plugin_version.rc"
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/remoting/host/plugin/host_plugin.ver b/remoting/host/plugin/host_plugin.ver new file mode 100644 index 0000000..0416488 --- /dev/null +++ b/remoting/host/plugin/host_plugin.ver @@ -0,0 +1,5 @@ +BINARY=BINARY_HOST_PLUGIN +FILE_TYPE=VFT_DLL +HOST_PLUGIN_MIME_TYPE=application/vnd.chromium.remoting-host +INTERNAL_NAME=remoting_host_plugin.dll +ORIGINAL_FILENAME=remoting_host_plugin.dll diff --git a/remoting/host/plugin/host_plugin_version.rc b/remoting/host/plugin/host_plugin_version.rc deleted file mode 100644 index 8825599..0000000 --- a/remoting/host/plugin/host_plugin_version.rc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// The host plugin pulls in strings from remoting.gyp via the pre-processor. -// The version resource is separate from the auto-generated resources so that -// Visual Studio will not modify it when the resources are edited in the IDE. - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", HOST_PLUGIN_DESCRIPTION - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "remoting_host_plugin.dll" - VALUE "LegalCopyright", "Copyright (C) 2011 The Chromium Authors. All rights reserved." - VALUE "MIMEType", HOST_PLUGIN_MIME_TYPE - VALUE "OriginalFilename", "remoting_host_plugin.dll" - VALUE "ProductName", HOST_PLUGIN_NAME - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/remoting/host/remoting_me2me_host.ver b/remoting/host/remoting_me2me_host.ver new file mode 100644 index 0000000..efc0e05 --- /dev/null +++ b/remoting/host/remoting_me2me_host.ver @@ -0,0 +1,4 @@ +BINARY=BINARY_ME2ME_HOST +FILE_TYPE=VFT_APP +INTERNAL_NAME=remoting_me2me_host.exe +ORIGINAL_FILENAME=remoting_me2me_host.exe diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 1137dd5..0402001 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -13,6 +13,15 @@ 'host_plugin_mime_type': 'application/vnd.chromium.remoting-host', 'host_plugin_description': 'Allow another user to access your computer securely over the Internet.', + # Borrow the scripts for generating version information for remoting + # binaries from Chrome. + 'variables': { + 'version_py_path': '../chrome/tools/build/version.py', + 'version_path': '../chrome/VERSION', + }, + 'version_py_path': '<(version_py_path)', + 'version_path': '<(version_path)', + 'conditions': [ ['OS=="mac"', { 'conditions': [ @@ -212,6 +221,7 @@ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../ipc/ipc.gyp:ipc', + 'remoting_version_resources', ], 'sources': [ 'base/scoped_sc_handle_win.h', @@ -227,6 +237,7 @@ 'host/wts_console_observer_win.h', 'host/wts_session_process_launcher_win.cc', 'host/wts_session_process_launcher_win.h', + '<(SHARED_INTERMEDIATE_DIR)/remoting_version/host_service_version.rc' ], 'msvs_settings': { 'VCLinkerTool': { @@ -236,6 +247,74 @@ }, }, }, # end of target 'remoting_service' + + # 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_version" folder. + # The substiture strings are taken from: + # - chrome/VERSION - the current version of Chrome. + # - build/util/LASTCHANGE - the last source code revision. + # - xxx_branding - UI/localizable strings. + # - xxx.ver - per-binary non-localizable strings such as the binary + # name. + { + 'target_name': 'remoting_version_resources', + 'type': 'none', + 'dependencies': [ + '../build/util/build_util.gyp:lastchange#target', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/remoting_version', + ], + }, + 'sources': [ + 'host/host_service.ver', + 'host/plugin/host_plugin.ver', + 'host/remoting_me2me_host.ver', + ], + 'rules': [ + { + 'rule_name': 'version', + 'extension': 'ver', + 'variables': { + 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', + 'template_input_path': 'version.rc.version', + }, + 'conditions': [ + ['branding == "Chrome"', { + 'variables': { + 'branding_path': 'google_chrome_branding', + }, + }, { # else branding!="Chrome" + 'variables': { + 'branding_path': 'chromium_branding', + }, + }], + ], + 'inputs': [ + '<(template_input_path)', + '<(version_path)', + '<(branding_path)', + '<(lastchange_path)', + ], + 'outputs': [ + '<(SHARED_INTERMEDIATE_DIR)/remoting_version/<(RULE_INPUT_ROOT)_version.rc', + ], + 'action': [ + 'python', + '<(version_py_path)', + '-f', '<(RULE_INPUT_PATH)', + '-f', '<(version_path)', + '-f', '<(branding_path)', + '-f', '<(lastchange_path)', + '<(template_input_path)', + '<@(_outputs)', + ], + 'message': 'Generating version information in <@(_outputs)' + }, + ], + }, # end of target 'remoting_version_resources' ], # end of 'targets' }], # 'OS=="win"' @@ -299,8 +378,6 @@ 'host/plugin/host_log_handler.cc', 'host/plugin/host_log_handler.h', 'host/plugin/host_plugin.cc', - 'host/plugin/host_plugin.def', - 'host/plugin/host_plugin.rc', 'host/plugin/host_plugin_resource.h', 'host/plugin/host_plugin_utils.cc', 'host/plugin/host_plugin_utils.h', @@ -343,13 +420,13 @@ }], # OS=="mac" [ 'OS=="win"', { 'dependencies': [ - '../ipc/ipc.gyp:ipc' + '../ipc/ipc.gyp:ipc', + 'remoting_version_resources', ], - }], - ['OS!="win"', { - 'sources!': [ + 'sources': [ 'host/plugin/host_plugin.def', 'host/plugin/host_plugin.rc', + '<(SHARED_INTERMEDIATE_DIR)/remoting_version/host_plugin_version.rc' ], }], ], @@ -746,11 +823,13 @@ }], ['OS=="win"', { 'dependencies': [ - '../ipc/ipc.gyp:ipc' + '../ipc/ipc.gyp:ipc', + 'remoting_version_resources', ], 'sources': [ 'host/host_event_logger_win.cc', 'host/remoting_host_messages.mc', + '<(SHARED_INTERMEDIATE_DIR)/remoting_version/remoting_me2me_host_version.rc' ], 'include_dirs': [ '<(INTERMEDIATE_DIR)', diff --git a/remoting/version.rc.version b/remoting/version.rc.version new file mode 100644 index 0000000..e6b26ad --- /dev/null +++ b/remoting/version.rc.version @@ -0,0 +1,65 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <verrsrc.h> + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +// Let .VER file to select the binary that is being compiled. +#define BINARY_HOST_PLUGIN 1 +#define BINARY_ME2ME_HOST 2 +#define BINARY_SERVICE 3 +#define BINARY @BINARY@ + +#if (BINARY == BINARY_HOST_PLUGIN) +#define FILE_DESCRIPTION "@HOST_PLUGIN_FILE_DESCRIPTION@" +#define PRODUCT_FULLNAME "@HOST_PLUGIN_PRODUCT_FULLNAME@" +#elif (BINARY == BINARY_ME2ME_HOST) +#define FILE_DESCRIPTION "@ME2ME_HOST_FILE_DESCRIPTION@" +#define PRODUCT_FULLNAME "@ME2ME_HOST_PRODUCT_FULLNAME@" +#elif (BINARY == BINARY_SERVICE) +#define FILE_DESCRIPTION "@SERVICE_FILE_DESCRIPTION@" +#define PRODUCT_FULLNAME "@SERVICE_PRODUCT_FULLNAME@" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ + PRODUCTVERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE @FILE_TYPE@ + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "@COMPANY_FULLNAME@" + VALUE "FileDescription", FILE_DESCRIPTION + VALUE "FileVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + VALUE "InternalName", "@INTERNAL_NAME@" + VALUE "LegalCopyright", "@COPYRIGHT@" + VALUE "OriginalFilename", "@ORIGINAL_FILENAME@" + VALUE "ProductName", PRODUCT_FULLNAME + VALUE "ProductVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + VALUE "LastChange", "@LASTCHANGE@" + VALUE "Official Build", "@OFFICIAL_BUILD@" +#if (BINARY == BINARY_HOST_PLUGIN) + VALUE "MIMEType", "@HOST_PLUGIN_MIME_TYPE@" +#endif + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END |