Commit graph

11 commits

Author SHA1 Message Date
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Iris Morelle
c9eee2d351 Copyright/attribution update
[ci skip]
2018-02-16 20:03:24 -03:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Charles Dang
2101353d36 Convert include guards to the shorter #pragma once
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.

For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
2017-05-09 19:41:37 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Celtic Minstrel
31a972242a When --wconsole causes the allocation of a new console,
print a 'press enter to continue' message when the program
terminates due to a caught exception.
2016-09-17 11:53:27 -04:00
Charles Dang
61cb45ac8c Fixup b98687147 2016-03-31 21:22:53 +11:00
Charles Dang
b98687147a Fixup compilation on C++11 2016-03-31 09:33:09 +11:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
Ignacio R. Morelle
53ed94da25 log/windows: Integrate implementation of --wconsole
This makes it so we no longer try to steal the console back to a log
file when using --wconsole with the new redirection code. Now the
--wconsole switch triggers a special mode of the log file manager that
uses a native console instead of log files.

As a necessary bonus to appease compilers, the GUI2 version info dialog
now uses the correct log file path when not started with the --wconsole
switch. Yay!
2015-11-23 03:42:14 -03:00
Ignacio R. Morelle
aae8e70c7a log/windows: Add our own stdout/stderr redirection on Windows
This replaces SDL 1.2's built-in stdout/stderr redirection, which writes
the log file to the process working directory (usually an
admin-restricted location) instead of a more accessible user-writable
location.

My approach combines stdout and stderr into a single log file which
includes the process id and timestamp in its filename in order to
accomodate multiple instances and (coming later) log rotation. The log
file is created in the user's temporary directory defined by Windows,
and then relocated to the game user data dir as soon as it is set-up the
first time, placed in the Windows-specific logs/ subdir.

The most pressing issues this solves are the lack of built-in
stdout/stderr redirection in SDL 2's SDL2main.lib entry point, and
Unicode path issues with SDL 1.2 (bug #22897). Additionally, it allows
us to not have to rely on UAC virtualization anymore; this is arguably
far more important because it has been known to break on occasion (e.g.
<http://r.wesnoth.org/t42970>), and starting with version 1.13.2 we want
to declare Windows Vista - 10 compatibility in our side-by-side manifest
(see commit e119f4071f).

Currently missing features coming later:

 * Log rotation (otherwise the logs/ dir may grow forever)
 * wesnothd support (although the code is already required to be linked
   into wesnothd due to it being required by the FS API)
 * Integration with the version info dialog
2015-11-23 03:21:42 -03:00