diff options
author | mad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 20:41:38 +0000 |
---|---|---|
committer | mad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 20:41:38 +0000 |
commit | 4d91cbc7507d85971368202326bcb58531374a8d (patch) | |
tree | 27e562b041ec74fa21b2a479ab7f358bdb68c984 /chrome | |
parent | 4ae3d4e71fcd94412d9957a0be05a3479e332b8d (diff) | |
download | chromium_src-4d91cbc7507d85971368202326bcb58531374a8d.zip chromium_src-4d91cbc7507d85971368202326bcb58531374a8d.tar.gz chromium_src-4d91cbc7507d85971368202326bcb58531374a8d.tar.bz2 |
Committing for jeffbailey.
Excerpt from: http://codereview.chromium.org/1991004/show
----------------
Put version information into header file for easy consumption by RC files.
RC files can use an #include to pull in this header, rather than being each
dynamically generated.
BUG=none
TEST=none
----------------
Review URL: http://codereview.chromium.org/2020003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/chrome.gyp | 43 | ||||
-rw-r--r-- | chrome/version.h.in | 130 |
2 files changed, 173 insertions, 0 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index a622be2..d66de827 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1405,6 +1405,49 @@ ], }, { + 'target_name': 'chrome_version_header', + 'type': 'none', + 'actions': [ + { + 'action_name': 'version_header', + 'variables': { + 'lastchange_path': + '<(SHARED_INTERMEDIATE_DIR)/build/LASTCHANGE', + }, + 'conditions': [ + [ 'branding == "Chrome"', { + 'variables': { + 'branding_path': 'app/theme/google_chrome/BRANDING', + }, + }, { # else branding!="Chrome" + 'variables': { + 'branding_path': 'app/theme/chromium/BRANDING', + }, + }], + ], + 'inputs': [ + '<(version_path)', + '<(branding_path)', + '<(lastchange_path)', + 'version.h.in', + ], + 'outputs': [ + '<(SHARED_INTERMEDIATE_DIR)/version.h', + ], + 'action': [ + 'python', + '<(version_py_path)', + '-f', '<(version_path)', + '-f', '<(branding_path)', + '-f', '<(lastchange_path)', + 'version.h.in', + '<@(_outputs)', + ], + 'message': 'Generating version header file: <@(_outputs)', + }, + ], + }, + { 'target_name': 'automation', 'type': '<(library)', 'msvs_guid': '1556EF78-C7E6-43C8-951F-F6B43AC0DD12', diff --git a/chrome/version.h.in b/chrome/version.h.in new file mode 100644 index 0000000..022c360 --- /dev/null +++ b/chrome/version.h.in @@ -0,0 +1,130 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can be +// found in the LICENSE file. + +// version.h is generated from version.h.in. Edit the source! + +#pragma once + +// Version Information + +#define CHROME_VERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ +#define CHROME_VERSION_STRING "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + +// Branding Information + +#define COMPANY_FULLNAME_STRING "@COMPANY_FULLNAME@" +#define COMPANY_SHORTNAME_STRING "@COMPANY_SHORTNAME@" +#define PRODUCT_FULLNAME_STRING "@PRODUCT_FULLNAME@" +#define PRODUCT_SHORTNAME_STRING "@PRODUCT_SHORTNAME@" +#define COPYRIGHT_STRING "@COPYRIGHT@" +#define OFFICIAL_BUILD_STRING "@OFFICIAL_BUILD@" + +// Changelist Information + +#define LASTCHANGE_STRING "@LASTCHANGE@" + +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can be +// found in the LICENSE file. + +// version.h is generated from version.h.in. Edit the source! + +#pragma once + +// Version Information + +#define CHROME_VERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ +#define CHROME_VERSION_STRING "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + +// Branding Information + +#define COMPANY_FULLNAME_STRING "@COMPANY_FULLNAME@" +#define COMPANY_SHORTNAME_STRING "@COMPANY_SHORTNAME@" +#define PRODUCT_FULLNAME_STRING "@PRODUCT_FULLNAME@" +#define PRODUCT_SHORTNAME_STRING "@PRODUCT_SHORTNAME@" +#define COPYRIGHT_STRING "@COPYRIGHT@" +#define OFFICIAL_BUILD_STRING "@OFFICIAL_BUILD@" + +// Changelist Information + +#define LASTCHANGE_STRING "@LASTCHANGE@" + +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can be +// found in the LICENSE file. + +// version.h is generated from version.h.in. Edit the source! + +#pragma once + +// Version Information + +#define CHROME_VERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ +#define CHROME_VERSION_STRING "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + +// Branding Information + +#define COMPANY_FULLNAME_STRING "@COMPANY_FULLNAME@" +#define COMPANY_SHORTNAME_STRING "@COMPANY_SHORTNAME@" +#define PRODUCT_FULLNAME_STRING "@PRODUCT_FULLNAME@" +#define PRODUCT_SHORTNAME_STRING "@PRODUCT_SHORTNAME@" +#define COPYRIGHT_STRING "@COPYRIGHT@" +#define OFFICIAL_BUILD_STRING "@OFFICIAL_BUILD@" + +// Changelist Information + +#define LASTCHANGE_STRING "@LASTCHANGE@" + +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can be +// found in the LICENSE file. + +// version.h is generated from version.h.in. Edit the source! + +#pragma once + +// Version Information + +#define CHROME_VERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ +#define CHROME_VERSION_STRING "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + +// Branding Information + +#define COMPANY_FULLNAME_STRING "@COMPANY_FULLNAME@" +#define COMPANY_SHORTNAME_STRING "@COMPANY_SHORTNAME@" +#define PRODUCT_FULLNAME_STRING "@PRODUCT_FULLNAME@" +#define PRODUCT_SHORTNAME_STRING "@PRODUCT_SHORTNAME@" +#define COPYRIGHT_STRING "@COPYRIGHT@" +#define OFFICIAL_BUILD_STRING "@OFFICIAL_BUILD@" + +// Changelist Information + +#define LASTCHANGE_STRING "@LASTCHANGE@" + +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source is governed by a BSD-style license that can be +// found in the LICENSE file. + +// version.h is generated from version.h.in. Edit the source! + +#pragma once + +// Version Information + +#define CHROME_VERSION @MAJOR@,@MINOR@,@BUILD@,@PATCH@ +#define CHROME_VERSION_STRING "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + +// Branding Information + +#define COMPANY_FULLNAME_STRING "@COMPANY_FULLNAME@" +#define COMPANY_SHORTNAME_STRING "@COMPANY_SHORTNAME@" +#define PRODUCT_FULLNAME_STRING "@PRODUCT_FULLNAME@" +#define PRODUCT_SHORTNAME_STRING "@PRODUCT_SHORTNAME@" +#define COPYRIGHT_STRING "@COPYRIGHT@" +#define OFFICIAL_BUILD_STRING "@OFFICIAL_BUILD@" + +// Changelist Information + +#define LASTCHANGE_STRING "@LASTCHANGE@" + |