Skip to content

Instantly share code, notes, and snippets.

@yupferris
Created January 7, 2021 19:52
Show Gist options
  • Save yupferris/af43acb807822b316e5c8e9ddae83b05 to your computer and use it in GitHub Desktop.
Save yupferris/af43acb807822b316e5c8e9ddae83b05 to your computer and use it in GitHub Desktop.
in `cmd`, `vcvarslol.bat >> vcvarslol`, then vs2019 tools can be pulled into msys2 with `. vcvarslol`
@ECHO OFF
set OLDPATH=%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 > NUL:
echo #!/bin/bash
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment