mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
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:
parent
dbb0cb3d56
commit
b6237267ce
8 changed files with 134 additions and 46 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue