diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-09-01 17:20:01 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-09-01 17:20:01 +0200 |
commit | 71dc18aaa2a57531c95465dbab302987d6562e76 (patch) | |
tree | 296447442d06c28a1227ff191c6236c5dc429eb1 /src/Setup/Setup.c | |
parent | 61fe6cc82f6d562fc25350599083912b6b3188e5 (diff) | |
download | VeraCrypt-71dc18aaa2a57531c95465dbab302987d6562e76.tar.gz VeraCrypt-71dc18aaa2a57531c95465dbab302987d6562e76.zip |
Windows: Fix MSI not installing all new documentation file. Remove old files left from old versions. Increment version to 1.26.15.
Diffstat (limited to 'src/Setup/Setup.c')
-rw-r--r-- | src/Setup/Setup.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index dc8c8ccc..43ea971b 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -2016,6 +2016,37 @@ error: return bOK; } +void RemoveLegacyFiles (wchar_t *szDestDir) +{ + const wchar_t* oldFileNames[] = { + L"docs\\html\\en\\BCH_Logo_48x30.png", + L"docs\\html\\en\\LinuxPrepAndBuild.sh", + L"docs\\html\\en\\LinuxPrepAndBuild.zip", + L"docs\\html\\en\\RIPEMD-160.html", + L"docs\\html\\en\\ru\\BCH_Logo_48x30.png", + L"Languages\\Language.ru - Copy.xml", + }; + wchar_t szDir[TC_MAX_PATH]; + wchar_t oldPath[TC_MAX_PATH]; + BOOL bSlash; + size_t x, i; + + StringCbCopyW (szDir, sizeof(szDir), szDestDir); + x = wcslen (szDestDir); + if (szDestDir[x - 1] == L'\\') + bSlash = TRUE; + else + bSlash = FALSE; + + if (bSlash == FALSE) + StringCbCatW (szDir, sizeof(szDir), L"\\"); + + for (i = 0; i < ARRAYSIZE(oldFileNames); i++) + { + StringCbPrintfW (oldPath, sizeof(oldPath), L"%s%s", szDestDir, oldFileNames[i]); + StatDeleteFile (oldPath, FALSE); + } +} void OutcomePrompt (HWND hwndDlg, BOOL bOK) { @@ -2199,7 +2230,6 @@ void DoInstall (void *arg) HWND hwndDlg = (HWND) arg; BOOL bOK = TRUE; wchar_t path[MAX_PATH]; - BootEncryption bootEnc (hwndDlg); // Refresh the main GUI (wizard thread) @@ -2343,6 +2373,12 @@ void DoInstall (void *arg) bRestartRequired = TRUE; // Restart is required to apply the new memory protection settings } + if (bOK && bUpgrade) + { + // delete legacy files + RemoveLegacyFiles (InstallationPath); + } + if (bOK) { UpdateProgressBarProc(100); |