Workaround nuke not autoaddling dep lib (#859)

* #pragma comment(lib, <minhook lib>)

* Fix logging path, and make common files not use pch

* Move lib import to vcproj from pragma

* a

* Make copy of vcxproj for minhook from submodule to lib dir

* nuke it

* .
This commit is contained in:
kizer 2022-05-30 02:18:00 +09:00 committed by GitHub
parent dbb0cb3d56
commit b6237267ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 134 additions and 46 deletions

View file

@ -9,13 +9,19 @@ HMODULE g_hModule;
HINSTANCE g_hGameInstance = GetModuleHandleW(nullptr);
DllExport DWORD WINAPI Initialize(LPVOID lpParam, HANDLE hMainThreadContinue) {
logging::log_file.open(utils::get_env<std::wstring>("DALAMUD_BOOT_LOGFILE"), std::ios_base::out | std::ios_base::app);
if (bootconfig::is_show_console())
ConsoleSetup(L"Dalamud Boot");
if (!logging::log_file) {
logging::print<logging::E>("Couldn't open log file!");
if (const auto logFilePath = utils::get_env<std::wstring>("DALAMUD_BOOT_LOGFILE"); logFilePath.empty())
logging::print<logging::I>("No log file path given; not logging to file.");
else {
try {
logging::start_file_logging(logFilePath);
logging::print<logging::I>(L"Logging to file: {}", logFilePath);
} catch (const std::exception& e) {
logging::print<logging::E>(L"Couldn't open log file: {}", logFilePath);
logging::print<logging::E>("Error: {} / {}", errno, e.what());
}
}
logging::print<logging::I>("Dalamud.Boot Injectable, (c) 2021 XIVLauncher Contributors");