From 006380f3ec6b0dcd5bcb4f4d99b6c16a3e34ca4f Mon Sep 17 00:00:00 2001 From: ibs Date: Mon, 9 Dec 2013 10:46:07 +0400 Subject: [PATCH] 0024436: WOK does not copy msvc.bat when selected target is vc12 Fix msvc.bat file copying for vc12 target wgenprojbat copies of msvc.bat for any vc* target --- src/WOKsite/wok_tclshrc.tcl | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/WOKsite/wok_tclshrc.tcl b/src/WOKsite/wok_tclshrc.tcl index 62e50f5..c80dbd5 100644 --- a/src/WOKsite/wok_tclshrc.tcl +++ b/src/WOKsite/wok_tclshrc.tcl @@ -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" } + } } } -- 2.39.5