[71c5f4d] | 1 | @echo off |
---|
| 2 | |
---|
| 3 | if "%1" == "" goto x86 |
---|
| 4 | if not "%2" == "" goto usage |
---|
| 5 | |
---|
| 6 | if /i %1 == x86 goto x86 |
---|
| 7 | if /i %1 == amd64 goto amd64 |
---|
| 8 | if /i %1 == x64 goto amd64 |
---|
| 9 | if /i %1 == x86_amd64 goto x86_amd64 |
---|
| 10 | goto usage |
---|
| 11 | |
---|
| 12 | :x86 |
---|
| 13 | echo Setting environment for using Microsoft Visual Studio 2008 x86 tools. |
---|
| 14 | set VCINSTALLDIR=%~dp0VC\ |
---|
| 15 | set WindowsSdkDir=%~dp0WinSDK\ |
---|
| 16 | if not exist "%VCINSTALLDIR%bin\cl.exe" goto missing |
---|
| 17 | set PATH=%VCINSTALLDIR%Bin;%WindowsSdkDir%Bin;%PATH% |
---|
| 18 | set INCLUDE=%VCINSTALLDIR%Include;%WindowsSdkDir%Include;%INCLUDE% |
---|
| 19 | set LIB=%VCINSTALLDIR%Lib;%WindowsSdkDir%Lib;%LIB% |
---|
| 20 | set LIBPATH=%VCINSTALLDIR%Lib;%WindowsSdkDir%Lib;%LIBPATH% |
---|
| 21 | goto :eof |
---|
| 22 | |
---|
| 23 | :amd64 |
---|
| 24 | echo Setting environment for using Microsoft Visual Studio 2008 x64 tools. |
---|
| 25 | set VCINSTALLDIR=%~dp0VC\ |
---|
| 26 | set WindowsSdkDir=%~dp0WinSDK\ |
---|
| 27 | if not exist "%VCINSTALLDIR%Bin\amd64\cl.exe" goto missing |
---|
| 28 | set PATH=%VCINSTALLDIR%Bin\amd64;%WindowsSdkDir%Bin\x64;%WindowsSdkDir%Bin;%PATH% |
---|
| 29 | set INCLUDE=%VCINSTALLDIR%Include;%WindowsSdkDir%Include;%INCLUDE% |
---|
| 30 | set LIB=%VCINSTALLDIR%Lib\amd64;%WindowsSdkDir%Lib\x64;%LIB% |
---|
| 31 | set LIBPATH=%VCINSTALLDIR%Lib\amd64;%WindowsSdkDir%Lib\x64;%LIBPATH% |
---|
| 32 | goto :eof |
---|
| 33 | |
---|
| 34 | :x86_amd64 |
---|
| 35 | echo Setting environment for using Microsoft Visual Studio 2008 x64 cross tools. |
---|
| 36 | set VCINSTALLDIR=%~dp0VC\ |
---|
| 37 | set WindowsSdkDir=%~dp0WinSDK\ |
---|
| 38 | if not exist "%VCINSTALLDIR%Bin\x86_amd64\cl.exe" goto missing |
---|
| 39 | set PATH=%VCINSTALLDIR%Bin\x86_amd64;%WindowsSdkDir%Bin;%PATH% |
---|
| 40 | set INCLUDE=%VCINSTALLDIR%Include;%WindowsSdkDir%Include;%INCLUDE% |
---|
| 41 | set LIB=%VCINSTALLDIR%Lib\amd64;%WindowsSdkDir%Lib\x64;%LIB% |
---|
| 42 | set LIBPATH=%VCINSTALLDIR%Lib\amd64;%WindowsSdkDir%Lib\x64;%LIBPATH% |
---|
| 43 | goto :eof |
---|
| 44 | |
---|
| 45 | :usage |
---|
| 46 | echo Error in script usage. The correct usage is: |
---|
| 47 | echo %0 [option] |
---|
| 48 | echo where [option] is: x86 ^| amd64 ^| x86_amd64 |
---|
| 49 | echo: |
---|
| 50 | echo For example: |
---|
| 51 | echo %0 x86_ia64 |
---|
| 52 | goto :eof |
---|
| 53 | |
---|
| 54 | :missing |
---|
| 55 | echo The specified configuration type is missing. The tools for the |
---|
| 56 | echo configuration might not be installed. |
---|
| 57 | goto :eof |
---|