VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/setenv.bat
blob: 82a963a684110f5435a77cdd4c21b8bd363b44b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
pushd "%~dp0"

if not defined PYTHONHOME (
   echo PYTHONHOME not found!
   goto :end
)

if defined VS100COMNTOOLS (
   call "%VS100COMNTOOLS%\vsvars32.bat"
   goto :initialize
) else (
   echo MSVS2010 not found!
   goto :end
)

:initialize

if not defined NASM_PREFIX set NASM_PREFIX=c:\Tools\nasm\
if not defined EDK_PREFIX set EDK_PREFIX=c:\Tools\edk2

call :updatepath "%PYTHONHOME%"
call :updatepath "%NASM_PREFIX%"

if not defined EDK_TOOLS_BIN (
   pushd "%EDK_PREFIX%"
   call edksetup.bat
   popd
)

goto :end

:updatepath
set appendpath=%~1
for %%A in ("%path:;=";"%") do (
   if /I "%~1"=="%%~A" (
      echo %1 in path found
      set appendpath=
   )
rem   echo %%~A
)
if defined appendpath set path=%path%;%appendpath%
goto :eof

:end
popd