1. 13 Jul, 2019 6 commits
  2. 05 Jul, 2019 3 commits
    • Thomas Debesse's avatar
      Merge branch 'winconsole' into 'master' · 5bacc7d8
      Thomas Debesse authored
      make tools target the console subsystem on Windows
      
      See merge request xonotic/netradiant!137
      5bacc7d8
    • Thomas Debesse's avatar
      cmake: do not use WIN32 for console tools · 0f91bcf3
      Thomas Debesse authored
      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
      0f91bcf3
    • Thomas Debesse's avatar
      cmake: make tools target the console subsystem on Windows · f2f321e9
      Thomas Debesse authored
      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)
      f2f321e9
  3. 24 Jun, 2019 1 commit
  4. 19 Jun, 2019 3 commits
    • Thomas Debesse's avatar
      bundle: store dll in lib subdirectory, bundle all of them at once · 7962186b
      Thomas Debesse authored
      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
      7962186b
    • Thomas Debesse's avatar
      423f9fcd
    • Thomas Debesse's avatar
      bundle: export gtk theme/engine bundle code to the script · 4cd8e40a
      Thomas Debesse authored
      now triggered on libgtk bundling
      4cd8e40a
  5. 18 Jun, 2019 10 commits
  6. 17 Jun, 2019 1 commit
  7. 16 Jun, 2019 16 commits