-fi
-
-if [ -z "$VSxTOOLS" ]; then
- print_usage
- return 33
-fi
-#echo "common tools dir is \"$VSxTOOLS\""
-export VSxTOOLS="$(short_path "$VSxTOOLS" | tr "A-Z" "a-z" | sed -e 's/\\/\//g' | sed -e 's/^\(.\):/\/\1/' )"
-#echo cleaned comn tools is $VSxTOOLS
-
-export VIS_STU_ROOT="$(echo $VSxTOOLS | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' | sed -e 's/^\(.\):/\/\1/' )"
-export VSINSTALLDIR="$VIS_STU_ROOT"
-#echo root of visual studio is $VSINSTALLDIR
-
-export WINDIR="$(short_path "$WINDIR" | sed -e 's/\\/\//g' | sed -e 's/^\(.\):/\/\1/' )"
-#echo cleaned windir is $WINDIR
-
-#echo "prior path is $PATH"
-
-export VCINSTALLDIR="$VSINSTALLDIR/VC"
-export VSCOMMONROOT="$VSINSTALLDIR/Common7"
-export VS_TOOLS_DIR="$VSCOMMONROOT/tools"
-export DevEnvDir="$VSCOMMONROOT/IDE"
-export MSVCDir="$VCINSTALLDIR"
-export FrameworkDir="$WINDIR/Microsoft.NET/Framework"
-export FrameworkVersion=v4.0.30319
-#old export FrameworkSDKDir="$VSINSTALLDIR/SDK/v2.0"
-
-export PLATFORM_DIR="$VCINSTALLDIR/PlatformSDK"
-if [ ! -d "$PLATFORM_DIR" ]; then
- export PLATFORM_DIR="$(short_path "$PROGRAMFILES/Microsoft SDKs/Windows/v7.0A" | tr "A-Z" "a-z" | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' | sed -e 's/^\(.\):/\/\1/' )"
-fi
-export WindowsSdkDir="$PLATFORM_DIR"
-#echo platform dir is $PLATFORM_DIR
-
-#echo "path before is $PATH"
-export PATH="$DevEnvDir:$VCINSTALLDIR/BIN:$VSxTOOLS:$VSxTOOLS/bin:$FrameworkDir/$FrameworkVersion:$FrameworkDir/v3.5:$VCINSTALLDIR/VCPackages:$VSINSTALLDIR/Common7/Tools:$PLATFORM_DIR/bin:$PATH"
-#echo "path after is $PATH"
-
-export INCLUDE="$VCINSTALLDIR/ATLMFC/INCLUDE:$VCINSTALLDIR/INCLUDE:$PLATFORM_DIR/include"
-#:$FrameworkSDKDir/include"
+
+ if [ -z "$VSxTOOLS" ]; then
+ return 33
+ fi
+ export VSxTOOLS="$(cygpath -w -s "$VSxTOOLS" | tr "A-Z" "a-z" | sed -e 's/\\/\//g' )"
+#| sed -e 's/^\(.\):/\/\1/' )"
+
+ export VIS_STU_ROOT="$(echo $VSxTOOLS | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' )"
+#| sed -e 's/^\(.\):/\/\1/' )"
+ export VSINSTALLDIR="$VIS_STU_ROOT"
+
+ export WINDIR="$(cygpath -w -s "$WINDIR" | tr A-Z a-z | sed -e 's/\\/\//g' )"
+#| sed -e 's/^\(.\):/\/\1/' )"
+
+ export VCINSTALLDIR="$VSINSTALLDIR/VC"
+ export VSCOMMONROOT="$VSINSTALLDIR/Common7"
+ export VS_TOOLS_DIR="$VSCOMMONROOT/tools"
+ export DevEnvDir="$VSCOMMONROOT/IDE"
+ export MSVCDir="$VCINSTALLDIR"
+ export FrameworkDir="$WINDIR/Microsoft.NET/Framework"
+ export FrameworkVersion=v4.0.30319
+ #old export FrameworkSDKDir="$VSINSTALLDIR/SDK/v2.0"
+
+ export PLATFORM_DIR="$VCINSTALLDIR/PlatformSDK"
+ if [ ! -d "$PLATFORM_DIR" ]; then
+
+#on hold: export PLATFORM_DIR="$(cygpath -w -s "$PROGRAMFILES/Microsoft SDKs/Windows/v7.0A" | tr "A-Z" "a-z" | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' )"
+##| sed -e 's/^\(.\):/\/\1/' )"
+
+ # guess at where we can find this damned directory in its short form.
+#hmmm: this is needed until there's a replacement for short path, or we can build again.
+ export PLATFORM_DIR="c:/progra~2/micros~1/windows/v7.0a"
+ if [ ! -d "$PLATFORM_DIR" ]; then
+ PLATFORM_DIR="c:/progra~1/micros~1/windows/v7.0a"
+ if [ ! -d "$PLATFORM_DIR" ]; then
+ PLATFORM_DIR="c:/progra~1/micros~2/windows/v7.0a"
+ if [ ! -d "$PLATFORM_DIR" ]; then
+ PLATFORM_DIR="c:/progra~2/micros~2/windows/v7.0a"
+ fi
+ fi
+ fi
+
+ if [ ! -d "$PLATFORM_DIR" ]; then
+ echo "*** Failure to calculate the platform directory based on several attempts using c:\\program files\\microsoft sdks\\windows\\v7.0a as the basic pattern"
+ fi
+