MSYS can best be described as a Bash shell and some GNU tools, which facilitate compiling sources under and for a Windows environment. It's the environment to use when compiling for instance OpenSSL or Emacs on Windows.
MSYS2 is the 'new and improved' version of MSYS.
One of its biggest advantages is better package management. MSYS2 has pacman, a package manager from Arch Linux. Upgrading can finally be done from within the shell session itself, with only a few basic commands.
# download package descriptions from the remote repositories pacman -Sy # upgrade MSYS2 core components and the shell itself pacman --needed -S bash pacman msys2-runtime # restart MSYS2 if any package needed updating, then update the rest pacman -Su
This was 'somewhat more difficult' under MSYS.
Another advantage is the Bash version - currently at 4.3.30 versus 3.1.17 on MSYS. Bash 4 means support for functions like associative arrays and fancier redirections:
# redirect stdout and stderr at the same time command &> output # same command in Bash 3 syntax command > output 2>&1 # pipe stdout and stderr at the same time command |& someothercommand # same command in Bash 3 syntax command 2>&1 \| someothercommand
The third big plus is that it's easier to switch between a 32 bit and 64 bit environment.
With MSYS you had to change the mapping in
That meant that files that you installed in
in one environment
weren't available in the other.
MSYS2 keeps the same environments accessible at the same time -
for 32 bit, and
for 64 bit. You can install packages for one
environment while you're in the other.
All OpenSSL binaries that are distributed through this site will be built using MSYS2 from now on.
MSYS2 can be found at https://sourceforge.net/projects/msys2/
More on pacman at https://wiki.archlinux.org/index.php/pacman