[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:
Chris Miles
2022-09-28 04:08:59 -05:00
committed by GitHub
parent 19791195e5
commit f8e7576ae7
53 changed files with 641 additions and 502 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ SET(tests_headers
ADD_EXECUTABLE(tests ${tests_sources} ${tests_headers})
TARGET_LINK_LIBRARIES(tests common cppunit fmt)
TARGET_LINK_LIBRARIES(tests common cppunit fmt ${SERVER_LIBS})
INSTALL(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+14 -6
View File
@@ -20,6 +20,8 @@
#include <iostream>
#include <fstream>
#include <memory>
#include "../common/platform.h"
#include "../common/path_manager.h"
#include "memory_mapped_file_test.h"
#include "ipc_mutex_test.h"
#include "fixed_memory_test.h"
@@ -30,17 +32,23 @@
#include "data_verification_test.h"
#include "skills_util_test.h"
#include "task_state_test.h"
#include "../common/eqemu_config.h"
const EQEmuConfig *Config;
EQEmuLogSys LogSys;
PathManager path;
int main()
{
RegisterExecutablePlatform(ExePlatformClientImport);
LogSys.LoadLogSettingsDefaults();
path.LoadPaths();
int main() {
auto ConfigLoadResult = EQEmuConfig::LoadConfig();
Config = EQEmuConfig::get();
Config = EQEmuConfig::get();
try {
std::ofstream outfile("test_output.txt");
std::ofstream outfile("test_output.txt");
std::unique_ptr<Test::Output> output(new Test::TextOutput(Test::TextOutput::Verbose, outfile));
Test::Suite tests;
Test::Suite tests;
tests.add(new MemoryMappedFileTest());
tests.add(new IPCMutexTest());
tests.add(new FixedMemoryHashTest());
@@ -52,7 +60,7 @@ int main() {
tests.add(new SkillsUtilsTest());
tests.add(new TaskStateTest());
tests.run(*output, true);
} catch(...) {
} catch (...) {
return -1;
}
return 0;