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
Tequila [Tue, 22 Jan 2013 10:28:39 +0000 (11:28 +0100)]
q3map2: Smokin'Guns 1.2.1 flavour
- Imported old q3map2 modifications by spoon from the v0.0.1 q3map2 for WesternQuake3
- Added support for lava content making dynamite explodes and molotov burns
- Added support for "-game smokinguns" option
- Added SMOKINGUNS define in CPPDEFINES so q3map2 builds with Smokin'Guns modifications
- Updated Smokin'Guns map pack to use "-game smokinguns" option with q3map2 tool
Thomas Debesse [Fri, 31 May 2019 15:02:06 +0000 (17:02 +0200)]
msys2: update build instructions in readme
- add minizip and git to pacman packages to install
* minizip is required by netradiant and q3map2
* git is required by gamepack-manager
* other game packs may require subversion
- tell how to use mingw over ssh
- autodetect mingw architecture, give instruction to override
- fix a typo (a i character was mistakenly added somewhere)
Thomas Debesse [Fri, 31 May 2019 15:59:56 +0000 (17:59 +0200)]
msys2/bundle: properly parse ldd output for dll bundling on windows
- properly filters out Windows dll using case insensitive grep
- filters out non .dll lines in ldd output, avoid empty lines and ??? lines
- copy dll preserving timestamps