VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Common/Dlgcode.c6
-rw-r--r--src/Setup/Setup.c25
-rw-r--r--src/Setup/Setup.h4
-rw-r--r--src/Signing/sign.bat12
-rw-r--r--src/Signing/sign_test.bat13
-rw-r--r--src/Signing/sign_test_debug.bat12
6 files changed, 57 insertions, 15 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index e6a609b..8f59dcf 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -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");
}
}
}
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index bb7eef0..b08ded6 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 c4f3fb2..3c2bea7 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",
diff --git a/src/Signing/sign.bat b/src/Signing/sign.bat
index 662e68f..8431cf5 100644
--- a/src/Signing/sign.bat
+++ b/src/Signing/sign.bat
@@ -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"
diff --git a/src/Signing/sign_test.bat b/src/Signing/sign_test.bat
index 477233f..14d6888 100644
--- a/src/Signing/sign_test.bat
+++ b/src/Signing/sign_test.bat
@@ -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"
diff --git a/src/Signing/sign_test_debug.bat b/src/Signing/sign_test_debug.bat
index eeb8595..7932928 100644
--- a/src/Signing/sign_test_debug.bat
+++ b/src/Signing/sign_test_debug.bat
@@ -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"