Commit Graph

10 Commits

Author SHA1 Message Date
Pentarctagon
b1f632b85d cwesnoth.cmd cleanup 2023-05-21 11:52:16 -05:00
Pentarctagon
0f550369b3
Simplify logging options (#7620)
This removes --wconsole, --wnoconsole, and --wnoredirect. Instead these are now handled by --no-log-to-file and --log-to-file.

If logging to file is enabled, then output will be written to the log file. If logging to file is not enabled, then output is written to the terminal. On Windows, a terminal will be created for the output to be written to if wesnoth is not launched from a terminal.
2023-05-14 12:47:43 -05:00
Pentarctagon
e47fc68ef0 OpenMP isn't supported anymore, so don't set OMP_WAIT_POLICY in cwesnoth.cmd. 2019-07-24 19:53:41 -05:00
Ignacio R. Morelle
bbd2ffd64f cwesnoth: Use setlocal to reliably restore env vars
Thanks to aquileia for the tip.
2015-04-26 05:04:48 -04:00
Ignacio R. Morelle
9e2513183d cwesnoth: Reset OMP_WAIT_POLICY environment variable on exit
We really should save the previous value in a temporary variable instead
and reset it to that but I hate ugly code so...
2015-04-26 05:49:41 -03:00
Ignacio R. Morelle
13107f3437 cwesnoth: Document environment assignments 2015-04-26 05:49:29 -03:00
aquileia
04d7c5b587 Set OMP_WAIT_POLICY in cwesnoth.cmd 2015-04-25 18:34:34 +02:00
Ignacio R. Morelle
e32d9009dd cwesnoth: Add some documentation 2015-04-25 04:50:16 -04:00
Ignacio R. Morelle
c1fad7357d cwesnoth: Disable SDL stdio redirection
We can do this using an environment variable. Too bad doing so doesn't
give us a console, otherwise this whole hack wouldn't be necessary in the
first place.
2015-04-25 04:50:15 -04:00
Ignacio R. Morelle
8d2609ff4c Add --wconsole for allocating a Windows console on startup
This is only recognized by the game client at the moment. The
implementation is a bit hacky but it seems to work. Thanks, SDLmain.

The cwesnoth.cmd Windows batch file passes --wconsole to Wesnoth in the
command line, along with any other arguments passed to it. This is
intended to be *the* use case for --wconsole, since otherwise the fact
that Windows won't allocate a console for us on process initialization
(due to Wesnoth being compiled with the GUI application flag) causes
issues with the Command Prompt shell -- namely, the shell returns
before Wesnoth allocates its console, allowing shell input to happen
concurrently with Wesnoth's output to console.

cwesnoth.cmd should be used in shortcuts and given Wesnoth's install
path as its initial working directory.
2015-04-25 04:49:30 -04:00