Building Tremulous/ioQuake3 QVMs on Windows 10

Building Tremulous has always been a little funny thing for me and I only just figured out why after like what, 7 years?, and it's because the makefile needs a little tweak as they were generally made by linux users for linux users with functionality to build for other OS systems. This guide is more or less specifically for Windows 10, you may need some additional DLL files if you're using Windows XP or Vista. This guide is mainly based off the ioQuake3 obselete guide and requires MinGW and MSYS2.

This guide works with the 1.1 bot source code, CoW-QVM (https://github.com/cmf028/CoW-Tremulous) and assumes you already have your source code downloaded. If not, pick a match from github or something and then start this guide.

I attempted to simplify this as much as possible and remember, this guide may only specifically apply to Windows 10.

Part 1: Build Environment

This is the most annoying part of all and may vary from computer to computer. To simplify the process I don't recommend using custom installation paths.

Step 1: Get MinGW: https://sourceforge.net/projects/mingw/files/latest/download

Install this, it is used for its GCC which is the equivalent to CC, which is what compiles your C/QuakeC/C++ code.

In the installation setup, you will want to tick mingw-base, mingw-developer-toolkit (includes msys2) or msys-base (if the option is present), mingw32-gcc-g++. You do that by right clicking on the lines you want to add and mark for installation, then go to (top left) installation->Apply Changes.

Should msys be not included for some reason in the packages, you can get it from this link: http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe

Step 2: Adding those binaries to your system path directory

For some strange reason, installing those packages doesn't add them automatically even though it should.

Press the start/home/command key (whichever keyboard you're using) and type "var" and it should autocomplete to this:

Now open that program and press "Environment Variables..." button on the bottom right of the window.

Under the bottom half, System Variables, click on the variable "Path" and click "Edit..."

Now click New, and Browse to select C:\MinGW\bin and create another new path, and select C:\MinGW\msys\1.0\bin as well, or if you don't have it and used the alternative binary from above, it will be in C:\msys\1.0\bin

It should now look like the following screenshot:

Step 3: Source Code Makefile

Okay someone obviously made a mistake somewhere along the lines but this fix is fairly simple. Surprisingly this was the only step I had to do all these 7 years and I would've been able to build on windows. I don't have a reaction video to how happy I was when I found this out, but here's the closest you'll get to it.

In your Makefile of your source code, look for a line that says ifeq ($(PLATFORM),mingw32) and copy and paste the following text below it:

CC=gcc

Step 4: Q3ASM

For some strange reason, Q3ASM isn't set up right and doesn't build nor install properly when you compile the code. I tried making it manually but it still failed for me, so for now, you guys can just get ioQuake3's version of the binary (presumably built by XPC32 as he gave me the file) here: MEGA | Dropbox | Github (repository fork, click "view raw" and save the file)

Q3ASM is used to build QVMs. I had to request it from the ioq3 devs from IRC/Discord and after that it was just the matter of where do I place the file. Place the file into \src\tools\asm and you're good to go. It might trigger your antivirus like it did to mine because it's a specific build from well, the ioq3 guys. If you're using AVG, you might not get the message because it already uploaded my version to the AVG testing labs as a "very rare file" which later AVG responded "you're good to go." In that case that it blocks it you can just whitelist it, trust me or not that's up to you.

Part 2: It's building time!

Okay hopefully that went smoothly for you thus far. Now all you have to do is open Command Prompt at your source code location. The easiest way to do it without admin privileges is to simply type CMD into the file directory and press Enter. Handy feature indeed, thanks Microsoft!

Assuming everything until now went smoothly, all you need to do is type one magic word:

make

Press enter and wait, and if it's successful, it'll create a new folder called "build" and inside that, a mingw release folder containing the /base/ directory will contain DLLs (alternative to QVMs) although for Tremulous you will generally want to use the QVMs as they are safer, which are located inside /base/vm

Have fun!