GtkRadiant
GtkRadiant copied to clipboard
Doesn't Build On Compilers Which Default To C++17
C++17 added a byte
type which conflicts with GtkRadiant's.
The stdlib type isn't suitable for the way it's used here but it causes conflicts I think due to files including using std
which pulls it in. There are a few options to fix this:
- Rename the type from
byte
- Remove all relevant use of
using std
so thatstd::byte
no longer conflicts - Rewrite the relevant parts to just use
std::byte
- Compile against C++11.
I've attached a patch which does #4 as a temporary fix because creating a fork for a 1 line change is silly. It's "a .txt" because github refuses to let you attach .patch files. std.txt
Thanks for the patch. It's gotten past the byte failure. I could not run the predisastered binary as it was linked against some pangox binary library that doesn't exist on Fedora.
Now when I run it I get an error
No games setup, aborting
Will look at the code. :/
How hard would option 2 be, removing those using-directives?
Here's an alternate fix:
https://github.com/wdoekes/gtkradiant-deb/blob/main/patches/radiant-fix-std-bool-std-byte.patch
Removed the typedef qboolean bool
to get it to compile, and then the "No games setup, aborting" here as well. Would be nice with some docs on the next steps, is it some initialization that the packaged version does automatically that's needed? Alternatively a Flatpak to avoid having to build it to be compatible with recent version of whatever libs in dist.
There is an old Flatpak setup here, but abandoned since 2018, would be sweet to have it mainlined, https://github.com/magicmyth/io.github.TTimo.GtkRadiant
Oh, turns out that a symlink like installs -> ../../../install/installs
in build/release/radiant
makes it start. After configuring for Quake 1 engine it however fails on synapse after having loaded build/release/radiant/installs/Q1Pack/game/synapse.config
. This is fixed by adding a symlink for modules -> ../../../install/modules
in that same directory.
Hi @dsvensson, thank you for sharing the symlink trick! I was running into the same issue and now I realized that it is enough to simply start it via ~/GtkRadiant/install/radiant.bin
:
Did you test that before?
@wdoekes Thank you for the patch, exactly my compilation error that I had to fix aswell.