4 call "%~dp0env.bat" %1 %2 %3
6 rem Define path to project file
7 set "PRJFILE=%~dp0\adm\msvc\%VCVER%\OCCT.sln"
8 if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
13 set "VisualStudioExpressName=VCExpress"
15 if not "%DevEnvDir%" == "" (
16 rem If DevEnvDir is already defined (e.g. in custom.bat), use that value
17 ) else if /I "%VCFMT%" == "vc8" (
18 set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
19 ) else if /I "%VCFMT%" == "vc9" (
20 set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
21 ) else if /I "%VCFMT%" == "vc10" (
22 set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
23 ) else if /I "%VCFMT%" == "vc11" (
24 set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
25 rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
26 rem and has a new name for executable - WDExpress
27 set "VisualStudioExpressName=WDExpress"
28 ) else if /I "%VCFMT%" == "vc12" (
29 set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
30 set "VisualStudioExpressName=WDExpress"
31 ) else if /I "%VCFMT%" == "vc14" (
32 set "DevEnvDir=%VS140COMNTOOLS%..\IDE"
33 ) else if /I "%VCFMT%" == "vc141" (
34 for /f "usebackq delims=" %%i in (`vswhere.exe -version "[15.0,15.99]" -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do (
35 set DevEnvDir=%%i\Common7\IDE
38 echo Error: wrong VS identifier
42 rem Launch Visual Studio - either professional (devenv) or Express, as available
43 if exist "%DevEnvDir%\devenv.exe" (
44 start "" "%DevEnvDir%\devenv.exe" "%PRJFILE%"
45 ) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
46 start "" "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
48 echo Error: Could not find MS Visual Studio ^(%VCVER%^)
49 echo For VS 2010-2015, check relevant environment variable ^(e.g. VS100COMNTOOLS^)