mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-15 12:58:22 +00:00
[File Paths] Implement Path Manager (#2440)
* Push up branch for testing * Path manager * Tweaks * Changes * More path work * Update paths for eqemu_server.pl * More path work * Import and export client files * Path remove * More path work * Update eqemu_config.h * Fix tests * Tests disable temp * Update eqemu_config.h * Update .drone.yml * Hook tests back up * Update main.cpp * Platform tests * Fix include * Use std::filesystem on windows * Fix IPCMutex name on windows * std::filesystem changes * Update path_manager.cpp * Explicit string cast * Explicit string cast * Update path_manager.cpp * Windows fixes * Mapped files * Relative fixes * Use relative paths off of cwd * Update Debian image to Debian 11 (updates GCC) Co-authored-by: hg <4683435+hgtw@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "loginserver_webserver.h"
|
||||
#include "loginserver_command_handler.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/path_manager.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
@@ -20,6 +21,7 @@
|
||||
LoginServer server;
|
||||
EQEmuLogSys LogSys;
|
||||
bool run_server = true;
|
||||
PathManager path;
|
||||
|
||||
void ResolveAddresses();
|
||||
void CatchSignal(int sig_num)
|
||||
@@ -42,7 +44,9 @@ void LoadDatabaseConnection()
|
||||
|
||||
void LoadServerConfig()
|
||||
{
|
||||
server.config = EQ::JsonConfigFile::Load("login.json");
|
||||
server.config = EQ::JsonConfigFile::Load(
|
||||
fmt::format("{}/login.json", path.GetServerPath())
|
||||
);
|
||||
LogInfo("Config System Init");
|
||||
|
||||
/**
|
||||
@@ -172,6 +176,8 @@ int main(int argc, char **argv)
|
||||
LogSys.LoadLogSettingsDefaults();
|
||||
}
|
||||
|
||||
path.LoadPaths();
|
||||
|
||||
/**
|
||||
* Command handler
|
||||
*/
|
||||
@@ -197,6 +203,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (argc == 1) {
|
||||
LogSys.SetDatabase(server.db)
|
||||
->SetLogPath("logs")
|
||||
->LoadLogDatabaseSettings()
|
||||
->StartFileLogs();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user