• 欢迎光临中文版东方维基
  • 您目前还未登录,请点此登录后进行编辑。
    如果您还没有在东方维基注册,请点此注册
  • 如果您想要注册账号,请联络KyoriAsh或前往Discord频道以取得新账号

于Linux运行

来自东方维基
跳到导航 跳到搜索
可打印版不再被支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认的打印功能。

基本上,由于东方系列游戏被设计为运行 Windows 为主,所以在 Linux 上运行可能会非常艰难。不过 Linux 是有办法运行东方的:通常是透过一种称之为 Wine 的程序:它可以模拟 Windows 游戏,应用程序等。

于 Linux 运行东方是要看机会的,不过还是有可能。以下将展示如何运用 Wine 运行东方。

开始以前,可能需要会一些 Shell 的语法,这个网站算是不错的说明。

安装

原则上Wine 的官网已经提供主流的 Linux 操作系统下载了。

使用 Wine

Wine 主要是放在一个隐藏目录在你的主文件夹:.wine。 which contains a full representation of a Windows folder hierarchy and miscellaneous library and system files。.wine 主要是放在你的主文件夹 (~/.wine). 里面是另一个文件夹称为 drive_c,就是你的 C: 槽。如果你浏览这个文件夹里面(〜/.wine/ drive_c),你很可能会快地识别它的内容从一个标准的Windows安装。

一般来说,你的 Linux 发行版本会自行把 Windows 分配到 Wine 的可执行文件内,所以一般来说,双击 Windows可执行文件应该就行了。但如果没有,你就必须使用终端机来启动 Wine。这会让东方正常运行,只是速度比较慢。无论如何,下面我们将示范这个程序,请把资料夹路径代换成你安装 Wine 的路径:

~ $ ls .wine/drive_c/Program\ Files/RandomProgram
config.ini  libjpeg.dll  program.exe readme.txt
~ $ cd .wine/drive_c/Program\ Files/RandomProgram
~/.wine/drive_c/Program Files/RandomProgram $ wine program.exe

而这应该会开启你的程序。

运行东方

运行东方作法同样,你可能需要指定你的语言环境,才能以日文来援引 Wine 并开始你的游戏。以下是英文版作者如何安装并运行双重剧透

~ $ ls .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー
custom.exe  readme.txt  th125.exe  unins000.dat
omake.txt   th125.dat   thbgm.dat  unins000.exe
~ $ cd .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー
~/.wine/drive_c/Program Files/上海アリス幻樂団/ダブルスポイラー $ LANG="ja_JP.UTF-8" wine th125.exe

LANG="ja_JP.UTF-8" 会让 Wine 运行于日本语、或是其他想运行的语言(例如en_US.UTF-8, en_GB.UTF-8...)。然后,有可能出现严重的乱码,虽然只可能在标题列看到。此外,你应该运行英日文语言环境下的补丁:此时有英语补丁的可执行文件才可以运行在默认的语言环境。

DLL

This is pretty much no longer necessary for Touhou games, but it's a way to fix certain missing functionality in Wine you may find with other programs. Basically, Windows has a lot of available system interface DLLs, and it's a huge order to 100% duplicate all that functionality in Wine. While the Wine developers are constantly at work improving the coverage of the Windows' API, there's still lots of missing gaps here and there. One way to temporarily fix a partially-functioning DLL is to replace it with the original file from a Windows install. Here's the steps to do so; we'll use "d3dx9_36.dll" as an example. Also note, I have a 32-bit Vista installation mounted at /mnt/vista32.

首先,要复制你的档案到 Wine 的资料夹。Wine 的资料夹位于 .wine/drive_c/windows 。

~ $ cp /mnt/vista32/Windows/System32/d3dx9_36.dll .wine/drive_c/windows/system32/

这可能需要新的 DLL 档案去运作。为了确保档案可以被运行,我们需要去设定 Wine. Wine 的设定档被称之为 winecfg ,运行你的终端机就会看到以下画面:
ZhWine1.png
点选函式库:
ZhWine2.png
在“新增函式库顶替”之下,输入 d3dx9_36,点选加入以及套用:
ZhWine3.png

现在点选确定以离开,或是作其他设定。其中一个 DLL 的小问题是,Wine 正在模拟时他们可能需要低阶的 DLL (例如 ntdll.dll) ,之后无法运行。Wine 正在模拟时,核心的 DLL 不能被原生的 DLL 取代,否则你会令 Wine 的资料夹受到破坏。

PC-98

T98Next 与 Anex86 都可以在 Wine 之下正常运行。另外,如果你有2P的 PoDD 以及一个手柄,这个设定 也可以在 Wine 之下正常运行。

外部链接

Touhou on Linux and MacOS X, using Wine - Shrinemaiden.org