GlosSITarget: Fix/improve some logs

pull/130/head
Peter Repukat 3 years ago
parent 5de6dffb49
commit a34632369b

@ -51,8 +51,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,1,001006800550 FILEVERSION 0,0,1,003005025411
PRODUCTVERSION 0,0,1,001006800550 PRODUCTVERSION 0,0,1,003005025411
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware" VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - Config" VALUE "FileDescription", "GlosSI - Config"
VALUE "FileVersion", "0.0.1.0-1-g68bd55d" VALUE "FileVersion", "0.0.1.0-3-g5f25411"
VALUE "InternalName", "GlosSIConfig" VALUE "InternalName", "GlosSIConfig"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware" VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSIConfig.exe" VALUE "OriginalFilename", "GlosSIConfig.exe"
VALUE "ProductName", "GlosSi" VALUE "ProductName", "GlosSi"
VALUE "ProductVersion", "0.0.1.0-1-g68bd55d" VALUE "ProductVersion", "0.0.1.0-3-g5f25411"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -237,6 +237,10 @@ END

@ -134,6 +134,7 @@ void AppLauncher::launchWin32App(const std::wstring& path, const std::wstring& a
// launch_dir = m[0]; // launch_dir = m[0];
//} //}
std::wstring args_cpy(args); std::wstring args_cpy(args);
spdlog::debug(L"Launching Win32App app \"{}\"; args \"{}\"", native_seps_path, args_cpy);
if (CreateProcessW(native_seps_path.data(), if (CreateProcessW(native_seps_path.data(),
args_cpy.data(), args_cpy.data(),
nullptr, nullptr,
@ -149,12 +150,13 @@ void AppLauncher::launchWin32App(const std::wstring& path, const std::wstring& a
} }
else { else {
//spdlog::error(L"Couldn't start program: \"{}\" in directory: \"{}\"", native_seps_path, launch_dir); //spdlog::error(L"Couldn't start program: \"{}\" in directory: \"{}\"", native_seps_path, launch_dir);
spdlog::error(L"Couldn't start program: \"{}\" in directory: \"{}\"", native_seps_path); spdlog::error(L"Couldn't start program: \"{}\"", native_seps_path);
} }
} }
void AppLauncher::launchUWPApp(const LPCWSTR package_full_name, const std::wstring& args) void AppLauncher::launchUWPApp(const LPCWSTR package_full_name, const std::wstring& args)
{ {
spdlog::debug(L"Launching UWP app \"{}\"; args \"{}\"", package_full_name, args);
HRESULT result = CoInitialize(nullptr); HRESULT result = CoInitialize(nullptr);
if (SUCCEEDED(result)) { if (SUCCEEDED(result)) {

@ -51,8 +51,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,1,0 FILEVERSION 0,0,1,003005025411
PRODUCTVERSION 0,0,1,0 PRODUCTVERSION 0,0,1,003005025411
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware" VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - SteamTarget" VALUE "FileDescription", "GlosSI - SteamTarget"
VALUE "FileVersion", "0.0.1.0" VALUE "FileVersion", "0.0.1.0-3-g5f25411"
VALUE "InternalName", "GlosSITarget" VALUE "InternalName", "GlosSITarget"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware" VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSITarget.exe" VALUE "OriginalFilename", "GlosSITarget.exe"
VALUE "ProductName", "GlosSI" VALUE "ProductName", "GlosSI"
VALUE "ProductVersion", "0.0.1.0" VALUE "ProductVersion", "0.0.1.0-3-g5f25411"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@ -607,6 +607,10 @@ END

@ -60,7 +60,7 @@ inline void Parse(std::string arg1)
std::ifstream json_file; std::ifstream json_file;
json_file.open(path); json_file.open(path);
if (!json_file.is_open()) { if (!json_file.is_open()) {
spdlog::error("Couldn't open settings file {}", arg1); spdlog::error("Couldn't open settings file {}", path.string());
return; return;
} }
const auto json = nlohmann::json::parse(json_file); const auto json = nlohmann::json::parse(json_file);
@ -110,6 +110,8 @@ inline void Parse(std::string arg1)
} }
json_file.close(); json_file.close();
spdlog::debug("Read config file \"{}\"", path.string());
} }
} // namespace Settings } // namespace Settings

@ -89,7 +89,14 @@ int main(int argc, char* argv[])
Settings::Parse(argsv); Settings::Parse(argsv);
SteamTarget target(argc, argv); SteamTarget target(argc, argv);
#endif #endif
const auto exit = target.run(); auto exit = 1;
try {
exit = target.run();
} catch (std::exception& e) {
spdlog::error("Exception occured: {}", e.what());
} catch (...) {
spdlog::error("Unknown exception occured");
}
spdlog::shutdown(); spdlog::shutdown();
return exit; return exit;
} }
Loading…
Cancel
Save