summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--o3d/core/core.gyp9
-rw-r--r--o3d/installer/linux/debian.in/debian.gyp11
-rw-r--r--o3d/installer/mac/installer.gyp14
-rw-r--r--o3d/installer/win/installer.gyp43
-rw-r--r--o3d/installer/win/o3d_kill_version.py6
-rw-r--r--o3d/installer/win/o3d_version.py6
-rw-r--r--o3d/plugin/plugin.gyp10
-rw-r--r--o3d/plugin/version.gypi9
-rw-r--r--o3d/plugin/version_info.py40
9 files changed, 66 insertions, 82 deletions
diff --git a/o3d/core/core.gyp b/o3d/core/core.gyp
index d6c70cb..9b4237c 100644
--- a/o3d/core/core.gyp
+++ b/o3d/core/core.gyp
@@ -8,6 +8,10 @@
# Whether to enable the English-only, Win/Mac-only fullscreen message.
'plugin_enable_fullscreen_msg%': '1',
},
+ 'includes': [
+ '../build/common.gypi',
+ '../plugin/version.gypi',
+ ],
'target_defaults': {
'include_dirs': [
# The internal dir is first so that headers in internal can replace those
@@ -19,7 +23,7 @@
'../../<(nacldir)',
],
'defines': [
- 'O3D_PLUGIN_VERSION="<!(python ../plugin/version_info.py --version)"',
+ 'O3D_PLUGIN_VERSION="<(plugin_version)"',
],
'conditions': [
['<(plugin_enable_fullscreen_msg) != 0',
@@ -76,9 +80,6 @@
}],
],
},
- 'includes': [
- '../build/common.gypi',
- ],
'targets': [
{
'target_name': 'o3dCore',
diff --git a/o3d/installer/linux/debian.in/debian.gyp b/o3d/installer/linux/debian.in/debian.gyp
index 44506fe..51abeca 100644
--- a/o3d/installer/linux/debian.in/debian.gyp
+++ b/o3d/installer/linux/debian.in/debian.gyp
@@ -5,10 +5,9 @@
{
'includes': [
'../../../build/common.gypi',
+ '../../../plugin/version.gypi',
],
'variables': {
- 'O3D_PLUGIN_VERSION':
- '<!(python ../../../plugin/version_info.py --version)',
'INSTALLER_DIR': '<(PRODUCT_DIR)/installer',
'DEBIAN_DIR': '<(INSTALLER_DIR)/debian',
},
@@ -57,7 +56,7 @@
'action': [
'python',
'mk_changelog.py',
- '--version=<(O3D_PLUGIN_VERSION)',
+ '--version=<(plugin_version)',
'--out=<(DEBIAN_DIR)/changelog',
'--in=changelog.in',
],
@@ -90,10 +89,10 @@
'-rfakeroot',
],
'outputs': [
- '<(PRODUCT_DIR)/google-o3d_<(O3D_PLUGIN_VERSION)_<(ARCH).changes',
- '<(PRODUCT_DIR)/google-o3d_<(O3D_PLUGIN_VERSION)_<(ARCH).deb',
+ '<(PRODUCT_DIR)/google-o3d_<(plugin_version)_<(ARCH).changes',
+ '<(PRODUCT_DIR)/google-o3d_<(plugin_version)_<(ARCH).deb',
'<(PRODUCT_DIR)/' +
- 'google-o3d-dbgsym_<(O3D_PLUGIN_VERSION)_<(ARCH).deb',
+ 'google-o3d-dbgsym_<(plugin_version)_<(ARCH).deb',
],
},
],
diff --git a/o3d/installer/mac/installer.gyp b/o3d/installer/mac/installer.gyp
index 10435ce..7e41527 100644
--- a/o3d/installer/mac/installer.gyp
+++ b/o3d/installer/mac/installer.gyp
@@ -5,18 +5,10 @@
{
'variables': {
'chromium_code': 1,
- 'nppversion': '<!(python ../../plugin/version_info.py --commaversion)',
- 'dotnppversion': '<!(python ../../plugin/version_info.py --version)',
-
- # We don't actually want the extras version to update by itself;
- # it should change only when we actually add something to the
- # installer or change the d3dx9 version. This version is
- # therefore independent of the o3d plugin and sdk versions.
- 'extrasversion': '0,1,1,0',
- 'dotextrasversion': '0.1.1.0',
},
'includes': [
'../../build/common.gypi',
+ '../../plugin/version.gypi',
],
'targets': [
{
@@ -35,7 +27,7 @@
'installer_script_path': './make_installer.sh',
},
'postbuild_name': 'Make Installer',
- 'action': ['<(installer_script_path)', '<(dotnppversion)',],
+ 'action': ['<(installer_script_path)', '<(plugin_version)',],
},
],
},
@@ -51,7 +43,7 @@
'disk_image_script_path': './make_disk_image.sh',
},
'postbuild_name': 'Make Disk Image',
- 'action': ['<(disk_image_script_path)', '<(dotnppversion)',],
+ 'action': ['<(disk_image_script_path)', '<(plugin_version)',],
},
],
},
diff --git a/o3d/installer/win/installer.gyp b/o3d/installer/win/installer.gyp
index fa7bca1..9246aa7 100644
--- a/o3d/installer/win/installer.gyp
+++ b/o3d/installer/win/installer.gyp
@@ -9,8 +9,6 @@
'dx_redist_path': '../../../o3d-internal/third_party/dx_nov_2007_redist',
'dx_redist_exists': '<!(python ../../build/file_exists.py ../../../o3d-internal/third_party/dx_nov_2007_redist/d3dx9_36.dll)',
'guidgen': '..\\..\\nbguidgen\\win\\nbguidgen.exe',
- 'nppversion': '<!(python ../../plugin/version_info.py --commaversion)',
- 'dotnppversion': '<!(python ../../plugin/version_info.py --version)',
# Unique guid for o3d namespace
'o3d_namespace_guid': 'B445DBAE-F5F9-435A-9A9B-088261CDF00A',
@@ -36,6 +34,7 @@
},
'includes': [
'../../build/common.gypi',
+ '../../plugin/version.gypi',
],
'targets': [
{
@@ -95,10 +94,13 @@
'candle_exe': '../../../<(wixdir)/candle.exe',
'light_exe': '../../../<(wixdir)/light.exe',
'custom_actions_path': '<(PRODUCT_DIR)/cactions.dll',
- 'd3dx_guid': '<!(<(guidgen) <(o3d_namespace_guid) d3dx-<(nppversion))',
+ 'd3dx_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'd3dx-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'dbl_path': '../../installer/win/driver_blacklist.txt',
'dx_redist_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
- 'dx_redist-<(nppversion))',
+ 'dx_redist-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'get_extras_path': '<(PRODUCT_DIR)/getextras.exe',
'ieplugin_path': '<(PRODUCT_DIR)/o3d_host.dll',
'include_software_renderer':
@@ -106,26 +108,38 @@
'../../../<(swiftshaderdir)/swiftshader_d3d9.dll)',
'npplugin_path': '<(PRODUCT_DIR)/npo3dautoplugin.dll',
'o3d_driver_blacklist_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
- 'o3d_driver_blacklist-<(nppversion))',
+ 'o3d_driver_blacklist-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'o3d_get_extras_guid':
'<!(<(guidgen) <(o3d_namespace_guid) extras_installer-)',
'o3d_iep_component_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
- 'o3d_ieplugin_component-<(nppversion))',
+ 'o3d_ieplugin_component-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'o3d_npp_component_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
- 'o3d_npplugin_component-<(nppversion))',
+ 'o3d_npplugin_component-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'o3d_npp_google_update_reg_component_guid':
'<!(<(guidgen) <(o3d_namespace_guid) '
- 'o3d_user_google_update_reg_component-<(nppversion))',
- 'o3d_npp_package_guid': '<!(<(guidgen) <(o3d_namespace_guid) o3d_package-<(nppversion))',
- 'o3d_npp_product_guid': '<!(<(guidgen) <(o3d_namespace_guid) o3d_product-<(nppversion))',
+ 'o3d_user_google_update_reg_component-'
+ '<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
+ 'o3d_npp_package_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_package-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
+ 'o3d_npp_product_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_product-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'o3d_npp_reg_key':
'<(google_update_reg_path)<(o3d_npp_google_update_guid)',
'o3d_npp_state_reg_key':
'<(google_update_state_reg_path)<(o3d_npp_google_update_guid)',
'o3d_reporter_guid':
- '<!(<(guidgen) <(o3d_namespace_guid) o3d_reporter-<(nppversion))',
+ '<!(<(guidgen) <(o3d_namespace_guid) '
+ 'o3d_reporter-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'o3d_software_renderer_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
- 'o3d_software_renderer-<(nppversion))',
+ 'o3d_software_renderer-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'rep_path': '<(PRODUCT_DIR)/reporter.exe',
'software_renderer_path':
'../../../<(swiftshaderdir)/swiftshader_d3d9.dll',
@@ -185,7 +199,7 @@
'-dNppPackageGuid=<(o3d_npp_package_guid)',
'-dNppProductGuid=<(o3d_npp_product_guid)',
'-dNppUpgradeCode=<(o3d_npp_upgrade_code)',
- '-dNppVersion=<(dotnppversion)',
+ '-dNppVersion=<(plugin_version)',
'-dRepGuid=<(o3d_reporter_guid)',
'-dRepPath=<(rep_path)',
'-dSoftwareRendererGuid=<(o3d_software_renderer_guid)',
@@ -232,7 +246,8 @@
'candle_exe': '../../../<(wixdir)/candle.exe',
'light_exe': '../../../<(wixdir)/light.exe',
'o3d_extras_d3dx_component_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
- 'o3d_extras_d3dx_component-<(nppversion))',
+ 'o3d_extras_d3dx_component-<!(python ../../plugin/version_info.py '
+ '--set_version=<(plugin_version) --commaversion))',
'o3d_extras_package_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
'o3d_extras_package-<(extrasversion))',
'o3d_extras_product_guid': '<!(<(guidgen) <(o3d_namespace_guid) '
diff --git a/o3d/installer/win/o3d_kill_version.py b/o3d/installer/win/o3d_kill_version.py
deleted file mode 100644
index e3eb624..0000000
--- a/o3d/installer/win/o3d_kill_version.py
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/python2.4
-# Copyright 2008 Google Inc. All Rights Reserved.
-
-# version = (major, minor, trunk, patch)
-plugin_version = (0, 2, 0, 0)
-sdk_version = plugin_version
diff --git a/o3d/installer/win/o3d_version.py b/o3d/installer/win/o3d_version.py
deleted file mode 100644
index 11a6c0c..0000000
--- a/o3d/installer/win/o3d_version.py
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/python2.4
-# Copyright 2008-9 Google Inc. All Rights Reserved.
-
-# version = (major, minor, trunk, patch)
-plugin_version = (0, 1, 43, 2)
-sdk_version = plugin_version
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index 1f162bf..bcc3401 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -62,6 +62,7 @@
'includes': [
'../build/common.gypi',
'branding.gypi',
+ 'version.gypi',
],
'target_defaults': {
'include_dirs': [
@@ -70,11 +71,11 @@
'../../<(gtestdir)',
],
'defines': [
- 'O3D_PLUGIN_DESCRIPTION="<!(python version_info.py --set_name="<(plugin_name)" --set_npapi_mimetype="<(plugin_npapi_mimetype)" --description)"',
+ 'O3D_PLUGIN_DESCRIPTION="<!(python version_info.py --set_name="<(plugin_name)" --set_version="<(plugin_version)" --set_npapi_mimetype="<(plugin_npapi_mimetype)" --description)"',
'O3D_PLUGIN_NPAPI_FILENAME="<(plugin_npapi_filename)"',
'O3D_PLUGIN_NPAPI_MIMETYPE="<(plugin_npapi_mimetype)"',
'O3D_PLUGIN_NAME="<(plugin_name)"',
- 'O3D_PLUGIN_VERSION="<!(python version_info.py --version)"',
+ 'O3D_PLUGIN_VERSION="<(plugin_version)"',
'O3D_PLUGIN_INSTALLDIR_CSIDL=<(plugin_installdir_csidl)',
'O3D_PLUGIN_VENDOR_DIRECTORY="<(plugin_vendor_directory)"',
'O3D_PLUGIN_PRODUCT_DIRECTORY="<(plugin_product_directory)"',
@@ -208,6 +209,7 @@
'action': ['python',
'version_info.py',
'--set_name=<(plugin_name)',
+ '--set_version=<(plugin_version)',
'--set_npapi_mimetype=<(plugin_npapi_mimetype)',
'mac/o3d_plugin.r',
'${BUILT_PRODUCTS_DIR}/O3D.r',
@@ -533,6 +535,7 @@
'action': ['python',
'version_info.py',
'--set_name=<(plugin_name)',
+ '--set_version=<(plugin_version)',
'--set_npapi_filename=<(plugin_npapi_filename)',
'--set_npapi_mimetype=<(plugin_npapi_mimetype)',
'win/o3dPlugin.rc_template',
@@ -550,6 +553,7 @@
'action': ['python',
'version_info.py',
'--set_name=<(plugin_name)',
+ '--set_version=<(plugin_version)',
'--set_npapi_filename=<(plugin_npapi_filename)',
'--set_npapi_mimetype=<(plugin_npapi_mimetype)',
'mac/Info.plist',
@@ -605,6 +609,7 @@
],
'action': ['python',
'version_info.py',
+ '--set_version=<(plugin_version)',
'--set_activex_hostcontrol_clsid=' +
'<(plugin_activex_hostcontrol_clsid)',
'--set_activex_typelib_clsid=<(plugin_activex_typelib_clsid)',
@@ -632,6 +637,7 @@
],
'action': ['python',
'version_info.py',
+ '--set_version=<(plugin_version)',
'--set_activex_hostcontrol_clsid=' +
'<(plugin_activex_hostcontrol_clsid)',
'--set_activex_typelib_clsid=<(plugin_activex_typelib_clsid)',
diff --git a/o3d/plugin/version.gypi b/o3d/plugin/version.gypi
new file mode 100644
index 0000000..447d46f
--- /dev/null
+++ b/o3d/plugin/version.gypi
@@ -0,0 +1,9 @@
+# Copyright (c) 2010 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.
+
+{
+ 'variables': {
+ 'plugin_version': '0.1.43.2',
+ }
+}
diff --git a/o3d/plugin/version_info.py b/o3d/plugin/version_info.py
index 23d4acc..58c8229 100644
--- a/o3d/plugin/version_info.py
+++ b/o3d/plugin/version_info.py
@@ -28,21 +28,18 @@ sys.path.append(gflags_dir)
import gflags
FLAGS = gflags.FLAGS
-gflags.DEFINE_boolean('kill_switch', False,
- 'Generate version numbers for kill switch binary.')
-
gflags.DEFINE_boolean('description', False,
'Print out the plugin description and exit.')
-gflags.DEFINE_boolean('version', False,
- 'Print out the plugin version and exit.')
-
gflags.DEFINE_boolean('commaversion', False,
'Print out the plugin version with commas and exit.')
gflags.DEFINE_string('set_name', '',
'Sets the plugin name to use.')
+gflags.DEFINE_string('set_version', '',
+ 'Sets the plugin version to use.')
+
gflags.DEFINE_string('set_npapi_filename', '',
'Sets the plugin NPAPI filename to use.')
@@ -61,14 +58,9 @@ gflags.DEFINE_string('set_activex_hostcontrol_name', '',
gflags.DEFINE_string('set_activex_typelib_name', '',
'Sets the ActiveX TypeLib\'s name to use.')
-def GetDotVersion(version):
- return '%d.%d.%d.%d' % version
-
-def GetCommaVersion(version):
- return '%d,%d,%d,%d' % version
-
def DoReplace(in_filename, out_filename, replacements):
- '''Replace the version number in the given filename with the replacements.'''
+ '''Replace the version placeholders in the given filename with the
+ replacements.'''
if not os.path.exists(in_filename):
raise Exception(r'''Input template file %s doesn't exist.''' % in_filename)
input_file = open(in_filename, 'r')
@@ -92,27 +84,13 @@ def main(argv):
# Strip off argv[0]
files = files[1:]
- # Get version string from o3d_version.py
- o3d_version_vars = {}
- if FLAGS.kill_switch:
- execfile(os.path.join(script_dir, '..', 'installer', 'win',
- 'o3d_kill_version.py'), o3d_version_vars)
- else:
- execfile(os.path.join(script_dir, '..', 'installer', 'win',
- 'o3d_version.py'), o3d_version_vars)
-
- plugin_version = o3d_version_vars['plugin_version']
- sdk_version = o3d_version_vars['sdk_version']
-
# This name is used by Javascript to find the plugin therefore it must
# not change. If you change this you must change the name in
# samples/o3djs/util.js but be aware, changing the name
# will break all apps that use o3d on the web.
O3D_PLUGIN_NAME = FLAGS.set_name
- O3D_PLUGIN_VERSION = GetDotVersion(plugin_version)
- O3D_PLUGIN_VERSION_COMMAS = GetCommaVersion(plugin_version)
- O3D_SDK_VERSION = GetDotVersion(sdk_version)
- O3D_SDK_VERSION_COMMAS = GetCommaVersion(sdk_version)
+ O3D_PLUGIN_VERSION = FLAGS.set_version
+ O3D_PLUGIN_VERSION_COMMAS = O3D_PLUGIN_VERSION.replace('.', ',')
O3D_PLUGIN_DESCRIPTION = '%s version:%s' % (O3D_PLUGIN_NAME,
O3D_PLUGIN_VERSION)
O3D_PLUGIN_NPAPI_FILENAME = FLAGS.set_npapi_filename
@@ -126,10 +104,6 @@ def main(argv):
print '%s' % O3D_PLUGIN_DESCRIPTION
sys.exit(0)
- if FLAGS.version:
- print '%s' % O3D_PLUGIN_VERSION
- sys.exit(0)
-
if FLAGS.commaversion:
print '%s' % O3D_PLUGIN_VERSION_COMMAS
sys.exit(0)