Rem Ensure parentheses in argument do not interfere with FOR IN loop below. Set CHERE_INVOKING=enabled_from_arguments 1>&2Įcho Cannot set specified working diretory "%~2". If "x%~1" = "x-here" shift& set /a msys2_shiftCounter+=1& set CHERE_INVOKING=enabled_from_arguments& goto :checkparamsĮcho Working directory is not specified for -where parameter. If "x%~1" = "x-use-full-path" shift& set /a msys2_shiftCounter+=1& set MSYS2_PATH_TYPE=inherit& goto :checkparams If "x%~1" = "x-full-path" shift& set /a msys2_shiftCounter+=1& set MSYS2_PATH_TYPE=inherit& goto :checkparams If "x%~1" = "x-defterm" shift& set /a msys2_shiftCounter+=1& set MSYSCON=defterm& goto :checkparams If "x%~1" = "x-conemu" shift& set /a msys2_shiftCounter+=1& set MSYSCON=conemu& goto :checkparams If "x%~1" = "x-mintty" shift& set /a msys2_shiftCounter+=1& set MSYSCON=mintty.exe& goto :checkparams
If "x%~1" = "x-mingw" shift& set /a msys2_shiftCounter+=1& (if exist "%WD%.\.\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams If "x%~1" = "x-clang64" shift& set /a msys2_shiftCounter+=1& set MSYSTEM=CLANG64& goto :checkparams
If "x%~1" = "x-ucrt64" shift& set /a msys2_shiftCounter+=1& set MSYSTEM=UCRT64& goto :checkparams If "x%~1" = "x-mingw64" shift& set /a msys2_shiftCounter+=1& set MSYSTEM=MINGW64& goto :checkparams If "x%~1" = "x-mingw32" shift& set /a msys2_shiftCounter+=1& set MSYSTEM=MINGW32& goto :checkparams If "x%~1" = "x-msys2" shift& set /a msys2_shiftCounter+=1& set MSYSTEM=MSYS& goto :checkparams If "x%~1" = "x-msys" shift& set /a msys2_shiftCounter+=1& set MSYSTEM=MSYS& goto :checkparams Rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter Rem set MSYS=error_start:%WD%././mingw64/bin/qtcreator.exe^|-debug^|^ Rem To activate windows native symlinks uncomment next line If NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\" cmd script, as it is msys2, so here it is: off I'm not sure what to do next, I'd appreciate anyone's help.ĮDIT: This is a long. It opens mingw32, but then instantly (or sometimes almost instantly) closes.
But, when I run it via Process.Start(), it simply opens then almost instantly closes.Į.x. When I double-click the batch file in File Explorer, it runs and compiles the C++ source code just fine. NOTE: The batch file is located in the same location as the Makefile. There is a Makefile located in the /d/HelloWorld/Assets directory, as well as a C++ source file (*.cpp) and I would like to execute/compile it from my C# app. I'm trying to execute a batch file that contains the following commands: C:\\devkitPro\\msys2\\msys2_shell.cmd -mingw32 -c "cd /d/HelloWorld/Assets & make" I'm using Visual Studio 2019 and C# Windows Forms.