2009年12月22日 星期二

patch wine source for D2GS

先準備編譯環境
sudo apt-get build-dep wine
下載源碼
apt-get source wine
編輯server/sock.c
if ((event & POLLOUT) && (sock->state & FD_WRITE))
{
sock->state &= ~FD_WRITE;
sock->pmask |= FD_WRITE;
sock->hmask |= FD_WRITE;
編譯、安裝
dpkg-buildpackage -us -uc -b
sudo dpkg -i wine_*.deb
開啟regedit,將EnableNTMode設為零
啟動虛擬X server
Xvfb :1 &
執行D2GS
DISPLAY=:1 wine d2gs