MSYS2 consists of three subsystems and their corresponding package repositories, `msys2`, `mingw32`, and `mingw64`.
The `mingw` subsystems provide native Windows programs and are the main focus
of the project. These programs are built to co-operate well with other Windows
programs, independently of the other subsystems.
The `msys2` subsystem provides an emulated mostly-POSIX-compliant environment
for building, package management, and shell scripting. These programs live in a
virtual single-root filesystem (the root is the MSYS2 installation directory).
Some effort is made to have the programs work well with native Windows
programs, but it's not seamless.
Each of the subsystems provides its own native (i.e. target=host) compiler
toolchain, in `msys2-devel`, `mingw-w64-i686-toolchain`, and
`mingw-w64-x86_64-toolchain`. There are also cross compiler toolchains with
host=msys2 and target=mingw{32,64} in `mingw-w64-cross-toolchain`, but these
are of limited use because there are no library packages for them.
Every subsystem has an associated "shell", which is essentially a set of
environment variables that allow the subsystems to co-operate properly. These
shells can be invoked using scripts in the MSYS2 installation directory or
shortcuts in the Start menu. The scripts set the MSYSTEM variable and start a
terminal emulator with bash. Bash in turn sources `/etc/profile` which sets the
environment depending on the value of MSYSTEM.
Without the correct environment, various things may and will (sometimes
silently) break. The exception is using mingw subsystems from pure Windows,
which shouldn't require any special environment apart from an entry in PATH. Do
not set MSYSTEM outside of the shells, because that will also break things.
Use `msys2` shell for running `pacman`, `makepkg`, `makepkg-mingw` and for
building POSIX-dependent software that you don't intend to distribute. Use
`mingw` shells for building native software and other tasks.
Packages for `msys2` are built from recipes in the `msys2-packages` Git
repository, packages for `mingw` are in `mingw-packages`. Official repositories
are on GitHub under user Alexpux and on SF.net under the MSYS2 project. When
looking for `msys2` packages or deciding to create a new one, keep in mind that
MSYS2 doesn't intend to compete with Cygwin or duplicate their efforts. The set
of things that belong to the `msys2` subsystem is pretty small:
- essential POSIX stuff: `filesystem`, `msys2-runtime`, ...
- the native toolchain: `gcc`, `binutils`, `gdb`, ...
- supporting programs that are hard to port to Windows: `bash`, `automake`,
`make`, ...
- supporting programs, even though they're portable: `mintty`, `pacman`,
`winpty`, `python`, `man`, `vim`, `git`, ...
- random, highly useful stuff: `mc`, `ssh`, `rsync`, `lftp`, ...
- dependencies of these packages
In other words, if a program is needed to build native software, but is itself
hard to port, it can be made into a `msys2` package. Anything else needs to be
done as a `mingw` package or vetted individually.
The virtual filesystem contains:
`/bin`, `/dev`, `/home`, `/opt`, `/proc`, `/tmp`, `/var`: essential POSIX stuff
`/etc`, `/usr`: `msys2` subsystem
`/mingw32`, `/mingw64`: `mingw` subsystems
`/*.xml`, `/maintenancetool.*`, `InstallationLog.txt`: installer
`/autorebase.bat`, `/*_shell.bat`, `msys2.ico`: shell entry points
--
David Macek
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Msys2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msys2-users
