カテゴリー別アーカイブ: Dwarf Fortress

DFHack をコンパイルしてみた

Hack

Dwarf Fortress で要塞を育てていると,操作の煩雑さが増し,さらにいろんなバグでくじけそうになるので DFHack という MOD を使いはじめたが,GitHub にはさらに新しい機能がついたソースコードがある(しかも興味深いことに, Ruby で書かれたスクリプトのサポートまでされたようだ)のでコンパイルしたくなった.環境は Windows Vista SP2 64bit.

いろいろつまずいた

忘れないうちにつまずいたところのメモを残しておく.

Building DFHACK – Windows を参考にコンパイルを進める.

libiconv-2.dll

git submodule init をやろうとすると

libiconv-2.dll が無いとか言われた. %ProgramFiles%\Git\bin\ にそれはあるんだけど,そこに環境変数 PATH を通してもダメだった.結局?%ProgramFiles%\Git\libexec\git-core に libiconv-2.dll をコピーしたら成功した.

参考:

libiconv-2.dll errors (introduced in new Git for Windows, but seen in msysgit for some time)

vsvars32.bat

ビルドするときに vsvars32.bat が実行され,環境変数を何かいじられるのだが,すでに設定されている環境変数 PATH に “)” があったりするとエラーが出てビルドできない(例:C:\Program Files (x86)\MeCab\bin).そこで一時しのぎに “C:\Program Files (x86)\MeCab\bin” のようにダブルクォーテーションでくくった.

cmd.exe

cmd.exe が起動されるときにこういう妙な悪いことをしていると,コンパイルの最後でエラーが出て失敗する.やめとこう.

Snatcher! Protect the children!

Snatcher!? Protect the children!
Tobul Kolilir, Farmer cancels Mill Plants: Needs empty bag.
The Recruit strikes at The Goblin Thief but the shot is parried!
The Recruit attacks The Goblin Thief but He jumps away!
The Recruit charges at The Goblin Thief!
The Recruit attacks The Goblin Thief but He jumps away!
The Goblin Thief counterstrikes!
The Goblin Thief slashes The Recruit in the upper body from the side with his ({large silver dagger}), bruising the fat through the (giant cave spider silk cloak)!
The Recruit rushes by The Goblin Thief!
Make wooden Barrel (20) has been completed.
The Recruit attacks The Goblin Thief but He jumps away!
The Recruit charges at The Goblin Thief!
The Recruit misses The Goblin Thief!
The Recruit collides with The Goblin Thief!
The Goblin Thief is knocked over!
The Recruit strikes at The Goblin Thief but the shot is parried!
The Goblin Thief counterstrikes!
The Goblin Thief stabs The Recruit in the right lower arm with his ({large silver dagger}), bruising the fat through the (giant cave spider silk cloak)!
The Recruit strikes at The Goblin Thief but the shot is parried!
The Goblin Thief counterstrikes!
The Goblin Thief misses The Recruit!
The Recruit strikes at The Goblin Thief but the shot is parried!
The Goblin Thief counterstrikes!
The Goblin Thief strikes at The Recruit but the shot is parried!
The Goblin Thief is no longer stunned.
The Goblin Thief stands up.
The Recruit bites The Goblin Thief in the right lower arm, bruising the muscle through the ({moose leather cloak})!
The Recruit latches on firmly!
The Recruit shakes The Goblin Thief around by the right lower arm, tearing apart the right lower arm’s muscle and bruising the bone!
An artery in the right lower arm has been opened by the attack, many nerves have been severed, a ligament has been torn and a tendon has been torn!
The Goblin Thief loses hold of the ({troll fur bag}).
The Goblin Thief slashes The Recruit in the left hand with his ({large silver dagger}), fracturing the bone through the (elk bird leather left mitten)!
An artery has been opened by the attack, a sensory nerve has been severed, a ligament has been torn and a tendon has been torn!
Kogan Togalmoul has become a Wrestler.
The Recruit shakes The Goblin Thief around by the right lower arm, tearing apart the right lower arm’s muscle and bruising the bone!
An artery in the right lower arm has been opened by the attack, many nerves have been severed, a ligament has been torn and a tendon has been torn!
The Goblin Thief stabs The Wrestler in the right foot with his ({large silver dagger}), chipping the bone through the (cave spider silk shoe)!
A ligament has been torn and a tendon has been torn!
The Wrestler falls over.
The Wrestler gives in to pain.
The Wrestler regains consciousness.
The Wrestler is no longer stunned.
The Wrestler gives in to pain.
The Wrestler regains consciousness.
Kogan Togalmoul has become a Shearer.
The Shearer is no longer stunned.
The Shearer gives in to pain.
The Shearer regains consciousness.
The Shearer is no longer stunned.