This repo help me use shell script file to setup the enviroment for msys2.
Please follow these steps to setup the enviroment for msys2.
- Use the command to upgrade the system.
pacman -Syu- The terminal will automatically close if
msys2finish upgrading. Now, please use the same command to continue upgrading.
pacman -Syu- Use the shell script file in this repo to setup the enviroment.
sh setup.sh- Restart the
msys2terminal.
In order to run msys2 terminal here from the right-click context menu, we can need do something to setup. You can select one of the ways to setup:
- Edit
Registrybyregedit.exe - Use the
.regfiles.
We use these steps to use regedit.exe to setup:
- Click keys
WIN + R, and then launchregedit.exe. - Reach to the path
HKEY_CLASS_ROOT\Directory\Background\shell. - Click mouse right button on
shell, and then selectNew>Key. Name this keyMSYS2. - Click mouse right button on
MSYS2, and then selectNew>Key. Name this keycommand. - Select
commandand then double click(Default). We supposemsys2installed inC:\, so set theValue dataof(Default)to"C:\msys64\msys2_shell.cmd" "-here".
If you want to run mingw64terminal on here, you can create the key mingw64 in HKEY_CLASS_ROOT\Directory\Background\shell. Of course, mingw64 also need create the key command, but Value data of (Default) in command must set "C:\msys64\msys2_shell.cmd" "-here" "-mingw64".
The directory regedit_files has .reg files. We can double click each .reg file in the directory to setup.