GlosSITarget: Fix/improve some logs

main
Peter Repukat 3 years ago
parent 5de6dffb49
commit a34632369b

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,1,001006800550
PRODUCTVERSION 0,0,1,001006800550
FILEVERSION 0,0,1,003005025411
PRODUCTVERSION 0,0,1,003005025411
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - Config"
VALUE "FileVersion", "0.0.1.0-1-g68bd55d"
VALUE "FileVersion", "0.0.1.0-3-g5f25411"
VALUE "InternalName", "GlosSIConfig"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSIConfig.exe"
VALUE "ProductName", "GlosSi"
VALUE "ProductVersion", "0.0.1.0-1-g68bd55d"
VALUE "ProductVersion", "0.0.1.0-3-g5f25411"
END
END
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];
//}
std::wstring args_cpy(args);
spdlog::debug(L"Launching Win32App app \"{}\"; args \"{}\"", native_seps_path, args_cpy);
if (CreateProcessW(native_seps_path.data(),
args_cpy.data(),
nullptr,
@ -149,12 +150,13 @@ void AppLauncher::launchWin32App(const std::wstring& path, const std::wstring& a
}
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);
spdlog::error(L"Couldn't start program: \"{}\"", native_seps_path);
}
}
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);
if (SUCCEEDED(result)) {

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

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

@ -89,7 +89,14 @@ int main(int argc, char* argv[])
Settings::Parse(argsv);
SteamTarget target(argc, argv);
#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();
return exit;
}
Loading…
Cancel
Save