]> OCCT Git - occt-wok.git/commitdiff
0024436: WOK does not copy msvc.bat when selected target is vc12
authoribs <ibs@opencascade.com>
Mon, 9 Dec 2013 06:46:07 +0000 (10:46 +0400)
committeribs <ibs@opencascade.com>
Mon, 9 Dec 2013 06:46:07 +0000 (10:46 +0400)
Fix msvc.bat file copying for vc12 target
wgenprojbat copies of msvc.bat for any vc* target

src/WOKsite/wok_tclshrc.tcl

index 62e50f5248c1f3d0fa2b46f0b6bb444a41ca15b8..c80dbd50eaea9cb418571f533f28169ef3c53273 100644 (file)
@@ -250,17 +250,13 @@ proc wgenprojbat {thePath theIDE} {
   if { "$::tcl_platform(platform)" == "windows" } {
     set aTargetPlatform "wnt"
   }
-
-  switch -exact -- "$theIDE" {
-    "vc7"   -
-    "vc8"   -
-    "vc9"   -
-    "vc10"  -
-    "vc11"  -
-    "vc12"  { set aTargetPlatform wnt }
-    "amk"   { set aTargetPlatform lin  }
-  }
   
+  if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
+    set aTargetPlatform wnt
+  } elseif {"$theIDE" == "amk"} {
+    set aTargetPlatform lin
+  }
+
   set aTargetPlatformExt sh
   if { "$aTargetPlatform" == "wnt" } {
     set aTargetPlatformExt bat
@@ -293,15 +289,13 @@ proc wgenprojbat {thePath theIDE} {
     file copy -force -- "$::env(WOKHOME)/lib/templates/draw.${aTargetPlatformExt}" "$aBox/draw.${aTargetPlatformExt}"
   }
 
-  switch -exact -- "$theIDE" {
-    "vc7"   -
-    "vc8"   -
-    "vc9"   -
-    "vc10"  -
-    "vc11"  { file copy -force -- "$::env(WOKHOME)/lib/templates/msvc.bat" "$aBox/msvc.bat" }
-    "cbp"   { file copy -force -- "$::env(WOKHOME)/lib/templates/codeblocks.sh" "$aBox/codeblocks.sh" }
-    "xcd"   { file copy -force -- "$::env(WOKHOME)/lib/templates/xcode.sh" "$aBox/xcode.sh" }
-
+  if {[regexp {(vc)[0-9]*$} $theIDE] == 1} {
+    file copy -force -- "$::env(WOKHOME)/lib/templates/msvc.bat" "$aBox/msvc.bat"
+  } else {
+    switch -exact -- "$theIDE" {
+      "cbp"   { file copy -force -- "$::env(WOKHOME)/lib/templates/codeblocks.sh" "$aBox/codeblocks.sh" }
+      "xcd"   { file copy -force -- "$::env(WOKHOME)/lib/templates/xcode.sh" "$aBox/xcode.sh" }
+    }
   }
 }