Windows: Install CHM User Guide instead of PDF one. Delete existing PDF when upgrading.

This commit is contained in:
Mounir IDRASSI 2017-06-04 18:42:03 +02:00
parent b878659810
commit 1ad425e4e1
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC
6 changed files with 57 additions and 15 deletions

View File

@ -3054,11 +3054,11 @@ void InitHelpFileName (void)
if (strcmp (GetPreferredLangId(), "en") == 0
|| strlen(GetPreferredLangId()) == 0)
{
StringCbCatW (szHelpFile, sizeof(szHelpFile), L"VeraCrypt User Guide.pdf");
StringCbCatW (szHelpFile, sizeof(szHelpFile), L"VeraCrypt User Guide.chm");
}
else
{
StringCbPrintfW (szTemp, sizeof(szTemp), L"VeraCrypt User Guide.%S.pdf", GetPreferredLangId());
StringCbPrintfW (szTemp, sizeof(szTemp), L"VeraCrypt User Guide.%S.chm", GetPreferredLangId());
StringCbCatW (szHelpFile, sizeof(szHelpFile), szTemp);
}
@ -3069,7 +3069,7 @@ void InitHelpFileName (void)
{
++lpszTmp;
*lpszTmp = 0;
StringCbCatW (szHelpFile2, sizeof(szHelpFile2), L"VeraCrypt User Guide.pdf");
StringCbCatW (szHelpFile2, sizeof(szHelpFile2), L"VeraCrypt User Guide.chm");
}
}
}

View File

@ -1016,6 +1016,29 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
}
}
// 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 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
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];

View File

@ -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",

View File

@ -1,5 +1,11 @@
PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip
set SIGNINGPATH=%~dp0
call "..\..\..\doc\chm\create_chm.bat"
cd %SIGNINGPATH%
rem sign using SHA-1
signtool sign /v /a /n IDRIX /i Thawte /ac thawte_Primary_MS_Cross_Cert.cer /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys"
signtool sign /v /a /n IDRIX /i Thawte /ac Thawt_CodeSigning_CA.crt /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe"
@ -14,7 +20,7 @@ cd "..\Release\Setup Files\"
copy ..\..\LICENSE .
copy ..\..\License.txt .
copy ..\..\NOTICE .
copy "..\..\..\doc\VeraCrypt User Guide.pdf" .
copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" .
del *.xml
copy /V /Y ..\..\..\Translations\*.xml .
@ -31,13 +37,13 @@ del docs.zip
del LICENSE
del License.txt
del NOTICE
del "VeraCrypt User Guide.pdf"
del "VeraCrypt User Guide.chm"
del *.xml
del docs.zip
rmdir /S /Q docs
cd "..\..\Signing"
cd %SIGNINGPATH%
rem sign using SHA-1
signtool sign /v /a /n IDRIX /i Thawte /ac Thawt_CodeSigning_CA.crt /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Setup 1.20-BETA2.exe"

View File

@ -7,6 +7,13 @@ set SHA256PFXNAME=TestCertificate\idrix_Sha256CodeSign.pfx
set SHA256PFXPASSWORD=idrix
set SHA256PFXCA=TestCertificate\idrix_SHA256TestRootCA.crt
set SIGNINGPATH=%~dp0
cd %SIGNINGPATH%
call "..\..\doc\chm\create_chm.bat"
cd %SIGNINGPATH%
rem sign using SHA-1
signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe"
@ -18,7 +25,7 @@ cd "..\Release\Setup Files\"
copy ..\..\LICENSE .
copy ..\..\License.txt .
copy ..\..\NOTICE .
copy "..\..\..\doc\VeraCrypt User Guide.pdf" .
copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" .
del *.xml
copy /V /Y ..\..\..\Translations\*.xml .
@ -35,13 +42,13 @@ del docs.zip
del LICENSE
del License.txt
del NOTICE
del "VeraCrypt User Guide.pdf"
del "VeraCrypt User Guide.chm"
del *.xml
del docs.zip
rmdir /S /Q docs
cd "..\..\Signing"
cd %SIGNINGPATH%
rem sign using SHA-1
signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Setup 1.20-BETA2.exe"

View File

@ -7,6 +7,12 @@ set SHA256PFXNAME=TestCertificate\idrix_Sha256CodeSign.pfx
set SHA256PFXPASSWORD=idrix
set SHA256PFXCA=TestCertificate\idrix_SHA256TestRootCA.crt
set SIGNINGPATH=%~dp0
call "..\..\..\doc\chm\create_chm.bat"
cd %SIGNINGPATH%
rem sign using SHA-1
signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe"
@ -18,7 +24,7 @@ cd "..\Debug\Setup Files\"
copy ..\..\LICENSE .
copy ..\..\License.txt .
copy ..\..\NOTICE .
copy "..\..\..\doc\VeraCrypt User Guide.pdf" .
copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" .
del *.xml
copy /V /Y ..\..\..\Translations\*.xml .
@ -35,13 +41,13 @@ del docs.zip
del LICENSE
del License.txt
del NOTICE
del "VeraCrypt User Guide.pdf"
del "VeraCrypt User Guide.chm"
del *.xml
del docs.zip
rmdir /S /Q docs
cd "..\..\Signing"
cd %SIGNINGPATH%
rem sign using SHA-1
signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Debug\Setup Files\VeraCrypt Setup 1.20-BETA2.exe"