@echo off
setlocal

:: Set MSYS2 environment for your execCommand to use
set MSYSTEM=MINGW64
set MSYS2_PATH_TYPE=inherit
set MSYS2_BASH_PATH=C:\msys64\usr\bin\bash.exe

:: Add MSYS2 to PATH so your program can find utilities
set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%~dp0\shell;%PATH%

:: Your program path
set MYSHELL=%~dp0\shell\mxcmd-cli.exe

echo Starting Custom Shell with MSYS2 integration...
echo MSYS2_BASH_PATH is set to: %MSYS2_BASH_PATH%
echo Your shell program: %MYSHELL%

:: Launch your program directly (it will use MSYS2 bash for exec commands)
start "Custom Shell" cmd /c ""%MYSHELL%""

endlocal