From 5ae400231dadc63157054b0d96172a6bfaa48a50 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 12 Nov 2020 01:30:57 -0800 Subject: [PATCH] Updated version string in Windows Service Installer UI --- meshservice/ServiceMain.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/meshservice/ServiceMain.c b/meshservice/ServiceMain.c index 7094589..f4d91fa 100644 --- a/meshservice/ServiceMain.c +++ b/meshservice/ServiceMain.c @@ -1067,9 +1067,23 @@ INT_PTR CALLBACK DialogHandler(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP hotfix = (pFileInfo->dwFileVersionLS >> 16) & 0xffff; other = (pFileInfo->dwFileVersionLS) & 0xffff; #ifdef _WIN64 - sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "v%d.%d.%d, 64bit", major, minor, hotfix); + if (SOURCE_COMMIT_DATE != NULL) + { + sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "%s, 64bit", SOURCE_COMMIT_DATE); + } + else + { + sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "v%d.%d.%d, 64bit", major, minor, hotfix); + } #else - sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "v%d.%d.%d", major, minor, hotfix); + if (SOURCE_COMMIT_DATE != NULL) + { + sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "%s", SOURCE_COMMIT_DATE); + } + else + { + sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "v%d.%d.%d", major, minor, hotfix); + } #endif SetWindowTextA(GetDlgItem(hDlg, IDC_VERSIONTEXT), ILibScratchPad); }