quake2,heretic2: attempt to fix undeclared strupr, <3 Kai Attempt to fix this: netradiant/tools/heretic2/h2data/tmix.c:292:5: error: implicit declaration of function 'strupr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] strupr( buffer ); ^
tools/heretic2: move heretic2 stuff to its own directory
cmake: do not use WIN32 for console tools allow them to output stdout on console and spawn a console if required it's not very intuitive and explicit but the WIN32 cmake keyword in add_executable call is to not target the console subsystem but only the graphical one so console tools just have to not use that keyword, even if they imay display a window like when doing q2map -glview then the WIN32 keyword is a kind of “no console” keyword
cmake: make tools target the console subsystem on Windows previously on Windows the stdout stuff was only printed on MinTTY console or SSH shell, this change makes the tools to target the console subsystem so they also print stdout on cmd console. this also makes the tool spawning a cmd console windows when not started from a console, allowing people to monitor what is printed. this is done by adding a console_app() cmake macro that enables the -mconsole linker flag. For exhaustivity an extraneous window_app() macro is done too that enables the -mwindows flag. The -mwindows looks to be implicit, but making this macro explicit and using it keeps the CMakeLists.txt file self documenting which exe has to be compiled with -mconsole, which one has to be compiled with -mwindows, and which one has to be compiled with both. this is a way to check if an exe targets only the windows subsystem: $ objdump -p netradiant.exe | egrep '^Subsystem' Subsystem 00000002 (Windows GUI) this is a way to check if an exe targets the console subsystem: $ objdump -p q3map2.exe | egrep '^Subsystem' Subsystem 00000003 (Windows CUI) note that this one targets both console and windows subsystem, only console is reported: $ objdump -p q2map.exe | egrep '^Subsystem' Subsystem 00000003 (Windows CUI)
cmake: build quake2 and heretic2 tools to be on par with legacy Makefile
rework GDEF_OS macros
threading: [partial] Working NetRadiant and q3map2 on MSYS2 (both x86, x86_64) this code is meant to fix q3map2 threading on MSYS2 partial commit from original by Aleksandr “void995” Palamar: - c1c3c66ec062438e1a99266751122557517d708d initially named: > Working NetRadiant and q3map2 on MSYS2 (both x86, x86_64), > fixed problems with out of bounds and got rid of unneeded > warning messages. Optimisations for MSYS2 were disabled as > they are causing crashes. Added specific MSYS2 shell scripts > for installing DLLs and GTK themes. see merge request !18 https://gitlab.com/xonotic/netradiant/merge_requests/18
tools: reduce diff noise