diff options
Diffstat (limited to 'setenv.bat')
-rw-r--r-- | setenv.bat | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/setenv.bat b/setenv.bat new file mode 100644 index 0000000..82a963a --- /dev/null +++ b/setenv.bat @@ -0,0 +1,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
\ No newline at end of file |