6 echo -e "\t$1 [-conf "'"Release"|"Debug"'"] [-action build|clean|rebuild] [-proj project] [-voff|--versioning-off] [-solution sln_file]"
8 echo -e '-conf\t\t"Release"'
9 echo -e '-action\t\tbuild'
10 echo -e '-project\tvsfilter_2010'
11 echo -e '-solution\tsrc/filters/transform/vsfilter/VSFilter_vs2010.sln'
14 script_dir
=`dirname $0`
17 solution
="src/filters/transform/vsfilter/VSFilter_vs2010.sln"
19 configuration
="Release"
20 project
="vsfilter_2010"
23 while [ "$1"x
!= ""x
]
25 if [ "$flag"x
== ""x
]; then
26 if [ "$1"x
== "-conf"x
]; then
28 elif [ "$1"x
== "-action"x
]; then
30 elif [ "$1"x
== "-proj"x
]; then
32 elif [ "$1"x
== "-solution"x
]; then
34 elif [ "$1"x
== "--versioning-off"x
] ||
[ "$1"x
== "-voff"x
]; then
38 echo "Invalid arguments"
43 if [ "${1:0:1}"x
== "-"x
]; then
44 echo "Invalid arguments"
54 if [ "$flag"x
!= ""x
]; then
55 echo "Invalid arguments"
60 if [ "$update_version"x
== "1"x
]; then
61 echo "Updating version info"
64 cur_rev_num
=`git rev-list HEAD | wc -l | awk '{print $1}'`
65 base_rev_num
=`git rev-list 3.0.0.4 | wc -l | awk '{print $1}'`
66 ((rev_num
=$cur_rev_num-$base_rev_num+4))
68 rev_sha1
=`git rev-parse HEAD`
69 rev_tag
=`git describe --tag --abbrev=0`
70 ver_major
=`echo $rev_tag | awk -F$'.' '{print $1}'`
71 ver_minor
=`echo $rev_tag | awk -F$'.' '{print $2}'`
72 ver_patch
=`echo $rev_tag | awk -F$'.' '{print $3}'`
74 echo "#define XY_VSFILTER_VERSION_MAJOR $ver_major
75 #define XY_VSFILTER_VERSION_MINOR $ver_minor
76 #define XY_VSFILTER_VERSION_PATCH $ver_patch
77 #define XY_VSFILTER_VERSION_COMMIT $rev_num
78 #define XY_VSFILTER_VERSION_COMMIT_SHA1 \"$rev_sha1\"" > src
/filters
/transform
/vsfilter
/version_in.h
83 CALL "%VS100COMNTOOLS%../../VC/vcvarsall.bat" x86
84 devenv "'$solution'" /'$action' "'$configuration'" /project "'$project'"