added 7z file format unpacking.
[feisty_meow.git] / scripts / generator / vis_stu_vars.sh
index 9f00b080f28405b0be270d1b645b5f230be60233..3f9c50ecdff1c881293e8fc59f79193f78cb2a46 100644 (file)
@@ -20,7 +20,7 @@ fi
 function setup_visual_studio_variables()
 {
   chmod 755 $PRODUCTION_DIR/win32_helper/*.exe
-  export PATH=$PRODUCTION_DIR/win32_helper:$PATH
+  export PATH="$(dos_to_unix_path $PRODUCTION_DIR)/win32_helper:$PATH"
 
   # we try to use the most recent compiler location, and work backwards as
   # needed for the supported range (10 = vs 2010, 9 = vs 2008, 8 = vs 2005).
@@ -35,12 +35,15 @@ function setup_visual_studio_variables()
   if [ -z "$VSxTOOLS" ]; then
     return 33
   fi
-  export VSxTOOLS="$(short_path "$VSxTOOLS" | tr "A-Z" "a-z" | sed -e 's/\\/\//g' | sed -e 's/^\(.\):/\/\1/' )"
+  export VSxTOOLS="$(short_path "$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 VIS_STU_ROOT="$(echo $VSxTOOLS | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' )"
+#| sed -e 's/^\(.\):/\/\1/' )"
   export VSINSTALLDIR="$VIS_STU_ROOT"
   
-  export WINDIR="$(short_path "$WINDIR" | sed -e 's/\\/\//g' | sed -e 's/^\(.\):/\/\1/' )"
+  export WINDIR="$(short_path "$WINDIR" | tr A-Z a-z | sed -e 's/\\/\//g' )"
+#| sed -e 's/^\(.\):/\/\1/' )"
   
   export VCINSTALLDIR="$VSINSTALLDIR/VC"
   export VSCOMMONROOT="$VSINSTALLDIR/Common7"
@@ -53,12 +56,20 @@ function setup_visual_studio_variables()
   
   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/' )"
+
+#on hold:    export PLATFORM_DIR="$(short_path "$PROGRAMFILES/Microsoft SDKs/Windows/v7.0A" | tr "A-Z" "a-z" | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' )"
+##| sed -e 's/^\(.\):/\/\1/' )"
+
+export PLATFORM_DIR="c:\progra~2\micros~1\windows\v7.0a"
+
   fi
   export WindowsSdkDir="$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"
+  local filena
+  for filena in "$DevEnvDir" "$VCINSTALLDIR/BIN" "$VSxTOOLS" "$VSxTOOLS/bin" "$FrameworkDir/$FrameworkVersion" "$FrameworkDir/v3.5" "$VCINSTALLDIR/VCPackages" "$VSINSTALLDIR/Common7/Tools" "$PLATFORM_DIR/bin"; do 
+    export PATH="$PATH:$(dos_to_unix_path $filena)"
+  done
   #echo "path after is $PATH"
   
   export INCLUDE="$VCINSTALLDIR/ATLMFC/INCLUDE:$VCINSTALLDIR/INCLUDE:$PLATFORM_DIR/include"
@@ -87,12 +98,8 @@ function setup_visual_studio_variables()
   
   ##############
   
-  #echo "common tools dir is \"$VSxTOOLS\""
-  #echo cleaned windir is $WINDIR
-  #echo cleaned comn tools is $VSxTOOLS 
-  #echo root of visual studio is $VSINSTALLDIR
-  #echo platform dir is $PLATFORM_DIR
-  #echo framedir now $FrameworkDir
+  echo "calculated variables for dos/windoze builds:"
+  var VIS_STU_ROOT VSxTOOLS WINDIR VSxTOOLS VSINSTALLDIR PLATFORM_DIR FrameworkDir
   
   ##############
 }