{"id":35916,"date":"2024-12-31T10:09:29","date_gmt":"2024-12-31T02:09:29","guid":{"rendered":"https:\/\/www.deepin.org\/?p=35916"},"modified":"2025-01-06T14:00:44","modified_gmt":"2025-01-06T06:00:44","slug":"getting-started-with-wine","status":"publish","type":"post","link":"https:\/\/www.deepin.org.cn\/zh\/getting-started-with-wine\/","title":{"rendered":"\u60f3\u5f00\u542f Wine \u5f00\u53d1\uff1f\u770b\u8fd9\u7bc7\u5c31\u591f\u4e86\uff01"},"content":{"rendered":"<img loading=\"lazy\" class=\"alignnone size-full wp-image-35917\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762.png\" alt=\"\" width=\"900\" height=\"383\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762.png 900w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762-300x128.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762-150x64.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762-768x327.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762-24x10.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762-36x15.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/12\/\u84dd\u8272\u7b80\u7ea6\u6241\u5e73\u98ce\u82f1\u8bed\u8bfe\u7a0b\u5ba3\u4f20\u5fae\u4fe1\u516c\u4f17\u53f7\u5c01\u9762-48x20.png 48w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>\u8bf4\u8d77 Wine\uff0c\u7a0d\u5fae\u8d44\u6df1\u4e00\u70b9\u7684 Linux \u7528\u6237\u5e94\u8be5\u90fd\u542c\u8fc7\uff0c\u4f46\u662f\u771f\u8981\u8bf4\u8d77 Wine \u5230\u5e95\u662f\u600e\u4e48\u56de\u4e8b\uff0c\u53ef\u80fd\u5927\u591a\u6570\u4eba\u4e0d\u89c1\u5f97\u8bf4\u5f97\u6e05\u3002\u8fd9\u7bc7\u6587\u7ae0\u4f1a\u7b80\u5355\u5730\u4ecb\u7ecd Wine \u7684\u5de5\u4f5c\u539f\u7406\uff0c\u4ee5\u53ca\u5982\u4f55\u5f00\u59cb Wine \u7684\u5f00\u53d1\u3002\u6240\u4ee5\u5982\u679c\u60a8\u5c5e\u4e8e\u4ee5\u4e0b\u4e09\u7c7b\u8bfb\u8005\u4e4b\u4e00\uff1a<\/p>\n<p>* \u60f3\u53c2\u4e0e Wine \u5f00\u53d1\uff0c\u4f46\u662f\u4e0d\u77e5\u5982\u4f55\u5f00\u59cb\u7684\u3002<\/p>\n<p>* \u4ec5\u4ec5\u60f3\u5927\u81f4\u4e86\u89e3 Wine \u662f\u5982\u4f55\u5de5\u4f5c\u7684\u3002<\/p>\n<p>* \u53ea\u662f\u60f3\u80fd\u591f\u6109\u5feb\u7684\u7528\u4e0a\u6700\u65b0\u7248\u672c Wine \u7684\u3002<\/p>\n<p>\u5e0c\u671b\u5728\u770b\u5b8c\u672c\u6587\u540e\uff0c\u80fd\u591f\u6709\u4e00\u4e9b\u6536\u83b7\u3002<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 1\u00a0 Wine \u662f\u4ec0\u4e48<\/strong><\/h1>\n<p>Wine \u662f \"Wine Is Not an Emulator\" \u7684\u9012\u5f52\u7f29\u5199\uff0c\u5982\u540c \"GNU\" \u4e00\u6837\uff08GNU's Not Unix\uff09\uff0c\u5b57\u9762\u610f\u601d\u5c31\u662f Wine \u4e0d\u662f\u4e00\u4e2a\u6a21\u62df\u5668\u3002\u8fd9\u91cc\u7684\u6a21\u62df\u5668\u4e3b\u8981\u662f\u6307 Wine \u5e76\u4e0d\u662f\u4e00\u4e2a\u865a\u62df\u673a\uff0c\u800c\u662f\u4e00\u4e2a Windows API \u5b9e\u73b0\u517c\u5bb9\u5c42\u3002\u8fd9\u4e48\u8bf4\u53ef\u80fd\u4e0d\u592a\u597d\u7406\u89e3\uff0c\u5927\u5bb6\u53ef\u4ee5\u628a Windows \u5e94\u7528\u7a0b\u5e8f\u7c7b\u6bd4\u6210 Android \u5e94\u7528\u7a0b\u5e8f\uff0c\u800c Wine \u7684\u89d2\u8272\u5c31\u548c Android \u5f88\u50cf\u4e86\uff0c\u5c06\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u7684\u5404\u79cd\u529f\u80fd\u5c01\u88c5\u6210 API\uff0c\u5e76\u8ba9\u5e94\u7528\u7a0b\u5e8f\u5728\u9694\u79bb\u7684\u73af\u5883\u5185\u8fd0\u884c\u3002\u81f3\u4e8e API \u957f\u6210\u5565\u6837\uff0c\u9694\u79bb\u7684\u529b\u5ea6\u5982\u4f55\uff0c\u8fd9\u4e9b\u90fd\u662f\u5b9e\u73b0\u76f8\u5173\u7684\uff0c\u548c\u672c\u8d28\u5e76\u4e0d\u51b2\u7a81\u3002\u53e6\u4e00\u65b9\u9762\uff0cWine \u5176\u5b9e\u53c8\u662f\u4e00\u4e2a\u6a21\u62df\u5668\uff0c\u4e0d\u8fc7\u6a21\u62df\u7684\u5bf9\u8c61\u4e0d\u662f\u786c\u4ef6 CPU\uff0c\u800c\u662f Windows \u7684\u884c\u4e3a\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 2\u00a0 Wine \u539f\u7406\u4ecb\u7ecd<\/strong><\/h1>\n<p>\u672c\u8282\u5185\u5bb9\u76f8\u5bf9\u6765\u8bf4\u7a0d\u663e\u57fa\u7840\u548c\u5355\u4e00\u5566\uff0c\u5e76\u4e14\u9605\u8bfb\u65f6\u6700\u597d\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u6709\u4e00\u5b9a\u7a0b\u5ea6\u7684\u4e86\u89e3\u54e6\u3002\u5982\u679c\u53ea\u662f\u60f3\u7f16\u8bd1\u3001\u8fd0\u884c\uff0c\u5bf9\u539f\u7406\u4e0d\u6562\u5174\u8da3\u7684\u540c\u5b66\uff0c\u53ef\u4ee5\u8df3\u8fc7\uff0c\u4e0d\u5f71\u54cd\u540e\u9762\u7684\u9605\u8bfb\u3002<\/p>\n<p>Wine \u7684\u76ee\u7684\u662f\u8fd0\u884c Windows \u4e0a\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\uff08PE\uff0cportable executable\uff09\u3002\u6211\u4eec\u77e5\u9053\uff0c\u53ef\u6267\u884c\u7a0b\u5e8f\u7684\u672c\u8d28\u5176\u5b9e\u5c31\u662f\u6309\u7167\u67d0\u4e00\u89c4\u5219\u6392\u5217\u7684\u673a\u5668\u7801\uff0c\u800c\u673a\u5668\u7801\u662f\u6307\u4ee4\u96c6\u76f8\u5173\u7684\u3002\u5f97\u76ca\u4e8e\u5e38\u89c1\u7684 PC \u673a\u4e00\u822c\u662f x86\/x64 \u7684\uff0c\u56e0\u6b64 Windows \u5e94\u7528\u7a0b\u5e8f\u4ece\u6307\u4ee4\u96c6\u7684\u89d2\u5ea6\u770b\uff0c\u662f\u5b8c\u5168\u53ef\u4ee5\u5728 x86\/x64 \u7684 Linux \u673a\u5668\u4e0a\u76f4\u63a5\u8fd0\u884c\uff0c\u800c\u4e0d\u9700\u8981\u786c\u4ef6\u5c42\u6a21\u62df\u7684\u3002<\/p>\n<p>\u4f46\u662f\u4e3a\u4e86\u80fd\u591f\u76f4\u63a5\u52a0\u8f7d\u8fd0\u884c PE \u6587\u4ef6\uff0c\u9700\u8981\u6ee1\u8db3\u4e00\u4e9b ABI \u517c\u5bb9\u3002\u6700\u57fa\u672c\u7684\uff0cWindows PE \u7a0b\u5e8f\u4f1a\u5047\u5b9a\u81ea\u5df1\u88ab\u52a0\u8f7d\u5230\u5730\u5740 0x400000 \u5904\uff0c\u56e0\u6b64 Wine \u5b9e\u73b0\u81ea\u5df1\u7684 loader \u65f6\uff0c\u9700\u8981\u4fdd\u8bc1\u5c06 PE \u955c\u50cf\u52a0\u8f7d\u5230\u540c\u6837\u7684\u4f4d\u7f6e\u3002\u5bf9\u4e8e\u9759\u6001\u94fe\u63a5\u7684\u7a0b\u5e8f\uff0c\u9700\u8981\u505a\u7684\u4e8b\u60c5\u53ef\u80fd\u4e0d\u662f\u592a\u591a\uff0c\u4f46\u662f\u5bf9\u4e8e\u52a8\u6001\u94fe\u63a5\u7684\u7a0b\u5e8f\uff0cWine \u9700\u8981\u6a21\u4eff Windows loader \u7684\u884c\u4e3a\uff0c\u52a0\u8f7d\u4f9d\u8d56\u7684\u5e93\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u91cd\u5b9a\u4f4d\u5de5\u4f5c\u3002<\/p>\n<p>\u4e3a\u4e86\u6700\u5927\u7a0b\u5ea6\u4e0a\u51cf\u5c11\u5bf9\u4e8c\u8fdb\u5236\u5c42\u9762\u7684\u4f9d\u8d56\uff0cWine \u51b3\u5b9a\u5b9e\u73b0\u81f3\u5c11 GDI32\uff0cKERNEL32\uff0cUSER32 \u4e09\u4e2a\u52a8\u6001\u5e93\uff0c\u56e0\u4e3a\u5176\u4ed6\u5e93\u90fd\u662f\u5efa\u7acb\u5728\u8fd9\u4e09\u4e2a\u5e93\u7684\u57fa\u7840\u4e4b\u4e0a\u7684\u3002\u6240\u4ee5\u7406\u8bba\u4e0a\u6765\u8bf4\uff0c\u9664\u6b64\u4e4b\u5916\u7684\u5176\u4ed6\u52a8\u6001\u5e93\u662f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 Windows \u4e0a\u9762\u73b0\u6709\u7684\u5e93\uff0c\u4f46\u7531\u4e8e\u5404\u79cd\u539f\u56e0\uff0cWine \u8fd8\u662f\u503e\u5411\u4e8e\u5c3d\u91cf\u5b9e\u73b0\u6240\u6709\u7684 API\u3002\u6211\u4eec\u628a Wine \u81ea\u5df1\u5b9e\u73b0\u7684 API \u5e93\u79f0\u4f5c builtin\uff0c\u628a Windows \u4e0a\u73b0\u6210\u7684\u5e93\u79f0\u4f5c native\u3002\u5f53 Wine \u5728\u52a0\u8f7d builtin \u52a8\u6001\u5e93\u7684\u540c\u65f6\uff0c\u8fd8\u4f1a\u5728\u5185\u5b58\u4e2d\u5efa\u7acb PE header\uff0c\u7528\u6765\u6a21\u4eff Windows \u4e0a\u7684\u5185\u5b58\u5e03\u5c40\u3002\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u73b0\uff0c\u6709\u673a\u4f1a\u53ef\u4ee5\u5199\u4e00\u7bc7 Wine loader \u76f8\u5173\u7684\u6587\u7ae0\u6765\u4ecb\u7ecd Wine \u672c\u8eab\u3001PE \u7a0b\u5e8f\u548c\u52a8\u6001\u5e93\u662f\u5982\u4f55\u88ab\u52a0\u8f7d\u7684\u3002<\/p>\n<p>\u9664\u5f00 loader \u7684\u529f\u80fd\u5916\uff0cWine \u8fd8\u9700\u8981\u89e3\u51b3\u8fdb\u7a0b\u95f4\u901a\u4fe1\uff08IPC\uff09\u7684\u95ee\u9898\u3002Wine \u7684\u5b9e\u73b0\u65b9\u5f0f\u662f\u5c06\u6240\u6709\u8de8\u8fdb\u7a0b\u7684\u5bf9\u8c61\u548c\u673a\u5236\uff0c\u6bd4\u5982 GDI \u5bf9\u8c61\uff0c\u6bd4\u5982\u4fe1\u53f7\u91cf\uff0c\u5168\u90e8\u5b9e\u73b0\u5728 Wine server \u4e2d\u3002\u540c\u65f6 Wine \u5141\u8bb8\u7cfb\u7edf\u8fd0\u884c\u591a\u4e2a Wine server \u7684\u5b9e\u4f8b\u3002\u8fd9\u6837\u5b58\u5728\u4e8e\u540c\u4e00\u4e2a Wine server \u4e2d\u7684\u5bf9\u8c61\u81ea\u7136\u662f\u53ef\u4ee5\u76f8\u4e92\u901a\u4fe1\uff0c\u597d\u50cf\u5728\u540c\u4e00\u4e2a\u7a7a\u95f4\u5185\uff1b\u800c\u4e0d\u540c Wine server \u4e0b\u7684\u5bf9\u8c61\uff0c\u662f\u76f8\u4e92\u9694\u79bb\u7684\uff0c\u8fd9\u79cd\u67b6\u6784\u4f7f\u5f97\u4e0d\u540c\u5bb9\u5668\u4e4b\u95f4\u7684\u7a0b\u5e8f\u76f8\u4e92\u6ca1\u6709\u5f71\u54cd\u3002Wine server \u7684\u5177\u4f53\u5b9e\u73b0\u662f\u901a\u8fc7 unix socket\uff0c\u5b9e\u73b0\u4e86\u4e00\u5957 IPC \u673a\u5236\uff0c\u5b8c\u6210\u548c API \u5c42\u7684\u4ea4\u4e92\u3002<\/p>\n<p>\u6709\u4e86\u4ee5\u4e0a\u8fd9\u4e9b\u57fa\u7840\uff0cWine \u5b9e\u73b0\u8d77\u5404\u79cd\u529f\u80fd\u5c31\u53ef\u4ee5\u6309\u90e8\u5c31\u73ed\u4e86\uff0c\u53ea\u9700\u7406\u89e3 Windows \u4e0b API \u7684\u884c\u4e3a\u548c\u542b\u4e49\uff0c\u7136\u540e\u518d\u91cd\u65b0\u5b9e\u73b0\u4e00\u904d\u5c31\u884c\u4e86\u3002\u542c\u8d77\u6765\u867d\u7136\u7b80\u5355\uff0c\u5b9e\u9645\u96be\u5ea6\u4e0d\u5c0f\uff0c\u7279\u522b\u662f\u4e00\u4e9b\u672a\u516c\u5f00\u7684\u884c\u4e3a\uff0c\u5fc5\u987b\u5bf9\u6574\u4f53\u6709\u76f8\u5f53\u7684\u4e86\u89e3\u540e\u624d\u80fd\u4e0b\u624b\u3002\u751a\u81f3\u4e00\u4e9b\u5dee\u5f02\uff0c\u6bd4\u5982 UI \u76f8\u5173\u7684\u5185\u5bb9\uff0c\u7531\u4e8e Windows \u7a97\u53e3\u7cfb\u7edf\u548c X \u5728\u8bbe\u8ba1\u54f2\u5b66\u4e0a\u7684\u4e0d\u540c\uff0c\u5b9e\u73b0\u4e0a\u9700\u8981\u6709\u6240\u820d\u53d6\u3002\u76ee\u524d Wine \u652f\u6301\u7684\u5e73\u53f0\u4e0d\u4ec5\u5305\u62ec Linux\uff0c\u8fd8\u5305\u62ec BSD\u3001Mac OS X \u548c Android\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 3\u00a0 \u73af\u5883<\/strong><\/h1>\n<p>\u4e0b\u9762\u7684\u5f00\u53d1\u73af\u5883\u90fd\u4ee5 deepin \u4e3a\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002<\/p>\n<p>\u9996\u5148\u83b7\u53d6\u4ee3\u7801\u3002Wine \u5b98\u65b9\u4ee3\u7801\u4ed3\u5e93\u5730\u5740\u4e3a<\/p>\n<blockquote><p>&gt;\u00a0<em>git:\/\/source.winehq.org\/git\/wine.git<\/em><\/p><\/blockquote>\n<p>\u5982\u679c\u4f60\u60f3\u65b9\u4fbf\u6253\u5305\u7ed9\u522b\u4eba\u4f7f\u7528\uff0c\u53c8\u4e0d\u592a\u60f3\u6298\u817e\u6253\u5305\u7684\u4e00\u4e9b\u7ec6\u8282\uff0c\u53ef\u4ee5\u7528\u5404\u4e2a\u53d1\u884c\u7248\u81ea\u5df1\u7ef4\u62a4\u7684 Wine\u3002\u6bd4\u5982 Debian \u7ef4\u62a4\u7684 Wine \u4ed3\u5e93\u5730\u5740\u4e3a<\/p>\n<blockquote><p>&gt;\u00a0<em>https:\/\/salsa.debian.org\/wine-team\/wine.git<\/em><\/p><\/blockquote>\n<p>\u8fd9\u91cc\u4ee5\u5b98\u65b9\u7684 Wine \u4e3a\u4f8b\uff1a<\/p>\n<blockquote><p><em>git clone git:\/\/source.winehq.org\/git\/wine.git<\/em><\/p><\/blockquote>\n<p>\u7136\u540e\u5b89\u88c5\u5f00\u53d1\u7684\u4f9d\u8d56\u3002\u4e3a\u4e86\u7b80\u5355\u8d77\u89c1\uff0c\u6211\u4eec\u53ea\u7f16\u8bd1 32 \u4f4d\u7684 Wine\uff0c\u56e0\u4e3a 64 \u4f4d\u7684 Wine \u53ea\u652f\u6301 64 \u4f4d\u7684 PE \u7a0b\u5e8f\uff0c\u800c\u76ee\u524d Windows \u4e0a\u4ecd\u6709\u5927\u91cf\u7684\u7a0b\u5e8f\u53ea\u63d0\u4f9b\u4e86 32 \u4f4d\u7684\u7248\u672c\u3002<\/p>\n<blockquote><p>sudo apt install\\<br \/>\ngcc-multilib\\<br \/>\nflex\\<br \/>\nbison\\<br \/>\nlibx11-dev:i386\\<br \/>\nlibfreetype6-dev:i386\\<br \/>\nlibxcursor-dev:i386\\<br \/>\nlibxi-dev:i386\\<br \/>\nlibxshmfence-dev:i386\\<br \/>\nlibxxf86vm-dev:i386\\<br \/>\nlibxrandr-dev:i386\\<br \/>\nlibxfixes-dev:i386\\<br \/>\nlibxinerama-dev:i386\\<br \/>\nlibxcomposite-dev:i386\\<br \/>\nlibglu1-mesa-dev:i386\\<br \/>\nlibosmesa6-dev:i386\\<br \/>\nocl-icd-opencl-dev:i386\\<br \/>\nlibpcap-dev:i386\\<br \/>\nlibdbus-1-dev:i386\\<br \/>\nlibgnutls28-dev:i386\\<br \/>\nlibncurses-dev:i386\\<br \/>\nlibsane-dev:i386\\<br \/>\nlibv4l-dev:i386\\<br \/>\nlibgphoto2-dev:i386\\<br \/>\nliblcms2-dev:i386\\<br \/>\nlibpulse-dev:i386\\<br \/>\nlibgstreamer-plugins-base1.0-dev:i386\\<br \/>\nlibudev-dev:i386\\<br \/>\nlibcapi20-dev:i386\\<br \/>\nlibcups2-dev:i386\\<br \/>\nlibfontconfig1-dev:i386\\<br \/>\nlibgsm1-dev:i386\\<br \/>\nlibkrb5-dev:i386\\<br \/>\nlibtiff-dev:i386\\<br \/>\nlibmpg123-dev:i386\\<br \/>\nlibopenal-dev:i386\\<br \/>\nlibldap2-dev:i386\\<br \/>\nlibxrandr-dev:i386\\<br \/>\nlibxml2-dev:i386\\<br \/>\nlibxslt1-dev:i386\\<br \/>\nlibjpeg62-turbo-dev:i386\\<br \/>\nlibusb-1.0-0-dev:i386\\<br \/>\ngettext\\<br \/>\nlibsdl2-dev:i386\\<br \/>\nlibvulkan-dev:i386<\/p><\/blockquote>\n<p>\u63a5\u7740\u8fd0\u884c\u811a\u672c\uff1a<\/p>\n<blockquote><p>.\/configure --<span class=\"code-snippet__keyword\">with<\/span>-gnutls --without-hal --without-oss<\/p><\/blockquote>\n<p>\u6839\u636e\u4e0d\u540c\u7684 Wine \u7248\u672c\uff0c\u6b64\u65f6\u53ef\u80fd\u4f1a\u63d0\u793a\u4e0d\u540c\u7684 feature \u652f\u6301\u60c5\u51b5\u3002\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u9700\u6c42\uff0c\u5bf9\u4e0a\u9762\u7684\u4f9d\u8d56\u5e93\u548c\u4f20\u5165\u7684\u53c2\u6570\u8fdb\u884c\u8c03\u6574\uff0c\u5177\u4f53\u53ef\u4ee5\u67e5\u770b configure.ac \u7684\u5185\u5bb9\u3002<\/p>\n<p>Wine \u7684\u6e90\u7801\u6bd4\u8f83\u5927\uff0c\u7f16\u8bd1\u6709\u4e9b\u8017\u65f6\uff0c\u53ef\u4ee5\u6839\u636e CPU \u60c5\u51b5\u589e\u52a0\u5e76\u884c\u53c2\u6570\uff0c\u6bd4\u5982 make -j8\uff0c\u8fdb\u884c\u7f16\u8bd1\u3002<\/p>\n<p>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\uff1a<\/p>\n<blockquote><p>.\/wine --version<\/p><\/blockquote>\n<p>\u53ef\u4ee5\u67e5\u770b\u7248\u672c\u53f7\u3002\u5982\u679c\u60f3\u5b89\u88c5\u5230\u7cfb\u7edf\uff0c\u53ef\u4ee5\u8fd0\u884c\uff1a<\/p>\n<blockquote><p>sudo\u00a0 make install<\/p><\/blockquote>\n<p>\u4f46\u662f\u6ce8\u610f\uff0c\u5b89\u88c5\u540e\u53ef\u80fd\u4f1a\u4fee\u6539\u4e00\u4e9b\u6587\u4ef6\u7684\u9ed8\u8ba4\u6253\u5f00\u65b9\u5f0f\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 4\u00a0 \u4f7f\u7528<\/strong><\/h1>\n<p>\u8fd0\u884c\uff1a<\/p>\n<blockquote><p>.\/wine winecfg<\/p><\/blockquote>\n<p>\u53ef\u4ee5\u5bf9\u9ed8\u8ba4\u5bb9\u5668\u8fdb\u884c\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u7684\u5bb9\u5668\u4f4d\u4e8e HOME \u76ee\u5f55\u4e0b\u7684 .wine\uff0c\u73af\u5883\u53d8\u91cf WINEPREFIX \u7528\u6765\u4fee\u6539\u5f53\u524d\u7684\u5bb9\u5668\u8def\u5f84\u3002\u6bd4\u5982\u6709\u4e00\u4e2a\u53eb demo.exe \u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u6211\u4eec\u60f3\u6d4b\u8bd5\u80fd\u5426\u6b63\u5e38\u8fd0\u884c\uff0c\u53ef\u4ee5\u8fd0\u884c\u3002<\/p>\n<blockquote><p>WINEPREFIX=~\/.demo_exe .\/wine demo.exe<\/p><\/blockquote>\n<p>HOME \u76ee\u5f55\u4e0b\u7684`demo_exe`\u5c31\u4f1a\u4f5c\u4e3a\u5176\u5bb9\u5668\u76ee\u5f55\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 5\u00a0 \u5f00\u53d1<\/strong><\/h1>\n<p>\u7f16\u8bd1\u8fc7\u540e\u7684 Wine \u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<blockquote><p>\u251c\u2500\u2500 aclocal.m4<br \/>\n\u251c\u2500\u2500 ANNOUNCE<br \/>\n\u251c\u2500\u2500 AUTHORS<br \/>\n\u251c\u2500\u2500 config.log<br \/>\n\u251c\u2500\u2500 config.status<br \/>\n\u251c\u2500\u2500 configure<br \/>\n\u251c\u2500\u2500 configure.ac<br \/>\n\u251c\u2500\u2500 COPYING.LIB<br \/>\n\u251c\u2500\u2500 dlls<br \/>\n\u251c\u2500\u2500 documentation<br \/>\n\u251c\u2500\u2500 fonts<br \/>\n\u251c\u2500\u2500 include<br \/>\n\u251c\u2500\u2500 libs<br \/>\n\u251c\u2500\u2500 LICENSE<br \/>\n\u251c\u2500\u2500 LICENSE.OLD<br \/>\n\u251c\u2500\u2500 loader<br \/>\n\u251c\u2500\u2500 MAINTAINERS<br \/>\n\u251c\u2500\u2500 Makefile<br \/>\n\u251c\u2500\u2500 Makefile.in<br \/>\n\u251c\u2500\u2500 po<br \/>\n\u251c\u2500\u2500 programs<br \/>\n\u251c\u2500\u2500 README<br \/>\n\u251c\u2500\u2500 server<br \/>\n\u251c\u2500\u2500 tools<br \/>\n\u251c\u2500\u2500 VERSION<br \/>\n\u2514\u2500\u2500 wine -&gt; tools\/winewrapper<\/p><\/blockquote>\n<p>* \u76ee\u5f55 dlls \u6309\u7167\u6a21\u5757\u5b58\u653e\u4e86\u6240\u6709 API \u7684\u5b9e\u73b0\u3002<\/p>\n<p>* \u76ee\u5f55 loader \u662f\u548c Wine \u542f\u52a8\u3001\u52a0\u8f7d\u76f8\u5173\u7684\u4ee3\u7801\u3002<\/p>\n<p>* \u76ee\u5f55 programs \u5b58\u653e\u4e86\u5916\u90e8\u7a0b\u5e8f\u7684\u4ee3\u7801\uff0c\u6bd4\u5982\u6ce8\u518c\u8868\u7ba1\u7406\u5de5\u5177 regedit \u3002<\/p>\n<p>* \u76ee\u5f55 server \u987e\u540d\u601d\u4e49\uff0c\u662f Wine server \u7684\u5b9e\u73b0\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u9700\u8981\u505a\u7684\u5c31\u548c\u666e\u901a\u5f00\u53d1\u6ca1\u4ec0\u4e48\u4e24\u6837\u4e86\u3002\u6bd4\u5982\u8bf4\u6211\u4eec\u53d1\u73b0\u67d0\u4e2a\u5e94\u7528\u5b58\u5728\u5b57\u4f53\u76f8\u5173\u7684 BUG\uff0c\u53ef\u4ee5\u9996\u5148\u6839\u636e\u7ecf\u9a8c\u5224\u65ad\u5728 Windows \u4e0a\uff0c\u8be5\u7a0b\u5e8f\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff0c\u7136\u540e\u67e5\u770b\u5bf9\u5e94\u7684\u5b9e\u73b0\u3002\u4f8b\u5982 GDI \u76f8\u5173\u7684\u5b57\u4f53\u5b9e\u73b0\uff0c\u4f4d\u4e8e dlls\/gdi32\/font.c \u548c dlls\/gdi32\/freetype.c \u3002\u4fee\u6539\u5b8c\u4ee3\u7801\u540e\uff0c\u5728\u6240\u5728\u6a21\u5757\u7684\u76ee\u5f55\uff0c\u6bd4\u5982\u4e0a\u4f8b\u5c31\u662f dlls\/gdi32 \u4e0b\u91cd\u65b0 make \u5c31\u53ef\u4ee5\u5feb\u901f\u9a8c\u8bc1\u4e86\u3002<\/p>\n<p>\u5bf9\u4e8e\u590d\u6742\u7684\u95ee\u9898\uff0c\u4e0d\u592a\u597d\u76f4\u63a5\u5b9a\u4f4d\u7684\uff0c\u53ef\u4ee5\u901a\u8fc7\u8f93\u51fa\u65e5\u5fd7\u7684\u65b9\u5f0f\u6765\u8c03\u8bd5\uff0c\u73af\u5883\u53d8\u91cf WINEDEBUG \u6307\u5b9a\u4e86\u9700\u8981\u8f93\u51fa\u7684\u65e5\u5fd7\u3002<\/p>\n<p>\u6709\u65f6\u6211\u4eec\u53ef\u80fd\u9700\u8981\u628a\u590d\u6742\u7684\u60c5\u51b5\u7b80\u5355\u5316\uff0c\u8fd9\u65f6\u5019\u96be\u514d\u4f1a\u5199\u4e00\u4e9b\u5c0f\u7684 demo \u7a0b\u5e8f\u6765\u91cd\u73b0\u95ee\u9898\u3002\u5982\u679c\u4e0d\u60f3\u5230 Windows \u4e0a\u9762\u7f16\u8bd1\uff0c\u53ef\u4ee5\u4f7f\u7528 mingw \u76f4\u63a5\u5728 deepin \u4e0b\u7f16\u8bd1\u51fa exe \u6587\u4ef6\u3002\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u9996\u5148\u5b89\u88c5 mingw\uff1a<\/p>\n<blockquote><p>sudo apt install mingw-w64<\/p><\/blockquote>\n<p>\u63a5\u7740\u6b63\u5e38\u5229\u7528 Windows API \u5b9e\u73b0\u7a0b\u5e8f\uff0c\u6700\u540e\u5229\u7528 mingw \u7f16\u8bd1\u5de5\u5177\u94fe\u751f\u6210\u6587\u4ef6\u5373\u53ef\uff0cMakefile \u793a\u4f8b\uff1a<\/p>\n<blockquote><p>hello.exe: hello.c<br \/>\ni686-w64-mingw32-g++ -o hello.exe hello.c -DUNICODE -D_UNICODE -municode -lgdi32<\/p><\/blockquote>\n<p>\u4e0a\u9762\u7684\u4f8b\u5b50\uff0c\u5b9a\u4e49\u4e86 UNICODE\uff0c\u6240\u4ee5\u4f7f\u7528\u7684 UNICODE \u7248\u672c\u7684 API\uff0c\u5165\u53e3\u51fd\u6570\u4e3a wmain\uff0c-lgdi32 \u8868\u793a\u9700\u8981\u94fe\u63a5\u5e93 gdi32 \u3002\u751f\u6210\u51fa\u6765\u7684 hello.exe\uff0c\u53ef\u4ee5\u540c\u65f6\u5728 Windows \u548c deepin \u4e0b\u8fd0\u884c\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 6\u00a0 \u5176\u4ed6<\/strong><\/h1>\n<p>\u672c\u6587\u4ecb\u7ecd\u7684\u5185\u5bb9\u53ea\u6d89\u53ca\u5230 Wine \u5f00\u53d1\u7684\u57fa\u7840\uff0cWine \u672c\u8eab\u8fd8\u6709\u5f88\u591a\u4e1c\u897f\u503c\u5f97\u53bb\u63a2\u7d22\u3002\u6bd4\u5982 Wine \u662f\u5982\u4f55\u4f7f\u7528 driver \u673a\u5236\u8ba9\u63a5\u53e3\u548c\u5b9e\u73b0\u5206\u79bb\u7684\uff0c\u518d\u6bd4\u5982 Wine \u662f\u5982\u4f55\u4f7f\u7528\u7eaf C \u5b9e\u73b0 COM \u673a\u5236\u7684\u3002\u867d\u7136 Wine \u7684\u51fa\u73b0\u5df2\u7ecf\u6709\u4e00\u4e9b\u5e74\u5934\u4e86\uff0c\u4f46\u662f\u76ee\u524d\u7684\u5f00\u53d1\u4ecd\u7136\u6bd4\u8f83\u6d3b\u8dc3\uff0c\u611f\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u52a0\u5165\u8fdb\u6765\uff0c\u4e3a Linux \u751f\u6001\u6dfb\u7816\u52a0\u74e6\uff0c\u8ba9\u5927\u5bb6\u80fd\u7528\u5230\u66f4\u591a\u7684\u4f18\u8d28\u5e94\u7528\uff0c\u4e5f\u7b97\u662f\u66f2\u7ebf\u6551\u56fd\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Part 7\u00a0 \u66f4\u65b0<\/strong><\/h1>\n<p><strong>7.1 \u65b0\u7684 WOW64<\/strong><\/p>\n<p>\u4e0a\u9762\u7f16\u8bd1\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u53ea\u7f16\u8bd1\u4e86 32 \u4f4d\u7684 Wine\uff0c\u5ffd\u7565\u4e86\u7f16\u8bd1 64 \u4f4d Wine \u7684\u7ec6\u8282\u3002\u4ece Wine 8 \u5f00\u59cb\uff0cWine \u5f00\u59cb\u4e86\u4e00\u4e2a\u79f0\u4e3a PE \u00a0Convertion \u7684\u5f00\u53d1\u8fc7\u7a0b\uff0c\u91cd\u65b0\u5b9e\u73b0\u4e86 WOW64 \u7684\u673a\u5236\u3002\u6b64\u6a21\u5f0f\u4e0b\u53ea\u9700\u8981\u7f16\u8bd1\u51fa\u4e00\u4efd Wine\uff0c\u65e2\u53ef\u4ee5\u8fd0\u884c 32 \u4f4d\u7a0b\u5e8f\uff0c\u4e5f\u80fd\u8fd0\u884c 64 \u4f4d\u7a0b\u5e8f\u3002\u540c\u65f6\u4e5f\u4e0d\u518d\u4f9d\u8d56 32 \u4f4d\u7684\u8fd0\u884c\u65f6\u5e93\u3002\u867d\u7136\u6b64\u6a21\u5f0f\u8fd8\u88ab\u8ba4\u4e3a\u5904\u4e8e\u5b9e\u9a8c\u9636\u6bb5\uff0c\u4f46\u662f\u4ece deepin-wine8 \u5f00\u59cb\uff0c\u6211\u4eec\u5df2\u7ecf\u9ed8\u8ba4\u4f7f\u7528\u6b64\u65b9\u5f0f\u3002<\/p>\n<p>\u7f16\u8bd1\u65b0\u7684 WOW64 \u65b9\u5f0f\u7684 Wine\uff0c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ol class=\"list-paddingleft-1\">\n<li>Wine \u5b98\u65b9\u7684\u6e90\u7801\u5730\u5740\u5df2\u7ecf\u66f4\u6539\uff0c\u5728\u00a0<em>https:\/\/gitlab.winehq.org\/wine\/wine.git<\/em>\u00a0\u4e0b\u8f7d\u6e90\u4ee3\u7801\u3002<\/li>\n<li>\u4f9d\u65e7\u9700\u8981\u5b89\u88c5\u7f16\u8bd1\u65f6\u4f9d\u8d56\u7684\u5f00\u53d1\u5e93\uff0c\u4e0d\u540c\u5728\u4e8e\u6211\u4eec\u8fd9\u6b21\u53ea\u9700\u8981\u5b89\u88c5 amd64 \u7684\u7248\u672c\uff0c\u5728\u5b89\u88c5\u5f00\u53d1\u5e93\u65f6\u4e0d\u518d\u9700\u8981\u6307\u5b9a \uff1ai386 \u540e\u7f00\u3002\u6b64\u5916 mingw-w64 \u5728\u6b64\u6a21\u5f0f\u4e0b\u6210\u4e3a\u5fc5\u987b\u9879\u3002<\/li>\n<li>\u5728 Wine \u6e90\u7801\u76ee\u5f55\u7684\u540c\u7ea7\u76ee\u5f55\u4e0b\u65b0\u5efa build-wine \u76ee\u5f55\uff0c\u5e76\u8fdb\u5165\u6b64\u76ee\u5f55\u3002<\/li>\n<li>\u8fd0\u884c ..\/wine\/configure --prefix=\/opt\/wine-newwow64 --enable-archs=i386,x86_64\u3002\u8fd9\u4e00\u6b65\u5982\u679c\u6709\u4efb\u4f55\u63d0\u793a\uff0c\u6bd4\u5982\u7f3a\u5c11\u7f16\u8bd1\u671f\u4f9d\u8d56\uff0c\u53ef\u4ee5\u5728\u5b89\u88c5\u540e\u518d\u6b21\u8fd0\u884c\u3002<\/li>\n<li>make -j8\uff0c\u8fdb\u884c\u7f16\u8bd1\u3002<\/li>\n<li>sudo make install \u5b89\u88c5\uff0cWine \u4f1a\u5b89\u88c5\u5728\u7b2c 4 \u6b65\u901a\u8fc7 prefix \u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u5373 \/opt\/wine-newwow64 \u3002\u5f53\u7136\u4e5f\u53ef\u4ee5\u9009\u62e9\u4e0d\u5b89\u88c5\uff0c\u76f4\u63a5\u5728\u7f16\u8bd1\u76ee\u5f55\u4e0b\u8fd0\u884c\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>7.2 \u5176\u4ed6\u67b6\u6784<\/strong><\/p>\n<p>\u5728\u5173\u4e8e\u539f\u7406\u4e00\u8282\u7684\u63cf\u8ff0\u4e2d\u6211\u4eec\u63d0\u5230\u8fc7\uff0cx86\/x64 \u673a\u5668\u7684 Linux \u7cfb\u7edf\u53ef\u4ee5\u901a\u8fc7 Wine \u8fd0\u884c x86\/x64 \u7684 PE \u7a0b\u5e8f\u3002\u5b9e\u9645\u4e0a\u5982\u4eca\u901a\u8fc7 DBT\uff08dynamic binary translation\uff09\u6280\u672f\uff0c\u5728 ARM \u53ca\u5176\u4ed6\u67b6\u6784\u4e0a\u5df2\u7ecf\u6709\u4e86\u8fd0\u884c Wine \u7684\u65b9\u6848\u3002\u611f\u5174\u8da3\u7684\u8bfb\u8005\u53ef\u4ee5\u67e5\u770b [Box64](<em>https:\/\/github.com\/ptitSeb\/box64<\/em>) \u9879\u76ee\u3002<\/p>\n<p>11\u6708\u4efd\uff0c\u5fae\u4fe1\u5728 deepin \u5546\u5e97\u4e0a\u67b6\u4e86Linux\u539f\u751f\u7248\u672c\uff0c\u529f\u80fd\u4e0e Windows\u3001MacOS \u76f8\u5dee\u65e0\u51e0\u3002Wine \u7248\u672c\u7684\u5fae\u4fe1\u7ec8\u4e8e\u53ef\u4ee5\"\u529f\u6210\u8eab\u9000\"\u4e86\uff0c\u6211\u4eec\u4e5f\u671f\u5f85\u4eca\u540e\u6709\u66f4\u591a\u8f6f\u4ef6\u63a8\u51fa\u539f\u751f\u7248\u672c\uff0c\u8ba9 Wine \u65e9\u70b9\u5b8c\u6210\"\u5386\u53f2\u4f7f\u547d\"\u3002<\/p>\n<p>&nbsp;<\/p>\n<article id=\"post-35885\" class=\"post-35885 post type-post status-publish format-standard hentry category-deepin-community-reports\">\n<div class=\"entry-content\">\n<h1><strong>\u76f8\u5173\u9605\u8bfb\uff1a<\/strong><\/h1>\n<p>\uff081\uff09<a href=\"https:\/\/distrowatch.com\/table.php?distribution=deepin\">\u652f\u6301 deepin\uff08\u6df1\u5ea6\uff09\u793e\u533a<\/a><\/p>\n<p>\uff082\uff09<a href=\"https:\/\/www.deepin.org\/zh\/category\/technology-sharing\/\">deepin \u6280\u672f\u5206\u4eab\u5408\u96c6<\/a><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: right;\">\u5185\u5bb9\u6765\u6e90\uff1adeepin\uff08\u6df1\u5ea6\uff09\u793e\u533a<\/p>\n<p style=\"text-align: right;\">\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904<\/p>\n<\/div>\n<\/article>","protected":false},"excerpt":{"rendered":"<p>\u8bf4\u8d77 Wine\uff0c\u7a0d\u5fae\u8d44\u6df1\u4e00\u70b9\u7684 Linux \u7528\u6237\u5e94\u8be5\u90fd\u542c\u8fc7\uff0c\u4f46\u662f\u771f\u8981\u8bf4\u8d77 Wine \u5230\u5e95\u662f\u600e\u4e48\u56de\u4e8b\uff0c\u53ef\u80fd\u5927\u591a\u6570\u4eba\u4e0d\u89c1\u5f97\u8bf4\u5f97\u6e05\u3002\u8fd9\u7bc7\u6587\u7ae0\u4f1a\u7b80\u5355\u5730\u4ecb\u7ecd Wine \u7684\u5de5\u4f5c\u539f\u7406\uff0c\u4ee5\u53ca\u5982\u4f55\u5f00\u59cb Wine \u7684\u5f00\u53d1\u3002\u6240\u4ee5\u5982\u679c\u60a8\u5c5e\u4e8e\u4ee5\u4e0b\u4e09\u7c7b\u8bfb\u8005\u4e4b\u4e00\uff1a * \u60f3\u53c2\u4e0e Wine \u5f00\u53d1\uff0c\u4f46\u662f\u4e0d\u77e5\u5982\u4f55\u5f00\u59cb\u7684\u3002 * \u4ec5\u4ec5\u60f3\u5927\u81f4\u4e86\u89e3 Wine \u662f\u5982\u4f55\u5de5\u4f5c\u7684\u3002 * \u53ea\u662f\u60f3\u80fd\u591f\u6109\u5feb\u7684\u7528\u4e0a\u6700\u65b0\u7248\u672c Wine \u7684\u3002 \u5e0c\u671b\u5728\u770b\u5b8c\u672c\u6587\u540e\uff0c ...<a href=https:\/\/www.deepin.org.cn\/zh\/getting-started-with-wine\/>\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":11164,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[155,93],"tags":[],"_links":{"self":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts\/35916"}],"collection":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/users\/11164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/comments?post=35916"}],"version-history":[{"count":3,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts\/35916\/revisions"}],"predecessor-version":[{"id":35944,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts\/35916\/revisions\/35944"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/media?parent=35916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/categories?post=35916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/tags?post=35916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}