Jason Yundt 5a4a820218 vkquake: properly enable user directory support
302c3a7a168c41555dd35576a0ab5c872ba226b3 added this line to
pkgs/games/quakespasm/vulkan.nix:

>   buildFlags = [ "DO_USERDIRS=1" ];

At the time, Nixpkgs was shipping version 0.97.3 of vkQuake. That
version of vkQuake only used make as its build system. buildFlags passes
additional flags to make, so it made sense to use buildFlags at the
time.

As of this vkQuake commit [1], vkQuake now uses Meson as its main build
system and has a Meson option for enabling user directory support.
Setting buildFlags no longer seems to work. In order to enable user
directory support, it seems that we now need to use mesonFlags instead
of buildFlags.

[1]: <8875ada7df>

---

This change can be tested by doing the following:

1. Make sure that ~/.vkquake/ contains a valid id1 subdirectory.

2. Change directory into a directory that doesn’t contain an id1
subdirectory by running this command:

  cd /var/empty

3. Start vkQuake by running this command:

  nix-shell -p '(import <path to nixpkgs> { }).vkquake' --run vkquake

Before this change was made, if you followed those instructions, then
vkQuake would give you an error about not being able to load gfx.wad:

> $ nix-shell -p '(import "/home/jayman/Documents/Home/VC/Git/Partially mine/nixpkgs/repo" { }).vkquake' --run vkquake
> Command line: vkquake
> Found SDL version 2.32.56
> Detected 12 CPUs.
> Initializing vkQuake 1.32.3
> Built with GCC 14.3.0
> Host_Init
> Playing shareware version.
>
> ERROR-OUT BEGIN
>
>
> QUAKE ERROR: W_LoadWadFile: couldn't load gfx.wad
>
> Basedir is: /var/empty
>
> Check that this has an id1 subdirectory containing pak0.pak and pak1.pak, or use the -basedir command-line option to specify another directory.
>
>
> (zenity:55857): Gtk-WARNING **: 10:05:55.434: Unknown key gtk-modules in /home/jayman/.config/gtk-4.0/settings.ini
>
> (zenity:55857): Adwaita-WARNING **: 10:05:56.380: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
> $ echo "$?"
> 1

Now that this change has been made, if you follow those instructions,
then vkQuake will start successfully, and Quake’s first demo will start
to play.
2025-08-01 10:11:52 -04:00
..
2025-07-24 13:55:40 +02:00