Skip to content

Commit

Permalink
[Chromoting] Update remoting version numbering pattern.
Browse files Browse the repository at this point in the history
To make it easier to patch Chromoting without updating Chrome's version, we're switching to use: major.branch.patch.remoting_patch, where |remoting_patch| is 0 unless we need to patch a release.

For reference, Chrome uses major.minor.branch.patch, but |minor| is always 0.

This cl also adds the ability to override Chrome's |major|, |branch|, and |patch| values with Chromoting-specific ones.

BUG=153462

Review URL: https://chromiumcodereview.appspot.com/11058004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160992 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
garykac@chromium.org committed Oct 10, 2012
1 parent 889d59d commit acf2eb0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 25 deletions.
3 changes: 1 addition & 2 deletions remoting/VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
MAJOR=1
MINOR=9
REMOTING_PATCH=0
49 changes: 30 additions & 19 deletions remoting/remoting.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@
'remoting_host_linux_clipboard%': 1,
'remoting_multi_process%': 0,

# The version is composed from major & minor versions specific to remoting
# and build & patch versions inherited from Chrome.
# 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.
# Note that we check both the |chrome_version_path| file and the
# |remoting_version_path| so that we can override the Chrome version
# numbers if needed.
'version_py_path': '../chrome/tools/build/version.py',
'version_path': '../remoting/VERSION',
'remoting_version_path': '../remoting/VERSION',
'chrome_version_path': '../chrome/VERSION',
'version_full':
'<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@").'
'<!(python <(version_py_path) -f <(chrome_version_path) -t "@BUILD@.@PATCH@")',
'version_major':
'<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@MAJOR@")',
'version_minor':
'<!(python <(version_py_path) -f <(remoting_version_path) -t "@REMOTING_PATCH@")',
'version_short':
'<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@").'
'<!(python <(version_py_path) -f <(chrome_version_path) -t "@BUILD@")',
'<(version_major).<(version_minor).'
'<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@BUILD@")',
'version_full':
'<(version_short).'
'<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@PATCH@")',

'branding_path': '../remoting/branding_<(branding)',
'copyright_info': '<!(python <(version_py_path) -f <(branding_path) -t "@COPYRIGHT@")',
Expand Down Expand Up @@ -340,8 +348,8 @@
'defs': [
'VERSION=<(version_full)',
'VERSION_SHORT=<(version_short)',
'VERSION_MAJOR=<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@")',
'VERSION_MINOR=<!(python <(version_py_path) -f <(version_path) -t "@MINOR@")',
'VERSION_MAJOR=<(version_major)',
'VERSION_MINOR=<(version_minor)',
'COPYRIGHT_INFO=<(copyright_info)',
'HOST_NAME=<(host_name)',
'HOST_SERVICE_NAME=<(host_service_name)',
Expand Down Expand Up @@ -635,8 +643,9 @@
# placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting" folder.
# The substitution strings are taken from:
# - build/util/LASTCHANGE - the last source code revision.
# - chrome/VERSION - the build & patch versions.
# - remoting/VERSION - the major & minor versions.
# - 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.
Expand All @@ -647,7 +656,7 @@
'<(branding_path)',
'version.rc.version',
'<(DEPTH)/build/util/LASTCHANGE',
'<(version_path)',
'<(remoting_version_path)',
'<(chrome_version_path)',
],
'direct_dependent_settings': {
Expand All @@ -671,11 +680,11 @@
'template_input_path': 'version.rc.version',
},
'inputs': [
'<(template_input_path)',
'<(version_path)',
'<(chrome_version_path)',
'<(branding_path)',
'<(chrome_version_path)',
'<(lastchange_path)',
'<(remoting_version_path)',
'<(template_input_path)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)_version.rc',
Expand All @@ -685,7 +694,9 @@
'<(version_py_path)',
'-f', '<(RULE_INPUT_PATH)',
'-f', '<(chrome_version_path)',
'-f', '<(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)',
Expand Down Expand Up @@ -1134,7 +1145,7 @@
'sources': [
'webapp/build-webapp.py',
'webapp/verify-webapp.py',
'<(version_path)',
'<(remoting_version_path)',
'<(chrome_version_path)',
'<@(remoting_webapp_files)',
'<@(remoting_webapp_locale_files)',
Expand Down Expand Up @@ -1186,7 +1197,7 @@
'inputs': [
'webapp/build-webapp.py',
'<(_plugin_path)',
'<(version_path)',
'<(remoting_version_path)',
'<(chrome_version_path)',
'<@(remoting_webapp_files)',
'<@(remoting_webapp_locale_files)',
Expand Down
8 changes: 4 additions & 4 deletions remoting/version.rc.version
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@
PRODUCTVERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@
FILEVERSION @MAJOR@,@REMOTING_PATCH@,@BUILD@,@PATCH@
PRODUCTVERSION @MAJOR@,@REMOTING_PATCH@,@BUILD@,@PATCH@
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -48,12 +48,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "@COMPANY_FULLNAME@"
VALUE "FileDescription", FILE_DESCRIPTION
VALUE "FileVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"
VALUE "FileVersion", "@MAJOR@.@REMOTING_PATCH@.@BUILD@.@PATCH@"
VALUE "InternalName", "@INTERNAL_NAME@"
VALUE "LegalCopyright", "@COPYRIGHT@"
VALUE "OriginalFilename", "@ORIGINAL_FILENAME@"
VALUE "ProductName", "@PRODUCT_FULLNAME@"
VALUE "ProductVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"
VALUE "ProductVersion", "@MAJOR@.@REMOTING_PATCH@.@BUILD@.@PATCH@"
VALUE "LastChange", "@LASTCHANGE@"
VALUE "Official Build", "@OFFICIAL_BUILD@"
#if (BINARY == BINARY_HOST_PLUGIN)
Expand Down

0 comments on commit acf2eb0

Please sign in to comment.