Commit Graph

27 Commits

Author SHA1 Message Date
Shauren
1ae7cdd512 Core/Common: Update PCH content to include most commonly used headers 2025-06-11 16:35:31 +02:00
Shauren
546d23264c Core/Misc: Make string and string_view literal suffixes globally available 2025-05-13 11:41:54 +02:00
Shauren
ee251a94d6 Core/Config: Use std::string_view instead of std::string to lookup config values 2025-05-07 19:28:08 +02:00
Shauren
cfa838df5d Core/Misc: Support boost 1.85 2024-04-22 11:52:58 +02:00
Смердокрыл
74a4dc46b4 Core/Config: Implement reading config overrides from subdirectory (#29068)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-06-09 20:36:03 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Anton Popovichenko
8447f627ba Core/Config: Implement config override with env vars (#26811)
* Core/Config: Implement config override with env vars

Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver

* Core/Config Fix typo in logs

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* Core/Config Fix code style in EnvVarForIniKey

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update tests/common/Config.cpp

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

Co-authored-by: Anton Popovichenko <anton.popovichenko@mendix.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 1ddd9dc19c)
2022-03-13 16:37:01 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Shauren
7cd98cd7d2 Core/Config: Restore ability to load additional config files for custom scripts
(cherry picked from commit c1e4cfd07e)
2022-02-04 13:05:06 +01:00
Treeston
be9dadc189 Common/Utilities: Centralize string -> T conversion in StringConvert.h (PR #25335)
(cherry picked from commit cd30e0b86c)
2022-02-04 00:27:13 +01:00
Treeston
23ad14526c Core/Common: Allow config settings to be loaded as optional (PR #25137)
If the config setting is not present, returns the default without issuing a warning.

(cherry picked from commit 5ad064976e)
2022-01-24 15:08:46 +01:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
dd356ea04c Core/Misc: Extended racemasks in db to uint64 2018-09-26 23:08:23 +02:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
3a418a0bbc Core/Common: Include cleanup 2017-05-11 22:29:51 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
jackpoz
ab40f20bad Common/Crypto: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-03 23:34:01 +02:00
Naios
51ec8d3b8c Core/Scripting: Use the path of the worldserver executable to search for the scripts dir
* Fixes issues when starting the worldserver not in the bin directory
  or the CMAKE_INSTALL_PREFIX directory using the -c option.

(cherry picked from commit 86b0fcf67a)
2016-04-18 23:03:24 +02:00
DDuarte
0afcefea27 Core/Config: Fix 3 more missing config warnings
Closes #16861

Thanks tkrokli
2016-03-31 03:31:21 +01:00
DDuarte
9431b94bff Core/Config: Error logging for ptree_bad_data
Ref 6487e2f2d6 (commitcomment-16888976)
2016-03-31 03:19:27 +01:00
DDuarte
06b3bca0d2 Core/Startup: Warn when a config key isn't found in the config files
Example: "Missing name Guild.SaveInterval in config file worldserver.conf, add "Guild.SaveInterval = 15" to this file"
2016-03-27 23:48:17 +01:00
Naios
5c91586797 Core/Common: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
2016-03-11 18:22:39 +01:00
Naios
719159e207 Core/Common: Add a generic config helper to access built-in overwriteable paths.
* Adds CMAKE_COMMAND and CMAKE_BINARY_DIR to revision_data.h
* Move the source and mysql exe path handling out of the DBUpdater.
* Make some Config methods const for correctness.
* Remove C & CXX flags from revision_data.h
 (was unused and didn't capture all cxx vars)
* Reorder the link order to prevent `ld` from ignoring the file
* Ref #15671
2016-02-21 15:52:42 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
StormBytePP
1d2aafd39b Core/Build: Merge common library and move database out of shared 2015-08-21 17:52:42 +02:00