# Wine（软件）

**Wine**（最初是“Wine Is Not an Emulator”的首字母缩写）是一个自由开源的兼容层，用于在符合 POSIX 的操作系统（如 Linux、macOS 和 BSD）上运行 Windows 应用程序。Wine 不像虚拟机或模拟器那样复现 Windows 的内部运作机制；相反，它实时地将 [Windows API](https://www.edgepedia.org/zh/windows-api) 调用转换为 POSIX 调用，从而绕开模拟带来的性能和内存开销，使 Windows 程序能够无缝融入宿主桌面环境。<sup>[1](https://www.winehq.org/about)</sup>

| 关键事实 | 详情 |
|---|---|
| 本质 | 一个在运行时将 Windows API 调用转换为 POSIX 调用的兼容层，而非模拟器或虚拟机<sup>[1](https://www.winehq.org/about)</sup> |
| 平台 | Linux、macOS 和 BSD；专为 Intel x86 级 CPU 开发，Winelib 可将应用程序源代码移植到其他平台<sup>[1](https://www.winehq.org/about)</sup><sup> • </sup><sup>[2](https://www.winehq.org/pipermail/wine-cvs/2005-May/015577.html)</sup> |
| 起源 | 1993 年由鲍勃·阿姆斯塔特（Bob Amstadt）发起，旨在在 Linux 上运行 Windows 3.1 程序；亚历山大·朱利亚尔（Alexandre Julliard）早期接手领导，此后一直管理该项目<sup>[1](https://www.winehq.org/about)</sup> |
| 首个稳定版本 | Wine 1.0，2008 年发布，历经 15 年开发<sup>[1](https://www.winehq.org/about)</sup> |
| 当前稳定版本 | Wine 11.0，2026 年 1 月 13 日发布，包含约 6,300 项独立更改和 600 多个错误修复<sup>[3](https://www.winehq.org/news/2026011301)</sup> |
| 代码库 | 完全独立的、不含微软代码的实现，不需要 Windows，但在可用时可选择使用原生 Windows DLL<sup>[4](https://appdb.winehq.org.ru/help/?sTopic=appdb_faq)</sup> |
| 主要衍生品 | Proton（Valve 的 Steam 兼容工具）和 CrossOver（CodeWeavers 的商业产品）均基于 Wine 构建<sup>[5](https://github.com/ValveSoftware/Proton)</sup><sup> • </sup><sup>[6](https://www.codeweavers.com/crossover)</sup> |

## 工作原理

Wine 为应用程序所调用的 Windows 库提供替代实现。有些转换几乎是逐一对应的：一个打开文件进行读取的请求，经过参数重新排列后直接映射到等效的 Unix 系统调用。另一些则如启动程序，需要大量工作，因为两个操作系统的服务调用差异相当大。<sup>[7](https://www.winehq.org/pipermail/wine-users/2015-July/107290.html)</sup> 相比之下，模拟器是一种读取并执行被模拟硬件的二进制机器指令的程序；Wine 完全不做这些事，这正是该项目名称坚持自己不是模拟器的原因。<sup>[7](https://www.winehq.org/pipermail/wine-users/2015-July/107290.html)</sup>

**文件系统映射。** Wine 通过前缀目录呈现 Windows 风格的驱动器盘符。诸如 `c:\foo\bar\myfile.txt` 的 DOS 路径会被转换为 Unix 路径 `$(WINEPREFIX)/dosdevices/c:/foo/bar/myfile.txt`，其中 `dosdevices/c:` 是一个符号链接，用户可将其指向任意 Unix 目录。同样的方案也处理 UNC 网络路径，驱动器映射只需编辑链接即可更改。<sup>[8](https://citeseerx.ist.psu.edu/document?doi=b48deefde8f9f440582f0a96d59be48c3f43c128&repid=rep1&type=pdf)</sup> 由于大多数 Unix 文件系统区分大小写，而 Windows 查找不区分大小写，Wine 在解析 Unix 路径后执行不区分大小写的搜索；同一目录下仅字母大小写不同的两个文件会出现未定义行为。<sup>[8](https://citeseerx.ist.psu.edu/document?doi=b48deefde8f9f440582f0a96d59be48c3f43c128&repid=rep1&type=pdf)</sup>

**前缀。** 每个 Wine 环境称为一个前缀，拥有自己的虚拟 C: 盘、注册表和已安装程序；默认为 `~/.wine`，`WINEPREFIX` 环境变量可选择其他位置。Lutris、PlayOnLinux 和 [Proton](https://www.edgepedia.org/zh/proton-software) 等工具会为每个应用程序或游戏创建单独的前缀，以保持安装隔离。<sup>[9](https://github.com/ValveSoftware/Proton/wiki/Proton-FAQ/3ab3aee48363823a5362706ea01519276ca78e89)</sup>

## 兼容性策略

Wine 的目标是成为 Windows API 的逐 bug 兼容实现。由于 Windows 本身包含内部变通机制，能检测特定的异常应用程序并启用特殊行为，针对文档化 API 的黑盒测试并不总能揭示这些变通手段；Wine 开发者转而检查程序如何与 API 交互，编写测试用例，并构建匹配的代码。<sup>[10](https://www.winehq.org/pipermail/wine-devel/2011-March/089409.html)</sup> 各个程序的兼容性由社区维护的应用程序数据库跟踪，志愿者在其中报告其软件的运行情况，bug 则提交到项目的 Bugzilla 跟踪器。<sup>[11](https://www.winehq.org/help)</sup>

## 图形与游戏

运行 Windows 游戏在很大程度上依赖于转换 Direct3D。DXVK 是一个基于 Vulkan 的 Direct3D 9、10 和 11 转换层，允许 3D 应用程序通过 Wine 在 Linux 上运行，它将替代 DLL 安装到前缀的 `system32` 和 `syswow64` 目录中。<sup>[12](https://github.com/ValveSoftware/dxvk/blob/proton_6.3/README.md)</sup> 对于 Direct3D 12，vkd3d-proton 是 WineHQ 的 vkd3d 的一个分支，在 Vulkan 之上实现了完整的 D3D12 API，并承担为 Proton 开发 D3D12 支持的工作。<sup>[13](https://github.com/lutris/vkd3d/blob/master/README.md)</sup>

**Proton。** Valve 的 Proton 是 Steam Play 的兼容工具，基于 Wine 加上 DXVK、vkd3d-proton 以及字体和媒体库等附加组件，让 Windows 独占游戏能够在 Linux 上运行。Steam 随附多个 Proton 版本，并在 `steamapps/compatdata/` 下为每个游戏创建新的 Wine 前缀。<sup>[5](https://github.com/ValveSoftware/Proton)</sup><sup> • </sup><sup>[9](https://github.com/ValveSoftware/Proton/wiki/Proton-FAQ/3ab3aee48363823a5362706ea01519276ca78e89)</sup> 2026 年发布的 Proton 11 已改以 Wine 11 为基础。<sup>[14](https://www.pcgamer.com/software/linux/valves-magical-play-windows-games-on-linux-tech-is-rebased-updated-and-ready-to-play-resident-evil/)</sup>

**CrossOver。** CodeWeavers 销售 CrossOver Mac 和 CrossOver Linux，这是基于 Wine 构建的商业产品，增加了安装工具、支持和桌面集成。该公司表示，其为 CrossOver 开发的 Wine 代码库中有 95% 回馈到了开源项目中。<sup>[6](https://www.codeweavers.com/crossover)</sup>

## 近期发展

Wine 11.0 于 2026 年 1 月 13 日发布稳定版，代表了一年的开发工作，包含约 6,300 项独立更改和 600 多个错误修复。其主要亮点是 NTSYNC 支持和新 WoW64 架构的完成。<sup>[3](https://www.winehq.org/news/2026011301)</sup> NTSync [Linux 内核](https://www.edgepedia.org/zh/linux-kernel)模块从 Linux 内核 6.14 版开始随内核提供，在可用时用于提升同步原语的性能。<sup>[15](https://list.winehq.org/hyperkitty/list/wine-announce@list.winehq.org/2026/1/)</sup>

新的 WoW64 模式最初在 Wine 9.0 中实验性引入，现已获得全面支持，功能与旧模式对等，包括 16 位应用程序支持。使用 `WINEARCH=win32` 创建的纯 32 位前缀已弃用，独立的 `wine64` 加载器二进制文件已被移除，改为单一的 `wine` 加载器，根据所执行的二进制文件选择正确的模式。<sup>[15](https://list.winehq.org/hyperkitty/list/wine-announce@list.winehq.org/2026/1/)</sup>

## 平台限制与安全

Wine 是为 Intel x86 级 CPU 开发的。在其他处理器架构（如 PowerPC Mac）上运行 Windows 二进制文件，仅靠 Wine 无法实现；可选方案是在模拟的 x86 环境中运行 Wine，或用 Winelib（Wine 将 Windows 源代码构建为原生 Unix 应用程序的工具包）重新编译应用程序源代码。<sup>[2](https://www.winehq.org/pipermail/wine-cvs/2005-May/015577.html)</sup>

由于 Wine 执行 Windows 二进制文件，Windows 恶意软件也能在其下运行。大多数病毒持久化方法（如安排在每次重启时运行）会被 Wine 忽略，但病毒可以执行一次并造成损害；需要 Windows 内核访问权限的软件（如某些杀毒产品）无法工作，因为没有 Windows 内核。<sup>[16](https://www.winehq.org/pipermail/wine-users/2006-August/023351.html)</sup><sup> • </sup><sup>[17](https://www.winehq.org/pipermail/wine-users/2011-August/094585.html)</sup> Wine 从 ELF 文件转向原生 PE 格式的 Windows 文件改善了兼容性，但也增加了杀毒软件的误报。<sup>[18](https://forum.winehq.org/viewtopic.php?t=33444)</sup>

## References

1. [WineHQ – About Wine](https://www.winehq.org/about)
2. [Wine FAQ translation strings, wine-cvs mailing list (2005)](https://www.winehq.org/pipermail/wine-cvs/2005-May/015577.html)
3. [WineHQ News – Wine 11.0 Released (January 13, 2026)](https://www.winehq.org/news/2026011301)
4. [WineHQ Application Database FAQ](https://appdb.winehq.org.ru/help/?sTopic=appdb_faq)
5. [ValveSoftware/Proton – Compatibility tool for Steam Play based on Wine](https://github.com/ValveSoftware/Proton)
6. [CodeWeavers – CrossOver](https://www.codeweavers.com/crossover)
7. [Wine-users mailing list – If Wine isn't an emulator how does it work (2015)](https://www.winehq.org/pipermail/wine-users/2015-July/107290.html)
8. [Wine Developer's Guide](https://citeseerx.ist.psu.edu/document?doi=b48deefde8f9f440582f0a96d59be48c3f43c128&repid=rep1&type=pdf)
9. [ValveSoftware/Proton Wiki – Proton FAQ](https://github.com/ValveSoftware/Proton/wiki/Proton-FAQ/3ab3aee48363823a5362706ea01519276ca78e89)
10. [Wine-devel mailing list – Wine compatibility (2011)](https://www.winehq.org/pipermail/wine-devel/2011-March/089409.html)
11. [WineHQ – Getting Help](https://www.winehq.org/help)
12. [ValveSoftware/dxvk – README](https://github.com/ValveSoftware/dxvk/blob/proton_6.3/README.md)
13. [vkd3d-proton – README](https://github.com/lutris/vkd3d/blob/master/README.md)
14. [PC Gamer – Valve's Proton 11 rebased on Wine 11](https://www.pcgamer.com/software/linux/valves-magical-play-windows-games-on-linux-tech-is-rebased-updated-and-ready-to-play-resident-evil/)
15. [Wine-Announce mailing list – Wine release 11.0 (January 2026)](https://list.winehq.org/hyperkitty/list/wine-announce@list.winehq.org/2026/1/)
16. [Wine-users mailing list – viruses for mswindows on a linux machine running wine (2006)](https://www.winehq.org/pipermail/wine-users/2006-August/023351.html)
17. [Wine-users mailing list – Kaspersky v6 under wine (2011)](https://www.winehq.org/pipermail/wine-users/2011-August/094585.html)
18. [WineHQ Forums – Why anti-virus programs report Wine package as malware?](https://forum.winehq.org/viewtopic.php?t=33444)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 19, 2026; Oct 15, 2026 · Edited: Sep 19, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Frameworks, libraries, and APIs › Mobile and platform frameworks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/wine-software

English original: https://www.edgepedia.org/wine-software
