MSYS2 Windows软件分发和构建平台

MSYS2

Software Distribution and Building Platform for Windows

MSYS2 Windows软件分发和构建平台

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

MSYS2是一个工具和库的集合,为您构建、安装和运行本机Windows软件提供了一个易于使用的环境。

It consists of a command line terminal called mintty, bash, version control systems like git and subversion, tools like tar and awk and even build systems like autotools, all based on a modified version of Cygwin. Despite some of these central parts being based on Cygwin, the main focus of MSYS2 is to provide a build environment for native Windows software and the Cygwin-using parts are kept at a minimum. MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, just to name a few.

​它包括一个名为mintty、bash的命令行终端、git和subversion等版本控制系统、tar和awk等工具,甚至还有autotools等构建系统,所有这些都基于Cygwin的修改版本。尽管其中一些核心部件基于Cygwin,但MSYS2的主要重点是为本机Windows软件提供构建环境,并且使用Cygwin的部件保持在最低限度。MSYS2为GCC、mingw-w64、CPython、CMake、Meson、OpenSSL、FFmpeg、Rust、Ruby等提供了最新的本机版本。

To provide easy installation of packages and a way to keep them updated it features a package management system called Pacman, which should be familiar to Arch Linux users. It brings many powerful features such as dependency resolution and simple complete system upgrades, as well as straight-forward and reproducible package building. Our package repository contains more than 2500 pre-built packages ready to install.

​为了方便安装软件包并保持更新,它提供了一个名为Pacman的软件包管理系统,Arch Linux用户应该熟悉该系统。它带来了许多强大的功能,如依赖解析和简单的完整系统升级,以及直接和可复制的包构建。我们的软件包存储库包含2500多个准备安装的预构建软件包。

For more details see 'What is MSYS2?' which also compares MSYS2 to other software distributions and development environments like CygwinWSLChocolateyScoop, ... and 'Who Is Using MSYS2?' to see which projects are using MSYS2 and what for.

​有关更多详细信息,请参阅“什么是MSYS2?”它还将MSYS2与Cygwin、WSL、Chocolate、Scoop等其他软件发行版和开发环境进行了比较。。。“谁在使用MSYS2?”查看哪些项目正在使用MSYS2以及它的用途。

Installation

安装

1.Download the installer: msys2-x86_64-20220319.exe

下载安装程序:msys2-x86_64-20220319.exe

Verify with SHA256 checksum bd7cac636c1bf3a1821b9694ba3f49a92a6de1458d0ccc78f36338a393892e71 or GPG signature by 0xf7a49b0ec.

2.Run the installer. MSYS2 requires 64 bit Windows 7 or newer.

运行安装程序。MSYS2需要64位Windows 7或更高版本。

Enter your desired Installation Folder (short ASCII-only path on a NTFS volume, no accents, no spaces, no symlinks, no subst or network drives, no FAT).

输入所需的安装文件夹(NTFS卷上只有短ASCII路径、无重音符号、无空格、无符号链接、无subst或网络驱动器、无FAT)。

3.When done, tick Run MSYS2 now.

完成后,勾选立即运行MSYS2。

4.Update the package database and base packages. Unless your setup file is very recent, it will take two steps. First run pacman -Syu:

更新包数据库和基本包。除非您的安装文件是最新的,否则需要两个步骤。第一次运行pacman-Syu:

$ pacman -Syu
:: Synchronizing package databases...
 mingw32                        805.0 KiB
 mingw32.sig                    438.0   B
 mingw64                        807.9 KiB
 mingw64.sig                    438.0   B
 msys                           289.3 KiB
 msys.sig                       438.0   B
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...

Packages (6) bash-5.1.004-1  filesystem-2021.01-1
             mintty-1~3.4.4-1  msys2-runtime-3.1.7-4
             pacman-5.2.2-9  pacman-mirrors-20201208-1

Total Download Size:   11.05 MiB
Total Installed Size:  53.92 MiB
Net Upgrade Size:      -1.24 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 bash-5.1.004-1-x86_64            2.3 MiB
 filesystem-2021.01-1-any        33.2 KiB
 mintty-1~3.4.4-1-x86_64        767.2 KiB
 msys2-runtime-3.1.7-4-x86_64     2.6 MiB
 pacman-mirrors-20201208-1-any    3.8 KiB
 pacman-5.2.2-9-x86_64            5.4 MiB
(6/6) checking keys in keyring       100%
(6/6) checking package integrity     100%
(6/6) loading package files          100%
(6/6) checking for file conflicts    100%
(6/6) checking available disk space  100%
:: Processing package changes...
(1/6) upgrading bash                 100%
(2/6) upgrading filesystem           100%
(3/6) upgrading mintty               100%
(4/6) upgrading msys2-runtime        100%
(5/6) upgrading pacman-mirrors       100%
(6/6) upgrading pacman               100%
:: To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed [Y/n]

5.Run "MSYS2 MSYS" from Start menu. Update the rest of the base packages with pacman -Su:

从开始菜单运行“MSYS2 MSYS”。使用pacman-Su更新其余的基本软件包:

$ pacman -Su
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (20) base-2020.12-1  bsdtar-3.5.0-1
              [... more packages listed ...]

Total Download Size:   12.82 MiB
Total Installed Size:  44.25 MiB
Net Upgrade Size:       3.01 MiB

:: Proceed with installation? [Y/n]
[... downloading and installation continues ...]

6.Now MSYS2 is ready for you. You will probably want to install some tools and the mingw-w64 GCC to start compiling:

现在MSYS2已经为您准备好了。您可能需要安装一些工具和mingw-w64 GCC来开始编译:

$ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
warning: file-5.39-2 is up to date -- skipping
[... more warnings ...]
:: There are 48 members in group base-devel:
:: Repository msys
   1) asciidoc  2) autoconf  3) autoconf2.13  4) autogen
   [... more packages listed ...]

Enter a selection (default=all):
:: There are 19 members in group mingw-w64-x86_64-toolchain:
:: Repository mingw64
   1) mingw-w64-x86_64-binutils  2) mingw-w64-x86_64-crt-git
   [... more packages listed ...]

Enter a selection (default=all):
resolving dependencies...
looking for conflicting packages...

Packages (123) docbook-xml-4.5-2  docbook-xsl-1.79.2-1
               [... more packages listed ...]
               m4-1.4.18-2  make-4.3-1  man-db-2.9.3-1
               mingw-w64-x86_64-binutils-2.35.1-3
               mingw-w64-x86_64-crt-git-9.0.0.6090.ad98746a-1
               mingw-w64-x86_64-gcc-10.2.0-6
               mingw-w64-x86_64-gcc-ada-10.2.0-6
               mingw-w64-x86_64-gcc-fortran-10.2.0-6
               mingw-w64-x86_64-gcc-libgfortran-10.2.0-6
               mingw-w64-x86_64-gcc-libs-10.2.0-6
               mingw-w64-x86_64-gcc-objc-10.2.0-6
               mingw-w64-x86_64-gdb-10.1-2
               mingw-w64-x86_64-gdb-multiarch-10.1-2
              [... more packages listed ...]

Total Download Size:    196.15 MiB
Total Installed Size:  1254.96 MiB

:: Proceed with installation? [Y/n]
[... downloading and installation continues ...]

7.To start building using the mingw-w64 GCC, close this window and run "MSYS MinGW 64-bit" from Start menu. Now you can call make or gcc to build software for Windows.

要开始使用mingw-w64 GCC构建,请关闭此窗口并从“开始”菜单运行“MSYS mingw 64位”。现在,您可以调用make或gcc来为Windows构建软件。

8.Check out the introduction page to learn which Start menu item to use when and which packages to install. Take look at Detailed MSYS2 install guide for troubleshooting and additional details on how to keep your MSYS2 up-to-date.

​查看简介页面,了解何时使用“开始”菜单项以及安装哪些软件包。查看详细的MSYS2安装指南,了解疑难解答,以及如何保持MSYS2最新的其他详细信息。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值