Created
April 17, 2013 19:16
-
-
Save kingbin/5406938 to your computer and use it in GitHub Desktop.
vcvarsall.bat
This file contains 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 | |
@set IE_BIN=%ProgramFiles%\Internet Explorer\iexplore.exe | |
@set PHANTOMJS_BIN=%APPDATA%\npm\node_modules\phantomjs\lib\phantom\phantomjs.exe | |
@doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $* | |
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\amd64\vcvars64.bat" goto missing | |
call "%~dp0bin\amd64\vcvars64.bat" | |
goto :eof | |
:ia64 | |
if not exist "%~dp0bin\ia64\vcvars64.bat" goto missing | |
call "%~dp0bin\ia64\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