Linux GNUWin32 和 cygwin 的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10712550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference between GNUWin32 and cygwin
提问by qwertymk
I can't seem to get a handle on the difference between the two.
我似乎无法理解两者之间的区别。
It seems that one (GNUWin32
) is an layer on top of windows (like MSYS
) and the
other (cygwin) is something else (?)
似乎一个 ( GNUWin32
) 是窗口顶部的一层(如MSYS
),
另一个(cygwin)是其他东西(?)
What does that mean? When would I use one over the other? Are they both suited for the same thing?
这意味着什么?我什么时候会使用一个?他们都适合做同样的事情吗?
I want to use it mainly for git but want to keep my options open for learning and doing all thing *nixy.
我想主要将它用于 git,但希望让我的选择开放以学习和做所有事情 *nixy。
Is there another tool for this? Will msysgit
be better suited for this?
Are there any resources that go through the differences of all of these *nix platforms exhaustively?
有没有其他工具可以做到这一点?会msysgit
更适合这个吗?
是否有任何资源可以详尽地分析所有这些 *nix 平台的差异?
采纳答案by Michael Slade
Cygwinis a library that endeavours to make UNIX programs able to compile and run on Windows systems with minimal or no modifications, and a comprehensive set of packaged UNIX tools and applications compiled with this library. It is almost a complete wrapper around Windows. It includes an X server and an awful lot of the programs that you can expect to find in a Linux distribution. It is great for people who want to learn or use the UNIX command line in Windows.
Cygwin是一个库,它致力于使 UNIX 程序能够在 Windows 系统上编译和运行,而只需进行最少的修改或无需修改,以及使用该库编译的一组综合的打包 UNIX 工具和应用程序。它几乎是 Windows 的完整包装器。它包括一个 X 服务器和大量您可以在 Linux 发行版中找到的程序。它非常适合想要在 Windows 中学习或使用 UNIX 命令行的人。
MSYSis mostly a port of the UNIX tools necessary to build GNU style packages (with a configure
etc) on Windows systems with the MinGWcompiler. It uses a variant of the Cygwin library modified to sacrifice some compatibility for efficiency, and is more Windows-friendly.
MSYS主要是configure
使用MinGW编译器在 Windows 系统上构建 GNU 样式包(带有等)所需的 UNIX 工具的端口。它使用 Cygwin 库的一个变体,经过修改以牺牲一些兼容性以提高效率,并且更加 Windows 友好。
GnuWin32is simply a port of some of the GNU tools to Windows. Like MSYS, it uses msvcrt.dll
, as well as an additional library to provide some UNIX compatibility functions. Its main purpose appears to be to allow Windows programs and batch files to use some of the GNU programs and libraries directly.
GnuWin32只是一些 GNU 工具到 Windows 的端口。与 MSYS 一样,它使用msvcrt.dll
, 以及一个额外的库来提供一些 UNIX 兼容性功能。它的主要目的似乎是允许 Windows 程序和批处理文件直接使用某些 GNU 程序和库。
For the most part, they all provide UNIX programs on Windows, but there are many subtle differences, including:
大多数情况下,它们都在 Windows 上提供 UNIX 程序,但也有许多细微的差别,包括:
- Intent. Cygwin is for people who want to use UNIX on their Windows OS. MSYS is for people who want to build Windows programs using the GNU/UNIX build tools. GnuWin32 is a port of individual GNU programs and libraries to Windows.
- Text files, particularly line endings. Cygwin lets you use CR/LF or LF. MSYS expects LF line endings. GnuWin32 programs expect CR/LF line endings.
- Supplied programs. In particular, Cygwin has a lot more packages, and GnuWin32 doesn't provide any shells.
- 意图。Cygwin 适用于希望在其 Windows 操作系统上使用 UNIX 的人。MSYS 适用于想要使用 GNU/UNIX 构建工具构建 Windows 程序的人。GnuWin32 是单个 GNU 程序和库到 Windows 的端口。
- 文本文件,尤其是行尾。Cygwin 允许您使用 CR/LF 或 LF。MSYS 需要 LF 行结尾。GnuWin32 程序需要 CR/LF 行结尾。
- 提供的程序。特别是 Cygwin 有更多的包,而 GnuWin32 不提供任何 shell。
As for git, it is available with Cygwin - this version can be used in a Windows directory (accessible under /cygdrive
). Also, as mentioned, there is msysgit.
至于 git,它可用于 Cygwin - 此版本可在 Windows 目录中使用(可在 下访问/cygdrive
)。此外,如前所述,还有msysgit。