summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/version_info.py
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/plugin/version_info.py')
-rw-r--r--o3d/plugin/version_info.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/o3d/plugin/version_info.py b/o3d/plugin/version_info.py
index cebfa57..5424cf4 100644
--- a/o3d/plugin/version_info.py
+++ b/o3d/plugin/version_info.py
@@ -20,9 +20,9 @@ import os.path
import re
import sys
+script_dir = os.path.join(os.path.dirname(sys.argv[0]))
gflags_dir = os.path.normpath(
- os.path.join(os.path.dirname(sys.argv[0]),
- '..', '..', 'third_party', 'gflags', 'python'))
+ os.path.join(script_dir, '..', '..', 'third_party', 'gflags', 'python'))
sys.path.append(gflags_dir)
import gflags
@@ -43,6 +43,9 @@ gflags.DEFINE_boolean('mimetype', False,
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.')
+
def GetDotVersion(version):
return '%d.%d.%d.%d' % version
@@ -77,9 +80,11 @@ def main(argv):
# Get version string from o3d_version.py
o3d_version_vars = {}
if FLAGS.kill_switch:
- execfile('../installer/win/o3d_kill_version.py', o3d_version_vars)
+ execfile(os.path.join(script_dir, '..', 'installer', 'win',
+ 'o3d_kill_version.py'), o3d_version_vars)
else:
- execfile('../installer/win/o3d_version.py', o3d_version_vars)
+ 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']
@@ -113,6 +118,10 @@ def main(argv):
print '%s' % O3D_PLUGIN_VERSION
sys.exit(0)
+ if FLAGS.commaversion:
+ print '%s' % O3D_PLUGIN_VERSION_COMMAS
+ sys.exit(0)
+
plugin_replace_strings = [
('@@@PluginName@@@', O3D_PLUGIN_NAME),
('@@@ProductVersionCommas@@@', O3D_PLUGIN_VERSION_COMMAS),