[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
+5 -3
View File
@@ -18,6 +18,8 @@ Eglin
#include "embperl.h"
#include "embxs.h"
#include "../common/features.h"
#include "../common/path_manager.h"
#ifndef GvCV_set
#define GvCV_set(gv,cv) (GvCV(gv) = (cv))
#endif
@@ -79,7 +81,7 @@ void Embperl::DoInit() {
perl_run(my_perl);
//a little routine we use a lot.
eval_pv("sub my_eval { eval $_[0];}", TRUE); //dies on error
eval_pv("sub my_eval { eval $_[0];}", TRUE); //dies on error
//ruin the perl exit and command:
eval_pv("sub my_exit {}",TRUE);
@@ -146,11 +148,11 @@ void Embperl::DoInit() {
//should probably read the directory in c, instead, so that
//I can echo filenames as I do it, but c'mon... I'm lazy and this 1 line reads in all the plugins
std::string perl_command =
"if(opendir(D,'" + Config->PluginDir +"')) { "
"if(opendir(D,'" + path.GetPluginsPath() +"')) { "
" my @d = readdir(D);"
" closedir(D);"
" foreach(@d){ "
" main::eval_file('plugin','" + Config->PluginDir + "/'.$_)if/\\.pl$/;"
" main::eval_file('plugin','" + path.GetPluginsPath() + "/'.$_)if/\\.pl$/;"
" }"
"}";
eval_pv(perl_command.c_str(),FALSE);