Guide how to compile Minetest with M$ Visual C++ ================================================== Last updated: 170104 by Krock Requirements -------------- For a minimal build, you need at least zLib, SQLite3 and Irrlicht. cURL is also required to make the server list working. To use your command line, either: 1) Start the "Visual Studio Command Line" which can be found in the start menu You will need this ater to build LuaJIT anyway OR 2) Find the file 'MSBuild.exe' in %windir%\Microsoft.NET\Framework\v?.?.?\ and add its parent directory to your system PATH variable Compile .sln and .vcxproj files with the following commands: > cd > MSBuild /p:Configuration=Release Additional parameter for multithreaded compiling: /p:MP=true Pre-Compiled libraries ------------------------ Download this archive if you do not want to compile all libraries. With them, you can ignore the compiling instructions and simply point CMake to the bin\ and include\ paths within each library directory. New: https://www.dropbox.com/s/t3fuc61116lytva/Minetest_MSVC_Win32_libraries_compiled_170104.7z Old: https://www.dropbox.com/s/r4u925x60ol6q1q/Minetest_MSVC_Win32_libraries_compiled.7z Note: These are 32-bit binaries and WILL NOT WORK for a 64-bit Minetest build! -------------------------- [..] cURL-master ------------- -> Run CMake to get a .sln file, the "bin" directory in my case. Uncheck the box ENABLE_CURL in CMake when you want poor download performance. curl\bin\CURL.sln CURL_DLL curl\bin\lib\Release\libcurl.dll CURL_INCLUDE_DIR curl\include CURL_LIBRARY curl\bin\lib\Release\libcurl_imp.lib Freetype 2.7.0 ---------------- -> Replace all occurences of "MultiThreadedDLL" with "MultiThreaded" in "freetype-2.7.0\builds\windows\vc2010\freetype.vcxproj" to prevent linker errors FREETYPE_DLL FREETYPE_INCLUDE_DIR_freetype2 freetype-2.7.0\include FREETYPE_INCLUDE_DIR_ft2build freetype-2.7.0\include FREETYPE_LIBRARY freetype-2.7.0\objs\vc2010\Win32\freetype27.lib Irrlicht 1.8.1 ---------------- irrlicht-1.8.1\source\Irrlicht\Irrlicht10.0.sln IRRLICHT_DLL irrlicht-1.8.1\bin\Win32-VisualStudio\Irrlicht.dll IRRLICHT_INCLUDE_DIR irrlicht-1.8.1\include IRRLICHT_LIBRARY irrlicht-1.8.1\lib\Win32-visualstudio\Irrlicht.lib IRRLICHT_SOURCE_DIR irrlicht-1.8.1\source\Irrlicht libOgg 1.3.1 -------------- libogg-1.3.1\win32\VS2010\libogg_dynamic.sln OGG_DLL libogg-1.3.1\win32\VS2010\Win32\Release\libogg.dll OGG_INCLUDE_DIR libogg-1.3.1\include OGG_LIBRARY libogg-1.3.1\win32\VS2010\Win32\Release\libogg.lib libVorbis 1.3.3 (libvorbis) ----------------------------- libvorbis-1.3.3\win32\VS2010\libvorbis\libvorbis_dynamic.vcxproj VORBIS_DLL libvorbis-1.3.3\win32\VS2010\Win32\Release\libvorbis.dll VORBIS_INCLUDE_DIR libvorbis-1.3.3\include VORBIS_LIBRARY libvorbis-1.3.3\win32\VS2010\Win32\Release\libvorbis.lib libVorbis 1.3.3 (libvorbisfile) --------------------------------- libvorbis-1.3.3\win32\VS2010\libvorbisfile\libvorbisfile_dynamic.vcxproj VORBISFILE_DLL libvorbis-1.3.3\win32\VS2010\Win32\Release\libvorbisfile.dll VORBISFILE_LIBRARY libvorbis-1.3.3\win32\VS2010\Win32\Release\libvorbisfile.lib OpenAL soft 1.15.1 -------------------- -> Run CMake to get a .sln file, the "bin" directory in my case openal-soft-1.15.1\bin\OpenAL.sln OPENAL_DLL openal-soft-1.15.1\bin\Release\OpenAL32.dll OPENAL_INCLUDE_DIR openal-soft-1.15.1\include\AL OPENAL_LIBRARY openal-soft-1.15.1\bin\Release\OpenAL32.lib Bundled Lua ------------- In case you do not want to use LuaJIT for any reason.. Replace all occurrences of "MultiThreadedDLL" with "MultiThreaded" in "cmake_build_dir\src\lua\build\lua.vcxproj" to prevent linker errors. LuaJIT-master --------------- Start the Visual Studio Command Line in your start menu to compile this one successfully. > cd LuaJIT\src > msvcbuild.bat LUA_DLL LuaJIT\src\lua51.dll LUA_INCLUDE_DIR LuaJIT\src LUA_LIBRARY LuaJIT\src\lua51.lib SQLite3 (amalgamation version) -------------------------------- Create the file "sqlite3\CMakeLists.txt": cmake_minimum_required(VERSION 2.6) if(MSVC) set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") endif() add_library(sqlite3 "sqlite3.c") target_link_libraries(sqlite3) -> Run CMake to get a .sln file - in my case into "sqlite3\bin\" SQLITE3_INCLUDE_DIR sqlite3 SQLITE3_LIBRARY sqlite3\bin\Release\sqlite3.lib zLib 1.2.8 ------------ zlib-1.2.8\contrib\vstudio\vc10\zlibvc.sln ZLIB_DLL zlib-1.2.8\contrib\vstudio\vc10\x86\ZlibDllRelease\zlibwapi.dll ZLIB_INCLUDE_DIR zlib-1.2.8 ZLIB_LIBRARY zlib-1.2.8\contrib\vstudio\vc10\x86\ZlibDllRelease\zlibwapi.lib Other libraries ----------------- getText 0.14.4 libIconv 1.9.2 Get this stuff from http://sourceforge.net/projects/gnuwin32/ ALL YOUR DOCUMENTATION ERROR REPORT ARE BELONG TO ME