Torque2D Reference
Variables
versiongenerate Namespace Reference

Variables

list input_dir = sys.argv[1]
 
list output_dir = sys.argv[2]
 
tuple config_file = open("%s/configure.ac" % input_dir, 'r')
 
int buffer_size = 1024
 
tuple opening_string = config_file.read(buffer_size)
 
tuple version_expression
 
tuple version_values = version_expression.search(opening_string)
 
tuple major_version = version_values.group(1)
 
tuple minor_version = version_values.group(2)
 
tuple fix_version = version_values.group(3)
 
string file_data
 
tuple version_file = open("%s/Version.h" % output_dir, 'w')
 

Variable Documentation

int buffer_size = 1024
tuple config_file = open("%s/configure.ac" % input_dir, 'r')
string file_data
Initial value:
1 = """//
2 // DO NOT MODIFY THIS FILE (but you can delete it)
3 //
4 // This file is autogenerated by the versiongenerate.py script. This script
5 // is executed in a "Run Script" build phase when creating gtest.framework. This
6 // header file is not used during compilation of C-source. Rather, it simply
7 // defines some version strings for substitution in the Info.plist. Because of
8 // this, we are not not restricted to C-syntax nor are we using include guards.
9 //
10 
11 #define GTEST_VERSIONINFO_SHORT %s.%s
12 #define GTEST_VERSIONINFO_LONG %s.%s.%s
13 
14 """
tuple fix_version = version_values.group(3)
list input_dir = sys.argv[1]
tuple major_version = version_values.group(1)
tuple minor_version = version_values.group(2)
tuple opening_string = config_file.read(buffer_size)
list output_dir = sys.argv[2]
tuple version_expression
Initial value:
1 = re.compile(r"AC_INIT\(.*?\[(\d+)\.(\d+)\.(\d+)\].*?\)",
2  re.DOTALL)
tuple version_file = open("%s/Version.h" % output_dir, 'w')
tuple version_values = version_expression.search(opening_string)