VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-06-18 17:13:15 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-06-18 17:17:19 (GMT)
commit85cab3b85f1d95fe54958c4bd207976dec027dd9 (patch)
treefff79f805ee9a1c72506d13f5cb82d64f867741a /src/Driver
parente4efd6820aed1618a3509d50fa7041ce3f5366eb (diff)
downloadVeraCrypt-85cab3b85f1d95fe54958c4bd207976dec027dd9.zip
VeraCrypt-85cab3b85f1d95fe54958c4bd207976dec027dd9.tar.gz
Windows Driver: use more reliable way to correctly set path to VC++ 2010 in driver build batch file.
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/BuildDriver.cmd19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/Driver/BuildDriver.cmd b/src/Driver/BuildDriver.cmd
index db41315..197e41c 100644
--- a/src/Driver/BuildDriver.cmd
+++ b/src/Driver/BuildDriver.cmd
@@ -103,12 +103,23 @@ pushd .
call %TC_WINDDK_ROOT%\bin\setenv %TC_WINDDK_ROOT% %TC_BUILD_TYPE% %TC_BUILD_ARCH% no_oacr || exit /B %errorlevel%
popd
+:: set path to VC++ 2010
+IF EXIST "%programfiles(x86)%" (GOTO 64-Bit) ELSE (GOTO 32-Bit)
+
+:32-Bit
+@set "VCPATH=%programfiles%\Microsoft Visual Studio 10.0\"
+GOTO CONTINUE
+
+:64-Bit
+@set "VCPATH=%programfiles(x86)%\Microsoft Visual Studio 10.0\"
+GOTO CONTINUE
+
+:CONTINUE
+
if "%TC_ARG_ARCH%"=="-x64" (
- @call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
- @set "PATH=%VSINSTALLDIR%Common7\IDE;%VSINSTALLDIR%VC\bin\amd64;%PATH%"
+ @set "PATH=%VCPATH%Common7\IDE;%VCPATH%VC\bin\amd64;%PATH%"
) else (
- @call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" No32bit 64bit
- @set "PATH=PATH=%VSINSTALLDIR%Common7\IDE;%VSINSTALLDIR%VC\bin;%PATH%"
+ @set "PATH=%VCPATH%Common7\IDE;%VCPATH%VC\bin;%PATH%"
)
:: Build