set SYS_VCVARS_LIST {}
# detect installed Visual Studio 2017+ instances by running vswhere.exe
-if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
+if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)"
lappend ::SYS_VC_LIST "vc141"
- lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
-if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
+if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141) UWP"
lappend ::SYS_VC_LIST "vc141-uwp"
- lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
-if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } {
+if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)"
lappend ::SYS_VC_LIST "vc142"
- lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
-if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } {
+if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP"
lappend ::SYS_VC_LIST "vc142-uwp"
- lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
-if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] } {
+if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } {
lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset ClangCL)"
lappend ::SYS_VC_LIST "vclang"
- lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\Auxiliary\\Build\\vcvarsall.bat"
+}
+if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } {
+ lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143)"
+ lappend ::SYS_VC_LIST "vc143"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
+}
+if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } {
+ lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143) UWP"
+ lappend ::SYS_VC_LIST "vc143-uwp"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
+}
+if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } {
+ lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset ClangCL)"
+ lappend ::SYS_VC_LIST "vclang"
+ lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat"
}
# detect installed Visual Studio instances from global environment
# Wrapper-function to generate VS project files
proc genproj {theFormat args} {
- set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vclang" "cbp" "xcd" "pro"}
+ set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vc143" "vclang" "cbp" "xcd" "pro"}
set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" }
set isHelpRequire false
vc14 - Visual Studio 2015
vc141 - Visual Studio 2017
vc142 - Visual Studio 2019
+ vc143 - Visual Studio 2022
vclang - Visual Studio with ClangCL toolset
cbp - CodeBlocks
xcd - XCode
"vc14" -
"vc141" -
"vc142" -
+ "vc143" -
"vclang" { OS:MKVC $anOutDir $aModules $aTools $theSolution $theFormat $isUWP}
"cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl }
"xcd" {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 2013\n"
- } elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
- "$vcversion" == "vc142" || "$vcversion" == "vclang" } {
+ } elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" ||
+ "$vcversion" == "vc142" || "$vcversion" == "vc143" || "$vcversion" == "vclang" } {
append var \
"Microsoft Visual Studio Solution File, Format Version 12.00\n" \
"# Visual Studio 14\n"
} elseif { $theVcVer == "vc142" } {
set aVCRTVer "vc14"
set aToolset "v142"
+ } elseif { $theVcVer == "vc143" } {
+ set aVCRTVer "vc14"
+ set aToolset "v143"
} elseif { $theVcVer == "vclang" } {
set aVCRTVer "vc14"
set aToolset "ClangCL"
for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
+) else if /I "%VCFMT%" == "vc143" (
+ for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
+ set "DevEnvDir=%%i\Common7\IDE\"
+ )
) else if /I "%VCFMT%" == "vclang" (
- for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
+ for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "DevEnvDir=%%i\Common7\IDE\"
)
) else if /I "%VCFMT%" == "gcc" (
echo vc14 = VS 2015
echo vc141 = VS 2017
echo vc142 = VS 2019
+ echo vc143 = VS 2022
echo vclang = VS 2019 with ClangCL toolset
exit /B
)
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
set "VCPlatformToolSet=v142"
-) else if /I "%VCFMT%" == "vclang" (
- for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
+) else if /I "%VCFMT%" == "vc143" (
+ for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
+ set "VCPlatformToolSet=v143"
+) else if /I "%VCFMT%" == "vclang" (
+ for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
+ set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat"
+ )
set "VCPlatformToolSet=ClangCL"
) else if /I "%VCFMT%" == "gcc" (
rem MinGW