DAR0.29コンパイルまでの道

Civ4のmodであるffh2のmod Denev's Advanced Rules modmod(J)のdll作成方法。
コンパイルまで成功したのでまとめておきます。

環境構築

VC++をインストール&いくつかの依存するツール類をインストールしなければいけないのだけれども、基本はCiv4Wikiを参照してください。
http://wiki.rk3.jp/civ4/index.php?MOD%2F%E4%BD%9C%E6%88%90%E6%83%85%E5%A0%B1%2FCvGameCoreDLL.dll%E3%81%AE%E4%BD%9C%E3%82%8A%E6%96%B9

私はVC++2010Express Editionでやりましたが、上記手順でできます。
Visual C++ Toolkit 2003とMicrosoft R Windows Server 2003 R2 Platform SDKも忘れずにインストールして下さい。

ライブラリ構築

上のページのプロジェクトの作成までやったら、DARが依存しているけれども、SDKに入っていないファイルを集めます。

とりあえず以下の3つを手に入れる必要があります。

  • Civ4本体のSDK(英語版)

http://civ4btspatch.svn.sourceforge.net/viewvc/civ4btspatch/CvGameCoreDLL/trunk/?pathrev=2
(今回はCiv4Wikiにリンクがはられていたものを使用)
(下の方にあるDownload GNU tarballを押して全部DLしてください。)

  • BULL1.2

http://sourceforge.net/projects/civ4bull/files/
http://sourceforge.net/projects/civ4bull/files/BULL%20for%20BTS%203.19/BULL%201.2/BULL_1.2.zip/download

  • DAR0.29

http://bb2.atbb.jp/denev/viewtopic.php?t=3&start=0&postdays=0&postorder=asc&highlight=&sid=49b1a87d43cdf676bb294afb5a9bed71

ここまで来たら上から順(Civ4SDK→BULL1.2→DAR0.29)に解凍していき、ひとつのフォルダにまとめて、VC++のプロジェクトの中に全部入れます。

まとめたらMakeFileを修正するだけだけれども、問題は、MakeFileのマージが難しい。
Denevさんの方針により配られてはいませんが直接連絡すればいただけるそうです。
(ただし、そのファイルを使用したときに出た不具合に関してはノーサポートとのこと)
//何を付け加えればよいか書こうとしたけれども説明が難しかったので断念。

ちなみに、以下のようなフォルダ構成になっているはずです。

├─Boost-1.32.0
│ ├─include
│ │ └─boost
│ │ ├─algorithm
│ │ │ └─string
│ │ │ ├─detail
│ │ │ └─std
│ │ ├─archive
│ │ │ ├─detail
│ │ │ ├─impl
│ │ │ └─iterators
│ │ ├─assign
│ │ │ └─std
│ │ ├─bind
│ │ ├─compatibility
│ │ │ └─cpp_c_headers
│ │ ├─config
│ │ │ ├─abi
│ │ │ ├─compiler
│ │ │ ├─platform
│ │ │ └─stdlib
│ │ ├─date_time
│ │ │ ├─gregorian
│ │ │ ├─local_time
│ │ │ └─posix_time
│ │ ├─detail
│ │ ├─dynamic_bitset
│ │ ├─filesystem
│ │ ├─format
│ │ │ └─detail
│ │ ├─function
│ │ │ └─detail
│ │ ├─graph
│ │ │ └─detail
│ │ ├─integer
│ │ ├─io
│ │ ├─iterator
│ │ │ └─detail
│ │ ├─lambda
│ │ │ └─detail
│ │ ├─logic
│ │ ├─math
│ │ │ └─special_functions
│ │ ├─mpl
│ │ │ ├─aux_
│ │ │ │ ├─config
│ │ │ │ ├─preprocessed
│ │ │ │ │ ├─bcc
│ │ │ │ │ ├─bcc551
│ │ │ │ │ ├─dmc
│ │ │ │ │ ├─gcc
│ │ │ │ │ ├─msvc60
│ │ │ │ │ ├─msvc70
│ │ │ │ │ ├─mwcw
│ │ │ │ │ ├─no_ctps
│ │ │ │ │ ├─no_ttp
│ │ │ │ │ └─plain
│ │ │ │ ├─preprocessor
│ │ │ │ ├─range_c
│ │ │ │ └─test
│ │ │ ├─limits
│ │ │ ├─list
│ │ │ │ └─aux_
│ │ │ │ └─preprocessed
│ │ │ │ └─plain
│ │ │ ├─map
│ │ │ │ └─aux_
│ │ │ │ └─preprocessed
│ │ │ │ ├─plain
│ │ │ │ └─typeof_based
│ │ │ ├─math
│ │ │ ├─multiset
│ │ │ │ └─aux_
│ │ │ ├─set
│ │ │ │ └─aux_
│ │ │ │ └─preprocessed
│ │ │ │ └─plain
│ │ │ └─vector
│ │ │ └─aux_
│ │ │ └─preprocessed
│ │ │ ├─no_ctps
│ │ │ ├─plain
│ │ │ └─typeof_based
│ │ ├─multi_array
│ │ ├─multi_index
│ │ │ └─detail
│ │ ├─numeric
│ │ │ ├─conversion
│ │ │ │ └─detail
│ │ │ ├─interval
│ │ │ │ ├─compare
│ │ │ │ ├─detail
│ │ │ │ └─ext
│ │ │ └─ublas
│ │ │ └─detail
│ │ ├─optional
│ │ ├─pending
│ │ │ └─detail
│ │ ├─pool
│ │ │ └─detail
│ │ ├─preprocessor
│ │ │ ├─arithmetic
│ │ │ │ └─detail
│ │ │ ├─array
│ │ │ ├─comparison
│ │ │ ├─config
│ │ │ ├─control
│ │ │ │ └─detail
│ │ │ │ ├─dmc
│ │ │ │ ├─edg
│ │ │ │ └─msvc
│ │ │ ├─debug
│ │ │ ├─detail
│ │ │ │ └─dmc
│ │ │ ├─facilities
│ │ │ ├─iteration
│ │ │ │ └─detail
│ │ │ │ ├─bounds
│ │ │ │ └─iter
│ │ │ ├─list
│ │ │ │ └─detail
│ │ │ │ ├─dmc
│ │ │ │ └─edg
│ │ │ ├─logical
│ │ │ ├─punctuation
│ │ │ ├─repetition
│ │ │ │ └─detail
│ │ │ │ ├─dmc
│ │ │ │ ├─edg
│ │ │ │ └─msvc
│ │ │ ├─selection
│ │ │ ├─seq
│ │ │ │ └─detail
│ │ │ ├─slot
│ │ │ │ └─detail
│ │ │ └─tuple
│ │ ├─program_options
│ │ │ └─detail
│ │ ├─python
│ │ │ ├─converter
│ │ │ ├─detail
│ │ │ ├─object
│ │ │ └─suite
│ │ │ └─indexing
│ │ │ └─detail
│ │ ├─random
│ │ │ └─detail
│ │ ├─range
│ │ │ └─detail
│ │ ├─regex
│ │ │ ├─config
│ │ │ ├─v3
│ │ │ └─v4
│ │ ├─serialization
│ │ ├─signals
│ │ │ └─detail
│ │ ├─spirit
│ │ │ ├─actor
│ │ │ ├─attribute
│ │ │ ├─core
│ │ │ │ ├─composite
│ │ │ │ │ └─impl
│ │ │ │ ├─impl
│ │ │ │ ├─non_terminal
│ │ │ │ │ └─impl
│ │ │ │ ├─primitives
│ │ │ │ │ └─impl
│ │ │ │ └─scanner
│ │ │ │ └─impl
│ │ │ ├─debug
│ │ │ │ └─impl
│ │ │ ├─dynamic
│ │ │ │ └─impl
│ │ │ ├─error_handling
│ │ │ │ └─impl
│ │ │ ├─fusion
│ │ │ │ ├─algorithm
│ │ │ │ │ └─detail
│ │ │ │ ├─detail
│ │ │ │ ├─iterator
│ │ │ │ │ └─detail
│ │ │ │ │ ├─filter_view_iterator
│ │ │ │ │ ├─joint_view_iterator
│ │ │ │ │ ├─single_view_iterator
│ │ │ │ │ ├─transform_view_iterator
│ │ │ │ │ ├─tuple_iterator
│ │ │ │ │ └─type_sequence_iterator
│ │ │ │ └─sequence
│ │ │ │ └─detail
│ │ │ ├─iterator
│ │ │ │ └─impl
│ │ │ ├─meta
│ │ │ │ └─impl
│ │ │ ├─phoenix
│ │ │ ├─symbols
│ │ │ │ └─impl
│ │ │ ├─tree
│ │ │ │ └─impl
│ │ │ └─utility
│ │ │ └─impl
│ │ │ └─chset
│ │ ├─test
│ │ │ ├─detail
│ │ │ │ ├─basic_cstring
│ │ │ │ └─iterator
│ │ │ └─included
│ │ ├─thread
│ │ │ └─detail
│ │ ├─tuple
│ │ │ └─detail
│ │ ├─type_traits
│ │ │ └─detail
│ │ ├─utility
│ │ │ └─detail
│ │ └─variant
│ │ └─detail
│ └─libs
├─CxImage
│ ├─general
│ └─jpeg
└─Python24
├─include
└─libs