[Tool] Minetest MSVC Buildbot

Post Reply
User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

[Tool] Minetest MSVC Buildbot

by addi » Post

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


Requirements:
  • Git (make sure git is added to path)
  • CMake (make sure cmake is added to path) at least version 3.9 is required!
  • Visual Studio 2017 (make sure to install the C++ workload for Desktop)

Instructions:
  1. Copy both files into a new empty folder eg. "Minetest"
  2. 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.
  3. 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.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Tool] Minetest MSVC Buildbot

by Krock » Post

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 ;)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

Re: [Tool] Minetest MSVC Buildbot

by addi » Post

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. :-)

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Tool] Minetest MSVC Buildbot

by Fixer » Post

Very nice job! Add it to your signature.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Tool] Minetest MSVC Buildbot

by maikerumine » Post

What a joy, please sticky this post pronto.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

Re: [Tool] Minetest MSVC Buildbot

by addi » Post

Fixerol wrote:Very nice job! Add it to your signature.
Thanks :-) Well, I have disabled signatures, because they only contained spam. But I added it for those that havn't disabled them yet.
maikerumine wrote:What a joy, please sticky this post pronto.
Thanks, sad, but making this post sticky is not in my might.

Update: Now with sound!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests