• 欢迎光临中文版东方维基
  • 您目前还未登录,请点此登录后进行编辑。
    如果您还没有在东方维基注册,请点此注册
  • 如果您想要注册账号,请联络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