Commit Graph

73 Commits

Author SHA1 Message Date
Pentarctagon
d8abcff103
wesnothd: use lambdas instead of rs_base (#9747) 2025-01-15 21:14:00 -05:00
Charles Dang
2066456654 Target Windows 10 2024-12-12 20:35:51 -05:00
Pentarctagon
3f63908296 Further consolidate logging functionality between Windows and non-Windows platforms.
For non-Windows platforms this adds:
* a new check for whether the logs directory exists and is writable by attempting to write a single whitespace to a dummy.log file.
* a popup shown immediately after the GUI system is initialized letting the player know if there was an issue creating the log file.

For Windows, this changes:
* instead of writing to the OS temp directory and then attempting to move that file to the logs directory, this uses the same check that was described above for non-Windows platforms.
* the alert shown when writing the dummy log file fails is now a Wesnoth alert message rather than the Windows-specific MessageBox.
* a failure to create a log file does not immediately exit wesnoth anymore.

Additionally, this makes it so that for the default state (logging to file), all platforms follow the same code path by calling `lg::set_log_to_file()`. `log_windows` now contains only the Windows-specific logic needed for handling the creation/redirection of output to a console.
2023-02-17 10:03:05 -06:00
Pentarctagon
72a1c801c0 Log exception type when doing catch(...). 2022-08-25 22:22:22 -05:00
newfrenchy83
0bfb384887
Update codeblocks project files for gcc11 2022-07-20 11:39:50 +02:00
newfrenchy83
d8b8c5ea80 add GLIBCXX_USE_DEPRECATED=0 in codeblock projectfiles 2022-07-05 08:57:12 -05:00
newfrenchy83
55fedbb27c Revert "update codeblock projectfiles"
This reverts commit df05b5061a.
2022-07-04 21:21:16 -04:00
newfrenchy83
df05b5061a update codeblock projectfiles 2022-07-04 13:13:43 -05:00
newfrenchy83
6ba2ae1076 update codeblock projectfiles 2022-01-27 11:41:29 -06:00
newfrenchy83
3e05480b5b fix codeblock projectfiles 2021-06-03 18:53:16 -05:00
newfrenchy83
b9cbc084c3 update codeblock projectfiles 2021-06-02 13:18:21 -05:00
newfrenchy83
7e839a924c
update codeblock projectfiles
Add libssl and some includes for lua_mathx.
2021-05-19 16:39:06 -05:00
newfrenchy83
f671d2a678 Update wesnothd.cbp 2021-02-18 14:14:34 -06:00
newfrenchy83
3f131848ea
upgrades codeblock to Lua 5.4.2 (#5556)
* upgrades codeblock to Lua 5.4.2

* fix error

* upgrade to c++20

* upgrade to c++20

* upgradeto c++20

* Update wesnothd.cbp
2021-02-18 02:15:13 +11:00
newfrenchy83
043d49c6c3
fix codeblock projectfiles and update instructions 2021-02-03 19:58:36 +01:00
newfrenchy83
6f85e689e6
Update codeblock for recent changes (#5455)
* update codeblock for recent changes

* update codeblock test for recent changes

* Update wesnothd.cbp

* Update wesnothd.cbp

* update scons codeblock
2021-01-17 21:45:31 +11:00
newfrenchy83
3e46f3d4b4
update codeblock projectfiles (#5444)
* update codeblock project

* updat campaingd codeblock projectfiles

* update wesnothd codeblock scons
2021-01-17 03:04:18 +11:00
newfrenchy83
f33330de19
fix wesnothd and campaignd codeblock projectfiles after #5029 (#5035) 2020-08-07 11:18:05 +02:00
newfrenchy83
4becc858f1
update codeblock projectfiles 2020-07-03 17:16:26 -05:00
newfrenchy83
62a005f4cf fix for sample_user_handler removal. (#4273) 2019-08-24 14:26:32 +02:00
newfrenchy83
436f96a6b8 Update Code::Blocks project (#3761) 2018-12-06 09:27:58 +02:00
newfrenchy83
f594019433 Update Code::Blocks project and add documentation
Manual merge of pull request #3626.
2018-10-18 16:44:22 +03:00
newfrenchy83
da95fedcad Update Code::Blocks project (#3585)
(cherry-picked from commit 248af054c7)
2018-10-07 03:25:23 +00:00
Martin Hrubý
96bbebb514 Fix building with Xcode 10 (#3460)
Resolves #3458.

(cherry-picked from commit 50301f84e3)
2018-10-07 03:24:17 +00:00
newfrenchy83
f551e5ca8e Enable C++17 in Code::Blocks
(cherry-picked from commit 882eeb52ab)
2018-10-07 03:23:05 +00:00
newfrenchy83
fb403a982a Update wesnothd.cbp
(cherry-picked from commit 9bcaf3a897)
2018-10-07 03:22:48 +00:00
newfrenchy83
7a80094724 Update wesnothd.cbp
(cherry-picked from commit 67f2ba9767)
2018-10-07 03:18:09 +00:00
newfrenchy83
e20c55f57d Update Code::Blocks project files to C++14 (#2416) 2018-01-29 12:13:24 +02:00
newfrenchy83
9d2765e73a Update Wesnoth Code::Blocks project files (#2386) 2018-01-20 17:04:39 +02:00
Charles Dang
1e28a54cf2 Update CodeBlocks projectfiles for Boost 1.64
Also added a missing include to the wesnothd projfile.
2017-06-01 10:53:04 +11:00
Charles Dang
8c7df93d4f Removed old implementation of lexical_cast_default 2016-12-08 14:21:17 +11:00
Charles Dang
5637dfa8f0 Add color.*pp to CB wesnothd projectfile
[ci skip]

Was getting undefined reference errors otherwise.
2016-12-07 22:34:36 +11:00
Charles Dang
ced698e75f Updated CB projfile 2016-11-08 10:44:38 +11:00
Charles Dang
0a3769a7de Updated CB wesnothd projectfile 2016-10-18 14:41:50 +11:00
Ignacio R. Morelle
ea9d077b89 fs: Add utility functions for the new file dialog
These include an alternate mode of normalize_path() that enforces the
platform's preferred path delimiter (i.e. backslash on Windows) on the
output, and a function to detect whether a path refers to a root
directory.

Unfortunately, the last bit requires introducing a new link-time
dependency on Windows, against a system library. It's guaranteed to be
always there but it seems kind of a waste. The alternative would be to
hand-parse the string but that seems even more of a waste. And no,
Boost.Filesystem can't do this in a straightforward fashion right now.
2016-10-05 03:06:43 -03:00
Charles Dang
86e3161b29 Updated CB projfile (missing wesnothd source and Boost 1.61 linker target) 2016-09-24 00:39:35 +11:00
Charles Dang
423fc10437 CodeBlocks: explicitly added -Wunused-parameter flag 2016-09-02 09:56:07 +11:00
Charles Dang
c3d379e394 Updated CB projfile so it no longer links with SDL_net
Also cleans up a few broken includes in the project.
2016-06-06 05:58:00 +11:00
Charles Dang
dc9db2e830 Updated CB projfiles 2016-06-01 19:06:58 +11:00
Charles Dang
4645d654c3 CB: enable building wesnothd alone 2016-04-02 02:26:22 +11:00
Charles Dang
c97a5d14ff Codeblocks: enable building with c++11
This also adds the necessary boost::thread linker option required by
recent loadscreen code.
2016-03-31 09:37:10 +11:00
Charles Dang
465f5eece1 Implement new GUI2 loadscreen 2016-03-29 21:33:38 +11:00
Charles Dang
b8a821e388 Enable SDL2 building by default in codeblocks project 2015-12-22 16:35:56 +11: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
Charles Dang
e7345dd69a Updated codeblocks projectfile to use boost 1.58 libs 2015-07-30 17:53:19 +11:00
Ignacio R. Morelle
877ead550a Add Windows resource file for wesnothd 2015-07-20 21:16:04 -04:00
Charles Dang
cbe8c84033 Cleanup. Removed intl and unnecessary search directories 2015-04-14 11:11:58 +11:00
anonymissimus
949b05f39a CB build system update
description see commit
4a616341b2dff52f1ad179d86f1801e07ede1db7
on 1.12 branch
2014-11-29 00:23:07 +01:00
Alexander van Gessel
f786c2d422 Attempt to update projectfiles 2014-03-24 00:32:15 +01:00
Ignacio R. Morelle
23bdf9e1d6 CodeBlocks project update 2013-12-21 01:32:29 -03:00