18 months agogamepack-manager: fetch world of padman gamepack from git 182/head
Thomas Debesse [Thu, 15 Apr 2021 12:53:55 +0000 (14:53 +0200)]
gamepack-manager: fetch world of padman gamepack from git

19 months agoimport GCC10 fix by afontain
Antoine Fontaine [Tue, 27 Apr 2021 19:14:13 +0000 (21:14 +0200)]
import GCC10 fix by afontain

See: https://gitlab.com/xonotic/netradiant/-/issues/129#note_544674397

19 months agopicomodel::ase: support standard empty bitmap name 'none' illwieckz/md2 179/head
Garux [Mon, 23 Mar 2020 16:55:03 +0000 (19:55 +0300)]
picomodel::ase: support standard empty bitmap name 'none'

19 months agoprevent string overflow in radiant md2 loader
Garux [Fri, 22 Feb 2019 20:31:56 +0000 (23:31 +0300)]
prevent string overflow in radiant md2 loader

19 months ago* picomodel: fix md2 loader
Garux [Fri, 22 Feb 2019 20:29:04 +0000 (23:29 +0300)]
* picomodel: fix md2 loader
duplicates management algorithm isn't as quick, as in old code, but quick nuff + working

19 months agofix some strncpy use
Garux [Sat, 29 Sep 2018 18:34:03 +0000 (21:34 +0300)]
fix some strncpy use

Note by illwieckz: partial cherry-pick, vfsListShaderFiles is missing upstream

19 months ago* picomodel: do some guessings about shader paths to handle more cases out of the...
Garux [Sat, 29 Sep 2018 11:39:10 +0000 (14:39 +0300)]
* picomodel: do some guessings about shader paths to handle more cases out of the box; ones are based on material and diffuse map names:
name w/o path: assume textures are in the folder, where model file is
absolute path or with ..: try to cut at "/models/" or "/textures/" (as if leading to game folders); do previous case, if not
strip extensions and turn slashes to forward ones anytime
* picomodel::obj: fix diffuse map paths loading from .mtl

19 months agopicomodel: white default color of fm, md2 (was one white and rest black)
Garux [Sat, 9 Jun 2018 22:27:49 +0000 (01:27 +0300)]
picomodel: white default color of fm, md2 (was one white and rest black)
unified picoColor_white

19 months agoq3map2: do not leak user temporary paths
Thomas Debesse [Tue, 27 Apr 2021 01:30:54 +0000 (03:30 +0200)]
q3map2: do not leak user temporary paths

do not write in "_q3map2_cmdline" worldspawn entity key user paths like:


19 months agoMerge branch 'gcc10' into 'master'
Thomas Debesse [Sat, 24 Apr 2021 01:10:57 +0000 (01:10 +0000)]
Merge branch 'gcc10' into 'master'


See merge request xonotic/netradiant!181

19 months agoradiant: also filter subtelhint with “Filter hints” menu, <3 @Viech
Thomas Debesse [Sat, 24 Apr 2021 01:04:39 +0000 (03:04 +0200)]
radiant: also filter subtelhint with “Filter hints” menu, <3 @Viech

19 months agovfs/dpk: properly find the dpkdir, even for maps not in maps/, typically mapmodel...
Thomas Debesse [Sat, 24 Apr 2021 00:33:31 +0000 (02:33 +0200)]
vfs/dpk: properly find the dpkdir, even for maps not in maps/, typically mapmodel sources

19 months agoq3map2/image: also look for images path without extension but with dot in their name
Thomas Debesse [Wed, 7 Apr 2021 04:44:00 +0000 (06:44 +0200)]
q3map2/image: also look for images path without extension but with dot in their name

make sure that if a shader contains path to textures/directory/some.thing
q3map2 also look for textures/directory/some.thing.tga
instead of only looking for textures/directory/some.tga

19 months agoFix possible security vulnerability and fatal error 181/head
Antoine Fontaine [Wed, 14 Apr 2021 21:44:28 +0000 (23:44 +0200)]
Fix possible security vulnerability and fatal error

19 months agoFix cast warning
Antoine Fontaine [Tue, 30 Mar 2021 18:26:34 +0000 (20:26 +0200)]
Fix cast warning

19 months agofix include
Antoine Fontaine [Wed, 31 Mar 2021 19:19:14 +0000 (21:19 +0200)]
fix include

20 months agomacos: add --debug option to NetRadiant build to run with lldb
Thomas Debesse [Thu, 25 Mar 2021 22:42:04 +0000 (23:42 +0100)]
macos: add --debug option to NetRadiant build to run with lldb

20 months agocmake: PIE linux debug build
Thomas Debesse [Sun, 28 Mar 2021 00:30:16 +0000 (01:30 +0100)]
cmake: PIE linux debug build

20 months agocmake: reuse already defined variables
Thomas Debesse [Sun, 28 Mar 2021 15:53:16 +0000 (17:53 +0200)]
cmake: reuse already defined variables

20 months agoradiant/console: rename Sys_LogFile to Sys_EnableLogFile 177/head
Antoine Fontaine [Mon, 22 Mar 2021 01:30:26 +0000 (02:30 +0100)]
radiant/console: rename Sys_LogFile to Sys_EnableLogFile

20 months agoradiant/console: make logging thread-safe
Antoine Fontaine [Mon, 22 Mar 2021 01:10:47 +0000 (02:10 +0100)]
radiant/console: make logging thread-safe

20 months agolibs/gtkutil/glwidget: rework a bit shared context GL callbacks
Antoine Fontaine [Sun, 21 Mar 2021 22:13:49 +0000 (23:13 +0100)]
libs/gtkutil/glwidget: rework a bit shared context GL callbacks

This turns 2 global variables into local ones

20 months agogtkgl module: drop
Antoine Fontaine [Sun, 21 Mar 2021 20:45:53 +0000 (21:45 +0100)]
gtkgl module: drop

For some reason we have a gtkGL module from the beginning of the time,
but it's not doing anything, and it's not used anywhere. This removes it.

20 months agoradiant/camwindow, radiant/xywindow: Fix use of uninitialized values 176/head
Antoine Fontaine [Tue, 23 Mar 2021 01:54:50 +0000 (02:54 +0100)]
radiant/camwindow, radiant/xywindow: Fix use of uninitialized values

20 months agogtkutil/filechooser: replace Array<char> by std::string
Antoine Fontaine [Tue, 23 Mar 2021 02:38:44 +0000 (03:38 +0100)]
gtkutil/filechooser: replace Array<char> by std::string

20 months agoradiant/preferences: fix memory issue when saving pref
Antoine Fontaine [Tue, 23 Mar 2021 02:35:37 +0000 (03:35 +0100)]
radiant/preferences: fix memory issue when saving pref


==80929== Invalid read of size 2
==80929==    at 0x4842B30: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==80929==    by 0x43618E: char* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<char>(char const*, char const*, char*) (stl_algobase.h:386)
==80929==    by 0x435ABC: char* std::__copy_move_a<false, char const*, char*>(char const*, char const*, char*) (stl_algobase.h:404)
==80929==    by 0x436131: char* std::__copy_move_a2<false, char const*, char*>(char const*, char const*, char*) (stl_algobase.h:440)
==80929==    by 0x4359BF: char* std::copy<char const*, char*>(char const*, char const*, char*) (stl_algobase.h:474)
==80929==    by 0x59F28C: Array<char, DefaultAllocator<char> >::Array<char const*>(char const*, char const*) (array.h:86)
==80929==    by 0x59A2A0: Preferences_Save_Safe(PreferenceDictionary&, char const*) (preferences.cpp:207)
==80929==    by 0x59C7A2: Preferences_Save() (preferences.cpp:919)
==80929==    by 0x524500: Radiant_Shutdown() (mainframe.cpp:798)
==80929==    by 0x5223FB: main (main.cpp:654)
==80929==  Address 0xba88510 is 0 bytes after a block of size 64 alloc'd
==80929==    at 0x483B723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==80929==    by 0x483E017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==80929==    by 0x5272F3F: g_realloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.6)
==80929==    by 0x5290003: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.6)
==80929==    by 0x5290066: g_string_sized_new (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.6)
==80929==    by 0x52905BA: g_string_new (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.6)
==80929==    by 0x59B65A: PrefsDlg::Init() (preferences.cpp:551)
==80929==    by 0x5222A1: main (main.cpp:595)

20 months agoradiant/preferences: Remove unused variable
Antoine Fontaine [Sun, 21 Mar 2021 12:20:35 +0000 (13:20 +0100)]
radiant/preferences: Remove unused variable

20 months agovarious: add explicit default contructors
Antoine Fontaine [Sun, 21 Mar 2021 02:51:21 +0000 (03:51 +0100)]
various: add explicit default contructors

20 months agovarious: reindent classes
Antoine Fontaine [Sun, 21 Mar 2021 02:51:11 +0000 (03:51 +0100)]
various: reindent classes

20 months agoRevert "gtk3: call ui::process() after gtk_gl_area_queue_render()"
Thomas Debesse [Sun, 21 Mar 2021 20:03:42 +0000 (21:03 +0100)]
Revert "gtk3: call ui::process() after gtk_gl_area_queue_render()"

This reverts commit 95333c891fb8e1ce33241c51ed762a4a9e1f5893.

The default value for gtk_gl_area_set_auto_render is true…
So removing the call setting it to true has no effect.

The ui::process() call was reported to improve performance
when using a multi-window layout and GL texture binds fail
because of no sharing mechanism accross GL contexts. So it's
just dark magic and we may better fix that sharing thing first.

20 months agogtk3: call ui::process() after gtk_gl_area_queue_render()
Thomas Debesse [Sun, 21 Mar 2021 19:05:27 +0000 (20:05 +0100)]
gtk3: call ui::process() after gtk_gl_area_queue_render()

20 months agomacos: process the texture browser redraw as soon as possible when workarounding...
Thomas Debesse [Sun, 21 Mar 2021 18:28:31 +0000 (19:28 +0100)]
macos: process the texture browser redraw as soon as possible when workarounding the not-working hide

20 months agoradiant/texwindow: make glarea redraw code reusable
Thomas Debesse [Sun, 21 Mar 2021 18:15:14 +0000 (19:15 +0100)]
radiant/texwindow: make glarea redraw code reusable

20 months agoradiant/xywindow: make glarea redraw code reusable, force redraw on background selection
Thomas Debesse [Sat, 20 Mar 2021 22:21:03 +0000 (23:21 +0100)]
radiant/xywindow: make glarea redraw code reusable, force redraw on background selection

20 months agocmake/gtkglext: do not override CC
Thomas Debesse [Sat, 20 Mar 2021 14:19:50 +0000 (15:19 +0100)]
cmake/gtkglext: do not override CC

This bring many issues we don't have man power for at this time.

20 months agoeasy-builder: properly discover builtins before building netradiant
Thomas Debesse [Tue, 16 Mar 2021 11:57:33 +0000 (12:57 +0100)]
easy-builder: properly discover builtins before building netradiant

20 months agoEnable auto-redraw of the GLArea on GTK3 175/head
Antoine Fontaine [Sun, 21 Mar 2021 01:01:54 +0000 (02:01 +0100)]
Enable auto-redraw of the GLArea on GTK3

Unfortunately, gtk_gl_area_queue_render doesn't seem to do anything, so
this is needed for now.

20 months agoForce legacy GDK backend for GTK3
Antoine Fontaine [Sun, 21 Mar 2021 00:58:56 +0000 (01:58 +0100)]
Force legacy GDK backend for GTK3

20 months agoFix GTK_CRITICAL errors
Antoine Fontaine [Sun, 21 Mar 2021 00:03:58 +0000 (01:03 +0100)]

20 months agogtkutil/glwidget.cpp: use static
Antoine Fontaine [Sat, 20 Mar 2021 23:40:41 +0000 (00:40 +0100)]
gtkutil/glwidget.cpp: use static

20 months agoradiant/texwindow: Remove g_TextureBrowser
Antoine Fontaine [Wed, 17 Mar 2021 08:26:56 +0000 (09:26 +0100)]
radiant/texwindow: Remove g_TextureBrowser

This global variable initialised some gtk widgets. This static
initialisation happened before main(), and thus before gtk_init().

This caused a segfault in GTK3.

20 months agoAdd missing IMPL() call
Antoine Fontaine [Wed, 17 Mar 2021 08:18:21 +0000 (09:18 +0100)]
Add missing IMPL() call

20 months agoreadme: update macos dependencies
Thomas Debesse [Thu, 11 Mar 2021 08:25:39 +0000 (09:25 +0100)]
readme: update macos dependencies

20 months agogtkutil: fix gtk3 compilation (produced build still doesn't work anyway)
Thomas Debesse [Thu, 11 Mar 2021 08:23:00 +0000 (09:23 +0100)]
gtkutil: fix gtk3 compilation (produced build still doesn't work anyway)

20 months agolibs: remove deprecated non-replaced “register“ storage class
Thomas Debesse [Thu, 11 Mar 2021 05:02:12 +0000 (06:02 +0100)]
libs: remove deprecated non-replaced “register“ storage class

Silent this warning:

- 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]

This keyword was deprecated in C++11, it is now reserved for future use, and there is no replacement for it.

See also https://stackoverflow.com/a/30809775/9131399

20 months agocmake: OBJC is not passed to gtkglext build tools
Thomas Debesse [Thu, 11 Mar 2021 06:08:25 +0000 (07:08 +0100)]
cmake: OBJC is not passed to gtkglext build tools

20 months agocmake: pass C compiler option to gtkglext build tools
Thomas Debesse [Thu, 11 Mar 2021 06:06:52 +0000 (07:06 +0100)]
cmake: pass C compiler option to gtkglext build tools

20 months agoplugins/shader: remove unused Texture_ForName function declaration
Thomas Debesse [Wed, 10 Mar 2021 17:30:30 +0000 (18:30 +0100)]
plugins/shader: remove unused Texture_ForName function declaration

It looks to be a leftover from QE4.

20 months agoradiant/texwindow: fix a minor typo
Thomas Debesse [Wed, 10 Mar 2021 12:03:06 +0000 (13:03 +0100)]
radiant/texwindow: fix a minor typo

20 months agomacos: workaround the laggy XY/Camera window mouse pointer recentering
Thomas Debesse [Wed, 10 Mar 2021 06:25:34 +0000 (07:25 +0100)]
macos: workaround the laggy XY/Camera window mouse pointer recentering

On macOS, a huge lag occurs when the pointer is recentered.
This happens when calling GTK functions to set the pointer
at the center of the widget so it looks to be a lag in GTK
or in underlayer macOS technology GTK relies on.

When that mouse pointer recenter is disabled, one can drag
infinitely without lag BUT then comes weird bugs because
the “released right mouse button” event is only read when
the mouse is over the widget, so if one releases over
another widget, the mouse pointer is not released
and if one do another right mouse click on another XY widget,
the internal state becomes corrupted and a crash is
expected to happen soon.

So the idea of that workaround is to only reposition
the pointer when an edge of the XY/Camera window is reached,
so the user does not experience lag for the whole size
of the XY window, experiencing the lag only when a
whole dimension is moved. To optimize the distance
the user can move without lag, when an edge is reached
the pointer is repositioned on the opposite edge.

It was noticed the pointer is not hidden on macOS when
moving the map, so the pointer being visible during
all the move operation is not restored to the initial
position when it is released, but keep the position
currently seen by the user at right mouse button release

Note: It was noticed it is possible to esscape the capturing
widnow when the render is slow and framerate is low, it
may also occurs with touch screens (like virtual machines has)
to move the pointer out of the XY/Camera widget and get the
internal state corruption problem.

20 months agoradiant/cursor: get the display from the widget, attempt to support multiple displays...
Thomas Debesse [Wed, 10 Mar 2021 07:08:09 +0000 (08:08 +0100)]
radiant/cursor: get the display from the widget, attempt to support multiple displays and screens

20 months agoradiant/cursor: get/set cursor position from widget instead of window
Thomas Debesse [Wed, 10 Mar 2021 05:03:11 +0000 (06:03 +0100)]
radiant/cursor: get/set cursor position from widget instead of window

20 months agoradiant/cursor: factorise a bit the code
Thomas Debesse [Wed, 10 Mar 2021 05:03:11 +0000 (06:03 +0100)]
radiant/cursor: factorise a bit the code

20 months agorevert 0574802, the glwidget has to not be hidden for the macos hack to work
Thomas Debesse [Wed, 10 Mar 2021 04:07:48 +0000 (05:07 +0100)]
revert 0574802, the glwidget has to not be hidden for the macos hack to work

revert 057480298a2d8b73f1a49c6e8d8d162b09c276d4
and add a comment to make it obvious to future readers

20 months agocmake/gtkglext: rewrite the way it is built
Thomas Debesse [Tue, 9 Mar 2021 13:21:40 +0000 (14:21 +0100)]
cmake/gtkglext: rewrite the way it is built

20 months agomacos: add ssasc to deps, it's required to build the GTK theme
Thomas Debesse [Tue, 9 Mar 2021 04:53:06 +0000 (05:53 +0100)]
macos: add ssasc to deps, it's required to build the GTK theme

20 months agolinux: more knowledge about stripping and non-PIE binaries
Thomas Debesse [Mon, 8 Mar 2021 16:05:28 +0000 (17:05 +0100)]
linux: more knowledge about stripping and non-PIE binaries

20 months agodaemonmap: sync submodule reference
Thomas Debesse [Mon, 8 Mar 2021 14:44:42 +0000 (15:44 +0100)]
daemonmap: sync submodule reference

20 months agolinux: do not strip binaries (does not work well with the non-PIE hack)
Thomas Debesse [Mon, 8 Mar 2021 13:25:43 +0000 (14:25 +0100)]
linux: do not strip binaries (does not work well with the non-PIE hack)

20 months agoradiant: build PIE linux binary on FHS installation
Thomas Debesse [Mon, 8 Mar 2021 13:10:22 +0000 (14:10 +0100)]
radiant: build PIE linux binary on FHS installation

20 months agoeasy-builder: always sync before doing serious things to prevent issues happening...
Thomas Debesse [Mon, 8 Mar 2021 08:31:53 +0000 (09:31 +0100)]
easy-builder: always sync before doing serious things to prevent issues happening with slow I/O on macOS

errors like that:

> CMakeFiles/gtktheme-mojave.dir/build.make:73: CMakeFiles/gtkglext.dir/build.make:73: CMakeFiles/gtktheme-mojave.dir/progress.make: No such file or directory

> ginstall: cannot change permissions of 'netradiant/build/lib/gtkglext-1.0/include/gdkglext-config.h': No such file or directory

> mkdir: netradiant/build/registry: Operation not permitted

> clang: error: no such file or directory: '../../libs/libcm.a'

20 months agoeasy-builder: the immediate build retry does not fix the random linking issue on...
Thomas Debesse [Mon, 8 Mar 2021 08:52:05 +0000 (09:52 +0100)]
easy-builder: the immediate build retry does not fix the random linking issue on macOS that usually desappear on rebuilding

Unfortunately retrying immediately does not help, while doing it by hand some time later does, I have no proper explanation yet:

[100%] Linking CXX executable ../netradiant
Undefined symbols for architecture x86_64:
  "_gdk_gl_config_new", referenced from:
      glconfig_new() in libgtkutil.a(glwidget.cpp.o)
      glconfig_new_with_depth() in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_config_new_by_mode", referenced from:
      glconfig_new() in libgtkutil.a(glwidget.cpp.o)
      glconfig_new_with_depth() in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_drawable_get_type", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_swap_buffers(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_drawable_gl_begin", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_drawable_swap_buffers", referenced from:
      glwidget_swap_buffers(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_get_gl_context", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_enable_gl(ui::GLArea, ui::Widget, void*) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_get_gl_window", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_swap_buffers(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_is_gl_capable", referenced from:
      glwidget_enable_gl(ui::GLArea, ui::Widget, void*) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_set_gl_capability", referenced from:
      glwidget_enable_gl(ui::GLArea, ui::Widget, void*) in libgtkutil.a(glwidget.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [netradiant] Error 1
make[1]: *** [radiant/CMakeFiles/netradiant.dir/all] Error 2
make: *** [all] Error 2
+ task_build
+ make -j8
[  0%] Built target cm
[  0%] Built target filematch
[  1%] Built target archivepak
[  3%] Built target mathlib
[  3%] Built target fastlz
[  3%] Built target l_net
[  6%] Built target recast
[  8%] Built target detour
[  9%] Built target ddslib
[  9%] Built target archivewad
[  9%] Built target archivezip
[ 10%] Built target etclib
[ 10%] Built target imagehl
[ 10%] Built target imagepng
[ 11%] Built target imageq2
[ 12%] Built target imagewebp
[ 12%] Built target xmllib
[ 14%] Built target entity
[ 15%] Built target mapq3
[ 15%] Built target iqmmodel
[ 18%] Built target md3model
[ 18%] Built target shaders
[ 19%] Built target container
[ 19%] Built target cmdlib
[ 20%] Built target debugging
[ 24%] Built target generic
[ 25%] Built target picomodel
[ 25%] Built target uilib
[ 25%] Built target math
[ 25%] Built target memory
[ 25%] Built target os
[ 25%] Built target modulesystem
[ 26%] Built target profile
[ 26%] Built target script
[ 26%] Built target signal
[ 26%] Built target stream
[ 27%] Built target string
[ 29%] Built target includes
[ 30%] Built target splines
[ 30%] Built target libs
[ 37%] Built target qdata3
[ 39%] Built target image
[ 40%] Built target crnrgba
[ 41%] Built target vfspk3
[ 50%] Built target q3data
[ 54%] Built target q2map
[ 55%] Built target daemonmap
[ 56%] Built target h2data
[ 58%] Built target model
[ 58%] Built target mapxml
[ 59%] Built target imagecrn
[ 59%] Built target modules
[ 72%] Built target gtkutil
[ 75%] Built target q3map2
[ 75%] Built target shaderplug
[ 75%] Built target sunplug
[ 76%] Built target prtview
[ 77%] Built target ufoaiplug
[ 78%] Built target brushexport
[ 83%] Built target bobtoolz
[ 84%] Linking CXX executable ../netradiant
Undefined symbols for architecture x86_64:
  "_gdk_gl_config_new", referenced from:
      glconfig_new() in libgtkutil.a(glwidget.cpp.o)
      glconfig_new_with_depth() in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_config_new_by_mode", referenced from:
      glconfig_new() in libgtkutil.a(glwidget.cpp.o)
      glconfig_new_with_depth() in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_drawable_get_type", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_swap_buffers(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_drawable_gl_begin", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
  "_gdk_gl_drawable_swap_buffers", referenced from:
      glwidget_swap_buffers(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_get_gl_context", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_enable_gl(ui::GLArea, ui::Widget, void*) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_get_gl_window", referenced from:
      _glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_make_current(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
      glwidget_context_created(ui::GLArea, void*) in libgtkutil.a(glwidget.cpp.o)
      glwidget_swap_buffers(ui::GLArea) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_is_gl_capable", referenced from:
      glwidget_enable_gl(ui::GLArea, ui::Widget, void*) in libgtkutil.a(glwidget.cpp.o)
  "_gtk_widget_set_gl_capability", referenced from:
      glwidget_enable_gl(ui::GLArea, ui::Widget, void*) in libgtkutil.a(glwidget.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [netradiant] Error 1
make[1]: *** [radiant/CMakeFiles/netradiant.dir/all] Error 2
make: *** [all] Error 2

20 months agoeasy-builder: use make directly because cmake on macOS does not return error code...
Thomas Debesse [Mon, 8 Mar 2021 08:30:41 +0000 (09:30 +0100)]
easy-builder: use make directly because cmake on macOS does not return error code on build failure

20 months agosubmodules: sync daemonmap reference
Thomas Debesse [Sun, 7 Mar 2021 09:35:42 +0000 (10:35 +0100)]
submodules: sync daemonmap reference

20 months agoeasy-builder: don't forget submodules
Thomas Debesse [Sun, 7 Mar 2021 09:33:10 +0000 (10:33 +0100)]
easy-builder: don't forget submodules

20 months agomacos: properly set GL_SILENCE_DEPRECATION when building gtkglext
Thomas Debesse [Sun, 7 Mar 2021 09:09:29 +0000 (10:09 +0100)]
macos: properly set GL_SILENCE_DEPRECATION when building gtkglext

20 months agoradiant: build netradiant as non-PIE binary on Linux to workaround a mime-type bug
Thomas Debesse [Sun, 7 Mar 2021 05:33:31 +0000 (06:33 +0100)]
radiant: build netradiant as non-PIE binary on Linux to workaround a mime-type bug

PIE executables were wrongly recognized as shared libraries on Linux
because of a mistake in the mime-type library.
Because of that it was not possible to launch such executables from
the file browser.

While the problem is fixed upstream, most distributions still ship
with a faulty mime-type library and may do for a long time.

See: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/11

20 months agolibrary-bundler: only call rmdir on empty directories when cleaning-up useless stuff
Thomas Debesse [Sun, 7 Mar 2021 05:15:23 +0000 (06:15 +0100)]
library-bundler: only call rmdir on empty directories when cleaning-up useless stuff

20 months agomacos: set GL_SILENCE_DEPRECATION when building radiant
Thomas Debesse [Sun, 7 Mar 2021 05:14:50 +0000 (06:14 +0100)]
macos: set GL_SILENCE_DEPRECATION when building radiant

20 months agomacos: just restart the build when it failed
Thomas Debesse [Sun, 7 Mar 2021 03:35:37 +0000 (04:35 +0100)]
macos: just restart the build when it failed

Sometime linking fails on macOS with this message:

ld: symbol(s) not found for architecture x86_64

and restarting the build process just work.

20 months agoreadme: wording
Thomas Debesse [Sun, 7 Mar 2021 00:16:13 +0000 (01:16 +0100)]
readme: wording

20 months agoreadme: add instructions for freebsd and more knowledge about it
Thomas Debesse [Sun, 7 Mar 2021 00:11:30 +0000 (01:11 +0100)]
readme: add instructions for freebsd and more knowledge about it

20 months agofreebsd: exclude more libraries when bundling
Thomas Debesse [Sat, 6 Mar 2021 23:24:50 +0000 (00:24 +0100)]
freebsd: exclude more libraries when bundling

20 months agofreebsd: enable bundling
Thomas Debesse [Sat, 6 Mar 2021 23:07:02 +0000 (00:07 +0100)]
freebsd: enable bundling

Also always prevent cmake to patch rpath when bundling,
this is done by library-bundler instead.

20 months agofreebsd: do not strip binaries when installing, that breaks them (truncated ELF file)
Thomas Debesse [Sat, 6 Mar 2021 23:03:22 +0000 (00:03 +0100)]
freebsd: do not strip binaries when installing, that breaks them (truncated ELF file)

Note: I have not tried to strip binaries that had not rpath being patched,
but for sure stripping breaks binaries produced with the current toolchain.

$ ldd netradiant
elf_load_section: truncated ELF file
nr: signal 6

elf_load_section: truncated ELF file
Abort trap

20 months agofreebsd: add freebsd support to library-bundler
Thomas Debesse [Sat, 6 Mar 2021 22:55:05 +0000 (23:55 +0100)]
freebsd: add freebsd support to library-bundler

- use gsed/gcp (from coreutils) like macos
- use ldd/patchelf like linux
- use linux library filtering like linux for now (may be improved)

20 months agoradiant/about: set focus on OK button
Thomas Debesse [Sat, 6 Mar 2021 07:55:41 +0000 (08:55 +0100)]
radiant/about: set focus on OK button

20 months agobuild/about: reword a bit the about message
Thomas Debesse [Sat, 6 Mar 2021 07:42:07 +0000 (08:42 +0100)]
build/about: reword a bit the about message

also add more links, including one to Xonotic

20 months agoradiant/about: do not use full height empty lines between paragraphs
Thomas Debesse [Sat, 6 Mar 2021 07:37:12 +0000 (08:37 +0100)]
radiant/about: do not use full height empty lines between paragraphs

20 months agomacos: also call to hide the gl widget (even if that does not work, at least we ask to)
Thomas Debesse [Sat, 6 Mar 2021 06:38:02 +0000 (07:38 +0100)]
macos: also call to hide the gl widget (even if that does not work, at least we ask to)

20 months agoradiant/texwindow: fix crash when assigning a tag, fix #146 174/head
Thomas Debesse [Fri, 5 Mar 2021 05:16:15 +0000 (06:16 +0100)]
radiant/texwindow: fix crash when assigning a tag, fix #146

Fix crash when assigning a tag, fix #146

Seems to be a bug introduced by @TimePath
in 0203ac024e9396ebc180d9721da40b90b7c33dc6 (Wrap more GTK)

It was probably a typo, this is the change for which a revert fixes the bug:

-gboolean TextureBrowser_tagMoveHelper( ui::TreeModel model, ui::TreePath path, GtkTreeIter* iter, GSList** selected ){
+gboolean TextureBrowser_tagMoveHelper( ui::TreeModel model, ui::TreePath path, GtkTreeIter iter, GSList** selected ){

The commit just re-add the pointer mark.

20 months agoq3map2: implement symlink resolution 173/head
Thomas Debesse [Thu, 25 Feb 2021 01:12:23 +0000 (02:12 +0100)]
q3map2: implement symlink resolution

Ported from Dæmon engine implementation by slipher
which was a complete rewrite of one I did on Dæmon
by taking inspiration from Darkplaces engine.

- https://github.com/DaemonEngine/Daemon/blob/master/src/common/FileSystem.cpp
- https://gitlab.com/xonotic/darkplaces/-/blob/div0-stable/fs.c

20 months agonetradiant: implement symlink resolution
Thomas Debesse [Wed, 24 Feb 2021 21:57:06 +0000 (22:57 +0100)]
netradiant: implement symlink resolution

Ported from Dæmon engine implementation by slipher
which was a complete rewrite of one I did on Dæmon
by taking inspiration from Darkplaces engine.

- https://github.com/DaemonEngine/Daemon/blob/master/src/common/FileSystem.cpp
- https://gitlab.com/xonotic/darkplaces/-/blob/div0-stable/fs.c

20 months agoq3map2: better use strncpy instead of strcpy
Thomas Debesse [Thu, 25 Feb 2021 14:30:55 +0000 (15:30 +0100)]
q3map2: better use strncpy instead of strcpy

20 months agoq3map2: fix a leak (an allocated string not being freed before returning)
Thomas Debesse [Thu, 25 Feb 2021 01:28:16 +0000 (02:28 +0100)]
q3map2: fix a leak (an allocated string not being freed before returning)

20 months agonetradiant: some bikeshedding (whitespace, wording)
Thomas Debesse [Wed, 24 Feb 2021 21:57:22 +0000 (22:57 +0100)]
netradiant: some bikeshedding (whitespace, wording)

20 months agoq3map2: dds/ prefix, print log at the right time, when image is found
Thomas Debesse [Thu, 25 Feb 2021 01:15:36 +0000 (02:15 +0100)]
q3map2: dds/ prefix, print log at the right time, when image is found

20 months agonetradiant: dds/ prefix, use makeQuoted() in log printing
Thomas Debesse [Thu, 25 Feb 2021 13:58:22 +0000 (14:58 +0100)]
netradiant: dds/ prefix, use makeQuoted() in log printing

20 months agopreferences: onlrework the path page
Thomas Debesse [Fri, 5 Mar 2021 02:13:21 +0000 (03:13 +0100)]
preferences: onlrework the path page

- only ask for the basic options (engine path) on first startup
- mark other options as advanced and add some notes to discourage
  people not knowing what pakpath is to use it by mistake.
- just name Pak Path as Pak Path, no need to display the number,
  also makes code simpler.

20 months agoradiant/build menu: reword Commandline as Command line
Thomas Debesse [Tue, 2 Mar 2021 19:45:17 +0000 (20:45 +0100)]
radiant/build menu: reword Commandline as Command line

21 months agoq3map2: accept -bsp stage option name without complaining
Thomas Debesse [Fri, 26 Feb 2021 23:11:42 +0000 (00:11 +0100)]
q3map2: accept -bsp stage option name without complaining

- using it is far more consistent with other stages,
- makes reading options less prone to errors:
  reading “q3map3 -meta” may induce to human
  reader that meta is a stage while in fact
  it's “q3map2 -bsp -meta” and meta is an
  option for the bsp stage,
- it is not bad to use the explicit -bsp stage option,
- there is no reason to recommend to not use it.

21 months agomacos: delete now useless gitignore file in setup/
Thomas Debesse [Fri, 26 Feb 2021 22:16:25 +0000 (23:16 +0100)]
macos: delete now useless gitignore file in setup/

21 months agomacos: set NSHighResolutionCapable to true
Thomas Debesse [Fri, 26 Feb 2021 22:15:34 +0000 (23:15 +0100)]
macos: set NSHighResolutionCapable to true

21 months agodaemonmap: sync submodule
Thomas Debesse [Mon, 22 Feb 2021 21:09:17 +0000 (22:09 +0100)]
daemonmap: sync submodule

21 months agocmake: fix whitespace
Thomas Debesse [Mon, 22 Feb 2021 19:02:00 +0000 (20:02 +0100)]
cmake: fix whitespace

21 months agomacos: ignore warnings about OpenGL being deprecated
Thomas Debesse [Mon, 22 Feb 2021 18:49:53 +0000 (19:49 +0100)]
macos: ignore warnings about OpenGL being deprecated

hide those warnings on maCOS:

warning: 'glBegin' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings)

21 months agomacos: rework the plist and rename apple to macos in repository
Thomas Debesse [Mon, 22 Feb 2021 18:17:00 +0000 (19:17 +0100)]
macos: rework the plist and rename apple to macos in repository

21 months agolibrary-bundler: don't use -a, it may fail on network shares
Thomas Debesse [Mon, 22 Feb 2021 18:22:18 +0000 (19:22 +0100)]
library-bundler: don't use -a, it may fail on network shares

also there is no need to preserve owner

21 months agoquake3: delete dead strupr
Thomas Debesse [Sat, 20 Feb 2021 20:38:50 +0000 (21:38 +0100)]
quake3: delete dead strupr

21 months agoquake2,heretic2: attempt to fix undeclared strupr, <3 Kai
Thomas Debesse [Sat, 20 Feb 2021 20:09:08 +0000 (21:09 +0100)]
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
                                strupr( buffer );