Thomas Debesse [Mon, 5 Aug 2019 18:07:29 +0000 (20:07 +0200)]
bundle: do not bundle libstdc++, pango, and some remaining X11 stuff on Linux
- it's a bad idea to bundle libstdc++ as it may conflict in non-obvious manner
(like failing on X11 stuff)
- pango is known to conflict with newer distros
- no need to bundle libICE and libSM since we expect user to have a working x11 install
Thomas Debesse [Mon, 5 Aug 2019 03:02:55 +0000 (05:02 +0200)]
bundle: do not bundle gtk and other deps on linux
- gtk is not easily bundlable on linux because it looks for harcoded system path to optional
shared libraries like image codecs, theme engines, sound notification system, etc.
so expect user to install gtk first
- since we ask user to instal gtk, we can also ask them to install gtkglext,
which is likely to pull gtk itself, x11 and gl dependencies
- old fontconfig does not work correctly if newer fontconfig configuration is installed
- if gtk and fontconfig is installed, freetype is
q3map2: add missing help for q3map2 stage arguments
Move -keeplights help from -light stage to -bsp. Add other ~40 arguments
that were missing from help. My main focus was on the -convert stage
but I tried to document the rest as well. Some descriptions are copied
from message when enabling the option.
Thomas Debesse [Sun, 14 Jul 2019 00:53:50 +0000 (02:53 +0200)]
radiant: code to make radiant able to restart itself
- save preferences
- check for map being modified (this asks user for saving if not yet saved)
- check for a map being currently edited
- start a new instance, with the current map as parameter if exists
- quit current instance if new instance started correctly
Thomas Debesse [Sat, 13 Jul 2019 20:56:48 +0000 (22:56 +0200)]
gtk2: do not make floating windows minimizable
First, this feature leads to an horrible behavior on
Windows where the application ends in a loop of endless
minimization and restoration, probably because the window
manager minimizes or restores the whole application once
a floating window in minimized or restored, leading to a
race condition between all floating windows, some being
minimized and others being restored at the same time,
triggering the minimization and the restoration of the
others, and so on. It's difficult to say such issue
will never happen on other OS or with some window manager.
Second, those floating windows are expected to be displayed
or hidden using menu or keyboard shortcut, it's a design
choice. Then the OS-specific way to minimize/restore them
is superflous and less efficient.
Finally, the mainframe is not created as a floating window
so the user minimizes the application by minimizing the
mainframe.
Thomas Debesse [Fri, 5 Jul 2019 20:25:34 +0000 (22:25 +0200)]
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
Thomas Debesse [Thu, 4 Jul 2019 23:57:34 +0000 (01:57 +0200)]
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:
Thomas Debesse [Wed, 19 Jun 2019 18:45:53 +0000 (20:45 +0200)]
bundle: store dll in lib subdirectory, bundle all of them at once
instead of finding and copying the dll each time a binary is produced,
the path of the produced binary is stored in a unique file (to avoid race
condition) and the target for that binary is added as a dependency to a new
target named `bundle` that does the finding and the copying once for all.
this avoids race condition while building targets in parallel, workaround
the inability of cmake to track a common list between all targets and to keep
it from configure to build step
this makes the bundle process more reliable and avoid things being copied
twice. Before that I've seen copy processes starting to copy the same file
even with the -n option telling to not copy if the file exists, then seeing
one of them failing because they both started when the file was not yet
copied but one finished the copy before the other one
this also makes the bundling faster by only doing things once for all
the dll are then moved to a lib/ subdirectory instead of the root
of the buld directory
each binary having dll to find and copy is built with a special resource file
embedding a manifest telling there is an assembly directory containing dll
named lib, then a manifest is writen for that assembly directory listing all
the dll it can find there telling windows to look for them there at binary
loading instead of the system directory and the place right to binary
this:
- helps to ensure the right dll is loaded even if another exists
with the same name on the system
- reduce the mess by storing all dll in one dedicated directory
- avoids the double cmake configure run by removing the need to
glob the build directory before installation