mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Windows: Fix MSI not installing all new documentation file. Remove old files left from old versions. Increment version to 1.26.15.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user