Simplify MSYS2 scripts

This commit is contained in:
doylet 2024-04-09 21:17:10 +10:00
parent 90e20b2168
commit 5c8954036d
4 changed files with 27 additions and 9 deletions

View File

@ -1,3 +0,0 @@
@echo off
setlocal EnableDelayedExpansion
%devenver_root%\msys2\20240113\msys2_shell.cmd -defterm -here -use-full-path -no-start -mingw64 -shell bash

View File

@ -1,3 +0,0 @@
@echo off
setlocal EnableDelayedExpansion
%devenver_root%\msys2\20240113\msys2_shell.cmd -defterm -here -use-full-path -no-start -msys -shell bash

View File

@ -1,3 +0,0 @@
@echo off
setlocal EnableDelayedExpansion
%devenver_root%\msys2\20240113\msys2_shell.cmd -defterm -here -use-full-path -no-start -ucrt64 -shell bash

27
Win/Scripts/msys2_env.bat Normal file
View File

@ -0,0 +1,27 @@
@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%"