Skip to content

Commit b3b5560

Browse files
skibugmaster
authored andcommitted
0025490: Error appears trying to start QT OCCT sample
Separate msvc.bat files were created for each qt sample to avoid errors.
1 parent 2cf5ec3 commit b3b5560

3 files changed

Lines changed: 105 additions & 12 deletions

File tree

samples/qt/IESample/msvc.bat

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
1+
@echo off
2+
3+
rem Setup environment
14
call "%~dp0env.bat" %1 %2 %3
25

3-
if ["%CASDEB%"] == [""] (
4-
call "%~dp0..\..\..\msvc.bat" %VCVER% win%ARCH% "" "%~dp0IESample-%VCVER%.sln"
6+
rem Define path to project file
7+
set "PRJFILE=%~dp0IESample-%VCVER%.sln"
8+
9+
set "VisualStudioExpressName=VCExpress"
10+
11+
if "%VCVER%" == "vc8" (
12+
set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
13+
) else if "%VCVER%" == "vc9" (
14+
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
15+
) else if "%VCVER%" == "vc10" (
16+
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
17+
) else if "%VCVER%" == "vc11" (
18+
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
19+
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
20+
rem and has a new name for executable - WDExpress
21+
set "VisualStudioExpressName=WDExpress"
22+
) else if "%VCVER%" == "vc12" (
23+
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
24+
set "VisualStudioExpressName=WDExpress"
25+
) else (
26+
echo Error: wrong VS identifier
27+
exit /B
28+
)
29+
30+
rem Launch Visual Studio - either professional (devenv) or Express, as available
31+
if exist "%DevEnvDir%\devenv.exe" (
32+
start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
33+
) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
34+
start "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
535
) else (
6-
call "%~dp0..\..\..\msvc.bat" %VCVER% win%ARCH% %CASDEB% "%~dp0IESample-%VCVER%.sln"
7-
)
36+
echo Error: Could not find MS Visual Studio ^(%VCVER%^)
37+
echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
38+
)

samples/qt/Tutorial/msvc.bat

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
1+
@echo off
2+
3+
rem Setup environment
14
call "%~dp0env.bat" %1 %2 %3
25

3-
if ["%CASDEB%"] == [""] (
4-
call "%~dp0..\..\..\msvc.bat" %VCVER% win%ARCH% "" "%~dp0Tutorial-%VCVER%.sln"
6+
rem Define path to project file
7+
set "PRJFILE=%~dp0Tutorial-%VCVER%.sln"
8+
9+
set "VisualStudioExpressName=VCExpress"
10+
11+
if "%VCVER%" == "vc8" (
12+
set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
13+
) else if "%VCVER%" == "vc9" (
14+
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
15+
) else if "%VCVER%" == "vc10" (
16+
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
17+
) else if "%VCVER%" == "vc11" (
18+
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
19+
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
20+
rem and has a new name for executable - WDExpress
21+
set "VisualStudioExpressName=WDExpress"
22+
) else if "%VCVER%" == "vc12" (
23+
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
24+
set "VisualStudioExpressName=WDExpress"
25+
) else (
26+
echo Error: wrong VS identifier
27+
exit /B
28+
)
29+
30+
rem Launch Visual Studio - either professional (devenv) or Express, as available
31+
if exist "%DevEnvDir%\devenv.exe" (
32+
start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
33+
) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
34+
start "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
535
) else (
6-
call "%~dp0..\..\..\msvc.bat" %VCVER% win%ARCH% %CASDEB% "%~dp0Tutorial-%VCVER%.sln"
7-
)
36+
echo Error: Could not find MS Visual Studio ^(%VCVER%^)
37+
echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
38+
)

samples/qt/VoxelDemo/msvc.bat

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
1+
@echo off
2+
3+
rem Setup environment
14
call "%~dp0..\..\..\env.bat" %1 %2 %3
25

3-
if ["%CASDEB%"] == [""] (
4-
call "%~dp0..\..\..\msvc.bat" %VCVER% win%ARCH% "" "%~dp0VoxelDemo-%VCVER%.sln"
6+
rem Define path to project file
7+
set "PRJFILE=%~dp0VoxelDemo-%VCVER%.sln"
8+
9+
set "VisualStudioExpressName=VCExpress"
10+
11+
if "%VCVER%" == "vc8" (
12+
set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
13+
) else if "%VCVER%" == "vc9" (
14+
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
15+
) else if "%VCVER%" == "vc10" (
16+
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
17+
) else if "%VCVER%" == "vc11" (
18+
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
19+
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
20+
rem and has a new name for executable - WDExpress
21+
set "VisualStudioExpressName=WDExpress"
22+
) else if "%VCVER%" == "vc12" (
23+
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
24+
set "VisualStudioExpressName=WDExpress"
25+
) else (
26+
echo Error: wrong VS identifier
27+
exit /B
28+
)
29+
30+
rem Launch Visual Studio - either professional (devenv) or Express, as available
31+
if exist "%DevEnvDir%\devenv.exe" (
32+
start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
33+
) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
34+
start "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
535
) else (
6-
call "%~dp0..\..\..\msvc.bat" %VCVER% win%ARCH% %CASDEB% "%~dp0VoxelDemo-%VCVER%.sln"
7-
)
36+
echo Error: Could not find MS Visual Studio ^(%VCVER%^)
37+
echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
38+
)

0 commit comments

Comments
 (0)