Compiling on windows like a human #103
spoutn1k
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This project is compatible with windows, but windows is not compatible with having a good time. I spend so long fiddling with such inane bullshit that I do not wish it upon anyone else, so here are the steps I go through when building for a release.
The following is tied to your VS install and sets up the environment. We use
this on the command prompt to avoid touching VS Code and their fucky
configuration JSONs with a 10ft pole.
Run it in every command prompt you use ! Or else the configuration will fail.
Install CMake, Ninja and python3 with choco. CMake configures and Ninja
builds. Ninja is optional but is about 20x faster than whatever VS is using so
we'll use that. Python3 is here as Qt will need it to build.
Fetch the sources and uncompress them where you feel like it. You will need:
Set the
BUILDDIR
variable on the command prompt. We will install all librariesin there to make it easier to access them later. No need to choose a long term
folder as we compile statically and punt this out after compilation.
For
zlib
,fmt
andspdlog
, run in each folder:If this is your first time doing this, cmake is going to configure the project
following our instructions, like how to build (release) and where to install
(BUILDDIR), then Ninja will compile the project using the variables set at the
top and the results of the configuration, and finally install it where we asked.
You will find that it created files in BUILDDIR.
For
libpng
, we needzlib
:Configuring Qt is a pain. This is the script that worked.
-static
is hellaimportant, as it will save us a headache trying to run the binary. You will find
the
configure.bat
script at the root of the Qt source.Finally, we can configure
mcmap
using all the blocks above.Notes
You can install cmake through vscode, but good luck getting it to work :) Installing with choco is easier.
Make sure your system clock is up to date, as this can somehow trip up ninja.
Beta Was this translation helpful? Give feedback.
All reactions