[win-linux] updatesvc: add log support for portable version

This commit is contained in:
SimplestStudio
2024-09-02 12:01:07 +03:00
parent 7ebc18b2b1
commit 128957b8b3
3 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,8 @@ int main(int argc, char *argv[])
if (argc > 1) {
if (strcmp(argv[1], "--run-as-app") == 0) {
NS_Utils::parseCmdArgs(argc, argv);
if (NS_Utils::cmdArgContains("--log"))
NS_Logger::AllowWriteLog();
std::locale::global(std::locale(""));
Translator lang(NS_Utils::GetAppLanguage(), "/langs/langs.iss");
CSocket socket(0, INSTANCE_SVC_PORT);

View File

@ -99,6 +99,8 @@ int __cdecl _tmain (int argc, TCHAR *argv[])
if (lstrcmpi(argv[1], _T("--run-as-app")) == 0) {
NS_Utils::setRunAsApp();
NS_Utils::parseCmdArgs(argc, argv);
if (NS_Utils::cmdArgContains(_T("--log")))
NS_Logger::AllowWriteLog();
std::locale::global(std::locale(""));
Translator lang(NS_Utils::GetAppLanguage().c_str(), IDT_TRANSLATIONS);
CSocket socket(0, INSTANCE_SVC_PORT);