28 lines
930 B
Batchfile
28 lines
930 B
Batchfile
|
@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%"
|