diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-15 03:20:45 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-15 03:20:45 +0000 |
commit | d97cfbb046d93ec283bcf7cc76eacdfe06fb3485 (patch) | |
tree | f3050827628ebcf15c30858ac26241142a1562bc /remoting | |
parent | 59036b59b6e98ba0faca8156d1567754322f381c (diff) | |
download | chromium_src-d97cfbb046d93ec283bcf7cc76eacdfe06fb3485.zip chromium_src-d97cfbb046d93ec283bcf7cc76eacdfe06fb3485.tar.gz chromium_src-d97cfbb046d93ec283bcf7cc76eacdfe06fb3485.tar.bz2 |
Source major & minor versions from remoting, build & patch versions from Chrome.
The version number now follows the form major.minor.build.patch.
Major & minor versions come from remoting/VERSION.
Build & patch versions come from chrome/VERSION.
BUG=122721
TEST=Remoting web-app, plugins and host component executables & DLLs have matching versions in the above form, if versioned.
Review URL: http://codereview.chromium.org/10075002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132353 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/VERSION | 2 | ||||
-rw-r--r-- | remoting/remoting.gyp | 30 | ||||
-rwxr-xr-x | remoting/webapp/build-webapp.py | 27 | ||||
-rw-r--r-- | remoting/webapp/manifest.json | 2 |
4 files changed, 29 insertions, 32 deletions
diff --git a/remoting/VERSION b/remoting/VERSION index 71822c7..a3655e8 100644 --- a/remoting/VERSION +++ b/remoting/VERSION @@ -1,4 +1,2 @@ MAJOR=1 MINOR=4 -BUILD=8 -PATCH=0 diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 42e9bde..e1ae91d 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -1,3 +1,4 @@ + # 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. @@ -13,16 +14,14 @@ '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': '../remoting/VERSION', - }, - 'version_py_path': '<(version_py_path)', - 'version_path': '<(version_path)', + # The version is composed from major & minor versions specific to remoting + # and build & patch versions inherited from Chrome. + 'version_py_path': '../chrome/tools/build/version.py', + 'version_path': '../remoting/VERSION', + 'chrome_version_path': '../chrome/VERSION', 'version_full': - '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")', + '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@").' + '<!(python <(version_py_path) -f <(chrome_version_path) -t "@BUILD@.@PATCH@")', 'conditions': [ ['OS=="mac"', { @@ -332,9 +331,10 @@ # 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. - # The substiture strings are taken from: - # - remoting/VERSION - the current version of Chromoting. + # 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. # - xxx_branding - UI/localizable strings. # - xxx.ver - per-binary non-localizable strings such as the binary # name. @@ -350,6 +350,7 @@ 'version.rc.version', '<(DEPTH)/build/util/LASTCHANGE', '<(version_path)', + '<(chrome_version_path)', ], 'direct_dependent_settings': { 'include_dirs': [ @@ -384,6 +385,7 @@ 'inputs': [ '<(template_input_path)', '<(version_path)', + '<(chrome_version_path)', '<(branding_path)', '<(lastchange_path)', ], @@ -394,6 +396,7 @@ 'python', '<(version_py_path)', '-f', '<(RULE_INPUT_PATH)', + '-f', '<(chrome_version_path)', '-f', '<(version_path)', '-f', '<(branding_path)', '-f', '<(lastchange_path)', @@ -638,6 +641,8 @@ 'sources': [ 'webapp/build-webapp.py', 'webapp/verify-webapp.py', + '<(version_path)', + '<(chrome_version_path)', '<@(remoting_webapp_files)', '<@(remoting_webapp_locale_files)', ], @@ -688,6 +693,8 @@ 'inputs': [ 'webapp/build-webapp.py', '<(_plugin_path)', + '<(version_path)', + '<(chrome_version_path)', '<@(remoting_webapp_files)', '<@(remoting_webapp_locale_files)', ], @@ -698,6 +705,7 @@ 'action': [ 'python', 'webapp/build-webapp.py', '<(buildtype)', + '<(version_full)', '<(host_plugin_mime_type)', '<(_output_dir)', '<(_zip_path)', diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py index 84c9629..6f04f89 100755 --- a/remoting/webapp/build-webapp.py +++ b/remoting/webapp/build-webapp.py @@ -47,8 +47,8 @@ def createZip(zip_path, directory): zip.close() -def buildWebApp(buildtype, mimetype, destination, zip_path, plugin, files, - locales): +def buildWebApp(buildtype, version, mimetype, destination, zip_path, plugin, + files, locales): """Does the main work of building the webapp directory and zipfile. Args: @@ -155,19 +155,10 @@ def buildWebApp(buildtype, mimetype, destination, zip_path, plugin, files, if ((platform.system() == 'Linux') and (buildtype == 'Official')): subprocess.call(["strip", newPluginPath]) - # Add unique build numbers to manifest version. - # For now, this is based on the system clock (seconds since 1/1/1970), since - # a previous attempt (based on build/utils/lastchange.py) was failing on Mac. - # TODO(lambroslambrou): Use the SVN revision number or an incrementing build - # number (http://crbug.com/90110). - timestamp = int(time.time()) - # Version string must be 1-4 numbers separated by dots, with each number - # between 0 and 0xffff. - version1 = timestamp / 0x10000 - version2 = timestamp % 0x10000 + # Set the version number in the manifest version. findAndReplace(os.path.join(destination, 'manifest.json'), - 'UNIQUE_VERSION', - '%d.%d' % (version1, version2)) + 'FULL_APP_VERSION', + version) # Set the correct mimetype. findAndReplace(os.path.join(destination, 'plugin_settings.js'), @@ -212,16 +203,16 @@ def buildWebApp(buildtype, mimetype, destination, zip_path, plugin, files, def main(): - if len(sys.argv) < 6: + if len(sys.argv) < 7: print ('Usage: build-webapp.py ' - '<build-type> <mime-type> <dst> <zip-path> <plugin> ' + '<build-type> <version> <mime-type> <dst> <zip-path> <plugin> ' '<other files...> --locales <locales...>') return 1 reading_locales = False files = [] locales = [] - for arg in sys.argv[6:]: + for arg in sys.argv[7:]: if arg == "--locales": reading_locales = True; elif reading_locales: @@ -230,7 +221,7 @@ def main(): files.append(arg) buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], - files, locales) + sys.argv[6], files, locales) return 0 diff --git a/remoting/webapp/manifest.json b/remoting/webapp/manifest.json index 6696918..4eae439 100644 --- a/remoting/webapp/manifest.json +++ b/remoting/webapp/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_PRODUCT_NAME__", - "version": "1.3.UNIQUE_VERSION", + "version": "FULL_APP_VERSION", "description": "__MSG_PRODUCT_DESCRIPTION__", "default_locale": "en", "app": { |