mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-06 04:42:28 +00:00
Merge e5df0172d09e15df6e8b98e9688df30dc1d5dc91 into 85c3255568434deb1b1bb185aadfb7aa6f0581dc
This commit is contained in:
commit
3387e3a84b
@ -37,3 +37,13 @@ target_include_directories(loginserver PRIVATE ..)
|
|||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)
|
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)
|
||||||
|
|
||||||
|
# vcpkg doesn't copy legacy.dll automatically because it is loaded at runtime, not via the import table.
|
||||||
|
if(WIN32 AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET)
|
||||||
|
add_custom_command(TARGET loginserver POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<IF:$<CONFIG:Debug>,${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin/legacy.dll,${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/legacy.dll>"
|
||||||
|
"$<TARGET_FILE_DIR:loginserver>/legacy.dll"
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <filesystem>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -182,6 +183,12 @@ static OSSL_PROVIDER *s_default_provider = nullptr;
|
|||||||
bool eqcrypt_init()
|
bool eqcrypt_init()
|
||||||
{
|
{
|
||||||
#ifdef EQEMU_USE_OPENSSL
|
#ifdef EQEMU_USE_OPENSSL
|
||||||
|
#ifdef _WIN32
|
||||||
|
// Set OpenSSL default provider search path to the working directory. Okay to throw.
|
||||||
|
std::string search_path = std::filesystem::current_path().string();
|
||||||
|
OSSL_PROVIDER_set_default_search_path(nullptr, search_path.c_str());
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!s_default_provider) {
|
if (!s_default_provider) {
|
||||||
s_default_provider = OSSL_PROVIDER_load(nullptr, "default");
|
s_default_provider = OSSL_PROVIDER_load(nullptr, "default");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,6 +159,7 @@ void start_web_server()
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
RegisterExecutablePlatform(ExePlatformLogin);
|
RegisterExecutablePlatform(ExePlatformLogin);
|
||||||
|
EQEmuLogSys::Instance()->LoadLogSettingsDefaults();
|
||||||
set_exception_handler();
|
set_exception_handler();
|
||||||
|
|
||||||
if (!eqcrypt_init()) {
|
if (!eqcrypt_init()) {
|
||||||
@ -166,12 +167,6 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogInfo("Logging System Init");
|
|
||||||
|
|
||||||
if (argc == 1) {
|
|
||||||
EQEmuLogSys::Instance()->LoadLogSettingsDefaults();
|
|
||||||
}
|
|
||||||
|
|
||||||
PathManager::Instance()->Init();
|
PathManager::Instance()->Init();
|
||||||
|
|
||||||
// command handler
|
// command handler
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user