To support current developers and future developers in making Windows builds using MSVC, I wrote this scripts.
The most annoying part of compiling Minetest on MSVC are the loads of dependencies. Each have a different build system, different paths, outdated project files,....
The init.bat is using git to automatically clone them into the correct folder and to update the project files.
The make script then compiles the dependencies and calls cmake with the correct arguments to generate a valid Minetest Project file and a working minetest.exe Git Repo of bat scrips: https://bitbucket.org/adrido/minetest-msvc-buildbot/src
Copy both files into a new empty folder eg. "Minetest"
Open "x86 Native Tools Command Prompt for VS 2017" or the x64 variant of it, navigate to the folder where the files are, and execute the init.bat script.
In the prompt execute the make script like "make.bat x86" if you have opened the x64 command prompt, run "make.bat x64"
Notes:
This should also work with VS 2015 and VS 2013, but is not tested
Last edited by addi on Sun Oct 01, 2017 07:50, edited 3 times in total.
I used to download and update the libraries manually. At least there's CMake-GUI that helps a lot to complete the settings correctly.
It's nice to see that you're caring about the Windows users out there. I hope my MSVC setup/explanation setup file can help you a bit with finding the correct paths ;)
Your list was very helpful, of course. Thanks a lot for your work!
It took a long time and a lots of trials and errors, but - I'm a bit proud of myself - the script is now able to build x86 and x64 without any linker warning and without modifying the 3rd party lib's build system in some obscure way. Yay!
The new version does now compile curl and enables it. Sound is still on my to-do.
I hope this script helps someone to improve Minetests Windows integration and to increase the amount of Minetest developers, that are using Windows. :-)