diff options
Diffstat (limited to 'src/Setup')
-rw-r--r-- | src/Setup/ComSetup.cpp | 2 | ||||
-rw-r--r-- | src/Setup/ComSetup.h | 2 | ||||
-rw-r--r-- | src/Setup/ComSetup.rgs | 14 | ||||
-rw-r--r-- | src/Setup/Dir.c | 8 | ||||
-rw-r--r-- | src/Setup/Dir.h | 8 | ||||
-rw-r--r-- | src/Setup/Linux/veracrypt_install_template.sh | 66 | ||||
-rwxr-xr-x | src/Setup/MacOSX/veracrypt.pkgproj | 2 | ||||
-rw-r--r-- | src/Setup/Resource.h | 2 | ||||
-rw-r--r-- | src/Setup/SelfExtract.c | 62 | ||||
-rw-r--r-- | src/Setup/SelfExtract.h | 2 | ||||
-rw-r--r-- | src/Setup/Setup.c | 112 | ||||
-rw-r--r-- | src/Setup/Setup.h | 8 | ||||
-rw-r--r-- | src/Setup/Setup.rc | 8 | ||||
-rw-r--r-- | src/Setup/Wizard.c | 50 | ||||
-rw-r--r-- | src/Setup/Wizard.h | 8 |
15 files changed, 177 insertions, 177 deletions
diff --git a/src/Setup/ComSetup.cpp b/src/Setup/ComSetup.cpp index 24e5262f..1b3220d9 100644 --- a/src/Setup/ComSetup.cpp +++ b/src/Setup/ComSetup.cpp @@ -3,7 +3,7 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Setup/ComSetup.h b/src/Setup/ComSetup.h index 56e30139..6001fde2 100644 --- a/src/Setup/ComSetup.h +++ b/src/Setup/ComSetup.h @@ -3,7 +3,7 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Setup/ComSetup.rgs b/src/Setup/ComSetup.rgs index ed927913..b8201c10 100644 --- a/src/Setup/ComSetup.rgs +++ b/src/Setup/ComSetup.rgs @@ -20,7 +20,7 @@ HKCR LocalServer32 = s '"%MAIN_MODULE%"' TypeLib = s '{9ACF6176-5FC4-4690-A025-B3306A50EB6A}' - + Elevation { val Enabled = d 1 @@ -38,13 +38,13 @@ HKCR { val AccessPermission = b 010004803000000040000000000000001400000002001c000100000000001400070000000101000000000005040000000102000000000005200000002002000001020000000000052000000020020000 } - + ForceRemove VeraCrypt.exe { val AppId = s '{FE8B3B95-C80C-41f7-830F-FBA271C26F7E}' } } - + ForceRemove VeraCryptFormat.1 = s 'VeraCryptFormat class' { CLSID = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' @@ -55,7 +55,7 @@ HKCR CLSID = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' CurVer = s 'VeraCryptFormat.1' } - + NoRemove CLSID { ForceRemove {A96D3797-9F31-49f4-A0CE-9657392CF789} = s 'VeraCryptFormat class' @@ -65,7 +65,7 @@ HKCR LocalServer32 = s '"%FORMAT_MODULE%"' TypeLib = s '{56327DDA-F1A7-4e13-B128-520D129BDEF6}' - + Elevation { val Enabled = d 1 @@ -76,14 +76,14 @@ HKCR val LocalizedString = s '@%FORMAT_MODULE%,-112' } } - + NoRemove AppId { ForceRemove {A96D3797-9F31-49f4-A0CE-9657392CF789} = s 'VeraCryptFormat class' { val AccessPermission = b 010004803000000040000000000000001400000002001c000100000000001400070000000101000000000005040000000102000000000005200000002002000001020000000000052000000020020000 } - + ForceRemove 'VeraCrypt Format.exe' { val AppId = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' diff --git a/src/Setup/Dir.c b/src/Setup/Dir.c index 342ff748..3619f2d9 100644 --- a/src/Setup/Dir.c +++ b/src/Setup/Dir.c @@ -1,11 +1,11 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' - Modifications and additions to the original source code (contained in this file) + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Setup/Dir.h b/src/Setup/Dir.h index 2126bb42..5db9fa51 100644 --- a/src/Setup/Dir.h +++ b/src/Setup/Dir.h @@ -1,11 +1,11 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' - Modifications and additions to the original source code (contained in this file) + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh index 170f72ec..8eaf15c8 100644 --- a/src/Setup/Linux/veracrypt_install_template.sh +++ b/src/Setup/Linux/veracrypt_install_template.sh @@ -3,7 +3,7 @@ # Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed # by the TrueCrypt License 3.0. # -# Modifications and additions to the original source code (contained in this file) +# Modifications and additions to the original source code (contained in this file) # and all other portions of this file are Copyright (c) 2013-2016 IDRIX # and are governed by the Apache License 2.0 the full text of which is # contained in the file License.txt included in VeraCrypt binary and source @@ -49,13 +49,13 @@ fi if [ $TTY -eq 0 ] then [ $GUI -eq 0 ] && echo 'Error: Terminal required' >&2 && exit 1 - + if [ $XMESSAGE -eq 0 ] || ([ $XTERM -eq 0 ] && [ $GTERM -eq 0 ] && [ $KTERM -eq 0 ]) then which gnome-terminal && exec gnome-terminal -e "$0" which konsole && exec konsole -e "$0" which xterm && exec xterm -e "$0" - + [ $XMESSAGE -eq 1 ] && show_exit_message 'Error: Terminal required' exit 1 fi @@ -107,7 +107,7 @@ show_message() show_exit_message() { show_message "$*" - + if [ $XMESSAGE -eq 0 ] then printf 'Press Enter to exit... ' @@ -131,16 +131,16 @@ BOUND BY ALL TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT ACCEPT THEM, DO NOT USE, COPY, MODIFY, NOR (RE)DISTRIBUTE THE SOFTWARE, NOR ANY PART(S) THEREOF. -VeraCrypt is multi-licensed under Apache License 2.0 and -the TrueCrypt License version 3.0, a verbatim copy of both +VeraCrypt is multi-licensed under Apache License 2.0 and +the TrueCrypt License version 3.0, a verbatim copy of both licenses can be found below. -This license does not grant you rights to use any -contributors' name, logo, or trademarks, including IDRIX, +This license does not grant you rights to use any +contributors' name, logo, or trademarks, including IDRIX, VeraCrypt and all derivative names. -For example, the following names are not allowed: VeraCrypt, -VeraCrypt+, VeraCrypt Professional, iVeraCrypt, etc. Nor any -other names confusingly similar to the name VeraCrypt (e.g., +For example, the following names are not allowed: VeraCrypt, +VeraCrypt+, VeraCrypt Professional, iVeraCrypt, etc. Nor any +other names confusingly similar to the name VeraCrypt (e.g., Vera-Crypt, Vera Crypt, VerKrypt, etc.) ____________________________________________________________ @@ -172,7 +172,7 @@ of such entity. exercising permissions granted by this License. "Source" form shall mean the preferred form for making -modifications, including but not limited to software source +modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical @@ -200,7 +200,7 @@ additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the -purposes of this definition, "submitted" means any form +purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control @@ -222,18 +222,18 @@ prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable(except as stated in this section) patent license -to make, have made, use, offer to sell, sell, import, and -otherwise transfer the Work, where such license applies only +irrevocable(except as stated in this section) patent license +to make, have made, use, offer to sell, sell, import, and +otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are -necessarily infringed by their Contribution(s) alone or by +necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent -litigation against any entity (including a cross-claim or -counterclaim in a lawsuit) alleging that the Work or a +litigation against any entity (including a cross-claim or +counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate @@ -273,7 +273,7 @@ that You meet the following conditions: You may add Your own copyright statement to Your modifications and may provide additional or different license terms -and conditions for use, reproduction, or distribution of +and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. @@ -298,7 +298,7 @@ agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or -conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, +conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of @@ -311,7 +311,7 @@ deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not +out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the @@ -320,7 +320,7 @@ possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, -warranty, indemnity, or other liability obligations and/or +warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, @@ -848,7 +848,7 @@ then cat <<_END | xmessage -center -file - -buttons "Exit:1,Extract .$PACKAGE_TYPE Package File:20,Install VeraCrypt:10" -default 'Install VeraCrypt' VeraCrypt $VERSION Setup ==================== - VeraCrypt is a free disk encryption software brought to you by IDRIX + VeraCrypt is a free disk encryption software brought to you by IDRIX (http://www.idrix.fr) and that is based on TrueCrypt. It is a software system for establishing and maintaining an on-the-fly-encrypted volume (data storage device). On-the-fly encryption @@ -864,7 +864,7 @@ Please select one of the below options: _END SEL=$? - + case $SEL in 1) exit 1 ;; @@ -892,10 +892,10 @@ Installation options: _MENU_END printf 'To select, enter 1 or 2: ' - + read SEL [ -z "$SEL" ] && SEL=1 - + case $SEL in 1) INSTALL=1 ;; @@ -948,14 +948,14 @@ Press Page Down key or use the scroll bar to see the rest of the license. _END SEL=$? - + rm -f $LICENSE if [ $SEL -ne 10 ] then show_exit_message 'Installation/extraction aborted' exit 1 fi - + else # Console license agreement @@ -1001,9 +1001,9 @@ _END while [ $ACCEPTED -eq 0 ] do printf '\n\nDo you accept and agree to be bound by the license terms? (yes/no): ' - + read SEL - + case $SEL in y|Y|yes|YES) ACCEPTED=1 @@ -1080,7 +1080,7 @@ then else echo 'Installing package...' $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE && INSTALLED=1 - + if [ $INSTALLED -eq 1 ] then show_exit_message '' diff --git a/src/Setup/MacOSX/veracrypt.pkgproj b/src/Setup/MacOSX/veracrypt.pkgproj index 3ccb7992..ecf06615 100755 --- a/src/Setup/MacOSX/veracrypt.pkgproj +++ b/src/Setup/MacOSX/veracrypt.pkgproj @@ -791,7 +791,7 @@ <string></string> <key>VALUE</key> <string>OSXFuse seems to be missing on your machine. VeraCrypt requires OSXFuse 2.3 or above. -Please download the latest OSXFuse version from : +Please download the latest OSXFuse version from : https://osxfuse.github.io/</string> </dict> <dict> diff --git a/src/Setup/Resource.h b/src/Setup/Resource.h index bbbd4766..8feaf3dc 100644 --- a/src/Setup/Resource.h +++ b/src/Setup/Resource.h @@ -52,7 +52,7 @@ #define IDC_DONATE 1032 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c index e427e44c..5129e991 100644 --- a/src/Setup/SelfExtract.c +++ b/src/Setup/SelfExtract.c @@ -3,7 +3,7 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -51,8 +51,8 @@ void SelfExtractStartupInit (void) } -// The end marker must be included in the self-extracting exe only once, not twice (used e.g. -// by IsSelfExtractingPackage()) and that's why MAG_END_MARKER_OBFUSCATED is obfuscated and +// The end marker must be included in the self-extracting exe only once, not twice (used e.g. +// by IsSelfExtractingPackage()) and that's why MAG_END_MARKER_OBFUSCATED is obfuscated and // needs to be deobfuscated using this function at startup. static void DeobfuscateMagEndMarker (void) { @@ -90,27 +90,27 @@ static int DecompressBuffer (char *out, char *in, int len) } -static void __cdecl PipeWriteThread (void *len) +static void __cdecl PipeWriteThread (void *len) { int sendBufSize = PIPE_BUFFER_LEN, bytesSent = 0; int bytesToSend = *((int *) len), bytesSentTotal = 0; if (PipeWriteBuf == NULL || (HANDLE) hChildStdinWrite == INVALID_HANDLE_VALUE) { - PkgError (L"Failed sending data to the STDIN pipe"); + PkgError (L"Failed sending data to the STDIN pipe"); return; } - while (bytesToSend > 0) - { + while (bytesToSend > 0) + { if (bytesToSend < PIPE_BUFFER_LEN) sendBufSize = bytesToSend; - if (!WriteFile ((HANDLE) hChildStdinWrite, (char *) PipeWriteBuf + bytesSentTotal, sendBufSize, &bytesSent, NULL) + if (!WriteFile ((HANDLE) hChildStdinWrite, (char *) PipeWriteBuf + bytesSentTotal, sendBufSize, &bytesSent, NULL) || bytesSent == 0 - || bytesSent != sendBufSize) + || bytesSent != sendBufSize) { - PkgError (L"Failed sending data to the STDIN pipe"); + PkgError (L"Failed sending data to the STDIN pipe"); return; } @@ -122,23 +122,23 @@ static void __cdecl PipeWriteThread (void *len) if (!CloseHandle (hChildStdinWrite)) { - PkgError (L"Cannot close pipe"); + PkgError (L"Cannot close pipe"); return; } } -// Returns 0 if compression fails or, if successful, the size of the compressed data +// Returns 0 if compression fails or, if successful, the size of the compressed data static int CompressBuffer (char *out, char *in, int len) { - SECURITY_ATTRIBUTES securityAttrib; + SECURITY_ATTRIBUTES securityAttrib; DWORD bytesReceived = 0; HANDLE hChildStdoutWrite = INVALID_HANDLE_VALUE; HANDLE hChildStdoutRead = INVALID_HANDLE_VALUE; HANDLE hChildStdinRead = INVALID_HANDLE_VALUE; STARTUPINFO startupInfo; - PROCESS_INFORMATION procInfo; - char pipeBuffer [PIPE_BUFFER_LEN]; + PROCESS_INFORMATION procInfo; + char pipeBuffer [PIPE_BUFFER_LEN]; int res_len = 0; BOOL bGzipHeaderRead = FALSE; wchar_t szGzipCmd[64]; @@ -147,13 +147,13 @@ static int CompressBuffer (char *out, char *in, int len) ZeroMemory (&procInfo, sizeof (procInfo)); // Pipe handle inheritance - securityAttrib.bInheritHandle = TRUE; - securityAttrib.nLength = sizeof (securityAttrib); - securityAttrib.lpSecurityDescriptor = NULL; + securityAttrib.bInheritHandle = TRUE; + securityAttrib.nLength = sizeof (securityAttrib); + securityAttrib.lpSecurityDescriptor = NULL; if (!CreatePipe (&hChildStdoutRead, &hChildStdoutWrite, &securityAttrib, 0)) { - PkgError (L"Cannot create STDOUT pipe."); + PkgError (L"Cannot create STDOUT pipe."); return 0; } SetHandleInformation (hChildStdoutRead, HANDLE_FLAG_INHERIT, 0); @@ -172,7 +172,7 @@ static int CompressBuffer (char *out, char *in, int len) startupInfo.wShowWindow = SW_HIDE; startupInfo.hStdInput = hChildStdinRead; startupInfo.hStdOutput = hChildStdoutWrite; - startupInfo.cb = sizeof (startupInfo); + startupInfo.cb = sizeof (startupInfo); startupInfo.hStdError = hChildStdoutWrite; startupInfo.dwFlags |= STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; @@ -196,7 +196,7 @@ static int CompressBuffer (char *out, char *in, int len) if (!CloseHandle (hChildStdoutWrite)) { - PkgError (L"Cannot close STDOUT write"); + PkgError (L"Cannot close STDOUT write"); CloseHandle(hChildStdoutRead); CloseHandle(hChildStdinRead); return 0; @@ -205,10 +205,10 @@ static int CompressBuffer (char *out, char *in, int len) bGzipHeaderRead = FALSE; // Read the compressed data from the pipe (sent by the child process to STDOUT) - while (TRUE) - { - if (!ReadFile (hChildStdoutRead, pipeBuffer, bGzipHeaderRead ? PIPE_BUFFER_LEN : 10, &bytesReceived, NULL)) - break; + while (TRUE) + { + if (!ReadFile (hChildStdoutRead, pipeBuffer, bGzipHeaderRead ? PIPE_BUFFER_LEN : 10, &bytesReceived, NULL)) + break; if (bGzipHeaderRead) { @@ -217,7 +217,7 @@ static int CompressBuffer (char *out, char *in, int len) } else bGzipHeaderRead = TRUE; // Skip the 10-byte gzip header - } + } CloseHandle(hChildStdoutRead); CloseHandle(hChildStdinRead); @@ -225,7 +225,7 @@ static int CompressBuffer (char *out, char *in, int len) } -// Clears all bytes that change when an exe file is digitally signed, except the data that are appended. +// Clears all bytes that change when an exe file is digitally signed, except the data that are appended. // If those bytes weren't cleared, CRC-32 checks would fail after signing. static void WipeSignatureAreas (char *buffer) { @@ -295,7 +295,7 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir) bufLen += 4; // 32-bit file length } - buffer = malloc (bufLen + 524288); // + 512K reserve + buffer = malloc (bufLen + 524288); // + 512K reserve if (buffer == NULL) { PkgError (L"Cannot allocate memory for uncompressed data"); @@ -309,7 +309,7 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir) // Write the start marker if (!SaveBufferToFile (MAG_START_MARKER, outputFile, strlen (MAG_START_MARKER), TRUE, FALSE)) - { + { if (_wremove (outputFile)) PkgError (L"Cannot write the start marker\nFailed also to delete package file"); else @@ -645,7 +645,7 @@ BOOL SelfExtractInMemory (wchar_t *path) Error ("DIST_PACKAGE_CORRUPTED", NULL); } - DecompressedData = malloc (uncompressedLen + 524288); // + 512K reserve + DecompressedData = malloc (uncompressedLen + 524288); // + 512K reserve if (DecompressedData == NULL) { Error ("ERR_MEM_ALLOC", NULL); @@ -693,7 +693,7 @@ BOOL SelfExtractInMemory (wchar_t *path) bufPos += Decompressed_Files[fileNo].fileLength; // Verify CRC-32 of the file (to verify that it didn't get corrupted while creating the solid archive). - if (Decompressed_Files[fileNo].crc + if (Decompressed_Files[fileNo].crc != GetCrc32 (Decompressed_Files[fileNo].fileContent, Decompressed_Files[fileNo].fileLength)) { Error ("DIST_PACKAGE_CORRUPTED", NULL); diff --git a/src/Setup/SelfExtract.h b/src/Setup/SelfExtract.h index 529b24d7..91e2ca7c 100644 --- a/src/Setup/SelfExtract.h +++ b/src/Setup/SelfExtract.h @@ -3,7 +3,7 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index 899c1583..331b8ea4 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -1,11 +1,11 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' - Modifications and additions to the original source code (contained in this file) + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -156,7 +156,7 @@ static void RecursiveSetOwner (HKEY hKey, PSECURITY_DESCRIPTOR pSD) { LSTATUS status = 0; DWORD dwIndex = 0, dwMaxNameLen = 0, dwNameLen = 0, numberSubKeys = 0; - HKEY hSubKey; + HKEY hSubKey; if ( (ERROR_SUCCESS == status) && (ERROR_SUCCESS == RegQueryInfoKey(hKey, NULL, NULL, NULL, &numberSubKeys, &dwMaxNameLen, NULL, NULL, NULL, NULL, NULL, NULL)) && (numberSubKeys >= 1) @@ -192,7 +192,7 @@ static void RecursiveSetDACL (HKEY hKey, const wchar_t* SubKeyName, PSECURITY_DE HKEY hSubKey; DWORD dwIndex = 0, dwMaxNameLen = 0, dwNameLen = 0, numberSubKeys = 0; LSTATUS status = RegOpenKeyExW(hKey, SubKeyName, 0, WRITE_DAC | KEY_READ /*| ACCESS_SYSTEM_SECURITY*/, &hSubKey); - if (status == ERROR_SUCCESS) + if (status == ERROR_SUCCESS) { status = RegSetKeySecurity (hSubKey, DACL_SECURITY_INFORMATION, pSD); if (status == ERROR_SUCCESS) @@ -235,16 +235,16 @@ static void AllowKeyAccess(HKEY Key,const wchar_t* SubKeyName) std::string sNewSD; RegResult = RegOpenKeyExW(Key, SubKeyName, 0, WRITE_OWNER | KEY_READ, &SvcKey); - if (RegResult==ERROR_SUCCESS) + if (RegResult==ERROR_SUCCESS) { - if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token)) + if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token)) { - if (!GetTokenInformation(Token, TokenUser, pTokenUser, 0, &dwLength)) + if (!GetTokenInformation(Token, TokenUser, pTokenUser, 0, &dwLength)) { - if (GetLastError() ==ERROR_INSUFFICIENT_BUFFER) + if (GetLastError() ==ERROR_INSUFFICIENT_BUFFER) { pTokenUser = (PTOKEN_USER) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwLength); - if (pTokenUser) + if (pTokenUser) { if (GetTokenInformation(Token, TokenUser, pTokenUser, dwLength, &dwLength)) { @@ -257,7 +257,7 @@ static void AllowKeyAccess(HKEY Key,const wchar_t* SubKeyName) RecursiveSetOwner(SvcKey, &SecDesc); } } - + } } } @@ -265,7 +265,7 @@ static void AllowKeyAccess(HKEY Key,const wchar_t* SubKeyName) RegCloseKey(SvcKey); } - if (pTokenUser) + if (pTokenUser) { PSID pSid = pTokenUser->User.Sid; DWORD dwAclSize = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + ::GetLengthSid(pSid) - sizeof(DWORD); @@ -338,7 +338,7 @@ void SearchAndDeleteRegistrySubString (HKEY hKey, const wchar_t *subKey, const w } for (std::list<std::wstring>::iterator ItSubKey = subKeysList.begin(); ItSubKey != subKeysList.end(); ItSubKey++) - { + { // if the string to search for is empty, delete the sub key, otherwise, look for matching value and delete them if (subStringLength == 0) { @@ -378,13 +378,13 @@ void SearchAndDeleteRegistrySubString (HKEY hKey, const wchar_t *subKey, const w foundEntries.push_back(szNameValue); } } - } while ((status == ERROR_SUCCESS) || (status == ERROR_MORE_DATA)); // we ignore ERROR_MORE_DATA errors since + } while ((status == ERROR_SUCCESS) || (status == ERROR_MORE_DATA)); // we ignore ERROR_MORE_DATA errors since // we are sure to use the correct sizes // delete the entries if (!foundEntries.empty()) { - for (std::list<std::wstring>::iterator It = foundEntries.begin(); + for (std::list<std::wstring>::iterator It = foundEntries.begin(); It != foundEntries.end(); It++) { RegDeleteValueW (hSubKey, It->c_str()); @@ -403,18 +403,18 @@ void SearchAndDeleteRegistrySubString (HKEY hKey, const wchar_t *subKey, const w } /* Set the given privilege of the current process */ -BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable) +BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable) { TOKEN_PRIVILEGES tp; LUID luid; - HANDLE hProcessToken; + HANDLE hProcessToken; BOOL bStatus = FALSE; if ( OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hProcessToken) ) { - if ( LookupPrivilegeValue( + if ( LookupPrivilegeValue( NULL, szPrivilegeName, &luid ) ) @@ -426,11 +426,11 @@ BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable) // Enable the privilege bStatus = AdjustTokenPrivileges( - hProcessToken, - FALSE, - &tp, - sizeof(TOKEN_PRIVILEGES), - (PTOKEN_PRIVILEGES) NULL, + hProcessToken, + FALSE, + &tp, + sizeof(TOKEN_PRIVILEGES), + (PTOKEN_PRIVILEGES) NULL, (PDWORD) NULL); } @@ -522,7 +522,7 @@ BOOL IsSystemRestoreEnabled () wchar_t szRegPath[MAX_PATH]; GetRestorePointRegKeyName (szRegPath, sizeof (szRegPath)); if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, szRegPath, 0, KEY_READ | KEY_WOW64_64KEY, &hKey) == ERROR_SUCCESS) - { + { if (IsOSAtLeast (WIN_VISTA)) { if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"RPSessionInterval", NULL, NULL, (LPBYTE) &dwValue, &cbValue)) @@ -542,7 +542,7 @@ BOOL IsSystemRestoreEnabled () } } - + RegCloseKey (hKey); } @@ -569,7 +569,7 @@ void StatusMessage (HWND hwndDlg, char *stringId) SendMessageW (GetDlgItem (hwndDlg, IDC_LOG_WINDOW), LB_ADDSTRING, 0, (LPARAM) GetString (stringId)); - SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_SETTOPINDEX, + SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_SETTOPINDEX, SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_GETCOUNT, 0, 0) - 1, 0); } @@ -582,8 +582,8 @@ void StatusMessageParam (HWND hwndDlg, char *stringId, wchar_t *param) StringCbPrintfW (szTmp, sizeof(szTmp), L"%s %s", GetString (stringId), param); SendMessageW (GetDlgItem (hwndDlg, IDC_LOG_WINDOW), LB_ADDSTRING, 0, (LPARAM) szTmp); - - SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_SETTOPINDEX, + + SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_SETTOPINDEX, SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_GETCOUNT, 0, 0) - 1, 0); } @@ -807,11 +807,11 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) // Find the correct decompressed file in memory for (fileNo = 0; fileNo < NBR_COMPRESSED_FILES; fileNo++) { - // Write the file (stored in memory) directly to the destination location + // Write the file (stored in memory) directly to the destination location // (there will be no temporary files). if (wmemcmp ( - curFileName, - Decompressed_Files[fileNo].fileName, + curFileName, + Decompressed_Files[fileNo].fileName, min (wcslen (curFileName), (size_t) Decompressed_Files[fileNo].fileNameLength)) == 0) { // Dump filter driver cannot be installed to SysWOW64 directory @@ -825,7 +825,7 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) bResult = SaveBufferToFile ( (char *) Decompressed_Files[fileNo].fileContent, szTmp, - Decompressed_Files[fileNo].fileLength, + Decompressed_Files[fileNo].fileLength, FALSE, TRUE); @@ -876,8 +876,8 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) bResult = CopyFile (szTmp, servicePath.c_str(), FALSE); } - if (bResult && Is64BitOs () - && FileExists (favoritesLegacyFile.c_str()) + if (bResult && Is64BitOs () + && FileExists (favoritesLegacyFile.c_str()) && !FileExists (favoritesFile.c_str())) { // copy the favorites XML file to the native system directory @@ -1013,7 +1013,7 @@ err: { WIN32_FIND_DATA f; HANDLE h; - + SetCurrentDirectory (SetupFilesDir); h = FindFirstFile (L"Language.*.xml", &f); @@ -1145,7 +1145,7 @@ BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType) StringCbCopyW (szTmp, sizeof(szTmp), L"VeraCryptVolume"); if (RegSetValueEx (hkey, L"", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS) goto error; - + RegCloseKey (hkey); hkey = 0; @@ -1160,7 +1160,7 @@ BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType) 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE | KEY_WOW64_32KEY, NULL, &hkey, &dw) != ERROR_SUCCESS) goto error; - /* IMPORTANT: IF YOU CHANGE THIS IN ANY WAY, REVISE AND UPDATE SetInstallationPath() ACCORDINGLY! */ + /* IMPORTANT: IF YOU CHANGE THIS IN ANY WAY, REVISE AND UPDATE SetInstallationPath() ACCORDINGLY! */ StringCbPrintfW (szTmp, sizeof(szTmp), L"\"%sVeraCrypt Setup.exe\" /u", szDir); if (RegSetValueEx (hkey, L"UninstallString", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS) goto error; @@ -1176,7 +1176,7 @@ BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType) StringCbCopyW (szTmp, sizeof(szTmp), _T(VERSION_STRING)); if (RegSetValueEx (hkey, L"DisplayVersion", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS) goto error; - + StringCbCopyW (szTmp, sizeof(szTmp), L"VeraCrypt"); if (RegSetValueEx (hkey, L"DisplayName", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS) goto error; @@ -1200,7 +1200,7 @@ error: handleWin32Error (hwndDlg, SRC_POS); Error ("REG_INSTALL_FAILED", hwndDlg); } - + // Register COM servers for UAC if (IsOSAtLeast (WIN_VISTA)) { @@ -1239,7 +1239,7 @@ BOOL DoApplicationDataUninstall (HWND hwndDlg) StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_HISTORY); RemoveMessage (hwndDlg, path2); StatDeleteFile (path2, FALSE); - + // Delete configuration file StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_CONFIGURATION); RemoveMessage (hwndDlg, path2); @@ -1314,7 +1314,7 @@ BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated) RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell"); RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\DefaultIcon"); RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume"); - + if (!bRemoveDeprecated) { HKEY hKey; @@ -1333,7 +1333,7 @@ BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated) SearchAndDeleteRegistrySubString (HKEY_USERS, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\.hc", NULL, TRUE, NULL); SearchAndDeleteRegistrySubString (HKEY_USERS, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Compatibility Assistant\\Persisted", L"VeraCrypt", TRUE, NULL); SearchAndDeleteRegistrySubString (HKEY_USERS, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StartPage\\NewShortcuts", L"VeraCrypt", TRUE, NULL); - + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SYSTEM", 0, KEY_ALL_ACCESS | WRITE_DAC | WRITE_OWNER, &hKey) == ERROR_SUCCESS) { SearchAndDeleteRegistrySubString (hKey, L"Enum\\Root\\LEGACY_VERACRYPT", NULL, TRUE, L"ControlSet"); @@ -1346,7 +1346,7 @@ BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated) SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); } - + if (hAdvapiDll) FreeLibrary (hAdvapiDll); @@ -1623,7 +1623,7 @@ BOOL DoDriverUnload (HWND hwndDlg) EnumWindows (CloseTCWindowsEnum, (LPARAM) &TCWindowClosed); - if (TCWindowClosed) + if (TCWindowClosed) Sleep (2000); } @@ -1648,7 +1648,7 @@ BOOL DoDriverUnload (HWND hwndDlg) } else { - // Note that the driver may have already been unloaded during this session (e.g. retry after an error, etc.) so it is not + // Note that the driver may have already been unloaded during this session (e.g. retry after an error, etc.) so it is not // guaranteed that the user is installing VeraCrypt for the first time now (we also cannot know if the user has already // installed and used VeraCrypt on another system before). bPossiblyFirstTimeInstall = TRUE; @@ -1748,7 +1748,7 @@ BOOL DoShortcutsUninstall (HWND hwndDlg, wchar_t *szDestDir) RemoveMessage (hwndDlg, szTmp2); if (StatDeleteFile (szTmp2, FALSE) == FALSE) goto error; - + StringCbPrintfW (szTmp2, sizeof(szTmp2), L"%s%s", szLinkDir, L"\\VeraCrypt User's Guide.lnk"); StatDeleteFile (szTmp2, FALSE); @@ -1950,7 +1950,7 @@ static void SetSystemRestorePoint (HWND hwndDlg, BOOL finalize) static STATEMGRSTATUS SMgrStatus; static BOOL failed = FALSE; static BOOL (__stdcall *_SRSetRestorePoint)(PRESTOREPOINTINFO, PSTATEMGRSTATUS); - + if (!SystemRestoreDll) return; _SRSetRestorePoint = (BOOL (__stdcall *)(PRESTOREPOINTINFO, PSTATEMGRSTATUS))GetProcAddress (SystemRestoreDll,"SRSetRestorePointW"); @@ -1970,7 +1970,7 @@ static void SetSystemRestorePoint (HWND hwndDlg, BOOL finalize) RestPtInfo.llSequenceNumber = 0; StringCbCopyW (RestPtInfo.szDescription, sizeof(RestPtInfo.szDescription), bUninstall ? L"VeraCrypt uninstallation" : L"VeraCrypt installation"); - if(!_SRSetRestorePoint (&RestPtInfo, &SMgrStatus)) + if(!_SRSetRestorePoint (&RestPtInfo, &SMgrStatus)) { StatusMessage (hwndDlg, "FAILED_SYS_RESTORE"); failed = TRUE; @@ -1981,7 +1981,7 @@ static void SetSystemRestorePoint (HWND hwndDlg, BOOL finalize) RestPtInfo.dwEventType = END_SYSTEM_CHANGE; RestPtInfo.llSequenceNumber = SMgrStatus.llSequenceNumber; - if(!_SRSetRestorePoint(&RestPtInfo, &SMgrStatus)) + if(!_SRSetRestorePoint(&RestPtInfo, &SMgrStatus)) { StatusMessage (hwndDlg, "FAILED_SYS_RESTORE"); } @@ -2145,12 +2145,12 @@ void DoInstall (void *arg) } UpdateProgressBarProc(12); - + if (bSystemRestore) SetSystemRestorePoint (hwndDlg, FALSE); UpdateProgressBarProc(48); - + if (bDisableSwapFiles && IsPagingFileActive (FALSE)) { @@ -2167,7 +2167,7 @@ void DoInstall (void *arg) // Remove deprecated DoServiceUninstall (hwndDlg, L"VeraCryptService"); - + UpdateProgressBarProc(55); if (!SystemEncryptionUpdate) @@ -2348,7 +2348,7 @@ void SetInstallationPath (HWND hwndDlg) { /* VeraCrypt is not installed or it wasn't possible to determine where it is installed. */ - // Default "Program Files" path. + // Default "Program Files" path. SHGetSpecialFolderLocation (hwndDlg, CSIDL_PROGRAM_FILES, &itemList); SHGetPathFromIDList (itemList, path); @@ -2545,7 +2545,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz { if (!VerifyPackageIntegrity()) { - // Package corrupted + // Package corrupted exit (1); } bDevm = FALSE; @@ -2598,7 +2598,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz { /* Create the main dialog for install */ - DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_INSTL_DLG), NULL, (DLGPROC) MainDialogProc, + DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_INSTL_DLG), NULL, (DLGPROC) MainDialogProc, (LPARAM)lpszCommandLine); } else diff --git a/src/Setup/Setup.h b/src/Setup/Setup.h index da31f3cd..76cc7e9a 100644 --- a/src/Setup/Setup.h +++ b/src/Setup/Setup.h @@ -1,11 +1,11 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' - Modifications and additions to the original source code (contained in this file) + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc index bdb89be1..47d1d149 100644 --- a/src/Setup/Setup.rc +++ b/src/Setup/Setup.rc @@ -201,19 +201,19 @@ IDI_SETUP ICON "Setup.ico" // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "#include ""..\\\\common\\\\resource.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "#include ""..\\\\common\\\\common.rc""\r\n" "\0" @@ -228,7 +228,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO +GUIDELINES DESIGNINFO BEGIN IDD_UNINSTALL, DIALOG BEGIN diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c index 42ea42c9..8c0f058c 100644 --- a/src/Setup/Wizard.c +++ b/src/Setup/Wizard.c @@ -1,11 +1,11 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' - Modifications and additions to the original source code (contained in this file) + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -192,7 +192,7 @@ static int GetDonVal (int minVal, int maxVal) prngInitialized = TRUE; } - if (OsPrngAvailable && CryptGenRandom (hCryptProv, sizeof (buffer), buffer) != 0) + if (OsPrngAvailable && CryptGenRandom (hCryptProv, sizeof (buffer), buffer) != 0) { return ((int) ((double) *((uint16 *) buffer) / (0xFFFF+1) * (maxVal + 1 - minVal)) + minVal); } @@ -310,7 +310,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa case EXTRACTION_OPTIONS_PAGE: if (wcslen(WizardDestExtractPath) < 2) - { + { StringCbCopyW (WizardDestExtractPath, sizeof(WizardDestExtractPath), SetupFilesDir); StringCbCatNW (WizardDestExtractPath, sizeof(WizardDestExtractPath), L"VeraCrypt\\", ARRAYSIZE (WizardDestExtractPath) - wcslen (WizardDestExtractPath) - 1); } @@ -704,7 +704,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (nCurPageNo == DONATIONS_PAGE) { PAINTSTRUCT tmpPaintStruct; - HDC hdc = BeginPaint (hCurPage, &tmpPaintStruct); + HDC hdc = BeginPaint (hCurPage, &tmpPaintStruct); if (hdc == NULL) AbortProcessSilent (); @@ -736,13 +736,13 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa TextOutW (hdc, CompensateXDPI (258), CompensateYDPI (70), - DonText.c_str(), - DonText.length()); - - EndPaint (hCurPage, &tmpPaintStruct); + DonText.c_str(), + DonText.length()); + + EndPaint (hCurPage, &tmpPaintStruct); ReleaseDC (hCurPage, hdc); } - return 0; + return 0; } @@ -813,8 +813,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa InitDialog (hwndDlg); LocalizeDialog (hwndDlg, "IDD_INSTL_DLG"); - - // Resize the bitmap if the user has a non-default DPI + + // Resize the bitmap if the user has a non-default DPI if (ScreenDPI != USER_DEFAULT_SCREEN_DPI) { hbmWizardBitmapRescaled = RenderBitmap (MAKEINTRESOURCE (IDB_SETUP_WIZARD), @@ -916,7 +916,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { Info ("TRAVELER_LIMITATIONS_NOTE", hwndDlg); - if (IsUacSupported() + if (IsUacSupported() && AskWarnYesNo ("TRAVELER_UAC_NOTE", hwndDlg) == IDNO) { return 1; @@ -1001,12 +1001,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa HWND hwndItem = GetDlgItem (MainDlg, IDC_MAIN_CONTENT_CANVAS); PAINTSTRUCT tmpPaintStruct; - HDC hdc = BeginPaint (hwndItem, &tmpPaintStruct); + HDC hdc = BeginPaint (hwndItem, &tmpPaintStruct); if (DonColorSchemeId != 2) { HBRUSH tmpBrush = CreateSolidBrush (DonBkgColor); - + RECT trect; trect.left = CompensateXDPI (1); @@ -1016,11 +1016,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa FillRect (hdc, &trect, tmpBrush); } - - EndPaint(hwndItem, &tmpPaintStruct); + + EndPaint(hwndItem, &tmpPaintStruct); ReleaseDC (hwndItem, hdc); } - return 0; + return 0; @@ -1043,9 +1043,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa case TC_APPMSG_INSTALL_SUCCESS: - + /* Installation completed successfully */ - + bInProgress = FALSE; nCurPageNo = DONATIONS_PAGE; @@ -1065,7 +1065,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; case TC_APPMSG_INSTALL_FAILURE: - + /* Installation failed */ bInProgress = FALSE; @@ -1086,7 +1086,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; case TC_APPMSG_EXTRACTION_SUCCESS: - + /* Extraction completed successfully */ UpdateProgressBarProc(100); @@ -1115,7 +1115,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; case TC_APPMSG_EXTRACTION_FAILURE: - + /* Extraction failed */ bInProgress = FALSE; diff --git a/src/Setup/Wizard.h b/src/Setup/Wizard.h index 3d178e24..f52e32d6 100644 --- a/src/Setup/Wizard.h +++ b/src/Setup/Wizard.h @@ -1,11 +1,11 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' - Modifications and additions to the original source code (contained in this file) + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source |