A quick writeup on how to compile dev builds on Windows 10:
If you follow videos easier: https://youtu.be/B4QnlJozFoM
0.)
First you need these:
https://github.com/minetest/minetest
Unzip minetest-master to desktop.
https://github.com/minetest/minetest_game
Unzip this to minetest-master/games/
Games will contain a folder called devtest in case you are lost.
https://git-scm.com/downloads
Make sure you get 64 bit MSI if you're on 64 bit. You can use defaults, desktop icon easier for general use
1.)
https://cmake.org/download/
Make sure you enable system path for all users
2.)
https://visualstudio.microsoft.com
Download community edition.
Start installer.
Once installer is done you will have a window with all the components of the visualstudio databases and apis.
In Desktop & Mobile click Desktop development with C++.
In Gaming click Game Development with C++.
Next click install in the bottom right corner. This will be from 6.9-8GB so be patient with the install download.
Leave start after installation checked.
Sign in when prompted.
Visual Studio should now be opened.
3.)
https://github.com/Microsoft/vcpkg
Unzip to desktop.
Open GIT bash.
In git type these commands:
cd Desktop/vcpkg-master/
./bootstrap-vcpkg.bat
./vcpkg install irrlicht zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit --triplet x64-windows
4.)
Open cmake gui.
Where is the source code: browse source. Open the minetest-master folder.
Where to build the binaries: browse build. Open the minetest-master folder.
Click configure in the bottom left.
Click specify toolchain for cross-compiling.
Click next.
Click the ...
Open vcpkg-master/scripts/buildsystems/vcpkg.cmake
Click finish.
Everything will be red after configuring. Click configure again.
Everything will be white. Make sure REQUIRE_LUAJIT is checked.
Click configure again.
Click Generate.
Close cmake gui.
5.)
Open Visual Studio.
Open a project or solution.
Browse to Desktop/Minetest-master.
Open ALL_BUILD.vcxproj
You will now be in the Visual Studio compilation window.
Where it says Debug next to x64, change this to Release.
In the top menu go to Build -> Build ALL_BUILD.
Minetest will start compiling.
When the text on the bottom stops scrolling it should finish with:
========== Build: 6 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
6.)
Your binaries will be in Minetest-master/bin/release/
You can now drag the folder wherever you want to store it.
7.) (optional)
You can cut and paste the exe along with the dlls directly from Minetest-master/bin/release into Minetest-master/bin/ if you so choose. This makes it feel directly like a normal release build.
You can also delete all the non-folders in the root of the Minetest-master directory.
The folders you can delete in the root of the directory are:
.github
.vs
build
lib
src
x64
You can go back into Minetest-master/bin/ and rightclick the exe and send to desktop which creates a shortcut to Minetest. You can also drag it to your task bar to have even quicker access.
How to compile on Windows 10
-
- Member
- Posts: 139
- Joined: Mon Jan 28, 2019 13:12
- GitHub: oilboi
- IRC: oilboi
- In-game: oilboi
- Contact:
How to compile on Windows 10
This account is no longer active
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: How to compile on Windows 10
The problem I always run into is that vcpkg always errors in some way or another when trying to fetch or compile a package, and I've uninstalled and reinstalled it multiple times. Has anyone else run into that and know how to fix it?
-
- New member
- Posts: 4
- Joined: Fri Dec 11, 2020 08:34
- GitHub: jingkaimori
- In-game: jingkaimori
Re: How to compile on Windows 10
may the source of vcpkg ( usually github )are limited by your government. use a proxy may help
Who is online
Users browsing this forum: No registered users and 9 guests