DCSS/Windows版ビルドガイド のバックアップ(No.4) |
|
DCSS(英語版)を手元でソースコードからビルドするための覚え書き。
Windows 10 Home (Windows 10 Fall Creators Update適用)
https://github.com/git-for-windows/build-extra/releases からgit-sdk-installer-1.0.6-64.7z.exeをダウンロードして実行。
c:\git-sdk-64が生成されるので、エクスプローラ等で開いてgit-bash.exeを実行する。
出てきた黒い画面に「git version」と入力し、Enterを押して「git version 2.9.3.windows.2」等と帰ってくればOK。(細かい数字は異なるかも)
本家からソースコードをDLし、目的のバージョンに切り替える。(この例ではstone_soup-0.16ブランチ)
$ git clone --recursive https://github.com/crawl/crawl.git dcss-0.16 $ cd dcss-0.16 $ git checkout --track origin/stone_soup-0.16
タイル版をビルドする。
$ cd crawl-ref/source $ make TILES=y
生成されたcrawl.exeを実行するとDCSSタイル版が起動する。
↓こういうエラーが出るとき。
In file included from src/core/windows/SDL_xinput.c:24:0:
src/core/windows/SDL_xinput.h:115:3: error: conflicting types for 'XINPUT_GAMEPAD_EX'
} XINPUT_GAMEPAD_EX;
^~~~~~~~~~~~~~~~~
In file included from src/core/windows/SDL_xinput.h:29:0,
from src/core/windows/SDL_xinput.c:24:
C:/git-sdk-64/mingw64/x86_64-w64-mingw32/include/xinput.h:182:3: note: previous declaration of 'XINPUT_GAMEPAD_EX' was here
} XINPUT_GAMEPAD_EX, *PXINPUT_GAMEPAD_EX;
^~~~~~~~~~~~~~~~~
In file included from src/core/windows/SDL_xinput.c:24:0:
src/core/windows/SDL_xinput.h:123:3: error: conflicting types for 'XINPUT_STATE_EX'
} XINPUT_STATE_EX;
^~~~~~~~~~~~~~~
In file included from src/core/windows/SDL_xinput.h:29:0,
from src/core/windows/SDL_xinput.c:24:
C:/git-sdk-64/mingw64/x86_64-w64-mingw32/include/xinput.h:192:3: note: previous declaration of 'XINPUT_STATE_EX' was here
} XINPUT_STATE_EX, *PXINPUT_STATE_EX;
crawl-ref/source/contrib/sdl2/src/core/windows/SDL_xinput.hを開いて
ifndef HAVE_XINPUT_GAMEPAD_EX
typedef struct
{
WORD wButtons;
BYTE bLeftTrigger;
BYTE bRightTrigger;
SHORT sThumbLX;
SHORT sThumbLY;
SHORT sThumbRX;
SHORT sThumbRY;
DWORD dwPaddingReserved;
} XINPUT_GAMEPAD_EX;
#endif
#ifndef HAVE_XINPUT_STATE_EX
typedef struct
{
DWORD dwPacketNumber;
XINPUT_GAMEPAD_EX Gamepad;
} XINPUT_STATE_EX;
#endif
の箇所を削除するかコメントアウトする。
$ pacman -Syy
でデータベースを同期させる。