From 71dc18aaa2a57531c95465dbab302987d6562e76 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 1 Sep 2024 17:20:01 +0200 Subject: Windows: Fix MSI not installing all new documentation file. Remove old files left from old versions. Increment version to 1.26.15. --- src/Setup/MacOSX/veracrypt.pkgproj | 4 ++-- src/Setup/MacOSX/veracrypt_Legacy.pkgproj | 2 +- src/Setup/MacOSX/veracrypt_fuse-t.pkgproj | 4 ++-- src/Setup/Portable.rc | 8 +++---- src/Setup/Setup.c | 38 ++++++++++++++++++++++++++++++- src/Setup/Setup.rc | 8 +++---- 6 files changed, 50 insertions(+), 14 deletions(-) (limited to 'src/Setup') diff --git a/src/Setup/MacOSX/veracrypt.pkgproj b/src/Setup/MacOSX/veracrypt.pkgproj index d19cf13f..6f027358 100755 --- a/src/Setup/MacOSX/veracrypt.pkgproj +++ b/src/Setup/MacOSX/veracrypt.pkgproj @@ -557,7 +557,7 @@ USE_HFS+_COMPRESSION VERSION - 1.26.14 + 1.26.15 TYPE 0 @@ -1025,7 +1025,7 @@ https://osxfuse.github.io/ NAME - VeraCrypt 1.26.14 + VeraCrypt 1.26.15 PAYLOAD_ONLY TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING diff --git a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj index 6032b125..0c7d16cb 100755 --- a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj +++ b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj @@ -557,7 +557,7 @@ USE_HFS+_COMPRESSION VERSION - 1.26.14 + 1.26.15 TYPE 0 diff --git a/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj b/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj index 93bd3321..fb349daf 100755 --- a/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj +++ b/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj @@ -557,7 +557,7 @@ USE_HFS+_COMPRESSION VERSION - 1.26.14 + 1.26.15 TYPE 0 @@ -1024,7 +1024,7 @@ https://github.com/macos-fuse-t/fuse-t/releases NAME - VeraCrypt 1.26.14 + VeraCrypt 1.26.15 PAYLOAD_ONLY TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING diff --git a/src/Setup/Portable.rc b/src/Setup/Portable.rc index 9f125fd7..f62e9da0 100644 --- a/src/Setup/Portable.rc +++ b/src/Setup/Portable.rc @@ -26,8 +26,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,14,0 - PRODUCTVERSION 1,26,14,0 + FILEVERSION 1,26,15,0 + PRODUCTVERSION 1,26,15,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -44,11 +44,11 @@ BEGIN BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Portable" - VALUE "FileVersion", "1.26.14" + VALUE "FileVersion", "1.26.15" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Portable.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.14" + VALUE "ProductVersion", "1.26.15" END END BLOCK "VarFileInfo" 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); diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc index e2f55ff8..a0e59660 100644 --- a/src/Setup/Setup.rc +++ b/src/Setup/Setup.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,14,0 - PRODUCTVERSION 1,26,14,0 + FILEVERSION 1,26,15,0 + PRODUCTVERSION 1,26,15,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -46,11 +46,11 @@ BEGIN BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Setup" - VALUE "FileVersion", "1.26.14" + VALUE "FileVersion", "1.26.15" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Setup.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.14" + VALUE "ProductVersion", "1.26.15" END END BLOCK "VarFileInfo" -- cgit v1.2.3