1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: move language XML files to new "Languages" folder in the installation directory.

This commit is contained in:
Mounir IDRASSI
2017-06-05 01:38:22 +02:00
parent 0ef137c0a4
commit eb72fe7aa9
7 changed files with 44 additions and 111 deletions

View File

@@ -1015,14 +1015,15 @@ err:
return FALSE;
}
}
// remove PDF from previous version if any
if (bUninstall == FALSE)
{
WIN32_FIND_DATA f;
HANDLE h;
SetCurrentDirectory (szDestDir);
// remove PDF from previous version if any
h = FindFirstFile (L"VeraCrypt User Guide*.pdf", &f);
if (h != INVALID_HANDLE_VALUE)
@@ -1036,39 +1037,21 @@ err:
FindClose (h);
}
SetCurrentDirectory (SetupFilesDir);
}
// Language pack
if (bUninstall == FALSE)
{
WIN32_FIND_DATA f;
HANDLE h;
SetCurrentDirectory (SetupFilesDir);
h = FindFirstFile (L"Language.*.xml", &f);
// remove language XML files from previous version if any
h = FindFirstFile (L"Language*.xml", &f);
if (h != INVALID_HANDLE_VALUE)
{
wchar_t d[MAX_PATH*2];
StringCbPrintfW (d, sizeof(d), L"%s%s", szDestDir, f.cFileName);
CopyMessage (hwndDlg, d);
TCCopyFile (f.cFileName, d);
do
{
StatDeleteFile (f.cFileName, TRUE);
}
while (FindNextFile(h, &f) != 0);
FindClose (h);
}
SetCurrentDirectory (SetupFilesDir);
SetCurrentDirectory (L"Setup files");
h = FindFirstFile (L"VeraCrypt User Guide.*.chm", &f);
if (h != INVALID_HANDLE_VALUE)
{
wchar_t d[MAX_PATH*2];
StringCbPrintfW (d, sizeof(d), L"%s%s", szDestDir, f.cFileName);
CopyMessage (hwndDlg, d);
TCCopyFile (f.cFileName, d);
FindClose (h);
}
SetCurrentDirectory (SetupFilesDir);
}
return bOK;