diff --git a/launchers/win32/LauncherDlg.cpp b/launchers/win32/LauncherDlg.cpp index d3cae39013..98c61794a0 100644 --- a/launchers/win32/LauncherDlg.cpp +++ b/launchers/win32/LauncherDlg.cpp @@ -213,6 +213,9 @@ BOOL CLauncherDlg::getHQInfo(const CString& orgname) { CString lowerOrgName = orgname; lowerOrgName.MakeLower(); LauncherUtils::hMac256(lowerOrgName, LAUNCHER_HMAC_SECRET, hash); + CString msg; + msg.Format(_T("Calculated hash: \"%s\" => \"%s\""), lowerOrgName, hash); + theApp._manager.addToLog(msg); return theApp._manager.readOrganizationJSON(hash) == LauncherUtils::ResponseError::NoError; } diff --git a/launchers/win32/LauncherManager.cpp b/launchers/win32/LauncherManager.cpp index fc79287457..47c84f1124 100644 --- a/launchers/win32/LauncherManager.cpp +++ b/launchers/win32/LauncherManager.cpp @@ -427,6 +427,11 @@ BOOL LauncherManager::extractApplication() { LauncherUtils::cStringToStd(installPath), [&](int type, int size) { onZipExtracted((ZipType)type, size); }); + if (success) { + addToLog(_T("Created thread for unzipping application.")); + } else { + addToLog(_T("Failed to create thread for unzipping application.")); + } return success; } @@ -449,6 +454,11 @@ BOOL LauncherManager::installContent() { LauncherUtils::cStringToStd(contentPath), [&](int type, int size) { onZipExtracted((ZipType)type, size); }); + if (success) { + addToLog(_T("Created thread for unzipping content.")); + } else { + addToLog(_T("Failed to create thread for unzipping content.")); + } return success; } diff --git a/launchers/win32/LauncherUtils.cpp b/launchers/win32/LauncherUtils.cpp index cfb8b765c5..11ac10b5f2 100644 --- a/launchers/win32/LauncherUtils.cpp +++ b/launchers/win32/LauncherUtils.cpp @@ -16,6 +16,7 @@ #pragma comment(lib, "winhttp") +#include "LauncherApp.h" #include "LauncherUtils.h" CString LauncherUtils::urlEncodeString(const CString& url) { @@ -230,14 +231,24 @@ uint64_t LauncherUtils::extractZip(const std::string& zipFile, const std::string auto status = mz_zip_reader_init_file(&zip_archive, zipFile.c_str(), 0); + { + CString msg; + msg.Format(_T("Reading zip file %s, extracting to %s"), CString(zipFile.c_str()), CString(path.c_str())); + theApp._manager.addToLog(msg); + } + if (!status) return 0; int fileCount = (int)mz_zip_reader_get_num_files(&zip_archive); if (fileCount == 0) { + theApp._manager.addToLog(_T("Zip archive has a file count of 0")); + mz_zip_reader_end(&zip_archive); return 0; } mz_zip_archive_file_stat file_stat; if (!mz_zip_reader_file_stat(&zip_archive, 0, &file_stat)) { + theApp._manager.addToLog(_T("Zip archive cannot be stat'd")); + mz_zip_reader_end(&zip_archive); return 0; } @@ -263,6 +274,12 @@ uint64_t LauncherUtils::extractZip(const std::string& zipFile, const std::string } } + { + CString msg; + msg.Format(_T("Done unzipping archive, total size: %llu"), totalSize); + theApp._manager.addToLog(msg); + } + // Close the archive, freeing any resources it was using mz_zip_reader_end(&zip_archive); return totalSize;