6 echo -e "\t$1 [-conf "'"Release"|"Debug"'"] [-plat platform "'"Win32"|"x64"'"] [-action build|clean|rebuild] [-proj project] [-voff|--versioning-off] [-solution sln_file]"
8 echo -e '-conf\t\t"Release"'
9 echo -e '-plat\t\t"Win32"'
10 echo -e '-action\t\tbuild'
11 echo -e '-project\tvsfilter_2010'
12 echo -e '-solution\tsrc/filters/transform/vsfilter/VSFilter_vs2010.sln'
15 script_dir
=`dirname $0`
18 solution
="src/filters/transform/vsfilter/VSFilter_vs2010.sln"
20 configuration
="Release"
22 project
="vsfilter_2010"
25 while [ "$1"x
!= ""x
]
27 if [ "$flag"x
== ""x
]; then
28 if [ "$1"x
== "-conf"x
]; then
30 elif [ "$1"x
== "-plat"x
]; then
32 elif [ "$1"x
== "-action"x
]; then
34 elif [ "$1"x
== "-proj"x
]; then
36 elif [ "$1"x
== "-solution"x
]; then
38 elif [ "$1"x
== "--versioning-off"x
] ||
[ "$1"x
== "-voff"x
]; then
42 echo "Invalid arguments"
47 if [ "${1:0:1}"x
== "-"x
]; then
48 echo "Invalid arguments"
58 if [ "$flag"x
!= ""x
]; then
59 echo "Invalid arguments"
64 if [ "$update_version"x
== "1"x
]; then
65 echo "Updating version info"
68 cur_rev_num
=`git rev-list HEAD | wc -l | awk '{print $1}'`
69 base_rev_num
=`git rev-list 3.0.0.4 | wc -l | awk '{print $1}'`
70 ((rev_num
=$cur_rev_num-$base_rev_num+4))
72 rev_sha1
=`git rev-parse HEAD`
73 rev_tag
=`git describe --tag --abbrev=0`
74 ver_major
=`echo $rev_tag | awk -F$'.' '{print $1}'`
75 ver_minor
=`echo $rev_tag | awk -F$'.' '{print $2}'`
76 ver_patch
=`echo $rev_tag | awk -F$'.' '{print $3}'`
78 echo "#define XY_VSFILTER_VERSION_MAJOR $ver_major
79 #define XY_VSFILTER_VERSION_MINOR $ver_minor
80 #define XY_VSFILTER_VERSION_PATCH $ver_patch
81 #define XY_VSFILTER_VERSION_COMMIT $rev_num
82 #define XY_VSFILTER_VERSION_COMMIT_SHA1 \"$rev_sha1\"" > src
/filters
/transform
/vsfilter
/version_in.h
86 if [ "$platform"x
= "x64"x
]; then
87 platform_type
="x86_amd64"
90 configuration
=$configuration"|"$platform
94 CALL "%VS100COMNTOOLS%../../VC/vcvarsall.bat" '$platform_type'
95 devenv "'$solution'" /'$action' "'$configuration'" /project "'$project'"