Created
May 24, 2018 00:07
-
-
Save vvuk/01dc8a12678d1beffaa1e26549d03b02 to your computer and use it in GitHub Desktop.
Generate "vcvarsall" equivalent for msys2 bash from vcvarsall
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 | |
set OLDPATH=%PATH% | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64 > NUL: | |
echo export INCLUDE='%INCLUDE%' | |
echo export LIB='%LIB%' | |
echo export LIBPATH='%LIBPATH%' | |
call set NEWPATH=%%PATH:%OLDPATH%=%% | |
set NEWPATH=%NEWPATH:C:=/c% | |
set NEWPATH=%NEWPATH:\=/% | |
set NEWPATH=%NEWPATH:;=:% | |
echo export PATH="%NEWPATH%:$PATH" |
You have to call cmd set with quotes:
set "NEWPATH=%NEWPATH:C:=/c%"
set "NEWPATH=%NEWPATH:\=/%"
set "NEWPATH=%NEWPATH:;=:%"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use it from msys2 bash?