Difference between revisions of "How to build VCMI (Windows/Cmake)"
From VCMI Project Wiki
Line 20: | Line 20: | ||
* File -> Clone | * File -> Clone | ||
* select '''https://github.com/vcmi/vcmi/''' as source | * select '''https://github.com/vcmi/vcmi/''' as source | ||
− | * select '''[VCMIBUILD_DIR]/ | + | * select '''[VCMIBUILD_DIR]/vcmi/source''' as destination |
* click '''Clone''' | * click '''Clone''' | ||
Line 27: | Line 27: | ||
* Select latest Qt for mingw and mingw 4.8.2 from tools | * Select latest Qt for mingw and mingw 4.8.2 from tools | ||
* Select '''[VCMIBUILD_DIR]/qt''' as destination folder | * Select '''[VCMIBUILD_DIR]/qt''' as destination folder | ||
+ | * Add '''[VCMIBUILD_DIR]/Qt/Tools/mingw482_32/bin''' to '''PATH''' system variable. | ||
= Build boost = | = Build boost = | ||
Line 53: | Line 54: | ||
***lib | ***lib | ||
− | = Build ZLib | + | = Build ZLib = |
+ | * Unpack archive to temp folder, for example, '''[VCMIBUILD_DIR]/build/zlib/src''' | ||
+ | * Open CMake-gui | ||
+ | * Select '''[VCMIBUILD_DIR]/build/zlib/src''' as source directory | ||
+ | * Select '''[VCMIBUILD_DIR]/build/zlib/bin''' as binary directory | ||
+ | * click "Configure" | ||
+ | * Select "MinGW makefiles" in combobox | ||
+ | * Select "Specify toolchain file for crosscompiling" | ||
+ | * Select toolchain file | ||
+ | * Set variables: | ||
+ | ** INSTALL_BIN_DIR = '''[VCMIBUILD_DIR]/depends/bin''' | ||
+ | ** INSTALL_INC_DIR = '''[VCMIBUILD_DIR]/depends/include''' | ||
+ | ** INSTALL_LIB_DIR = '''[VCMIBUILD_DIR]/depends/lib''' | ||
+ | ** INSTALL_MAN_DIR = '''[VCMIBUILD_DIR]/depends/share/man''' | ||
+ | ** INSTALL_PKGCONFIG_DIR = '''[VCMIBUILD_DIR]/depends/share/pkgconfig''' | ||
+ | * click '''Configure''' | ||
+ | * click '''Generate''' | ||
+ | * go to '''[VCMIBUILD_DIR]/build/zlib/bin''' directory | ||
+ | * execute '''mingw32-make''' | ||
+ | * execute '''mingw32-make install''' |
Revision as of 14:37, 10 July 2014
Prerequisites
- HoMM 3 (can be bought at gog.com)
Clone VCMI
- open SourceTree
- File -> Clone
- select https://github.com/vcmi/vcmi/ as source
- select [VCMIBUILD_DIR]/vcmi/source as destination
- click Clone
Install Qt bundle
- Run installer
- Select latest Qt for mingw and mingw 4.8.2 from tools
- Select [VCMIBUILD_DIR]/qt as destination folder
- Add [VCMIBUILD_DIR]/Qt/Tools/mingw482_32/bin to PATH system variable.
Build boost
- Unpack boost archive
bootstrap.bat gcc b2 toolset=gcc --without-python --stage
- copy stage/lib to [VCMIBUILD_DIR]/boost/lib
- copy boost dir to [VCMIBUILD_DIR]/boost/boost
So, you should get
- [VCMIBUILD_DIR]
- boost
- boost
- lib
- boost
Unpack SDL2
- Unpack all SDL2* archives
- Copy content of i686-w64-mingw32 to [VCMIBUILD_DIR]/depends
So, you should get
- [VCMIBUILD_DIR]
- depends
- bin
- include
- lib
- depends
Build ZLib
- Unpack archive to temp folder, for example, [VCMIBUILD_DIR]/build/zlib/src
- Open CMake-gui
- Select [VCMIBUILD_DIR]/build/zlib/src as source directory
- Select [VCMIBUILD_DIR]/build/zlib/bin as binary directory
- click "Configure"
- Select "MinGW makefiles" in combobox
- Select "Specify toolchain file for crosscompiling"
- Select toolchain file
- Set variables:
- INSTALL_BIN_DIR = [VCMIBUILD_DIR]/depends/bin
- INSTALL_INC_DIR = [VCMIBUILD_DIR]/depends/include
- INSTALL_LIB_DIR = [VCMIBUILD_DIR]/depends/lib
- INSTALL_MAN_DIR = [VCMIBUILD_DIR]/depends/share/man
- INSTALL_PKGCONFIG_DIR = [VCMIBUILD_DIR]/depends/share/pkgconfig
- click Configure
- click Generate
- go to [VCMIBUILD_DIR]/build/zlib/bin directory
- execute mingw32-make
- execute mingw32-make install