Last active
August 29, 2015 14:06
-
-
Save regen100/fe700de0ec5a2c053bdb to your computer and use it in GitHub Desktop.
vcvarsall.bat for VC++ 9.0 (2008)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if "%1" == "" goto x86 | |
if not "%2" == "" goto usage | |
if /i %1 == x86 goto x86 | |
if /i %1 == amd64 goto amd64 | |
if /i %1 == x64 goto amd64 | |
if /i %1 == ia64 goto ia64 | |
if /i %1 == x86_amd64 goto x86_amd64 | |
if /i %1 == x86_ia64 goto x86_ia64 | |
goto usage | |
:x86 | |
if not exist "%~dp0bin\vcvars32.bat" goto missing | |
call "%~dp0bin\vcvars32.bat" | |
goto :eof | |
:amd64 | |
if not exist "%~dp0bin\vcvars64.bat" goto missing | |
call "%~dp0bin\vcvars64.bat" | |
goto :eof | |
:ia64 | |
if not exist "%~dp0bin\vcvars64.bat" goto missing | |
call "%~dp0bin\vcvars64.bat" | |
goto :eof | |
:x86_amd64 | |
if not exist "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat" goto missing | |
call "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat" | |
goto :eof | |
:x86_ia64 | |
if not exist "%~dp0bin\x86_ia64\vcvarsx86_ia64.bat" goto missing | |
call "%~dp0bin\x86_ia64\vcvarsx86_ia64.bat" | |
goto :eof | |
:usage | |
echo Error in script usage. The correct usage is: | |
echo %0 [option] | |
echo where [option] is: x86 ^| ia64 ^| amd64 ^| x86_amd64 ^| x86_ia64 | |
echo: | |
echo For example: | |
echo %0 x86_ia64 | |
goto :eof | |
:missing | |
echo The specified configuration type is missing. The tools for the | |
echo configuration might not be installed. | |
goto :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment