-
Install CMake:
- Download and run e.g.
cmake-3.11.0-win32-x86.msi
from https://cmake.org/download/ - If you are new to CMake, see some notes [(doc link)](@ref md_doc_cmake_readme).
- Download and run e.g.
-
Install FFMPEG:
- Download 64-bit Static from Zeranoe.
- Unpack the contents of the zip (bin folder etc.) to
C:\ffmpeg
- Add
C:\ffmpeg\bin
to yourPATH
(How To) - Check that typing
ffmpeg
at a command prompt works.
-
Install git and Visual Studio and Python 3.6 (64-bit) and the JDK (64-bit). Hints:
- Get the latest Windows git from https://git-scm.com/downloads
- Check that git and msbuild and python are on your path. (Hint: Run the Visual Studio command prompt)
N.B. MSBuild lives in an odd place: e.g.
C:\Program Files (x86)\MSBuild\12.0\Bin
- Set JAVA_HOME to be the location of the JDK installation, e.g.
C:\Program Files\Java\jdk1.8.0_71
- Add e.g.
C:\Program Files\Java\jdk1.8.0_71\bin
to your PATH variable. (How To) - Check that
java -version
andjavac -version
andset JAVA_HOME
all report the same 64-bit version. The Minecraft version currently requires Java 8.
-
Download and install Doxygen
- Download e.g.
doxygen-1.8.11-setup.exe
from http://www.stack.nl/~dimitri/doxygen/download.html - Run the exe to install.
- Download e.g.
-
Download and install ZLib
- Download e.g.
zlib-1.2.11.zip
from http://zlib.net/ - Extract to
C:\zlib-1.2.11\
- Open a Visual Studio 2017 x64 command prompt with Admin rights (How-To)
cd C:\zlib-1.2.11\
cmake -G "Visual Studio 15 2017 Win64" .
cmake --build . --config Debug --target install
cmake --build . --config Release --target install
- Add
C:\Program Files\zlib\bin
to your PATH (How To)
- Download e.g.
-
Install and build Boost 1.66.0 or later:
- Download e.g.
boost_1_66.zip
from http://boost.org - Extract to
c:\boost
- Open a Visual Studio 2017 x64 command prompt with Admin rights (How-To)
- e.g.
cd c:\boost\boost_1_66
If you are using Python 3, (rather than deprecated Python 2): a. Create a user-config.jam file in the root of your boost installation (eg c:\boost\boost_1_66_0\user-config.jam) - the easiest way to do this is copy the example one from boost's tools\build\example b. Find the section on Python, and uncomment the "using python" line, changing it to point to your python3 installation - egusing python : 3.6 : C:/python36 : C:/python36/include : C:/python36/lib ;
bootstrap.bat
b2.exe toolset=msvc-12.0 address-model=64 -sZLIB_SOURCE="C:\zlib-1.2.11"
- For more information on installing Boost with ZLib support, see here
- Download e.g.
-
Install SWIG
- Browse to http://swig.org/download.html and download the latest version of
swigwin
. - Unzip the directory and copy it to your
C:\
drive. - Add (e.g.)
C:\swigwin-3.0.12
to your PATH. CMake should then find swig automatically.
- Browse to http://swig.org/download.html and download the latest version of
-
Install xsltproc:
- Visit ftp://ftp.zlatkovic.com/libxml/ and download libxslt, libxml2, zlib and iconv: (NOTE: you can also get the binaries from http://xmlsoft.org/sources/win32/)
- Download e.g.
libxslt-1.1.26.win32.zip
and extract toC:\XSLT
- Download e.g.
libxml2-2.7.8.win32.zip
and extract toC:\XSLT
- Download e.g.
zlib-1.2.5.win32.zip
and extract toC:\XSLT
- Download e.g.
iconv-1.9.2.win32.zip
and extract toC:\XSLT
- Download e.g.
- Add their
bin
folders to your PATH: (How To)- Add
C:\XSLT\libxslt-1.1.26.win32\bin
to your PATH. - Add
C:\XSLT\libxml2-2.7.8.win32\bin
to your PATH. - Add
C:\XSLT\iconv-1.9.2.win32\bin
to your PATH.
- Add
- Copy
C:\XSLT\zlib-1.2.5\bin\zlib1.dll
toC:\XSLT\libxslt-1.1.26.win32\bin
- Check that running
xsltproc
from a new command prompt works, printing the options.
- Visit ftp://ftp.zlatkovic.com/libxml/ and download libxslt, libxml2, zlib and iconv: (NOTE: you can also get the binaries from http://xmlsoft.org/sources/win32/)
-
Build Malmo:
- Open a Visual Studio 2017 x64 command prompt
mkdir MalmoPlatform
(wherever you want)cd MalmoPlatform
git clone https://github.com/Microsoft/malmo.git .
- Save xs3p.xsl from https://raw.githubusercontent.com/bitfehler/xs3p/1b71310dd1e8b9e4087cf6120856c5f701bd336b/xs3p.xsl to the Schemas folder.
- Add a new environment variable
MALMO_XSD_PATH
and set it to the path toMalmoPlatform\Schemas
. You will need to open a fresh command prompt for this to take effect. mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" ..
- If it fails to find things, use
cmake-gui ..
and give hints, as described above.
If you have cygwin installed, check that cmake isn't using the cygwin python executables. - For a Debug build:
msbuild INSTALL.vcxproj
For a Release build:msbuild INSTALL.vcxproj /p:Configuration=Release
You can then run the samples from e.g.install\Python_Examples
If you want to use Visual Studio to build, openMalmo.sln
.
-
Test Malmo:
- After building Debug:
ctest -C Debug
- After building Release:
ctest -C Release
- Add
-E Integration
to exclude the integration tests. - Add
-VV
to get verbose output. - Or build the RUN_TESTS project in Visual Studio and look in the Output tab.
- After building Debug:
-
Make a distributable:
- Run all the tests.
- Change the version number in CMakeLists.txt and Minecraft/src/main/java/com/microsoft/Malmo/MalmoMod.java, and commit.
msbuild PACKAGE.vcxproj /p:Configuration=Release