VCMI (Magic Gate Hero Invincible 3-open source re-engraved) source code compilation

Source: Internet
Author: User

1 preparation
    1. HoMM3 gog.com
    2. CMake official website
    3. VCMI Source Download
    4. QT5 with MinGW official website
    5. Boost source 1.55 Download
    6. MSYS2 official website
2 Installing the 2.1 VCMI source target path D:/vcmi/source/2.2 QT5 with mingw, set environment variables
set PATH=D:\Qt\Qt5.4.1\5.4\mingw491_32\bin;D:\Qt\Qt5.4.1\Tools\mingw491_32\bin;%PATH%  
2.3 Boost 1.55
bootstrap.bat mingw  b2 toolset=gcc --without-python --stage  copy stage/lib to D:/vcmi/boost/lib  copy boost dir to D:/vcmi/boost/boost  
2.4 MSYS2

msys2-x86_64-20160205 This version seems to have changed, resulting in MSYS2 shell configuration errors that have not been resolved.

D:/msys64/etc/pacman.conf 修改网络代理配置  XferCommand = /usr/bin/curl -x http://yourproxy.yoursite.com:yourport -L -C - -f %u > %o  -x 设置proxy,-L 支持自动重定向  运行MSYS2 shell, 执行pacman -Syu,关闭(更新MSYS2软件库到最新)  运行autorebase.bat(刷新MSYS2)  运行MSYS2 shell, 安装所需库:  pacman -S mingw-w64-i686-SDL2  pacman -S mingw-w64-i686-SDL2_image  pacman -S mingw-w64-i686-SDL2_mixer  pacman -S mingw-w64-i686-SDL2_ttf  pacman -S mingw-w64-i686-ffmpeg  pacman -S mingw-w64-i686-zlib  
2.5 D:/vcmi/toolchain.txt New
SET(CMAKE_SYSTEM_NAME Windows)  SET(VCMIBUILD_DIR D:/vcmi)  SET(CMAKE_C_COMPILER   D:/Qt/Qt5.4.1/Tools/mingw491_32/bin/gcc.exe)  SET(CMAKE_CXX_COMPILER D:/Qt/Qt5.4.1/Tools/mingw491_32/bin/g++.exe)  SET(ENV{BOOST_ROOT} ${VCMIBUILD_DIR}/boost)  SET(CMAKE_FIND_ROOT_PATH  D:/msys64/mingw32)  list(APPEND CMAKE_PREFIX_PATH ${CMAKE_FIND_ROOT_PATH})  list(APPEND CMAKE_PREFIX_PATH D:/Qt/Qt5.4.1/Tools/mingw491_32)  SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)  SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)  SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)  
3 compiling
Open CMake-gui  Select D:/vcmi/source as source directory  Select D:/vcmi/binary as binary directory  click "Configure"  Select "MinGW makefiles" in combobox  Select "Specify toolchain file for crosscompiling"  Select toolchain file (D:/vcmi/toolchain.txt)  Set variables:  CMAKE_INSTALL_PREFIX = D:/vcmi/result  ENABLE_PCH = OFF (because of cc1plus.exe crash)  click Configure  click Generate  go to D:/vcmi/binary directory  execute mingw32-make  execute mingw32-make install  
4 run

D:/vcmi/result/Is the final build file.
Copy to HOMM3.
Enjoy it!

Https://gist.github.com/9468305/4ecaddbfd8b4d9cefe57

VCMI (Magic Gate Hero Invincible 3-open source re-engraved) source code compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.