diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-04 18:42:03 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-05 01:41:44 +0200 |
commit | 1ad425e4e19bfef683dfeab7547a0781ec150e44 (patch) | |
tree | caff928ed7057d013159da5fe104101068760026 /src/Setup | |
parent | b8786598103d6cf8ffcfde133f3e8651bb7ddc99 (diff) | |
download | VeraCrypt-1ad425e4e19bfef683dfeab7547a0781ec150e44.tar.gz VeraCrypt-1ad425e4e19bfef683dfeab7547a0781ec150e44.zip |
Windows: Install CHM User Guide instead of PDF one. Delete existing PDF when upgrading.
Diffstat (limited to 'src/Setup')
-rw-r--r-- | src/Setup/Setup.c | 25 | ||||
-rw-r--r-- | src/Setup/Setup.h | 4 |
2 files changed, 26 insertions, 3 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index bb7eef04..b08ded64 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -1016,6 +1016,29 @@ err: } } + // remove PDF from previous version if any + if (bUninstall == FALSE) + { + WIN32_FIND_DATA f; + HANDLE h; + + SetCurrentDirectory (szDestDir); + h = FindFirstFile (L"VeraCrypt User Guide*.pdf", &f); + + if (h != INVALID_HANDLE_VALUE) + { + do + { + StatDeleteFile (f.cFileName, TRUE); + } + while (FindNextFile(h, &f) != 0); + + FindClose (h); + } + + SetCurrentDirectory (SetupFilesDir); + } + // Language pack if (bUninstall == FALSE) { @@ -1036,7 +1059,7 @@ err: SetCurrentDirectory (SetupFilesDir); SetCurrentDirectory (L"Setup files"); - h = FindFirstFile (L"VeraCrypt User Guide.*.pdf", &f); + h = FindFirstFile (L"VeraCrypt User Guide.*.chm", &f); if (h != INVALID_HANDLE_VALUE) { wchar_t d[MAX_PATH*2]; diff --git a/src/Setup/Setup.h b/src/Setup/Setup.h index c4f3fb22..3c2bea71 100644 --- a/src/Setup/Setup.h +++ b/src/Setup/Setup.h @@ -21,7 +21,7 @@ extern "C" { // Specifies what files to install, where (determined by the prefix), and in what order static wchar_t *szFiles[]= { - L"AVeraCrypt User Guide.pdf", + L"AVeraCrypt User Guide.chm", L"ALicense.txt", L"ALICENSE", L"ANOTICE", @@ -81,7 +81,7 @@ static wchar_t *szFiles[]= // Specifies what files are included in self-extracting packages (no other files will be packaged or extracted). static wchar_t *szCompressedFiles[]= { - L"VeraCrypt User Guide.pdf", + L"VeraCrypt User Guide.chm", L"License.txt", L"LICENSE", L"NOTICE", |