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

145 lines
6.9 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="wesnothd" />
<Option makefile_is_custom="1" />
<Option execution_dir="/home/sergey/vcs-checkouts/wesnoth" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="release">
<Option output="../../wesnothd" prefix_auto="1" extension_auto="1" />
<Option working_dir="../../" />
<Option object_output="." />
<Option type="1" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -C ..\.. build=$target wesnothd" />
<CompileFile command="TARGET=$file;scons -C ..\.. build=$target build/$target/${TARGET:6}" />
<Clean command="scons -C ..\.. build=$target -c" />
<DistClean command="rm -rf ..\..\build" />
<AskRebuildNeeded command="scons -q -C ..\.. build=$target wesnothd" />
<SilentBuild command="scons -C ..\.. build=$target wesnothd" />
</MakeCommands>
</Target>
<Target title="debug">
<Option output="../../wesnothd-debug" prefix_auto="1" extension_auto="1" />
<Option working_dir="../../" />
<Option object_output="." />
<Option type="1" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -C ..\.. build=$target wesnothd" />
<CompileFile command="TARGET=$file;scons -C ..\.. build=$target build/$target/${TARGET:6}" />
<Clean command="scons -C ..\.. build=$target -c" />
<DistClean command="rm -rf ..\..\build" />
<AskRebuildNeeded command="scons -q -C ..\.. build=$target wesnothd" />
<SilentBuild command="scons -C ..\.. build=$target wesnothd" />
</MakeCommands>
</Target>
</Build>
<Unit filename="../../src/crypt_blowfish/crypt_blowfish.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../../src/crypt_blowfish/crypt_blowfish.h" />
<Unit filename="../../src/about.hpp" />
<Unit filename="../../src/color.cpp" />
<Unit filename="../../src/color.hpp" />
<Unit filename="../../src/color_range.cpp" />
<Unit filename="../../src/config.cpp" />
<Unit filename="../../src/config.hpp" />
<Unit filename="../../src/config_attribute_value.cpp" />
<Unit filename="../../src/config_attribute_value.hpp" />
<Unit filename="../../src/filesystem.cpp" />
<Unit filename="../../src/filesystem.hpp" />
<Unit filename="../../src/filesystem_common.cpp" />
<Unit filename="../../src/filesystem_sdl.cpp" />
<Unit filename="../../src/filesystem_win32.ii" />
<Unit filename="../../src/font/constants.cpp" />
<Unit filename="../../src/font/constants.hpp" />
<Unit filename="../../src/game_config.cpp" />
<Unit filename="../../src/game_config.hpp" />
<Unit filename="../../src/game_config_view.cpp" />
<Unit filename="../../src/game_config_view.hpp" />
<Unit filename="../../src/game_version.cpp" />
<Unit filename="../../src/game_version.hpp" />
<Unit filename="../../src/gettext.cpp" />
<Unit filename="../../src/gettext.hpp" />
<Unit filename="../../src/global.hpp" />
<Unit filename="../../src/hash.cpp" />
<Unit filename="../../src/hash.hpp" />
<Unit filename="../../src/log.cpp" />
<Unit filename="../../src/log.hpp" />
<Unit filename="../../src/log_windows.cpp" />
<Unit filename="../../src/log_windows.hpp" />
<Unit filename="../../src/mt_rng.cpp" />
<Unit filename="../../src/mt_rng.hpp" />
<Unit filename="../../src/random.cpp" />
<Unit filename="../../src/random.hpp" />
<Unit filename="../../src/seed_rng.cpp" />
<Unit filename="../../src/seed_rng.hpp" />
<Unit filename="../../src/serialization/base64.cpp" />
<Unit filename="../../src/serialization/base64.hpp" />
<Unit filename="../../src/serialization/binary_or_text.cpp" />
<Unit filename="../../src/serialization/binary_or_text.hpp" />
<Unit filename="../../src/serialization/compression.hpp" />
<Unit filename="../../src/serialization/parser.cpp" />
<Unit filename="../../src/serialization/parser.hpp" />
<Unit filename="../../src/serialization/preprocessor.cpp" />
<Unit filename="../../src/serialization/preprocessor.hpp" />
<Unit filename="../../src/serialization/schema/key.cpp" />
<Unit filename="../../src/serialization/schema/key.hpp" />
<Unit filename="../../src/serialization/schema/tag.cpp" />
<Unit filename="../../src/serialization/schema/tag.hpp" />
<Unit filename="../../src/serialization/schema/type.cpp" />
<Unit filename="../../src/serialization/schema/type.hpp" />
<Unit filename="../../src/serialization/string_utils.cpp" />
<Unit filename="../../src/serialization/string_utils.hpp" />
<Unit filename="../../src/serialization/string_view.hpp" />
<Unit filename="../../src/serialization/tokenizer.cpp" />
<Unit filename="../../src/serialization/tokenizer.hpp" />
<Unit filename="../../src/serialization/unicode.cpp" />
<Unit filename="../../src/serialization/unicode.hpp" />
<Unit filename="../../src/server/common/dbconn.cpp" />
<Unit filename="../../src/server/common/dbconn.hpp" />
<Unit filename="../../src/server/common/forum_user_handler.cpp" />
<Unit filename="../../src/server/common/forum_user_handler.hpp" />
<Unit filename="../../src/server/common/server_base.cpp" />
<Unit filename="../../src/server/common/server_base.hpp" />
<Unit filename="../../src/server/common/simple_wml.cpp" />
<Unit filename="../../src/server/common/simple_wml.hpp" />
<Unit filename="../../src/server/common/resultsets/ban_check.cpp" />
<Unit filename="../../src/server/common/resultsets/ban_check.hpp" />
<Unit filename="../../src/server/common/resultsets/game_history.cpp" />
<Unit filename="../../src/server/common/resultsets/game_history.hpp" />
<Unit filename="../../src/server/common/resultsets/tournaments.cpp" />
<Unit filename="../../src/server/common/resultsets/tournaments.hpp" />
<Unit filename="../../src/server/common/user_handler.hpp" />
<Unit filename="../../src/server/room.hpp" />
<Unit filename="../../src/server/wesnothd/ban.cpp" />
<Unit filename="../../src/server/wesnothd/ban.hpp" />
<Unit filename="../../src/server/wesnothd/game.cpp" />
<Unit filename="../../src/server/wesnothd/game.hpp" />
<Unit filename="../../src/server/wesnothd/metrics.cpp" />
<Unit filename="../../src/server/wesnothd/metrics.hpp" />
<Unit filename="../../src/server/wesnothd/player.cpp" />
<Unit filename="../../src/server/wesnothd/player.hpp" />
<Unit filename="../../src/server/wesnothd/player_connection.cpp" />
<Unit filename="../../src/server/wesnothd/player_connection.hpp" />
<Unit filename="../../src/server/wesnothd/player_network.cpp" />
<Unit filename="../../src/server/wesnothd/player_network.hpp" />
<Unit filename="../../src/server/wesnothd/server.cpp" />
<Unit filename="../../src/server/wesnothd/server.hpp" />
<Unit filename="../../src/tstring.cpp" />
<Unit filename="../../src/tstring.hpp" />
<Unit filename="../../src/util.hpp" />
<Unit filename="../../src/wesconfig.h" />
<Extensions>
<code_completion />
<debugger />
<envvars />
</Extensions>
</Project>
</CodeBlocks_project_file>