DEVenv/Win/Scripts/msys2_env.bat

28 lines
930 B
Batchfile
Raw Normal View History

2024-04-09 11:17:10 +00:00
@echo off
setlocal EnableDelayedExpansion
if "%~1"=="help" goto :help
if "%~1"=="" goto :help
if "%~1"=="--help" goto :help
if "%~1"=="/?" goto :help
if "%~2"=="" goto :help
goto :run
:help
echo USAGE: msys2_env.bat ^<environment^> ^<command^>
echo.
echo ENVIRONMENTS:
echo ^| Name ^| Toolchain ^| Arch ^| C Runtime ^| C++ Runtime ^|
echo ^| 'clang64' ^| llvm ^| x64 ^| ucrt ^| libc++ ^|
echo ^| 'mingw32' ^| gcc ^| x86 ^| msvcrt ^| libstdc++ ^|
echo ^| 'mingw64' ^| gcc ^| x64 ^| msvcrt ^| libstdc++ ^|
echo ^| 'msys2' ^| gcc ^| x64 ^| cygwin ^| libstdc++ ^|
echo ^| 'ucrt64' ^| gcc ^| x64 ^| ucrt ^| libstdc++ ^|
goto :eof
:run
set msys_env=%~1
for /f "tokens=1,* delims= " %%a in ("%*") do set remaining_args=%%b
%devenver_root%\MSYS2\20240113\msys2_shell.cmd -%msys_env% -no-start -defterm -here -c "%remaining_args%"