VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup
diff options
context:
space:
mode:
Diffstat (limited to 'src/Setup')
-rw-r--r--src/Setup/ComSetup.cpp27
-rw-r--r--src/Setup/ComSetup.h2
-rw-r--r--src/Setup/Dir.c110
-rw-r--r--src/Setup/Dir.h2
-rw-r--r--src/Setup/FreeBSD/veracrypt-uninstall.sh12
-rw-r--r--src/Setup/FreeBSD/veracrypt.desktop10
-rw-r--r--src/Setup/FreeBSD/veracrypt_install_template.sh1101
-rwxr-xr-xsrc/Setup/Linux/mount.veracrypt23
-rw-r--r--src/Setup/Linux/veracrypt-uninstall.sh9
-rw-r--r--src/Setup/Linux/veracrypt.desktop13
-rw-r--r--src/Setup/Linux/veracrypt.xml11
-rw-r--r--src/Setup/Linux/veracrypt_install_template.sh15
-rw-r--r--src/Setup/MacOSX/VeraCrypt.entitlements.plist8
-rwxr-xr-xsrc/Setup/MacOSX/notarize.sh140
-rwxr-xr-xsrc/Setup/MacOSX/postinstall.sh10
-rwxr-xr-xsrc/Setup/MacOSX/postinstall_fuse-t.sh5
-rwxr-xr-xsrc/Setup/MacOSX/veracrypt.pkgproj171
-rwxr-xr-xsrc/Setup/MacOSX/veracrypt_Legacy.pkgproj1082
-rwxr-xr-xsrc/Setup/MacOSX/veracrypt_fuse-t.pkgproj1044
-rw-r--r--src/Setup/Portable.manifest39
-rw-r--r--src/Setup/Portable.rc318
-rw-r--r--src/Setup/Portable.vcxproj328
-rw-r--r--src/Setup/Portable.vcxproj.filters154
-rw-r--r--src/Setup/Portable.vcxproj.user3
-rw-r--r--src/Setup/Resource.h50
-rw-r--r--src/Setup/SelfExtract.c188
-rw-r--r--src/Setup/SelfExtract.h13
-rw-r--r--src/Setup/Setup.c1020
-rw-r--r--src/Setup/Setup.h133
-rw-r--r--src/Setup/Setup.manifest8
-rw-r--r--src/Setup/Setup.rc96
-rw-r--r--src/Setup/Setup.vcproj484
-rw-r--r--src/Setup/Setup.vcxproj328
-rw-r--r--src/Setup/Setup.vcxproj.filters406
-rw-r--r--src/Setup/Wizard.c170
-rw-r--r--src/Setup/Wizard.h3
36 files changed, 5748 insertions, 1788 deletions
diff --git a/src/Setup/ComSetup.cpp b/src/Setup/ComSetup.cpp
index 7fe3ef49..96734303 100644
--- a/src/Setup/ComSetup.cpp
+++ b/src/Setup/ComSetup.cpp
@@ -3,19 +3,19 @@
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)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages.
*/
#define TC_MAIN_COM_VERSION_MAJOR 2
-#define TC_MAIN_COM_VERSION_MINOR 8
+#define TC_MAIN_COM_VERSION_MINOR 13
#define TC_FORMAT_COM_VERSION_MAJOR 2
-#define TC_FORMAT_COM_VERSION_MINOR 6
+#define TC_FORMAT_COM_VERSION_MINOR 10
#include <atlbase.h>
#include <comdef.h>
#include <statreg.h>
@@ -38,14 +38,12 @@ extern "C" BOOL RegisterComServers (wchar_t *modulePath)
UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR, 0, SYS_WIN32);
UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32);
// unregister older versions that may still exist
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-4, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-3, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-2, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-1, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-2, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-1, 0, SYS_WIN32);
+ for (WORD i = 9; i >= 1; i--)
+ UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-i, 0, SYS_WIN32);
+ for (WORD i = 6; i >= 1; i--)
+ UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-i, 0, SYS_WIN32);
wchar_t setupModule[MAX_PATH];
GetModuleFileNameW (NULL, setupModule, sizeof (setupModule) / sizeof (setupModule[0]));
@@ -79,15 +77,12 @@ extern "C" BOOL UnregisterComServers (wchar_t *modulePath)
if (UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32) != S_OK)
return FALSE;
// unregister older versions that may still exist
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-4, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-3, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-3, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-2, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-1, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-2, 0, SYS_WIN32);
- UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-1, 0, SYS_WIN32);
+ for (WORD i = 9; i >= 1; i--)
+ UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-i, 0, SYS_WIN32);
+ for (WORD i = 6; i >= 1; i--)
+ UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-i, 0, SYS_WIN32);
wchar_t module[1024];
CRegObject ro;
ro.FinalConstruct ();
diff --git a/src/Setup/ComSetup.h b/src/Setup/ComSetup.h
index 6001fde2..85d0f249 100644
--- a/src/Setup/ComSetup.h
+++ b/src/Setup/ComSetup.h
@@ -3,9 +3,9 @@
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)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages.
*/
diff --git a/src/Setup/Dir.c b/src/Setup/Dir.c
index 3619f2d9..f0a89ced 100644
--- a/src/Setup/Dir.c
+++ b/src/Setup/Dir.c
@@ -5,9 +5,9 @@
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 all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages. */
@@ -30,8 +30,14 @@ mkfulldir (wchar_t *oriPath, BOOL bCheckonly)
struct _stat st;
wchar_t *uniq_file;
wchar_t path [TC_MAX_PATH];
+ if (wcslen(oriPath) >= TC_MAX_PATH)
+ {
+ // directory name will be truncated so return failure to avoid unexepected behavior
+ return -1;
+ }
+
StringCbCopyW (path, TC_MAX_PATH, oriPath);
if (wcslen (path) == 3 && path[1] == L':')
goto is_root; /* keep final slash in root if present */
@@ -58,53 +64,59 @@ mkfulldir (wchar_t *oriPath, BOOL bCheckonly)
}
int
-mkfulldir_internal (wchar_t *path)
+mkfulldir_internal(wchar_t* path)
{
- wchar_t *token;
- struct _stat st;
- static wchar_t tokpath[_MAX_PATH];
- static wchar_t trail[_MAX_PATH];
-
- StringCbCopyW (tokpath, _MAX_PATH, path);
- trail[0] = L'\0';
-
- token = wcstok (tokpath, L"\\/");
-
- if (tokpath[0] == L'\\' && tokpath[1] == L'\\')
- { /* unc */
- trail[0] = tokpath[0];
- trail[1] = tokpath[1];
- trail[2] = L'\0';
- if (token)
- {
- StringCbCatW (trail, _MAX_PATH, token);
- StringCbCatW (trail, _MAX_PATH, L"\\");
- token = wcstok (NULL, L"\\/");
- if (token)
- { /* get share name */
- StringCbCatW (trail, _MAX_PATH, token);
- StringCbCatW (trail, _MAX_PATH, L"\\");
- }
- token = wcstok (NULL, L"\\/");
- }
- }
-
- if (tokpath[1] == L':')
- { /* drive letter */
- StringCbCatW (trail, _MAX_PATH, tokpath);
- StringCbCatW (trail, _MAX_PATH, L"\\");
- token = wcstok (NULL, L"\\/");
- }
-
- while (token != NULL)
- {
- int x;
- StringCbCatW (trail, _MAX_PATH, token);
- x = _wmkdir (trail);
- StringCbCatW (trail, _MAX_PATH, L"\\");
- token = wcstok (NULL, L"\\/");
- }
-
- return _wstat (path, &st);
-}
+ wchar_t* token;
+ wchar_t* next_token = NULL;
+ struct _stat st;
+ static wchar_t tokpath[_MAX_PATH];
+ static wchar_t trail[_MAX_PATH];
+
+ if (wcslen(path) >= _MAX_PATH)
+ {
+ // directory name will be truncated so return failure to avoid unexpected behavior
+ return -1;
+ }
+
+ StringCbCopyW(tokpath, _MAX_PATH, path);
+ trail[0] = L'\0';
+
+ token = wcstok_s(tokpath, L"\\/", &next_token);
+ if (tokpath[0] == L'\\' && tokpath[1] == L'\\')
+ { /* unc */
+ trail[0] = tokpath[0];
+ trail[1] = tokpath[1];
+ trail[2] = L'\0';
+ if (token)
+ {
+ StringCbCatW(trail, _MAX_PATH, token);
+ StringCbCatW(trail, _MAX_PATH, L"\\");
+ token = wcstok_s(NULL, L"\\/", &next_token);
+ if (token)
+ { /* get share name */
+ StringCbCatW(trail, _MAX_PATH, token);
+ StringCbCatW(trail, _MAX_PATH, L"\\");
+ }
+ token = wcstok_s(NULL, L"\\/", &next_token);
+ }
+ }
+
+ if (tokpath[1] == L':')
+ { /* drive letter */
+ StringCbCatW(trail, _MAX_PATH, tokpath);
+ StringCbCatW(trail, _MAX_PATH, L"\\");
+ token = wcstok_s(NULL, L"\\/", &next_token);
+ }
+
+ while (token != NULL)
+ {
+ int x;
+ StringCbCatW(trail, _MAX_PATH, token);
+ x = _wmkdir(trail);
+ StringCbCatW(trail, _MAX_PATH, L"\\");
+ token = wcstok_s(NULL, L"\\/", &next_token);
+ }
+
+ return _wstat(path, &st);
+} \ No newline at end of file
diff --git a/src/Setup/Dir.h b/src/Setup/Dir.h
index 5db9fa51..fb9dfc6b 100644
--- a/src/Setup/Dir.h
+++ b/src/Setup/Dir.h
@@ -5,9 +5,9 @@
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 all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages. */
diff --git a/src/Setup/FreeBSD/veracrypt-uninstall.sh b/src/Setup/FreeBSD/veracrypt-uninstall.sh
new file mode 100644
index 00000000..e29dbccc
--- /dev/null
+++ b/src/Setup/FreeBSD/veracrypt-uninstall.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+V="$(mount | grep veracrypt_aux_mnt)"
+[ "$V" ] && echo Error: All volumes must be dismounted first. && exit 1
+
+rm -f /usr/bin/veracrypt
+rm -f /usr/share/applications/veracrypt.desktop
+rm -f /usr/share/pixmaps/veracrypt.xpm
+rm -fr /usr/share/veracrypt
+rm -fr /usr/share/doc/veracrypt
+
+echo VeraCrypt uninstalled.
+rm -f /usr/bin/veracrypt-uninstall.sh
diff --git a/src/Setup/FreeBSD/veracrypt.desktop b/src/Setup/FreeBSD/veracrypt.desktop
new file mode 100644
index 00000000..01dfaf61
--- /dev/null
+++ b/src/Setup/FreeBSD/veracrypt.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=VeraCrypt
+GenericName=VeraCrypt
+Comment=VeraCrypt
+Exec=/usr/bin/veracrypt
+Icon=veracrypt
+Terminal=false
+Type=Application
+Categories=Encryption;Encryption Tools;Utility;
diff --git a/src/Setup/FreeBSD/veracrypt_install_template.sh b/src/Setup/FreeBSD/veracrypt_install_template.sh
new file mode 100644
index 00000000..1ebc7672
--- /dev/null
+++ b/src/Setup/FreeBSD/veracrypt_install_template.sh
@@ -0,0 +1,1101 @@
+#
+# Derived from source code of TrueCrypt 7.1a, which is
+# 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)
+# and all other portions of this file are Copyright (c) 2013-2017 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
+# code distribution packages.
+#
+
+PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/bin/X11
+
+PACKAGE_DIR=$(dirname $(mktemp))
+PACKAGE=$PACKAGE_DIR/$PACKAGE_NAME
+umask 022
+
+
+# Terminal setup
+
+TTY=0
+tty >/dev/null 2>/dev/null && TTY=1
+
+GUI=0
+XMESSAGE=0
+XTERM=0
+GTERM=0
+KTERM=0
+
+
+case $PACKAGE_TYPE in
+ tar)
+ PACKAGE_INSTALLER=tar
+ PACKAGE_INSTALLER_OPTS='-C / -xpzvf'
+ ;;
+esac
+
+
+if [ -n "$DISPLAY" -a "$INSTALLER_TYPE" != "console" ]
+then
+ GUI=1
+ which xmessage >/dev/null 2>/dev/null && XMESSAGE=1
+ which xterm >/dev/null 2>/dev/null && XTERM=1
+ which gnome-terminal >/dev/null 2>/dev/null && GTERM=1
+ which konsole >/dev/null 2>/dev/null && KTERM=1
+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
+fi
+
+if [ $XMESSAGE -eq 0 ] || ([ $XTERM -eq 0 ] && [ $GTERM -eq 0 ] && [ $KTERM -eq 0 ])
+then
+ GUI=0
+ XMESSAGE=0
+ XTERM=0
+ GTERM=0
+ KTERM=0
+fi
+
+
+show_message()
+{
+ if [ $GUI -eq 1 ]
+ then
+ if [ $XMESSAGE -eq 1 ]
+ then
+ xmessage -center -buttons OK -default OK "$*"
+ else
+ if [ $TTY -eq 1 ]
+ then
+ echo "$*"
+ else
+ if [ $XTERM -eq 1 ]
+ then
+ xterm -T 'VeraCrypt Setup' -e sh -c "echo $*; read A"
+ else
+ if [ $GTERM -eq 1 ]
+ then
+ gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo $*; read A\""
+ else
+ if [ $KTERM -eq 1 ]
+ then
+ konsole --qwindowtitle 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo $*; read A"
+ fi
+ fi
+ fi
+ fi
+ fi
+ else
+ echo "$*"
+ fi
+}
+
+show_exit_message()
+{
+ show_message "$*"
+
+ if [ $XMESSAGE -eq 0 ]
+ then
+ printf 'Press Enter to exit... '
+ read A
+ fi
+}
+
+# License extraction
+
+trap 'rm -f $LICENSE $PACKAGE; exit 1' HUP INT QUIT TERM
+LICENSE=$(mktemp)
+
+cat >$LICENSE <<_LICENSE_END
+VeraCrypt License
+Software distributed under this license is distributed on an "AS
+IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND
+DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO
+USES, COPIES, MODIFIES, OR (RE)DISTRIBUTES ANY PART OF THE
+SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE
+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
+licenses can be found below.
+
+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.,
+Vera-Crypt, Vera Crypt, VerKrypt, etc.)
+____________________________________________________________
+
+Apache License
+Version 2.0, January 2004
+https://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use,
+reproduction, and distribution as defined by Sections 1 through
+9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized
+by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all
+other entities that control, are controlled by, or are under
+common control with that entity. For the purposes of this
+definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity, whether by
+contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership
+of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making
+modifications, including but not limited to software source
+code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by
+a copyright notice that is included in or attached to the work
+(an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or
+Object form, that is based on (or derived from) the Work and
+for which the editorial revisions, annotations, elaborations, or
+other modifications represent, as a whole, an original work of
+authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely
+link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including
+the original version of the Work and any modifications or
+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
+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
+systems, and issue tracking systems that are managed by, or on
+behalf of, the Licensor for the purpose of discussing and
+improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the
+copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal
+Entity on behalf of whom a Contribution has been received by
+Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright 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 copyright license to reproduce,
+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
+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
+to those patent claims licensable by such Contributor that are
+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
+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
+as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of
+the Work or Derivative Works thereof in any medium, with or
+without modifications, and in Source or Object form, provided
+that You meet the following conditions:
+
+(a) You must give any other recipients of the Work or Derivative
+ Works a copy of this License; and
+(b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+(c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+(d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute
+ must include a readable copy of the attribution notices
+ contained within such NOTICE file, excluding those notices
+ that do not pertain to any part of the Derivative Works, in
+ at least one of the following places: within a NOTICE text
+ file distributed as part of the Derivative Works; within the
+ Source form or documentation, if provided along with the
+ Derivative Works; or, within a display generated by the
+ Derivative Works, if and wherever such third-party notices
+ normally appear. The contents of the NOTICE file are for
+ informational purposes only and do not modify the License.
+ You may add Your own attribution notices within Derivative
+ Works that You distribute, alongside or as an addendum to
+ the NOTICE text from the Work, provided that such additional
+ attribution notices cannot be construed as modifying
+ the License.
+
+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
+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.
+
+5. Submission of Contributions. Unless You explicitly state
+otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the
+terms and conditions of this License, without any additional
+terms or conditions. Notwithstanding the above, nothing herein
+shall supersede or modify the terms of any separate license
+agreement you may have executed with Licensor regarding such
+Contributions.
+
+6. Trademarks. This License does not grant permission to use the
+trade names, trademarks, service marks, or product names of the
+Licensor, except as required for reasonable and customary use in
+describing the origin of the Work and reproducing the content of
+the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+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,
+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
+permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal
+theory, whether in tort (including negligence), contract,
+or otherwise, unless required by applicable law (such as
+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
+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
+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
+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,
+and only if You agree to indemnify, defend, and hold each
+Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting
+any such warranty or additional liability.
+____________________________________________________________
+
+TrueCrypt License Version 3.0
+
+Software distributed under this license is distributed on an "AS
+IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND
+DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO
+USES, COPIES, MODIFIES, OR (RE)DISTRIBUTES ANY PART OF THE
+SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE
+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.
+
+
+I. Definitions
+
+1. "This Product" means the work (including, but not limited to,
+source code, graphics, texts, and accompanying files) made
+available under and governed by this version of this license
+("License"), as may be indicated by, but is not limited to,
+copyright notice(s) attached to or included in the work.
+
+2. "You" means (and "Your" refers to) an individual or a legal
+entity (e.g., a non-profit organization, commercial
+organization, government agency, etc.) exercising permissions
+granted by this License.
+
+3. "Modification" means (and "modify" refers to) any alteration
+of This Product, including, but not limited to, addition to or
+deletion from the substance or structure of This Product,
+translation into another language, repackaging, alteration or
+removal of any file included with This Product, and addition of
+any new files to This Product.
+
+4. "Your Product" means This Product modified by You, or any
+work You derive from (or base on) any part of This Product. In
+addition, "Your Product" means any work in which You include any
+(modified or unmodified) portion of This Product. However, if
+the work in which you include it is an aggregate software
+distribution (such as an operating system distribution or a
+cover CD-ROM of a magazine) containing multiple separate
+products, then the term "Your Product" includes only those
+products (in the aggregate software distribution) that use,
+include, or depend on a modified or unmodified version of This
+Product (and the term "Your Product" does not include the whole
+aggregate software distribution). For the purposes of this
+License, a product suite consisting of two or more products is
+considered a single product (operating system distributions and
+cover media of magazines are not considered product suites).
+
+5. "Distribution" means (and "distribute" refers to), regardless
+of means or methods, conveyance, transfer, providing, or making
+available of This/Your Product or portions thereof to third
+parties (including, but not limited to, making This/Your
+Product, or portions thereof, available for download to third
+parties, whether or not any third party has downloaded the
+product, or any portion thereof, made available for download).
+
+
+
+II. Use, Copying, and Distribution of This Product
+
+1. Provided that You comply with all applicable terms and
+conditions of this License, You may make copies of This Product
+(unmodified) and distribute copies of This Product (unmodified)
+that are not included in another product forming Your Product
+(except as permitted under Chapter III). Note: For terms and
+conditions for copying and distribution of modified versions of
+This Product, see Chapter III.
+
+2. Provided that You comply with all applicable terms and
+conditions of this License, You may use This Product freely (see
+also Chapter III) on any number of computers/systems for non-
+commercial and/or commercial purposes.
+
+
+
+III. Modification, Derivation, and Inclusion in Other Products
+
+1. If all conditions specified in the following paragraphs in
+this Chapter (III) are met (for exceptions, see Section III.2)
+and if You comply with all other applicable terms and conditions
+of this License, You may modify This Product (thus forming Your
+Product), derive new works from This Product or portions thereof
+(thus forming Your Product), include This Product or portions
+thereof in another product (thus forming Your Product, unless
+defined otherwise in Chapter I), and You may use (for non-
+commercial and/or commercial purposes), copy, and/or distribute
+Your Product.
+
+ a. The name of Your Product (or of Your modified version of
+ This Product) must not contain the name TrueCrypt (for
+ example, the following names are not allowed: TrueCrypt,
+ TrueCrypt+, TrueCrypt Professional, iTrueCrypt, etc.) nor
+ any other names confusingly similar to the name TrueCrypt
+ (e.g., True-Crypt, True Crypt, TruKrypt, etc.)
+
+ All occurrences of the name TrueCrypt that could reasonably
+ be considered to identify Your Product must be removed from
+ Your Product and from any associated materials. Logo(s)
+ included in (or attached to) Your Product (and in/to
+ associated materials) must not incorporate and must not be
+ confusingly similar to any of the TrueCrypt logos
+ (including, but not limited to, the non-textual logo
+ consisting primarily of a key in stylized form) or
+ portion(s) thereof. All graphics contained in This Product
+ (logos, icons, etc.) must be removed from Your Product (or
+ from Your modified version of This Product) and from any
+ associated materials.
+
+ b. The following phrases must be removed from Your Product
+ and from any associated materials, except the text of this
+ License: "A TrueCrypt Foundation Release", "Released by
+ TrueCrypt Foundation", "This is a TrueCrypt Foundation
+ release."
+
+ c. Phrase "Based on TrueCrypt, freely available at
+ http://www.truecrypt.org/" must be displayed by Your Product
+ (if technically feasible) and contained in its
+ documentation. Alternatively, if This Product or its portion
+ You included in Your Product constitutes only a minor
+ portion of Your Product, phrase "Portions of this product
+ are based in part on TrueCrypt, freely available at
+ http://www.truecrypt.org/" may be displayed instead. In each
+ of the cases mentioned above in this paragraph,
+ "http://www.truecrypt.org/" must be a hyperlink (if
+ technically feasible) pointing to http://www.truecrypt.org/
+ and You may freely choose the location within the user
+ interface (if there is any) of Your Product (e.g., an
+ "About" window, etc.) and the way in which Your Product will
+ display the respective phrase.
+
+ Your Product (and any associated materials, e.g., the
+ documentation, the content of the official web site of Your
+ Product, etc.) must not present any Internet address
+ containing the domain name truecrypt.org (or any domain name
+ that forwards to the domain name truecrypt.org) in a manner
+ that might suggest that it is where information about Your
+ Product may be obtained or where bugs found in Your Product
+ may be reported or where support for Your Product may be
+ available or otherwise attempt to indicate that the domain
+ name truecrypt.org is associated with Your Product.
+
+ d. The complete source code of Your Product must be freely
+ and publicly available (for exceptions, see Section III.2)
+ at least until You cease to distribute Your Product. This
+ condition can be met in one or both of the following ways:
+ (i) You include the complete source code of Your Product
+ with every copy of Your Product that You make and distribute
+ and You make all such copies of Your Product available to
+ the general public free of charge, and/or (ii) You include
+ information (valid and correct at least until You cease to
+ distribute Your Product) about where the complete source
+ code of Your Product can be obtained free of charge (e.g.,
+ an Internet address) or for a reasonable reproduction fee
+ with every copy of Your Product that You make and distribute
+ and, if there is a web site officially associated with Your
+ Product, You include the aforementioned information about
+ the source code on a freely and publicly accessible web
+ page to which such web site links via an easily viewable
+ hyperlink (at least until You cease to distribute Your
+ Product).
+
+ The source code of Your Product must not be deliberately
+ obfuscated and it must not be in an intermediate form (e.g.,
+ the output of a preprocessor). Source code means the
+ preferred form in which a programmer would usually modify
+ the program.
+
+ Portions of the source code of Your Product not contained in
+ This Product (e.g., portions added by You in creating Your
+ Product, whether created by You or by third parties) must be
+ available under license(s) that (however, see also
+ Subsection III.1.e) allow(s) anyone to modify and derive new
+ works from the portions of the source code that are not
+ contained in This Product and to use, copy, and redistribute
+ such modifications and/or derivative works. The license(s)
+ must be perpetual, non-exclusive, royalty-free, no-charge,
+ and worldwide, and must not invalidate, weaken, restrict,
+ interpret, amend, modify, interfere with or otherwise affect
+ any part, term, provision, or clause of this License. The
+ text(s) of the license(s) must be included with every copy
+ of Your Product that You make and distribute.
+
+ e. You must not change the license terms of This Product in
+ any way (adding any new terms is considered changing the
+ license terms even if the original terms are retained),
+ which means, e.g., that no part of This Product may be put
+ under another license. You must keep intact all the legal
+ notices contained in the source code files. You must include
+ the following items with every copy of Your Product that You
+ make and distribute: a clear and conspicuous notice stating
+ that Your Product or portion(s) thereof is/are governed by
+ this version of the TrueCrypt License, a verbatim copy of
+ this version of the TrueCrypt License (as contained herein),
+ a clear and conspicuous notice containing information about
+ where the included copy of the License can be found, and an
+ appropriate copyright notice.
+
+
+2. You are not obligated to comply with Subsection III.1.d if
+Your Product is not distributed (i.e., Your Product is available
+only to You).
+
+
+
+IV. Disclaimer of Liability, Disclaimer of Warranty,
+Indemnification
+
+You expressly acknowledge and agree to the following:
+
+1. IN NO EVENT WILL ANY (CO)AUTHOR OF THIS PRODUCT, OR ANY
+APPLICABLE INTELLECTUAL-PROPERTY OWNER, OR ANY OTHER PARTY WHO
+MAY COPY AND/OR (RE)DISTRIBUTE THIS PRODUCT OR PORTIONS THEREOF,
+AS MAY BE PERMITTED HEREIN, BE LIABLE TO YOU OR TO ANY OTHER
+PARTY FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, ANY
+DIRECT, INDIRECT, GENERAL, SPECIAL, INCIDENTAL, PUNITIVE,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, CORRUPTION OR LOSS OF DATA, ANY LOSSES SUSTAINED BY YOU OR
+THIRD PARTIES, A FAILURE OF THIS PRODUCT TO OPERATE WITH ANY
+OTHER PRODUCT, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR
+BUSINESS INTERRUPTION), WHETHER IN CONTRACT, STRICT LIABILITY,
+TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE) OR OTHERWISE,
+ARISING OUT OF THE USE, COPYING, MODIFICATION, OR
+(RE)DISTRIBUTION OF THIS PRODUCT (OR A PORTION THEREOF) OR OF
+YOUR PRODUCT (OR A PORTION THEREOF), OR INABILITY TO USE THIS
+PRODUCT (OR A PORTION THEREOF), EVEN IF SUCH DAMAGES (OR THE
+POSSIBILITY OF SUCH DAMAGES) ARE/WERE PREDICTABLE OR KNOWN TO
+ANY (CO)AUTHOR, INTELLECTUAL-PROPERTY OWNER, OR ANY OTHER PARTY.
+
+2. THIS PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
+LIMITED TO, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE ENTIRE RISK AS TO
+THE QUALITY AND PERFORMANCE OF THIS PRODUCT IS WITH YOU. SHOULD
+THIS PRODUCT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+3. THIS PRODUCT MAY INCORPORATE IMPLEMENTATIONS OF CRYPTOGRAPHIC
+ALGORITHMS THAT ARE REGULATED (E.G., SUBJECT TO EXPORT/IMPORT
+CONTROL REGULATIONS) OR ILLEGAL IN SOME COUNTRIES. IT IS SOLELY
+YOUR RESPONSIBILITY TO VERIFY THAT IT IS LEGAL TO IMPORT AND/OR
+(RE)EXPORT AND/OR USE THIS PRODUCT (OR PORTIONS THEREOF) IN
+COUNTRIES WHERE YOU INTEND TO USE IT AND/OR TO WHICH YOU INTEND
+TO IMPORT IT AND/OR FROM WHICH YOU INTEND TO EXPORT IT, AND IT
+IS SOLELY YOUR RESPONSIBILITY TO COMPLY WITH ANY APPLICABLE
+REGULATIONS, RESTRICTIONS, AND LAWS.
+
+4. YOU SHALL INDEMNIFY, DEFEND AND HOLD ALL (CO)AUTHORS OF THIS
+PRODUCT, AND APPLICABLE INTELLECTUAL-PROPERTY OWNERS, HARMLESS
+FROM AND AGAINST ANY AND ALL LIABILITY, DAMAGES, LOSSES,
+SETTLEMENTS, PENALTIES, FINES, COSTS, EXPENSES (INCLUDING
+REASONABLE ATTORNEYS' FEES), DEMANDS, CAUSES OF ACTION, CLAIMS,
+ACTIONS, PROCEEDINGS, AND SUITS, DIRECTLY RELATED TO OR ARISING
+OUT OF YOUR USE, INABILITY TO USE, COPYING, (RE)DISTRIBUTION,
+IMPORT AND/OR (RE)EXPORT OF THIS PRODUCT (OR PORTIONS THEREOF)
+AND/OR YOUR BREACH OF ANY TERM OF THIS LICENSE.
+
+
+
+V. Trademarks
+
+This License does not grant permission to use trademarks
+associated with (or applying to) This Product, except for fair
+use as defined by applicable law and except for use expressly
+permitted or required by this License. Any attempt otherwise to
+use trademarks associated with (or applying to) This Product
+automatically and immediately terminates Your rights under This
+License and may constitute trademark infringement (which may be
+prosecuted).
+
+
+
+VI. General Terms and Conditions, Miscellaneous Provisions
+
+1. ANYONE WHO USES AND/OR COPIES AND/OR MODIFIES AND/OR CREATES
+DERIVATIVE WORKS OF AND/OR (RE)DISTRIBUTES THIS PRODUCT, OR ANY
+PORTION(S) THEREOF, IS, BY SUCH ACTION(S), AGREEING TO BE BOUND
+BY AND ACCEPTING ALL TERMS AND CONDITIONS OF THIS LICENSE (AND
+THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS LICENSE).
+IF YOU DO NOT ACCEPT (AND AGREE TO BE BOUND BY) ALL TERMS AND
+CONDITIONS OF THIS LICENSE, DO NOT USE, COPY, MODIFY, CREATE
+DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY
+PORTION(S) THEREOF.
+
+2. YOU MAY NOT USE, MODIFY, COPY, CREATE DERIVATIVE WORKS OF,
+(RE)DISTRIBUTE, OR SUBLICENSE THIS PRODUCT, OR PORTION(S)
+THEREOF, EXCEPT AS EXPRESSLY PROVIDED IN THIS LICENSE (EVEN IF
+APPLICABLE LAW GIVES YOU MORE RIGHTS). ANY ATTEMPT (EVEN IF
+PERMITTED BY APPLICABLE LAW) OTHERWISE TO USE, MODIFY, COPY,
+CREATE DERIVATIVE WORKS OF, (RE)DISTRIBUTE, OR SUBLICENSE THIS
+PRODUCT, OR PORTION(S) THEREOF, AUTOMATICALLY AND IMMEDIATELY
+TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN CONSTITUTE
+COPYRIGHT INFRINGEMENT (WHICH MAY BE PROSECUTED). ANY CONDITIONS
+AND RESTRICTIONS CONTAINED IN THIS LICENSE ARE ALSO LIMITATIONS
+ON THE SCOPE OF THIS LICENSE AND ALSO DEFINE THE SCOPE OF YOUR
+RIGHTS UNDER THIS LICENSE. YOUR FAILURE TO COMPLY WITH THE TERMS
+AND CONDITIONS OF THIS LICENSE OR FAILURE TO PERFORM ANY
+APPLICABLE OBLIGATION IMPOSED BY THIS LICENSE AUTOMATICALLY AND
+IMMEDIATELY TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN
+CAUSE OR BE CONSIDERED COPYRIGHT INFRINGEMENT (WHICH MAY BE
+PROSECUTED). NOTHING IN THIS LICENSE SHALL IMPLY OR BE CONSTRUED
+AS A PROMISE, OBLIGATION, OR COVENANT NOT TO SUE FOR COPYRIGHT
+OR TRADEMARK INFRINGEMENT IF YOU DO NOT COMPLY WITH THE TERMS
+AND CONDITIONS OF THIS LICENSE.
+
+3. This License does not constitute or imply a waiver of any
+intellectual property rights except as may be otherwise
+expressly provided in this License. This License does not
+transfer, assign, or convey any intellectual property rights
+(e.g., it does not transfer ownership of copyrights or
+trademarks).
+
+4. Subject to the terms and conditions of this License, You may
+allow a third party to use Your copy of This Product (or a copy
+that You make and distribute, or Your Product) provided that the
+third party explicitly accepts and agrees to be bound by all
+terms and conditions of this License and the third party is not
+prohibited from using This Product (or portions thereof) by this
+License (see, e.g., Section VI.7) or by applicable law. However,
+You are not obligated to ensure that the third party accepts
+(and agrees to be bound by all terms of) this License if You
+distribute only the self-extracting package (containing This
+Product) that does not allow the user to install (nor extract)
+the files contained in the package until he or she accepts and
+agrees to be bound by all terms and conditions of this License.
+
+5. Without specific prior written permission from the authors of
+This Product (or from their common representative), You must not
+use the name of This Product, the names of the authors of This
+Product, or the names of the legal entities (or informal groups)
+of which the authors were/are members/employees, to endorse or
+promote Your Product or any work in which You include a modified
+or unmodified version of This Product, or to endorse or promote
+You or Your affiliates, or in a way that might suggest that Your
+Product (or any work in which You include a modified or
+unmodified version of This Product), You, or Your affiliates
+is/are endorsed by one or more authors of This Product, or in a
+way that might suggest that one or more authors of This Product
+is/are affiliated with You (or Your affiliates) or directly
+participated in the creation of Your Product or of any work in
+which You include a modified or unmodified version of This
+Product.
+
+6. IF YOU ARE NOT SURE WHETHER YOU UNDERSTAND ALL PARTS OF THIS
+LICENSE OR IF YOU ARE NOT SURE WHETHER YOU CAN COMPLY WITH ALL
+TERMS AND CONDITIONS OF THIS LICENSE, YOU MUST NOT USE, COPY,
+MODIFY, CREATE DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS
+PRODUCT, NOR ANY PORTION(S) OF IT. YOU SHOULD CONSULT WITH A
+LAWYER.
+
+7. IF (IN RELEVANT CONTEXT) ANY PROVISION OF CHAPTER IV OF THIS
+LICENSE IS UNENFORCEABLE, INVALID, OR PROHIBITED UNDER
+APPLICABLE LAW IN YOUR JURISDICTION, YOU HAVE NO RIGHTS UNDER
+THIS LICENSE AND YOU MUST NOT USE, COPY, MODIFY, CREATE
+DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY
+PORTION(S) THEREOF.
+
+8. Except as otherwise provided in this License, if any
+provision of this License, or a portion thereof, is found to be
+invalid or unenforceable under applicable law, it shall not
+affect the validity or enforceability of the remainder of this
+License, and such invalid or unenforceable provision shall be
+construed to reflect the original intent of the provision and
+shall be enforced to the maximum extent permitted by applicable
+law so as to effect the original intent of the provision as
+closely as possible.
+
+____________________________________________________________
+
+
+Third-Party Licenses
+
+This Product contains components that were created by third
+parties and that are governed by third-party licenses, which are
+contained hereinafter (separated by lines consisting of
+underscores). Each of the third-party licenses applies only to
+(portions of) the source code file(s) in which the third-party
+license is contained or in which it is explicitly referenced,
+and to compiled or otherwise processed forms of such source
+code. None of the third-party licenses applies to This Product
+as a whole, even when it uses terms such as "product",
+"program", or any other equivalent terms/phrases. This Product
+as a whole is governed by the TrueCrypt License (see above).
+Some of the third-party components have been modified by the
+authors of This Product. Unless otherwise stated, such
+modifications and additions are governed by the TrueCrypt
+License (see above). Note: Unless otherwise stated, graphics and
+files that are not part of the source code are governed by the
+TrueCrypt License.
+
+____________________________________________________________
+
+License agreement for Encryption for the Masses.
+
+Copyright (C) 1998-2000 Paul Le Roux. All Rights Reserved.
+
+This product can be copied and distributed free of charge,
+including source code.
+
+You may modify this product and source code, and distribute such
+modifications, and you may derive new works based on this
+product, provided that:
+
+1. Any product which is simply derived from this product cannot
+be called E4M, or Encryption for the Masses.
+
+2. If you use any of the source code in your product, and your
+product is distributed with source code, you must include this
+notice with those portions of this source code that you use.
+
+Or,
+
+If your product is distributed in binary form only, you must
+display on any packaging, and marketing materials which
+reference your product, a notice which states:
+
+"This product uses components written by Paul Le Roux
+<pleroux@swprofessionals.com>"
+
+3. If you use any of the source code originally by Eric Young,
+you must in addition follow his terms and conditions.
+
+4. Nothing requires that you accept this License, as you have
+not signed it. However, nothing else grants you permission to
+modify or distribute the product or its derivative works.
+
+These actions are prohibited by law if you do not accept this
+License.
+
+5. If any of these license terms is found to be to broad in
+scope, and declared invalid by any court or legal process, you
+agree that all other terms shall not be so affected, and shall
+remain valid and enforceable.
+
+6. THIS PROGRAM IS DISTRIBUTED FREE OF CHARGE, THEREFORE THERE
+IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. UNLESS OTHERWISE STATED THE PROGRAM IS PROVIDED
+"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
+WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
+COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+7. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
+MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM, INCLUDING BUT NOT LIMITED TO LOSS
+OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
+ANY OTHER PROGRAMS, EVEN IF SUCH HOLDER OR OTHER PARTY HAD
+PREVIOUSLY BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+____________________________________________________________
+
+Copyright (c) 1998-2008, Brian Gladman, Worcester, UK.
+All rights reserved.
+
+LICENSE TERMS
+
+The free distribution and use of this software is allowed (with
+or without changes) provided that:
+
+ 1. source code distributions include the above copyright
+ notice, this list of conditions and the following
+ disclaimer;
+
+ 2. binary distributions include the above copyright notice,
+ this list of conditions and the following disclaimer in
+ their documentation;
+
+ 3. the name of the copyright holder is not used to endorse
+ products built using this software without specific written
+ permission.
+
+DISCLAIMER
+
+This software is provided 'as is' with no explicit or implied
+warranties in respect of its properties, including, but not
+limited to, correctness and/or fitness for purpose.
+____________________________________________________________
+
+Copyright (C) 2002-2004 Mark Adler, all rights reserved
+version 1.8, 9 Jan 2004
+
+This software is provided 'as-is', without any express or
+implied warranty. In no event will the author be held liable
+for any damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you
+ use this software in a product, an acknowledgment in the
+ product documentation would be appreciated but is not
+ required.
+2. Altered source versions must be plainly marked as such, and
+ must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source
+ distribution.
+____________________________________________________________
+_LICENSE_END
+
+[ $? -ne 0 ] && show_exit_message 'Error while extracting license' && exit 1
+
+
+# Task selection
+
+INSTALL=-1
+
+if [ $XMESSAGE -eq 1 ]
+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
+ (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
+ means that data are automatically encrypted or decrypted right before they
+ are loaded or saved, without any user intervention. No data stored on an
+ encrypted volume can be read (decrypted) without using the correct
+ password/keyfile(s) or correct encryption keys. Entire file system is
+ encrypted (e.g., file names, folder names, contents of every file,
+ free space, meta data, etc).
+
+Please select one of the below options:
+
+_END
+
+ SEL=$?
+
+ case $SEL in
+ 1) exit 1
+ ;;
+ 10) INSTALL=1
+ ;;
+ 20) INSTALL=0
+ ;;
+ esac
+
+else
+
+ while [ $INSTALL -eq -1 ]
+ do
+ clear
+ cat <<_MENU_END
+VeraCrypt $VERSION Setup
+____________________
+
+
+Installation options:
+
+ 1) Install $PACKAGE_NAME
+ 2) Extract package file $PACKAGE_NAME and place it to $PACKAGE_DIR
+
+_MENU_END
+
+ printf 'To select, enter 1 or 2: '
+
+ read SEL
+ [ -z "$SEL" ] && SEL=1
+
+ case $SEL in
+ 1) INSTALL=1
+ ;;
+ 2) INSTALL=0
+ ;;
+ esac
+ done
+
+fi
+
+
+# Administrator privileges check
+
+SUDO=sudo
+
+if [ $INSTALL -eq 1 -a $(id -u) -ne 0 ]
+then
+ if ! which $SUDO >/dev/null 2>/dev/null
+ then
+ show_exit_message "Error: Administrator privileges required ($SUDO command is not installed)"
+ rm -f $LICENSE
+ exit 1
+ fi
+else
+ unset SUDO
+fi
+
+[ -n "$SUDO" -a $GUI -eq 1 ] && which gksudo >/dev/null 2>/dev/null && SUDO="gksudo -D 'VeraCrypt Setup' --"
+[ -n "$SUDO" -a $GUI -eq 1 ] && which kdesudo >/dev/null 2>/dev/null && SUDO="kdesudo -d --comment 'VeraCrypt Setup' --"
+
+
+# License agreement
+
+if [ $XMESSAGE -eq 1 ]
+then
+
+# GUI license agreement
+
+ cat <<_END | cat - $LICENSE | xmessage -center -file - -buttons 'I accept and agree to be bound by the license terms:10,I do not accept:20'
+
+Before you can use, extract, or install VeraCrypt, you must accept these
+license terms.
+
+IMPORTANT: By clicking the left button below this text field, you accept
+these license terms and agree to be bound by and to comply with them.
+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
+
+printf '\nBefore you can use, extract, or install VeraCrypt, you must accept the\n'
+printf 'terms of the VeraCrypt License.\n\nPress Enter to display the license terms... '
+read A
+
+MORE=more
+HASLESS=0
+which less >/dev/null 2>/dev/null && HASLESS=1
+if [ $HASLESS -eq 1 ]
+then
+ MORE='less -E -X'
+fi
+ cat <<_END | cat - $LICENSE | $MORE
+
+Press Enter or space bar to see the rest of the license.
+
+
+_END
+ if [ $? -ne 0 ]
+ then
+ if [ $HASLESS -eq 1 ]
+ then
+# use less without -X as it is not supported by some versions (busybox case)
+ MORE='less -E'
+ cat <<_END | cat - $LICENSE | $MORE
+
+Press Enter or space bar to see the rest of the license.
+
+
+_END
+ [ $? -ne 0 ] && exit 1
+ else
+ exit 1
+ fi
+ fi
+
+ rm -f $LICENSE
+
+ ACCEPTED=0
+ 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
+ ;;
+ n|N|no|NO)
+ exit 0
+ ;;
+ esac
+ done
+fi
+
+
+# Package extraction
+
+[ $GUI -eq 0 ] && echo
+
+if ! tail -n +$PACKAGE_START "$0" >$PACKAGE
+then
+ show_exit_message "Error: Extraction to $PACKAGE failed"
+ exit 1
+fi
+
+
+# Package installation
+
+if [ "$PACKAGE_TYPE" = "tar" ]
+then
+ if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null || ! service pcscd status >/dev/null 2>/dev/null
+ then
+ show_message "$(cat <<_INFO
+Requirements for Running VeraCrypt:
+-----------------------------------
+
+ - FUSE library and tools
+ - device mapper tool
+ - PC/SC Lite (optional)
+
+_INFO
+)"
+ [ $GUI -eq 0 ] && echo && echo Press Enter to continue... && read A
+ fi
+
+ show_message "$(cat <<_INFO
+Uninstalling VeraCrypt:
+-----------------------
+
+To uninstall VeraCrypt, please run 'veracrypt-uninstall.sh'.
+
+_INFO
+)"
+ [ $GUI -eq 0 ] && echo
+fi
+
+if [ $INSTALL -eq 1 ]
+then
+
+ INSTALLED=0
+
+ if [ $GUI -eq 1 ]
+ then
+ if [ $XTERM -eq 1 ]
+ then
+ exec xterm -T 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A"
+ else
+ if [ $GTERM -eq 1 ]
+ then
+ exec gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A\""
+ else
+ if [ $KTERM -eq 1 ]
+ then
+ exec konsole --qwindowtitle 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A"
+ fi
+ fi
+ fi
+ else
+ echo 'Installing package...'
+ $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE && INSTALLED=1
+
+ if [ $INSTALLED -eq 1 ]
+ then
+ show_exit_message ''
+ fi
+ fi
+
+ rm -f $PACKAGE
+ if [ $INSTALLED -ne 1 ]
+ then
+ show_exit_message 'Error: VeraCrypt installation failed'
+ exit 1
+ fi
+else
+ show_exit_message "Installation package '$PACKAGE_NAME' extracted and placed in '$PACKAGE_DIR'"
+fi
+
+exit 0
diff --git a/src/Setup/Linux/mount.veracrypt b/src/Setup/Linux/mount.veracrypt
new file mode 100755
index 00000000..a891c253
--- /dev/null
+++ b/src/Setup/Linux/mount.veracrypt
@@ -0,0 +1,23 @@
+#!/bin/bash
+DEV="$1"
+MNTPT="$2"
+VCOPTIONS=""
+OPTIONS=""
+
+shift 3
+IFS=','
+for arg in $*; do
+ case "$arg" in
+ truecrypt) VCOPTIONS=(${VCOPTIONS[*]} --truecrypt);;
+ system) VCOPTIONS=(${VCOPTIONS[*]} --mount-options=system);;
+ fs=*) VCOPTIONS=(${VCOPTIONS[*]} --filesystem=${arg#*=});;
+ keyfiles=*) VCOPTIONS=(${VCOPTIONS[*]} --keyfiles=${arg#*=});;
+ password=*) VCOPTIONS=(${VCOPTIONS[*]} --password=${arg#*=});;
+ pim=*) VCOPTIONS=(${VCOPTIONS[*]} --pim=${arg#*=});;
+ protect-hidden=*) VCOPTIONS=(${VCOPTIONS[*]} --protect-hidden=${arg#*=});;
+ slot=*) VCOPTIONS=(${VCOPTIONS[*]} --slot=${arg#*=});;
+ *) OPTIONS="${OPTIONS}${arg},";;
+ esac
+done
+
+/usr/bin/veracrypt --text --non-interactive ${VCOPTIONS[*]} --fs-options="${OPTIONS%,*}" ${DEV} ${MNTPT}
diff --git a/src/Setup/Linux/veracrypt-uninstall.sh b/src/Setup/Linux/veracrypt-uninstall.sh
index 82ea3096..2abbfd6c 100644
--- a/src/Setup/Linux/veracrypt-uninstall.sh
+++ b/src/Setup/Linux/veracrypt-uninstall.sh
@@ -1,13 +1,14 @@
#!/bin/sh
V="$(mount | grep veracrypt_aux_mnt)"
-[ "$V" ] && echo Error: All volumes must be dismounted first. && exit 1
+[ "$V" ] && echo Error: All volumes must be dismounted first. >&2 && exit 1
rm -f /usr/bin/veracrypt
-rm -f /usr/share/veracrypt/doc/License.txt
-rm -f '/usr/share/veracrypt/doc/VeraCrypt User Guide.pdf'
+rm -f /usr/sbin/mount.veracrypt
rm -f /usr/share/applications/veracrypt.desktop
rm -f /usr/share/pixmaps/veracrypt.xpm
-rmdir /usr/share/veracrypt/doc /usr/share/veracrypt
+rm -f /usr/share/mime/packages/veracrypt.xml
+rm -fr /usr/share/veracrypt
+rm -fr /usr/share/doc/veracrypt
echo VeraCrypt uninstalled.
rm -f /usr/bin/veracrypt-uninstall.sh
diff --git a/src/Setup/Linux/veracrypt.desktop b/src/Setup/Linux/veracrypt.desktop
index 01dfaf61..4504f20c 100644
--- a/src/Setup/Linux/veracrypt.desktop
+++ b/src/Setup/Linux/veracrypt.desktop
@@ -1,10 +1,11 @@
[Desktop Entry]
-Encoding=UTF-8
+Type=Application
Name=VeraCrypt
-GenericName=VeraCrypt
-Comment=VeraCrypt
-Exec=/usr/bin/veracrypt
+GenericName=VeraCrypt volume manager
+Comment=Create and mount VeraCrypt encrypted volumes
Icon=veracrypt
+Exec=/usr/bin/veracrypt %f
+Categories=Security;Utility;Filesystem
+Keywords=encryption,filesystem
Terminal=false
-Type=Application
-Categories=Encryption;Encryption Tools;Utility;
+MimeType=application/x-veracrypt-volume;application/x-truecrypt-volume; \ No newline at end of file
diff --git a/src/Setup/Linux/veracrypt.xml b/src/Setup/Linux/veracrypt.xml
new file mode 100644
index 00000000..4fc73b90
--- /dev/null
+++ b/src/Setup/Linux/veracrypt.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-veracrypt-volume">
+ <comment>VeraCrypt Volume</comment>
+ <glob pattern="*.hc"/>
+ </mime-type>
+ <mime-type type="application/x-truecrypt-volume">
+ <comment>TrueCrypt Volume</comment>
+ <glob pattern="*.tc"/>
+ </mime-type>
+</mime-info>
diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh
index 8eaf15c8..e4615966 100644
--- a/src/Setup/Linux/veracrypt_install_template.sh
+++ b/src/Setup/Linux/veracrypt_install_template.sh
@@ -3,9 +3,9 @@
# 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)
-# and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+# and all other portions of this file are Copyright (c) 2013-2017 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
# code distribution packages.
#
@@ -31,9 +31,13 @@ KTERM=0
case $PACKAGE_TYPE in
tar)
PACKAGE_INSTALLER=tar
- PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf'
+ if tar --help | grep -q -- '--keep-directory-symlink'; then
+ PACKAGE_INSTALLER_OPTS='-C / --keep-directory-symlink --no-overwrite-dir -xpzvf'
+ else
+ PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf'
+ fi
;;
esac
@@ -92,9 +96,9 @@ show_message()
gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo $*; read A\""
else
if [ $KTERM -eq 1 ]
then
- konsole --title 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo $*; read A"
+ konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo $*; read A"
fi
fi
fi
fi
@@ -1030,16 +1034,17 @@ fi
# Package installation
if [ "$PACKAGE_TYPE" = "tar" ]
then
- if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null
+ if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null || ! service pcscd status >/dev/null 2>/dev/null
then
show_message "$(cat <<_INFO
Requirements for Running VeraCrypt:
-----------------------------------
- FUSE library and tools
- device mapper tools
+ - PC/SC Lite (optional)
_INFO
)"
[ $GUI -eq 0 ] && echo && echo Press Enter to continue... && read A
@@ -1072,9 +1077,9 @@ then
exec gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A\""
else
if [ $KTERM -eq 1 ]
then
- exec konsole --title 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A"
+ exec konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A"
fi
fi
fi
else
diff --git a/src/Setup/MacOSX/VeraCrypt.entitlements.plist b/src/Setup/MacOSX/VeraCrypt.entitlements.plist
new file mode 100644
index 00000000..123d12a5
--- /dev/null
+++ b/src/Setup/MacOSX/VeraCrypt.entitlements.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.cs.disable-library-validation</key>
+ <true/>
+</dict>
+</plist>
diff --git a/src/Setup/MacOSX/notarize.sh b/src/Setup/MacOSX/notarize.sh
new file mode 100755
index 00000000..c3e2ff05
--- /dev/null
+++ b/src/Setup/MacOSX/notarize.sh
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Directory where the script is located
+BUNDLE_PATH="${SCRIPT_DIR}/../../Main/VeraCrypt.app" # Path to the VeraCrypt.app bundle
+APPLE_ID="appleid" # Apple ID
+APP_SPECIFIC_PASSWORD="password" # app-specific password
+TEAM_ID="teamid" # team ID
+SIGNING_ID="signingid" # Signing ID
+
+# Check if VeraCrypt.app bundle exists
+if [ ! -d "$BUNDLE_PATH" ]; then
+ echo "VeraCrypt.app bundle not found: $BUNDLE_PATH"
+ exit 1
+fi
+
+# Retrieve the version of VeraCrypt from Info.plist
+VC_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${BUNDLE_PATH}/Contents/Info.plist")
+
+echo "Notarizing VeraCrypt ${VC_VERSION}..."
+
+# Change to the script directory
+cd "${SCRIPT_DIR}"
+
+xattr -rc "$BUNDLE_PATH"
+codesign --timestamp --option runtime --deep --force --entitlements "${SCRIPT_DIR}/VeraCrypt.entitlements.plist" --sign "${SIGNING_ID}" "$BUNDLE_PATH"
+
+# Check dependencies of the VeraCrypt binary
+VC_BINARY="$BUNDLE_PATH/Contents/MacOS/VeraCrypt"
+DEPENDENCY_OUTPUT=$(otool -L "$VC_BINARY" | grep libfuse-t.dylib)
+
+# Determine the correct .pkgproj file based on the dependency
+PKGPROJ_FILE="${SCRIPT_DIR}/veracrypt.pkgproj"
+DMG_LABEL="VeraCrypt_${VC_VERSION}.dmg"
+if [[ "$DEPENDENCY_OUTPUT" != "" ]]; then
+ echo "VeraCrypt is linked against FUSE-T."
+ PKGPROJ_FILE="${SCRIPT_DIR}/veracrypt_fuse-t.pkgproj"
+ DMG_LABEL="VeraCrypt_FUSE-T_${VC_VERSION}.dmg"
+else
+ echo "VeraCrypt is linked against standard MacFUSE."
+fi
+
+/usr/local/bin/packagesbuild "$PKGPROJ_FILE"
+
+PKG_PATH="${SCRIPT_DIR}/VeraCrypt_${VC_VERSION}.pkg" # Constructed path to the VeraCrypt pkg
+productsign --sign "Developer ID Installer: IDRIX (Z933746L2S)" --timestamp "${SCRIPT_DIR}/VeraCrypt ${VC_VERSION}.pkg" "$PKG_PATH"
+
+if [ ! -f "$PKG_PATH" ]; then
+ echo "pkg file not found: $PKG_PATH"
+ exit 1
+fi
+
+# Step 1: Upload PKG to Apple for notarization
+echo "Uploading PKG to Apple for notarization..."
+xcrun notarytool submit "$PKG_PATH" --apple-id "$APPLE_ID" --password "$APP_SPECIFIC_PASSWORD" --team-id "$TEAM_ID" --wait --output-format json > notarization_result.json
+
+# Check if the notarization submission was successful
+if [ $? -ne 0 ]; then
+ echo "Failed to submit PKG for notarization."
+ cat notarization_result.json
+ exit 1
+fi
+
+# Extract the notarization UUID from the result
+REQUEST_UUID=$(grep -o '"id":"[^"]*' notarization_result.json | sed 's/"id":"//')
+echo "Notarization Request UUID: $REQUEST_UUID"
+
+# Step 2: Check the notarization status
+echo "Checking notarization status..."
+STATUS=$(grep -o '"status":"[^"]*' notarization_result.json | sed 's/"status":"//' | sed 's/"}//')
+echo "Initial status: $STATUS"
+
+while [ "$STATUS" == "in progress" ]; do
+ sleep 30
+ xcrun notarytool info "$REQUEST_UUID" --apple-id "$APPLE_ID" --password "$APP_SPECIFIC_PASSWORD" --team-id "$TEAM_ID" --output-format json > notarization_status.json
+
+ if [ ! -f notarization_status.json ]; then
+ echo "Failed to retrieve notarization status."
+ exit 1
+ fi
+
+ STATUS=$(grep -o '"status":"[^"]*' notarization_status.json | sed 's/"status":"//' | sed 's/"}//')
+ echo "Current status: $STATUS"
+done
+
+# Step 3: Staple the notarization ticket to the pkg or retrieve the log
+if [ "$STATUS" == "Accepted" ]; then
+ echo "Stapling the notarization ticket to the pkg..."
+ # Staple the notarization ticket to the installer package
+ xcrun stapler staple "$PKG_PATH"
+ echo "Notarization and stapling completed successfully."
+
+ # Clean up any existing temporary files and directories
+ rm -f template.dmg
+ rm -fr VeraCrypt_dmg
+
+ # Create a directory to mount the template DMG
+ echo "Creating directory to mount the template DMG..."
+ mkdir -p VeraCrypt_dmg
+
+ # Decompress the template DMG file
+ echo "Decompressing the template DMG file..."
+ bunzip2 -k -f template.dmg.bz2
+
+ # Attach the template DMG to the system, mount it at VeraCrypt_dmg directory
+ echo "Attaching the template DMG to the system..."
+ hdiutil attach template.dmg -noautoopen -quiet -mountpoint VeraCrypt_dmg
+
+ # Copy the notarized installer package into the mounted DMG
+ echo "Copying the notarized installer package into the mounted DMG..."
+ cp "VeraCrypt_${VC_VERSION}.pkg" VeraCrypt_dmg/VeraCrypt_Installer.pkg
+
+ # Detach the DMG, ensuring all changes are saved and it's unmounted
+ echo "Detaching the DMG..."
+ hdiutil detach VeraCrypt_dmg -quiet -force
+
+ # Convert the DMG back to a compressed format (UDZO) and create the final DMG file
+ echo "Converting the DMG back to a compressed format..."
+ rm -f "${DMG_LABEL}"
+ hdiutil convert template.dmg -quiet -format UDZO -imagekey zlib-level=9 -o "${DMG_LABEL}"
+
+ # Sign the final DMG file
+ echo "Signing the final DMG file..."
+ codesign -s "${SIGNING_ID}" --timestamp "${DMG_LABEL}"
+
+ # Clean up temporary files and directories
+ rm -f template.dmg
+ rm -fr VeraCrypt_dmg
+else
+ echo "Notarization failed. Retrieving log for more details..."
+ # Retrieve the notarization log for details on why it failed
+ xcrun notarytool log "$REQUEST_UUID" --apple-id "$APPLE_ID" --password "$APP_SPECIFIC_PASSWORD" --team-id "$TEAM_ID" --output-format json > notarization_log.json
+ cat notarization_log.json
+fi
+
+# Clean up temporary files
+rm -f notarization_result.json
+rm -f notarization_status.json
+rm -f notarization_log.json
+
+exit 0 \ No newline at end of file
diff --git a/src/Setup/MacOSX/postinstall.sh b/src/Setup/MacOSX/postinstall.sh
new file mode 100755
index 00000000..661b0f5b
--- /dev/null
+++ b/src/Setup/MacOSX/postinstall.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if !([ -e "/usr/local/lib/libfuse.2.dylib" ])
+then
+ ln -s /usr/local/lib/libosxfuse.2.dylib /usr/local/lib/libfuse.2.dylib
+fi
+
+chmod -R go-w /Applications/VeraCrypt.app
+
+exit 0
diff --git a/src/Setup/MacOSX/postinstall_fuse-t.sh b/src/Setup/MacOSX/postinstall_fuse-t.sh
new file mode 100755
index 00000000..fb799b91
--- /dev/null
+++ b/src/Setup/MacOSX/postinstall_fuse-t.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+chmod -R go-w /Applications/VeraCrypt.app
+
+exit 0
diff --git a/src/Setup/MacOSX/veracrypt.pkgproj b/src/Setup/MacOSX/veracrypt.pkgproj
index 80bf48ef..287adac6 100755
--- a/src/Setup/MacOSX/veracrypt.pkgproj
+++ b/src/Setup/MacOSX/veracrypt.pkgproj
@@ -4,8 +4,12 @@
<dict>
<key>PACKAGES</key>
<array>
<dict>
+ <key>MUST-CLOSE-APPLICATION-ITEMS</key>
+ <array/>
+ <key>MUST-CLOSE-APPLICATIONS</key>
+ <false/>
<key>PACKAGE_FILES</key>
<dict>
<key>DEFAULT_INSTALL_LOCATION</key>
<string>/</string>
@@ -252,9 +256,9 @@
<string>PrivilegedHelperTools</string>
<key>PATH_TYPE</key>
<integer>0</integer>
<key>PERMISSIONS</key>
- <integer>493</integer>
+ <integer>1005</integer>
<key>TYPE</key>
<integer>1</integer>
<key>UID</key>
<integer>0</integer>
@@ -354,8 +358,40 @@
<integer>1</integer>
<key>UID</key>
<integer>0</integer>
</dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Automator</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Extensions</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
</array>
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
@@ -467,17 +503,33 @@
<integer>0</integer>
</dict>
<key>PAYLOAD_TYPE</key>
<integer>0</integer>
+ <key>PRESERVE_EXTENDED_ATTRIBUTES</key>
+ <false/>
+ <key>SHOW_INVISIBLE</key>
+ <false/>
+ <key>SPLIT_FORKS</key>
+ <true/>
+ <key>TREAT_MISSING_FILES_AS_WARNING</key>
+ <false/>
<key>VERSION</key>
- <integer>2</integer>
+ <integer>5</integer>
</dict>
<key>PACKAGE_SCRIPTS</key>
<dict>
<key>POSTINSTALL_PATH</key>
- <dict/>
+ <dict>
+ <key>PATH</key>
+ <string>postinstall.sh</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
<key>PREINSTALL_PATH</key>
- <dict/>
+ <dict>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ </dict>
<key>RESOURCES</key>
<array/>
</dict>
<key>PACKAGE_SETTINGS</key>
@@ -485,19 +537,31 @@
<key>AUTHENTICATION</key>
<integer>1</integer>
<key>CONCLUSION_ACTION</key>
<integer>0</integer>
+ <key>FOLLOW_SYMBOLIC_LINKS</key>
+ <false/>
<key>IDENTIFIER</key>
<string>com.idrix.pkg.veracrypt</string>
<key>LOCATION</key>
<integer>0</integer>
<key>NAME</key>
<string>veracrypt</string>
<key>OVERWRITE_PERMISSIONS</key>
<false/>
+ <key>PAYLOAD_SIZE</key>
+ <integer>-1</integer>
+ <key>REFERENCE_PATH</key>
+ <string></string>
+ <key>RELOCATABLE</key>
+ <false/>
+ <key>USE_HFS+_COMPRESSION</key>
+ <false/>
<key>VERSION</key>
- <string>1.20.2</string>
+ <string>1.26.17</string>
</dict>
+ <key>TYPE</key>
+ <integer>0</integer>
<key>UUID</key>
<string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string>
</dict>
</array>
@@ -523,16 +587,17 @@
<key>PROJECT_PRESENTATION</key>
<dict>
<key>BACKGROUND</key>
<dict>
- <key>ALIGNMENT</key>
- <integer>4</integer>
- <key>BACKGROUND_PATH</key>
- <dict/>
- <key>CUSTOM</key>
- <false/>
- <key>SCALING</key>
- <integer>0</integer>
+ <key>APPAREANCES</key>
+ <dict>
+ <key>DARK_AQUA</key>
+ <dict/>
+ <key>LIGHT_AQUA</key>
+ <dict/>
+ </dict>
+ <key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key>
+ <true/>
</dict>
<key>INSTALLATION TYPE</key>
<dict>
<key>HIERARCHIES</key>
@@ -566,9 +631,9 @@
<key>REMOVED</key>
<dict/>
</dict>
</dict>
- <key>INSTALLATION TYPE</key>
+ <key>MODE</key>
<integer>0</integer>
</dict>
<key>INSTALLATION_STEPS</key>
<array>
@@ -635,19 +700,17 @@
<array/>
</dict>
<key>LICENSE</key>
<dict>
- <key>KEYWORDS</key>
- <dict/>
<key>LOCALIZATIONS</key>
<array>
<dict>
<key>LANGUAGE</key>
<string>English</string>
<key>VALUE</key>
<dict>
<key>PATH</key>
- <string>../../Release/Setup Files/License.txt</string>
+ <string>../../License.txt</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
</dict>
@@ -686,58 +749,14 @@
<key>BEHAVIOR</key>
<integer>3</integer>
<key>DICTIONARY</key>
<dict>
- <key>IC_REQUIREMENT_CPU_ARCHITECTURE_FAMILY</key>
- <integer>2</integer>
- <key>IC_REQUIREMENT_CPU_INTEL_ARCHITECTURE_TYPE</key>
- <integer>0</integer>
- <key>IC_REQUIREMENT_CPU_MINIMUM_CPU_CORES_COUNT</key>
- <integer>1</integer>
- <key>IC_REQUIREMENT_CPU_MINIMUM_FREQUENCY</key>
- <integer>866666</integer>
- <key>IC_REQUIREMENT_CPU_POWERPC_ARCHITECTURE_TYPE</key>
- <integer>0</integer>
- </dict>
- <key>IC_REQUIREMENT_CHECK_TYPE</key>
- <integer>0</integer>
- <key>IDENTIFIER</key>
- <string>fr.whitebox.Packages.requirement.cpu</string>
- <key>MESSAGE</key>
- <array>
- <dict>
- <key>LANGUAGE</key>
- <string>English</string>
- <key>SECONDARY_VALUE</key>
- <string></string>
- <key>VALUE</key>
- <string>VeraCrypt runs only on Intel platforms.</string>
- </dict>
- <dict>
- <key>LANGUAGE</key>
- <string>French</string>
- <key>SECONDARY_VALUE</key>
- <string></string>
- <key>VALUE</key>
- <string>VeraCrypt supporte seulement les platformes Intel.</string>
- </dict>
- </array>
- <key>NAME</key>
- <string>Processor</string>
- <key>STATE</key>
- <true/>
- </dict>
- <dict>
- <key>BEHAVIOR</key>
- <integer>3</integer>
- <key>DICTIONARY</key>
- <dict>
<key>IC_REQUIREMENT_OS_DISK_TYPE</key>
<integer>1</integer>
<key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key>
<integer>0</integer>
<key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key>
- <integer>100601</integer>
+ <integer>120001</integer>
</dict>
<key>IC_REQUIREMENT_CHECK_TYPE</key>
<integer>0</integer>
<key>IDENTIFIER</key>
@@ -747,15 +766,15 @@
<dict>
<key>LANGUAGE</key>
<string>English</string>
<key>VALUE</key>
- <string>VeraCrypt requires MacOSX 10.6.1 and above.</string>
+ <string>VeraCrypt requires MacOSX 12 and above.</string>
</dict>
<dict>
<key>LANGUAGE</key>
<string>French</string>
<key>VALUE</key>
- <string>VeraCrypt nécessite MacOSX 10.6.1 et supérieur.</string>
+ <string>VeraCrypt nécessite MacOSX 12 et supérieur.</string>
</dict>
</array>
<key>NAME</key>
<string>Operating System</string>
@@ -772,9 +791,10 @@
<key>IC_REQUIREMENT_FILES_DISK_TYPE</key>
<integer>1</integer>
<key>IC_REQUIREMENT_FILES_LIST</key>
<array>
- <string>/usr/local/lib/libosxfuse_i64.2.dylib</string>
+ <string>/usr/local/lib/libfuse.dylib</string>
+ <string>/usr/local/lib/libosxfuse.2.dylib</string>
</array>
<key>IC_REQUIREMENT_FILES_SELECTOR</key>
<integer>0</integer>
</dict>
@@ -789,9 +809,9 @@
<string>English</string>
<key>SECONDARY_VALUE</key>
<string></string>
<key>VALUE</key>
- <string>OSXFuse seems to be missing on your machine. VeraCrypt requires OSXFuse 2.5 or above.
+ <string>OSXFuse seems to be missing on your machine. VeraCrypt requires OSXFuse 3.10 or above.
Please download the latest OSXFuse version from :
https://osxfuse.github.io/</string>
</dict>
<dict>
@@ -799,9 +819,9 @@ https://osxfuse.github.io/</string>
<string>French</string>
<key>SECONDARY_VALUE</key>
<string></string>
<key>VALUE</key>
- <string>OSXFuse semble ne pas être installé sur votre machine. VeraCrypt nécessite OSXFuse 2.5 ou supérieur.
+ <string>OSXFuse semble ne pas être installé sur votre machine. VeraCrypt nécessite OSXFuse 3.10 ou supérieur.
Merci de télécharger la dernière version de OSXFuse à partir de :
https://osxfuse.github.io/
</string>
@@ -812,21 +832,22 @@ https://osxfuse.github.io/
<key>STATE</key>
<true/>
</dict>
</array>
- <key>POSTINSTALL_PATH</key>
- <dict/>
- <key>PREINSTALL_PATH</key>
- <dict/>
<key>RESOURCES</key>
<array/>
<key>ROOT_VOLUME_ONLY</key>
<false/>
</dict>
<key>PROJECT_SETTINGS</key>
<dict>
<key>ADVANCED_OPTIONS</key>
- <dict/>
+ <dict>
+ <key>installer-script.options:hostArchitectures</key>
+ <array>
+ <string>x86_64,arm64</string>
+ </array>
+ </dict>
<key>BUILD_FORMAT</key>
<integer>0</integer>
<key>BUILD_PATH</key>
<dict>
@@ -1003,9 +1024,13 @@ https://osxfuse.github.io/
<true/>
</dict>
</array>
<key>NAME</key>
- <string>VeraCrypt 1.20-BETA2</string>
+ <string>VeraCrypt 1.26.17</string>
+ <key>PAYLOAD_ONLY</key>
+ <false/>
+ <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
+ <false/>
</dict>
</dict>
<key>SHARED_GLOBAL_DATA</key>
<dict>
diff --git a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj
new file mode 100755
index 00000000..4a092975
--- /dev/null
+++ b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj
@@ -0,0 +1,1082 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PACKAGES</key>
+ <array>
+ <dict>
+ <key>MUST-CLOSE-APPLICATION-ITEMS</key>
+ <array/>
+ <key>MUST-CLOSE-APPLICATIONS</key>
+ <false/>
+ <key>PACKAGE_FILES</key>
+ <dict>
+ <key>DEFAULT_INSTALL_LOCATION</key>
+ <string>/</string>
+ <key>HIERARCHY</key>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Utilities</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>BUNDLE_CAN_DOWNGRADE</key>
+ <true/>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>../../Main/VeraCrypt.app</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>3</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Applications</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>509</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Application Support</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Documentation</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Filesystems</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Frameworks</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Input Methods</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Internet Plug-Ins</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>LaunchAgents</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>LaunchDaemons</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>PreferencePanes</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Preferences</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Printers</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>PrivilegedHelperTools</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>1005</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>QuickLook</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>QuickTime</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Screen Savers</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Scripts</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Services</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Widgets</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Automator</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Extensions</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Library</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Extensions</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Library</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>System</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Shared</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>1023</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Users</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>/</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <key>PAYLOAD_TYPE</key>
+ <integer>0</integer>
+ <key>PRESERVE_EXTENDED_ATTRIBUTES</key>
+ <false/>
+ <key>SHOW_INVISIBLE</key>
+ <false/>
+ <key>SPLIT_FORKS</key>
+ <true/>
+ <key>TREAT_MISSING_FILES_AS_WARNING</key>
+ <false/>
+ <key>VERSION</key>
+ <integer>5</integer>
+ </dict>
+ <key>PACKAGE_SCRIPTS</key>
+ <dict>
+ <key>POSTINSTALL_PATH</key>
+ <dict>
+ <key>PATH</key>
+ <string>postinstall.sh</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <key>PREINSTALL_PATH</key>
+ <dict>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <key>RESOURCES</key>
+ <array/>
+ </dict>
+ <key>PACKAGE_SETTINGS</key>
+ <dict>
+ <key>AUTHENTICATION</key>
+ <integer>1</integer>
+ <key>CONCLUSION_ACTION</key>
+ <integer>0</integer>
+ <key>FOLLOW_SYMBOLIC_LINKS</key>
+ <false/>
+ <key>IDENTIFIER</key>
+ <string>com.idrix.pkg.veracrypt</string>
+ <key>LOCATION</key>
+ <integer>0</integer>
+ <key>NAME</key>
+ <string>veracrypt</string>
+ <key>OVERWRITE_PERMISSIONS</key>
+ <false/>
+ <key>PAYLOAD_SIZE</key>
+ <integer>-1</integer>
+ <key>REFERENCE_PATH</key>
+ <string></string>
+ <key>RELOCATABLE</key>
+ <false/>
+ <key>USE_HFS+_COMPRESSION</key>
+ <false/>
+ <key>VERSION</key>
+ <string>1.26.17</string>
+ </dict>
+ <key>TYPE</key>
+ <integer>0</integer>
+ <key>UUID</key>
+ <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string>
+ </dict>
+ </array>
+ <key>PROJECT</key>
+ <dict>
+ <key>PROJECT_COMMENTS</key>
+ <dict>
+ <key>NOTES</key>
+ <data>
+ PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M
+ IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv
+ c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l
+ cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7
+ IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250
+ ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp
+ dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u
+ dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD
+ b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjExMzguNTEiPgo8c3R5bGUg
+ dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5
+ Pgo8L2JvZHk+CjwvaHRtbD4K
+ </data>
+ </dict>
+ <key>PROJECT_PRESENTATION</key>
+ <dict>
+ <key>BACKGROUND</key>
+ <dict>
+ <key>APPAREANCES</key>
+ <dict>
+ <key>DARK_AQUA</key>
+ <dict/>
+ <key>LIGHT_AQUA</key>
+ <dict/>
+ </dict>
+ <key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key>
+ <true/>
+ </dict>
+ <key>INSTALLATION TYPE</key>
+ <dict>
+ <key>HIERARCHIES</key>
+ <dict>
+ <key>INSTALLER</key>
+ <dict>
+ <key>LIST</key>
+ <array>
+ <dict>
+ <key>DESCRIPTION</key>
+ <array/>
+ <key>OPTIONS</key>
+ <dict>
+ <key>HIDDEN</key>
+ <false/>
+ <key>STATE</key>
+ <integer>1</integer>
+ </dict>
+ <key>PACKAGE_UUID</key>
+ <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string>
+ <key>TITLE</key>
+ <array/>
+ <key>TOOLTIP</key>
+ <array/>
+ <key>TYPE</key>
+ <integer>0</integer>
+ <key>UUID</key>
+ <string>4F1ACCF7-AA2A-4C80-A42F-274D410A13D1</string>
+ </dict>
+ </array>
+ <key>REMOVED</key>
+ <dict/>
+ </dict>
+ </dict>
+ <key>MODE</key>
+ <integer>0</integer>
+ </dict>
+ <key>INSTALLATION_STEPS</key>
+ <array>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewIntroductionController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>Introduction</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewReadMeController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>ReadMe</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewLicenseController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>License</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewDestinationSelectController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>TargetSelect</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewInstallationTypeController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>PackageSelection</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewInstallationController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>Install</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewSummaryController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>Summary</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ </array>
+ <key>INTRODUCTION</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array/>
+ </dict>
+ <key>LICENSE</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>VALUE</key>
+ <dict>
+ <key>PATH</key>
+ <string>../../License.txt</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
+ </dict>
+ </array>
+ <key>MODE</key>
+ <integer>0</integer>
+ </dict>
+ <key>README</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array/>
+ </dict>
+ <key>SUMMARY</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array/>
+ </dict>
+ <key>TITLE</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>VALUE</key>
+ <string></string>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>PROJECT_REQUIREMENTS</key>
+ <dict>
+ <key>LIST</key>
+ <array>
+ <dict>
+ <key>BEHAVIOR</key>
+ <integer>3</integer>
+ <key>DICTIONARY</key>
+ <dict>
+ <key>IC_REQUIREMENT_CPU_ARCHITECTURE_FAMILY</key>
+ <integer>2</integer>
+ <key>IC_REQUIREMENT_CPU_INTEL_ARCHITECTURE_TYPE</key>
+ <integer>0</integer>
+ <key>IC_REQUIREMENT_CPU_MINIMUM_CPU_CORES_COUNT</key>
+ <integer>1</integer>
+ <key>IC_REQUIREMENT_CPU_MINIMUM_FREQUENCY</key>
+ <integer>866666</integer>
+ <key>IC_REQUIREMENT_CPU_POWERPC_ARCHITECTURE_TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <key>IC_REQUIREMENT_CHECK_TYPE</key>
+ <integer>0</integer>
+ <key>IDENTIFIER</key>
+ <string>fr.whitebox.Packages.requirement.cpu</string>
+ <key>MESSAGE</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>SECONDARY_VALUE</key>
+ <string></string>
+ <key>VALUE</key>
+ <string>VeraCrypt runs only on Intel platforms.</string>
+ </dict>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>SECONDARY_VALUE</key>
+ <string></string>
+ <key>VALUE</key>
+ <string>VeraCrypt supporte seulement les platformes Intel.</string>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>Processor</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>BEHAVIOR</key>
+ <integer>3</integer>
+ <key>DICTIONARY</key>
+ <dict>
+ <key>IC_REQUIREMENT_OS_DISK_TYPE</key>
+ <integer>1</integer>
+ <key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key>
+ <integer>0</integer>
+ <key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key>
+ <integer>100701</integer>
+ </dict>
+ <key>IC_REQUIREMENT_CHECK_TYPE</key>
+ <integer>0</integer>
+ <key>IDENTIFIER</key>
+ <string>fr.whitebox.Packages.requirement.os</string>
+ <key>MESSAGE</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>VALUE</key>
+ <string>VeraCrypt requires MacOSX 10.7.1 and above.</string>
+ </dict>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>VALUE</key>
+ <string>VeraCrypt nécessite MacOSX 10.7.1 et supérieur.</string>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>Operating System</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>BEHAVIOR</key>
+ <integer>3</integer>
+ <key>DICTIONARY</key>
+ <dict>
+ <key>IC_REQUIREMENT_FILES_CONDITION</key>
+ <integer>0</integer>
+ <key>IC_REQUIREMENT_FILES_DISK_TYPE</key>
+ <integer>1</integer>
+ <key>IC_REQUIREMENT_FILES_LIST</key>
+ <array>
+ <string>/usr/local/lib/libfuse.dylib</string>
+ <string>/usr/local/lib/libosxfuse.2.dylib</string>
+ </array>
+ <key>IC_REQUIREMENT_FILES_SELECTOR</key>
+ <integer>0</integer>
+ </dict>
+ <key>IC_REQUIREMENT_CHECK_TYPE</key>
+ <integer>0</integer>
+ <key>IDENTIFIER</key>
+ <string>fr.whitebox.Packages.requirement.files</string>
+ <key>MESSAGE</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>SECONDARY_VALUE</key>
+ <string></string>
+ <key>VALUE</key>
+ <string>OSXFuse seems to be missing on your machine. VeraCrypt requires OSXFuse 3.10 or above.
+Please download the latest OSXFuse version from :
+https://osxfuse.github.io/</string>
+ </dict>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>SECONDARY_VALUE</key>
+ <string></string>
+ <key>VALUE</key>
+ <string>OSXFuse semble ne pas être installé sur votre machine. VeraCrypt nécessite OSXFuse 3.10 ou supérieur.
+Merci de télécharger la dernière version de OSXFuse à partir de :
+https://osxfuse.github.io/
+
+</string>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>OSXFuse</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ </array>
+ <key>RESOURCES</key>
+ <array/>
+ <key>ROOT_VOLUME_ONLY</key>
+ <false/>
+ </dict>
+ <key>PROJECT_SETTINGS</key>
+ <dict>
+ <key>BUILD_FORMAT</key>
+ <integer>0</integer>
+ <key>BUILD_PATH</key>
+ <dict>
+ <key>PATH</key>
+ <string>.</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <key>EXCLUDED_FILES</key>
+ <array>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.DS_Store</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove .DS_Store files</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove ".DS_Store" files created by the Finder.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.pbdevelopment</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove .pbdevelopment files</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove ".pbdevelopment" files created by ProjectBuilder or Xcode.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>CVS</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.cvsignore</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.cvspass</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.svn</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.git</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.gitignore</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove SCM metadata</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>classes.nib</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>designable.db</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>info.nib</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Optimize nib files</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>Resources Disabled</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove Resources Disabled folders</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove "Resources Disabled" folders.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>SEPARATOR</key>
+ <true/>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>VeraCrypt Legacy 10</string>
+ <key>PAYLOAD_ONLY</key>
+ <false/>
+ <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
+ <false/>
+ </dict>
+ </dict>
+ <key>SHARED_GLOBAL_DATA</key>
+ <dict>
+ <key>IC_REQUIREMENT_JAVASCRIPT_SHARED_SOURCE_CODE</key>
+ <string></string>
+ </dict>
+ <key>TYPE</key>
+ <integer>0</integer>
+ <key>VERSION</key>
+ <integer>2</integer>
+</dict>
+</plist>
diff --git a/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj b/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj
new file mode 100755
index 00000000..5641d95f
--- /dev/null
+++ b/src/Setup/MacOSX/veracrypt_fuse-t.pkgproj
@@ -0,0 +1,1044 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PACKAGES</key>
+ <array>
+ <dict>
+ <key>MUST-CLOSE-APPLICATION-ITEMS</key>
+ <array/>
+ <key>MUST-CLOSE-APPLICATIONS</key>
+ <false/>
+ <key>PACKAGE_FILES</key>
+ <dict>
+ <key>DEFAULT_INSTALL_LOCATION</key>
+ <string>/</string>
+ <key>HIERARCHY</key>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Utilities</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>BUNDLE_CAN_DOWNGRADE</key>
+ <true/>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>../../Main/VeraCrypt.app</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>3</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Applications</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>509</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Application Support</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Documentation</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Filesystems</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Frameworks</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Input Methods</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Internet Plug-Ins</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>LaunchAgents</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>LaunchDaemons</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>PreferencePanes</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Preferences</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Printers</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>PrivilegedHelperTools</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>1005</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>QuickLook</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>QuickTime</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Screen Savers</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Scripts</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Services</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Widgets</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Automator</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Extensions</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Library</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Extensions</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Library</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>System</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>CHILDREN</key>
+ <array>
+ <dict>
+ <key>CHILDREN</key>
+ <array/>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>Shared</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>1023</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>80</integer>
+ <key>PATH</key>
+ <string>Users</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>GID</key>
+ <integer>0</integer>
+ <key>PATH</key>
+ <string>/</string>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ <key>PERMISSIONS</key>
+ <integer>493</integer>
+ <key>TYPE</key>
+ <integer>1</integer>
+ <key>UID</key>
+ <integer>0</integer>
+ </dict>
+ <key>PAYLOAD_TYPE</key>
+ <integer>0</integer>
+ <key>PRESERVE_EXTENDED_ATTRIBUTES</key>
+ <false/>
+ <key>SHOW_INVISIBLE</key>
+ <false/>
+ <key>SPLIT_FORKS</key>
+ <true/>
+ <key>TREAT_MISSING_FILES_AS_WARNING</key>
+ <false/>
+ <key>VERSION</key>
+ <integer>5</integer>
+ </dict>
+ <key>PACKAGE_SCRIPTS</key>
+ <dict>
+ <key>POSTINSTALL_PATH</key>
+ <dict>
+ <key>PATH</key>
+ <string>postinstall_fuse-t.sh</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <key>PREINSTALL_PATH</key>
+ <dict>
+ <key>PATH_TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <key>RESOURCES</key>
+ <array/>
+ </dict>
+ <key>PACKAGE_SETTINGS</key>
+ <dict>
+ <key>AUTHENTICATION</key>
+ <integer>1</integer>
+ <key>CONCLUSION_ACTION</key>
+ <integer>0</integer>
+ <key>FOLLOW_SYMBOLIC_LINKS</key>
+ <false/>
+ <key>IDENTIFIER</key>
+ <string>com.idrix.pkg.veracrypt</string>
+ <key>LOCATION</key>
+ <integer>0</integer>
+ <key>NAME</key>
+ <string>veracrypt</string>
+ <key>OVERWRITE_PERMISSIONS</key>
+ <false/>
+ <key>PAYLOAD_SIZE</key>
+ <integer>-1</integer>
+ <key>REFERENCE_PATH</key>
+ <string></string>
+ <key>RELOCATABLE</key>
+ <false/>
+ <key>USE_HFS+_COMPRESSION</key>
+ <false/>
+ <key>VERSION</key>
+ <string>1.26.17</string>
+ </dict>
+ <key>TYPE</key>
+ <integer>0</integer>
+ <key>UUID</key>
+ <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string>
+ </dict>
+ </array>
+ <key>PROJECT</key>
+ <dict>
+ <key>PROJECT_COMMENTS</key>
+ <dict>
+ <key>NOTES</key>
+ <data>
+ PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M
+ IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv
+ c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l
+ cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7
+ IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250
+ ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp
+ dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u
+ dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD
+ b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjExMzguNTEiPgo8c3R5bGUg
+ dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5
+ Pgo8L2JvZHk+CjwvaHRtbD4K
+ </data>
+ </dict>
+ <key>PROJECT_PRESENTATION</key>
+ <dict>
+ <key>BACKGROUND</key>
+ <dict>
+ <key>APPAREANCES</key>
+ <dict>
+ <key>DARK_AQUA</key>
+ <dict/>
+ <key>LIGHT_AQUA</key>
+ <dict/>
+ </dict>
+ <key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key>
+ <true/>
+ </dict>
+ <key>INSTALLATION TYPE</key>
+ <dict>
+ <key>HIERARCHIES</key>
+ <dict>
+ <key>INSTALLER</key>
+ <dict>
+ <key>LIST</key>
+ <array>
+ <dict>
+ <key>DESCRIPTION</key>
+ <array/>
+ <key>OPTIONS</key>
+ <dict>
+ <key>HIDDEN</key>
+ <false/>
+ <key>STATE</key>
+ <integer>1</integer>
+ </dict>
+ <key>PACKAGE_UUID</key>
+ <string>B14381D9-EC5F-43E4-B971-82AB3D132A64</string>
+ <key>TITLE</key>
+ <array/>
+ <key>TOOLTIP</key>
+ <array/>
+ <key>TYPE</key>
+ <integer>0</integer>
+ <key>UUID</key>
+ <string>4F1ACCF7-AA2A-4C80-A42F-274D410A13D1</string>
+ </dict>
+ </array>
+ <key>REMOVED</key>
+ <dict/>
+ </dict>
+ </dict>
+ <key>MODE</key>
+ <integer>0</integer>
+ </dict>
+ <key>INSTALLATION_STEPS</key>
+ <array>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewIntroductionController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>Introduction</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewReadMeController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>ReadMe</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewLicenseController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>License</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewDestinationSelectController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>TargetSelect</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewInstallationTypeController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>PackageSelection</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewInstallationController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>Install</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ <dict>
+ <key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
+ <string>ICPresentationViewSummaryController</string>
+ <key>INSTALLER_PLUGIN</key>
+ <string>Summary</string>
+ <key>LIST_TITLE_KEY</key>
+ <string>InstallerSectionTitle</string>
+ </dict>
+ </array>
+ <key>INTRODUCTION</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array/>
+ </dict>
+ <key>LICENSE</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>VALUE</key>
+ <dict>
+ <key>PATH</key>
+ <string>../../License.txt</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
+ </dict>
+ </array>
+ <key>MODE</key>
+ <integer>0</integer>
+ </dict>
+ <key>README</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array/>
+ </dict>
+ <key>SUMMARY</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array/>
+ </dict>
+ <key>TITLE</key>
+ <dict>
+ <key>LOCALIZATIONS</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>VALUE</key>
+ <string></string>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>PROJECT_REQUIREMENTS</key>
+ <dict>
+ <key>LIST</key>
+ <array>
+ <dict>
+ <key>BEHAVIOR</key>
+ <integer>3</integer>
+ <key>DICTIONARY</key>
+ <dict>
+ <key>IC_REQUIREMENT_OS_DISK_TYPE</key>
+ <integer>1</integer>
+ <key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key>
+ <integer>0</integer>
+ <key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key>
+ <integer>119900</integer>
+ </dict>
+ <key>IC_REQUIREMENT_CHECK_TYPE</key>
+ <integer>0</integer>
+ <key>IDENTIFIER</key>
+ <string>fr.whitebox.Packages.requirement.os</string>
+ <key>MESSAGE</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>VALUE</key>
+ <string>VeraCrypt requires MacOSX 12 and above.</string>
+ </dict>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>VALUE</key>
+ <string>VeraCrypt nécessite MacOSX 12 et supérieur.</string>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>Operating System</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>BEHAVIOR</key>
+ <integer>3</integer>
+ <key>DICTIONARY</key>
+ <dict>
+ <key>IC_REQUIREMENT_FILES_CONDITION</key>
+ <integer>0</integer>
+ <key>IC_REQUIREMENT_FILES_DISK_TYPE</key>
+ <integer>1</integer>
+ <key>IC_REQUIREMENT_FILES_LIST</key>
+ <array>
+ <string>/usr/local/lib/libfuse-t.dylib</string>
+ </array>
+ <key>IC_REQUIREMENT_FILES_SELECTOR</key>
+ <integer>0</integer>
+ </dict>
+ <key>IC_REQUIREMENT_CHECK_TYPE</key>
+ <integer>0</integer>
+ <key>IDENTIFIER</key>
+ <string>fr.whitebox.Packages.requirement.files</string>
+ <key>MESSAGE</key>
+ <array>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>English</string>
+ <key>SECONDARY_VALUE</key>
+ <string></string>
+ <key>VALUE</key>
+ <string>FUSE-T seems to be missing on your machine. VeraCrypt requires OSXFuse 1.0 or above.
+Please download the latest FUSE-T version from :
+https://github.com/macos-fuse-t/fuse-t/releases</string>
+ </dict>
+ <dict>
+ <key>LANGUAGE</key>
+ <string>French</string>
+ <key>SECONDARY_VALUE</key>
+ <string></string>
+ <key>VALUE</key>
+ <string>FUSE-T semble ne pas être installé sur votre machine. VeraCrypt nécessite FUSE-T 1.0 ou supérieur.
+Merci de télécharger la dernière version de OSXFuse à partir de :
+https://github.com/macos-fuse-t/fuse-t/releases
+
+</string>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>FUSE-T</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ </array>
+ <key>RESOURCES</key>
+ <array/>
+ <key>ROOT_VOLUME_ONLY</key>
+ <false/>
+ </dict>
+ <key>PROJECT_SETTINGS</key>
+ <dict>
+ <key>ADVANCED_OPTIONS</key>
+ <dict>
+ <key>installer-script.options:hostArchitectures</key>
+ <array>
+ <string>x86_64,arm64</string>
+ </array>
+ </dict>
+ <key>BUILD_FORMAT</key>
+ <integer>0</integer>
+ <key>BUILD_PATH</key>
+ <dict>
+ <key>PATH</key>
+ <string>.</string>
+ <key>PATH_TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <key>EXCLUDED_FILES</key>
+ <array>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.DS_Store</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove .DS_Store files</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove ".DS_Store" files created by the Finder.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.pbdevelopment</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove .pbdevelopment files</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove ".pbdevelopment" files created by ProjectBuilder or Xcode.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>CVS</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.cvsignore</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.cvspass</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.svn</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.git</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>.gitignore</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove SCM metadata</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>classes.nib</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>designable.db</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>info.nib</string>
+ <key>TYPE</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Optimize nib files</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>PATTERNS_ARRAY</key>
+ <array>
+ <dict>
+ <key>REGULAR_EXPRESSION</key>
+ <false/>
+ <key>STRING</key>
+ <string>Resources Disabled</string>
+ <key>TYPE</key>
+ <integer>1</integer>
+ </dict>
+ </array>
+ <key>PROTECTED</key>
+ <true/>
+ <key>PROXY_NAME</key>
+ <string>Remove Resources Disabled folders</string>
+ <key>PROXY_TOOLTIP</key>
+ <string>Remove "Resources Disabled" folders.</string>
+ <key>STATE</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>SEPARATOR</key>
+ <true/>
+ </dict>
+ </array>
+ <key>NAME</key>
+ <string>VeraCrypt 1.26.17</string>
+ <key>PAYLOAD_ONLY</key>
+ <false/>
+ <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
+ <false/>
+ </dict>
+ </dict>
+ <key>SHARED_GLOBAL_DATA</key>
+ <dict>
+ <key>IC_REQUIREMENT_JAVASCRIPT_SHARED_SOURCE_CODE</key>
+ <string></string>
+ </dict>
+ <key>TYPE</key>
+ <integer>0</integer>
+ <key>VERSION</key>
+ <integer>2</integer>
+</dict>
+</plist>
diff --git a/src/Setup/Portable.manifest b/src/Setup/Portable.manifest
new file mode 100644
index 00000000..79d86799
--- /dev/null
+++ b/src/Setup/Portable.manifest
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <asmv3:application>
+ <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+ <dpiAware>true</dpiAware>
+ </asmv3:windowsSettings>
+ </asmv3:application>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows 10 and Windows 11 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ </application>
+ </compatibility>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+ </dependency>
+</assembly> \ No newline at end of file
diff --git a/src/Setup/Portable.rc b/src/Setup/Portable.rc
new file mode 100644
index 00000000..1ecfa8fd
--- /dev/null
+++ b/src/Setup/Portable.rc
@@ -0,0 +1,318 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+#include "..\\common\\resource.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "IDRIX"
+ VALUE "FileDescription", "VeraCrypt Portable"
+ VALUE "FileVersion", "1.26.17"
+ VALUE "LegalTrademarks", "VeraCrypt"
+ VALUE "OriginalFilename", "VeraCrypt Portable.exe"
+ VALUE "ProductName", "VeraCrypt"
+ VALUE "ProductVersion", "1.26.17"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// HEADER
+//
+
+IDR_SETUP_RSRC_HEADER HEADER "resource.h"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+//
+// LANGUAGES
+//
+
+IDR_LANG_AR LANGUAGES "..\\..\\Translations\\Language.ar.xml"
+IDR_LANG_CS LANGUAGES "..\\..\\Translations\\Language.cs.xml"
+IDR_LANG_DE LANGUAGES "..\\..\\Translations\\Language.de.xml"
+IDR_LANG_ES LANGUAGES "..\\..\\Translations\\Language.es.xml"
+IDR_LANG_FR LANGUAGES "..\\..\\Translations\\Language.fr.xml"
+IDR_LANG_IT LANGUAGES "..\\..\\Translations\\Language.it.xml"
+IDR_LANG_JA LANGUAGES "..\\..\\Translations\\Language.ja.xml"
+IDR_LANG_NL LANGUAGES "..\\..\\Translations\\Language.nl.xml"
+IDR_LANG_PL LANGUAGES "..\\..\\Translations\\Language.pl.xml"
+IDR_LANG_RO LANGUAGES "..\\..\\Translations\\Language.ro.xml"
+IDR_LANG_RU LANGUAGES "..\\..\\Translations\\Language.ru.xml"
+IDR_LANG_VI LANGUAGES "..\\..\\Translations\\Language.vi.xml"
+IDR_LANG_ZHCN LANGUAGES "..\\..\\Translations\\Language.zh-cn.xml"
+IDR_LANG_ZHHK LANGUAGES "..\\..\\Translations\\Language.zh-hk.xml"
+IDR_LANG_BE LANGUAGES "..\\..\\Translations\\Language.be.xml"
+IDR_LANG_BG LANGUAGES "..\\..\\Translations\\Language.bg.xml"
+IDR_LANG_CA LANGUAGES "..\\..\\Translations\\Language.ca.xml"
+IDR_LANG_CO LANGUAGES "..\\..\\Translations\\Language.co.xml"
+IDR_LANG_DA LANGUAGES "..\\..\\Translations\\Language.da.xml"
+IDR_LANG_EL LANGUAGES "..\\..\\Translations\\Language.el.xml"
+IDR_LANG_ET LANGUAGES "..\\..\\Translations\\Language.et.xml"
+IDR_LANG_EU LANGUAGES "..\\..\\Translations\\Language.eu.xml"
+IDR_LANG_FA LANGUAGES "..\\..\\Translations\\Language.fa.xml"
+IDR_LANG_FI LANGUAGES "..\\..\\Translations\\Language.fi.xml"
+IDR_LANG_HE LANGUAGES "..\\..\\Translations\\Language.he.xml"
+IDR_LANG_HU LANGUAGES "..\\..\\Translations\\Language.hu.xml"
+IDR_LANG_ID LANGUAGES "..\\..\\Translations\\Language.id.xml"
+IDR_LANG_KA LANGUAGES "..\\..\\Translations\\Language.ka.xml"
+IDR_LANG_KO LANGUAGES "..\\..\\Translations\\Language.ko.xml"
+IDR_LANG_LV LANGUAGES "..\\..\\Translations\\Language.lv.xml"
+IDR_LANG_NB LANGUAGES "..\\..\\Translations\\Language.nb.xml"
+IDR_LANG_NN LANGUAGES "..\\..\\Translations\\Language.nn.xml"
+IDR_LANG_PTBR LANGUAGES "..\\..\\Translations\\Language.pt-br.xml"
+IDR_LANG_SK LANGUAGES "..\\..\\Translations\\Language.sk.xml"
+IDR_LANG_SL LANGUAGES "..\\..\\Translations\\Language.sl.xml"
+IDR_LANG_SV LANGUAGES "..\\..\\Translations\\Language.sv.xml"
+IDR_LANG_TH LANGUAGES "..\\..\\Translations\\Language.th.xml"
+IDR_LANG_TR LANGUAGES "..\\..\\Translations\\Language.tr.xml"
+IDR_LANG_UK LANGUAGES "..\\..\\Translations\\Language.uk.xml"
+IDR_LANG_UZ LANGUAGES "..\\..\\Translations\\Language.uz.xml"
+IDR_LANG_ZHTW LANGUAGES "..\\..\\Translations\\Language.zh-tw.xml"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 217, 156
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LTEXT "",IDC_BOX_HELP,0,10,217,146
+END
+
+IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 346, 152
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "",IDC_LICENSE_TEXT,"RichEdit20W",WS_BORDER | WS_VSCROLL | WS_TABSTOP | 0x2804,0,23,345,108
+ CONTROL "",IDC_AGREE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,137,126,10
+ LTEXT "",IDC_BOX_HELP,0,0,346,22
+END
+
+IDD_INSTL_DLG DIALOGEX 0, 0, 374, 231
+STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "VeraCrypt Portable Wizard"
+CLASS "VeraCryptCustomDlg"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ PUSHBUTTON "&Help",IDHELP,150,211,50,14
+ PUSHBUTTON "",IDC_PREV,209,211,50,14
+ DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14
+ LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT
+ CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30
+ CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10
+ CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
+ CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE
+ CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE
+ LTEXT "VeraCrypt Portable",IDC_STATIC,4,200,62,8,WS_DISABLED
+ LTEXT "",IDC_BOX_INFO,18,18,317,13,0,WS_EX_TRANSPARENT
+ LTEXT "",IDC_MAIN_CONTENT_CANVAS,0,36,374,164
+ LTEXT "",IDC_POS_BOX,14,42,346,155,0,WS_EX_TRANSPARENT
+END
+
+IDD_EXTRACTION_OPTIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ PUSHBUTTON "Bro&wse...",IDC_BROWSE,277,32,62,14
+ EDITTEXT IDC_DESTINATION,6,33,264,12,ES_AUTOHSCROLL
+ LTEXT "Please select or type the location where you want to place the extracted files:",IDT_EXTRACT_DESTINATION,6,15,333,17
+ CONTROL "&Open the destination location when finished",IDC_OPEN_CONTAINING_FOLDER,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,91,318,16
+ LTEXT "",IDC_BOX_HELP,6,56,333,32
+END
+
+IDD_PROGRESS_PAGE_DLG DIALOGEX 0, 0, 346, 152
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LISTBOX IDC_LOG_WINDOW,0,1,345,131,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL
+ CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,139,345,12
+END
+
+IDD_DONATIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_TRANSPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14
+END
+
+IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 213, 87
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "VeraCrypt Setup Wizard"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,102,66,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,156,66,50,14
+ ICON 501,IDC_STATIC,10,10,32,32
+ LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,157,26
+ COMBOBOX IDC_LANGUAGES_LIST,42,44,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_SETUP ICON "Setup.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "#include ""..\\\\common\\\\resource.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#include ""..\\\\common\\\\common.rc""\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_INFO_PAGE_DLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 210
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 149
+ END
+
+ IDD_INTRO_PAGE_DLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 339
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 145
+ END
+
+ IDD_INSTL_DLG, DIALOG
+ BEGIN
+ END
+
+ IDD_EXTRACTION_OPTIONS_PAGE_DLG, DIALOG
+ BEGIN
+ RIGHTMARGIN, 343
+ BOTTOMMARGIN, 147
+ END
+
+ IDD_PROGRESS_PAGE_DLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 339
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 145
+ END
+
+ IDD_DONATIONS_PAGE_DLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 339
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 147
+ END
+
+ IDD_INSTALL_LANGUAGE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 206
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 80
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_SETUP_WIZARD BITMAP "VeraCrypt_setup.bmp"
+IDB_SETUP_WIZARD_BKG BITMAP "VeraCrypt_setup_background.bmp"
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#include "..\\common\\common.rc"
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/src/Setup/Portable.vcxproj b/src/Setup/Portable.vcxproj
new file mode 100644
index 00000000..a493c304
--- /dev/null
+++ b/src/Setup/Portable.vcxproj
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseCustomEFI|Win32">
+ <Configuration>ReleaseCustomEFI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}</ProjectGuid>
+ <RootNamespace>Portable</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>Portable</ProjectName>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)PortableDebug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)PortableDebug\Int\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)PortableRelease\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)PortableRelease\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)PortableRelease\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)PortableRelease\Int\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)PortableRelease\Int\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)PortableRelease\Int\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptPortable</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptPortable</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptPortable</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptPortable</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>libcmtd.lib;atls.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
+ <UACExecutionLevel>AsInvoker</UACExecutionLevel>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Portable.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>md "..\Debug\Setup Files" 2&gt;NUL:
+copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portable.exe" &gt;NUL:
+</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>atls.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
+ <UACExecutionLevel>AsInvoker</UACExecutionLevel>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;PORTABLE;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
+ <UACExecutionLevel>AsInvoker</UACExecutionLevel>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;PORTABLE;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
+ <UACExecutionLevel>AsInvoker</UACExecutionLevel>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="Dir.c" />
+ <ClCompile Include="SelfExtract.c" />
+ <ClCompile Include="Setup.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ <ClCompile Include="Wizard.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ <ClCompile Include="..\Common\Xml.c" />
+ <ClCompile Include="..\Common\BootEncryption.cpp" />
+ <ClCompile Include="..\Common\Crc.c" />
+ <ClCompile Include="..\Common\Dictionary.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ <ClCompile Include="..\Common\Dlgcode.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ <ClCompile Include="..\Common\Endian.c" />
+ <ClCompile Include="..\Common\Language.c" />
+ <ClCompile Include="..\Common\Registry.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Setup.ico" />
+ <None Include="..\Common\VeraCrypt.ico" />
+ <None Include="VeraCrypt_setup.bmp" />
+ <None Include="VeraCrypt_setup_background.bmp" />
+ <None Include="..\Common\VeraCrypt_Volume.ico" />
+ <None Include="..\Common\Language.xml" />
+ <None Include="..\Resources\Texts\License.rtf" />
+ <None Include="..\Common\Textual_logo_288dpi.bmp" />
+ <None Include="..\Common\Textual_logo_96dpi.bmp" />
+ <None Include="..\Common\Textual_logo_background.bmp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\Common\Apidrvr.h" />
+ <ClInclude Include="..\Common\Combo.h" />
+ <ClInclude Include="ComSetup.h" />
+ <ClInclude Include="..\Common\Crc.h" />
+ <ClInclude Include="Dir.h" />
+ <ClInclude Include="..\Common\Dlgcode.h" />
+ <ClInclude Include="..\Common\Exception.h" />
+ <ClInclude Include="..\Common\Inflate.h" />
+ <ClInclude Include="..\Common\Language.h" />
+ <ClInclude Include="..\Common\Registry.h" />
+ <ClInclude Include="..\Common\Resource.h" />
+ <ClInclude Include="Resource.h" />
+ <ClInclude Include="SelfExtract.h" />
+ <ClInclude Include="Setup.h" />
+ <ClInclude Include="..\Common\Tcdefs.h" />
+ <ClInclude Include="Wizard.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Manifest Include="Portable.manifest" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\Common\Common.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
+ </ResourceCompile>
+ <ResourceCompile Include="Portable.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/Setup/Portable.vcxproj.filters b/src/Setup/Portable.vcxproj.filters
new file mode 100644
index 00000000..855ecc00
--- /dev/null
+++ b/src/Setup/Portable.vcxproj.filters
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Source Files\Common">
+ <UniqueIdentifier>{876C2050-1694-4F32-AF5D-491C6A43A799}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ <Filter Include="Resource Files\Common">
+ <UniqueIdentifier>{17370B4B-2D76-41A9-9828-015FB30054F6}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Dir.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="SelfExtract.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="Setup.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="Wizard.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Xml.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\BootEncryption.cpp">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Crc.c">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Dictionary.c">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Dlgcode.c">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Language.c">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Registry.c">
+ <Filter>Source Files\Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Common\Endian.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Setup.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\Common\VeraCrypt.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="VeraCrypt_setup.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="VeraCrypt_setup_background.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\Common\VeraCrypt_Volume.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\Common\Language.xml">
+ <Filter>Resource Files\Common</Filter>
+ </None>
+ <None Include="..\Resources\Texts\License.rtf">
+ <Filter>Resource Files\Common</Filter>
+ </None>
+ <None Include="..\Common\Textual_logo_288dpi.bmp">
+ <Filter>Resource Files\Common</Filter>
+ </None>
+ <None Include="..\Common\Textual_logo_96dpi.bmp">
+ <Filter>Resource Files\Common</Filter>
+ </None>
+ <None Include="..\Common\Textual_logo_background.bmp">
+ <Filter>Resource Files\Common</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\Common\Apidrvr.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Combo.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ComSetup.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Crc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Dir.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Dlgcode.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Exception.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Inflate.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Language.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Registry.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SelfExtract.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Setup.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Common\Tcdefs.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Wizard.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Manifest Include="Portable.manifest" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\Common\Common.rc">
+ <Filter>Resource Files\Common</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="Portable.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Setup/Portable.vcxproj.user b/src/Setup/Portable.vcxproj.user
new file mode 100644
index 00000000..ace9a86a
--- /dev/null
+++ b/src/Setup/Portable.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project> \ No newline at end of file
diff --git a/src/Setup/Resource.h b/src/Setup/Resource.h
index 8feaf3dc..62246068 100644
--- a/src/Setup/Resource.h
+++ b/src/Setup/Resource.h
@@ -2,8 +2,49 @@
// Microsoft Visual C++ generated include file.
// Used by Setup.rc
//
#define IDR_COMREG 10
+#define IDR_LANG_AR 20
+#define IDR_LANG_CS 21
+#define IDR_LANG_DE 22
+#define IDR_LANG_ES 23
+#define IDR_LANG_FR 24
+#define IDR_LANG_IT 25
+#define IDR_LANG_JA 26
+#define IDR_LANG_NL 27
+#define IDR_LANG_PL 28
+#define IDR_LANG_RO 29
+#define IDR_LANG_RU 30
+#define IDR_LANG_VI 31
+#define IDR_LANG_ZHCN 32
+#define IDR_LANG_ZHHK 33
+#define IDR_LANG_BE 34
+#define IDR_LANG_BG 35
+#define IDR_LANG_CA 36
+#define IDR_LANG_CO 37
+#define IDR_LANG_DA 38
+#define IDR_LANG_EL 39
+#define IDR_LANG_ET 40
+#define IDR_LANG_EU 41
+#define IDR_LANG_FA 42
+#define IDR_LANG_FI 43
+#define IDR_LANG_HE 44
+#define IDR_LANG_HU 45
+#define IDR_LANG_ID 46
+#define IDR_LANG_KA 47
+#define IDR_LANG_KO 48
+#define IDR_LANG_LV 49
+#define IDR_LANG_NN 50
+#define IDR_LANG_PTBR 51
+#define IDR_LANG_SK 52
+#define IDR_LANG_SL 53
+#define IDR_LANG_SV 54
+#define IDR_LANG_TH 55
+#define IDR_LANG_TR 56
+#define IDR_LANG_UK 57
+#define IDR_LANG_UZ 58
+#define IDR_LANG_ZHTW 59
+#define IDR_LANG_NB 60
#define IDD_INSTALL 101
#define IDD_INSTALL_OPTIONS_PAGE_DLG 102
#define IDD_UNINSTALL 103
#define IDI_SETUP 104
@@ -16,8 +57,9 @@
#define IDD_INSTL_DLG 111
#define IDD_WIZARD_MODE_PAGE_DLG 112
#define IDD_PROGRESS_PAGE_DLG 113
#define IDD_DONATIONS_PAGE_DLG 114
+#define IDD_INSTALL_LANGUAGE 115
#define IDC_DESTINATION 1000
#define IDC_BOX_TITLE 1001
#define IDC_BROWSE 1002
#define IDC_BOX_INFO 1003
@@ -49,16 +91,18 @@
#define IDC_POS_BOX 1029
#define IDC_BITMAP_SETUP_WIZARD 1030
#define IDC_MAIN_CONTENT_CANVAS 1031
#define IDC_DONATE 1032
+#define IDC_LANGUAGES_LIST 1033
+#define IDC_SELECT_LANGUAGE_LABEL 1034
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 115
+#define _APS_NEXT_RESOURCE_VALUE 116
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1033
+#define _APS_NEXT_CONTROL_VALUE 1035
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c
index a2ad60dd..c672c364 100644
--- a/src/Setup/SelfExtract.c
+++ b/src/Setup/SelfExtract.c
@@ -3,9 +3,9 @@
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)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages.
*/
@@ -21,24 +21,33 @@
#include "Dlgcode.h"
#include "Dir.h"
#include "Language.h"
#include "Resource.h"
+#include "LzmaLib.h"
#include <tchar.h>
#include <Strsafe.h>
#ifndef SRC_POS
#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
#endif
-#define OutputPackageFile L"VeraCrypt Setup " _T(VERSION_STRING) L".exe"
-
-#define MAG_START_MARKER "TCINSTRT"
-#define MAG_END_MARKER_OBFUSCATED "T/C/I/N/S/C/R/C"
+#ifdef PORTABLE
+#define OutputPackageFile L"VeraCrypt Portable " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX)L".exe"
+#else
+#ifdef VC_COMREG
+#define OutputPackageFile L"VeraCrypt COMReg.exe"
+#else
+#define OutputPackageFile L"VeraCrypt Setup " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX) L".exe"
+#endif
+#endif
+#define MAG_START_MARKER "VCINSTRT"
+#define MAG_END_MARKER_OBFUSCATED "V/C/I/N/S/C/R/C"
#define PIPE_BUFFER_LEN (4 * BYTES_PER_KB)
unsigned char MagEndMarker [sizeof (MAG_END_MARKER_OBFUSCATED)];
wchar_t DestExtractPath [TC_MAX_PATH];
DECOMPRESSED_FILE Decompressed_Files [NBR_COMPRESSED_FILES];
+int Decompressed_Files_Count = 0;
volatile char *PipeWriteBuf = NULL;
volatile HANDLE hChildStdinWrite = INVALID_HANDLE_VALUE;
unsigned char *DecompressedData = NULL;
@@ -53,9 +62,9 @@ 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
// needs to be deobfuscated using this function at startup.
-static void DeobfuscateMagEndMarker (void)
+void DeobfuscateMagEndMarker (void)
{
int i;
for (i = 0; i < sizeof (MAG_END_MARKER_OBFUSCATED); i += 2)
@@ -85,26 +94,45 @@ static void PkgInfo (wchar_t *msg)
// Returns 0 if decompression fails or, if successful, returns the size of the decompressed data
static int DecompressBuffer (unsigned char *out, int outSize, unsigned char *in, int len)
{
- uLongf outlen = (uLongf) outSize;
- int ret = uncompress (out, &outlen, in, (uLong) len);
- if (Z_OK == ret)
- return (int) outlen;
- else
- return 0;
+ int outlen = 0;
+ int status;
+ if (len > 5)
+ {
+ // the first 5 bytes of in contain props parameter
+ size_t srcLen = len - 5;
+ size_t outputLen = (size_t) outSize;
+ status = LzmaUncompress (out, &outputLen, in + 5, &srcLen, in, 5);
+ if (status == SZ_OK)
+ {
+ outlen = (int) outputLen;
+ }
+ }
+
+ return outlen;
}
// Returns 0 if compression fails or, if successful, the size of the compressed data
static int CompressBuffer (unsigned char *out, int outSize, unsigned char *in, int len)
{
- uLongf outlen = (uLongf) outSize;
- int ret = compress2 (out, &outlen, in, (uLong) len, Z_BEST_COMPRESSION);
- if (Z_OK == ret)
- return (int) outlen;
- else
- return 0;
+ unsigned char outProps[5];
+ size_t outPropsSize = 5;
+ int outlen = 0;
+ int status;
+ if (outSize > 5)
+ {
+ size_t outputLen = (size_t) (outSize - 5);
+ status = LzmaCompress (out + 5, &outputLen, in, len, outProps, &outPropsSize, 9, 0, -1, -1, -1, -1, -1);
+ if (status == SZ_OK)
+ {
+ memcpy (out, outProps, outPropsSize);
+ outlen = (int) (outputLen + 5);
+ }
+ }
+
+ return outlen;
}
// Clears all bytes that change when an exe file is digitally signed, except the data that are appended.
@@ -115,9 +143,9 @@ static void WipeSignatureAreas (char *buffer)
memset (buffer + 0x130, 0, 0x200 - 0x130);
}
-BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
+BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir, BOOL bSkipX64)
{
int i, x;
wchar_t inputFile [TC_MAX_PATH];
wchar_t outputFile [TC_MAX_PATH];
@@ -128,9 +156,9 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
unsigned char *bufIndex = NULL;
wchar_t tmpStr [2048];
int bufLen = 0, compressedDataLen = 0, uncompressedDataLen = 0;
- x = wcslen (szDestDir);
+ x = (int) wcslen (szDestDir);
if (x < 2)
goto err;
if (szDestDir[x - 1] != L'\\')
@@ -145,9 +173,13 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
if (!TCCopyFile (inputFile, outputFile))
{
handleWin32Error (hwndDlg, SRC_POS);
+#ifdef PORTABLE
+ PkgError (L"Cannot copy 'VeraCrypt Portable.exe' to the package");
+#else
PkgError (L"Cannot copy 'VeraCrypt Setup.exe' to the package");
+#endif
goto err;
}
// Determine the buffer size needed for all the files and meta data and check if all required files exist
@@ -155,8 +187,19 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
bufLen = 0;
for (i = 0; i < sizeof (szCompressedFiles) / sizeof (szCompressedFiles[0]); i++)
{
+ if (bSkipX64 && wcsstr(szCompressedFiles[i], L"-x64"))
+ continue;
+
+#ifdef VC_COMREG
+ if ( wcsstr(szCompressedFiles[i], L".zip") || wcsstr(szCompressedFiles[i], L".inf")
+ || wcsstr(szCompressedFiles[i], L".cat") || wcsstr(szCompressedFiles[i], L".txt")
+ || wcsstr(szCompressedFiles[i], L"LICENSE") || wcsstr(szCompressedFiles[i], L"NOTICE")
+ )
+ continue;
+#endif
+
StringCbPrintfW (szTmpFilePath, sizeof(szTmpFilePath), L"%s%s", szDestDir, szCompressedFiles[i]);
if (!FileExists (szTmpFilePath))
{
@@ -171,9 +214,9 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
bufLen += (int) GetFileSize64 (szTmpFilePath);
bufLen += 2; // 16-bit filename length
- bufLen += (wcslen(szCompressedFiles[i]) * sizeof (wchar_t)); // Filename
+ bufLen += (int) (wcslen(szCompressedFiles[i]) * sizeof (wchar_t)); // Filename
bufLen += 4; // CRC-32
bufLen += 4; // 32-bit file length
}
@@ -189,9 +232,9 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
}
// Write the start marker
- if (!SaveBufferToFile (MAG_START_MARKER, outputFile, strlen (MAG_START_MARKER), TRUE, FALSE))
+ if (!SaveBufferToFile (MAG_START_MARKER, outputFile, (DWORD) strlen (MAG_START_MARKER), TRUE, FALSE))
{
if (_wremove (outputFile))
PkgError (L"Cannot write the start marker\nFailed also to delete package file");
else
@@ -207,8 +250,19 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
{
DWORD tmpFileSize;
unsigned char *tmpBuffer;
+ if (bSkipX64 && wcsstr(szCompressedFiles[i], L"-x64"))
+ continue;
+
+#ifdef VC_COMREG
+ if ( wcsstr(szCompressedFiles[i], L".zip") || wcsstr(szCompressedFiles[i], L".inf")
+ || wcsstr(szCompressedFiles[i], L".cat") || wcsstr(szCompressedFiles[i], L".txt")
+ || wcsstr(szCompressedFiles[i], L"LICENSE") || wcsstr(szCompressedFiles[i], L"NOTICE")
+ )
+ continue;
+#endif
+
StringCbPrintfW (szTmpFilePath, sizeof(szTmpFilePath), L"%s%s", szDestDir, szCompressedFiles[i]);
tmpBuffer = LoadFile (szTmpFilePath, &tmpFileSize);
@@ -316,9 +370,9 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir)
goto err;
}
// Write the end marker
- if (!SaveBufferToFile (MagEndMarker, outputFile, strlen (MagEndMarker), TRUE, FALSE))
+ if (!SaveBufferToFile (MagEndMarker, outputFile, (DWORD) strlen (MagEndMarker), TRUE, FALSE))
{
if (_wremove (outputFile))
PkgError (L"Cannot write the end marker.\nFailed also to delete package file");
else
@@ -377,34 +431,46 @@ err:
}
// Verifies the CRC-32 of the whole self-extracting package (except the digital signature areas, if present)
-BOOL VerifyPackageIntegrity (void)
+BOOL VerifySelfPackageIntegrity ()
+{
+ wchar_t path [TC_MAX_PATH];
+
+ GetModuleFileName (NULL, path, ARRAYSIZE (path));
+ return VerifyPackageIntegrity (path);
+}
+
+BOOL VerifyPackageIntegrity (const wchar_t *path)
{
int fileDataEndPos = 0;
int fileDataStartPos = 0;
unsigned __int32 crc = 0;
unsigned char *tmpBuffer;
int tmpFileSize;
- wchar_t path [TC_MAX_PATH];
- GetModuleFileName (NULL, path, ARRAYSIZE (path));
+ // verify Authenticode digital signature of the exe file
+ if (!VerifyModuleSignature (path))
+ {
+ Error ("DIST_PACKAGE_CORRUPTED", NULL);
+ return FALSE;
+ }
- fileDataEndPos = (int) FindStringInFile (path, MagEndMarker, strlen (MagEndMarker));
+ fileDataEndPos = (int) FindStringInFile (path, MagEndMarker, (int) strlen (MagEndMarker));
if (fileDataEndPos < 0)
{
Error ("DIST_PACKAGE_CORRUPTED", NULL);
return FALSE;
}
fileDataEndPos--;
- fileDataStartPos = (int) FindStringInFile (path, MAG_START_MARKER, strlen (MAG_START_MARKER));
+ fileDataStartPos = (int) FindStringInFile (path, MAG_START_MARKER, (int) strlen (MAG_START_MARKER));
if (fileDataStartPos < 0)
{
Error ("DIST_PACKAGE_CORRUPTED", NULL);
return FALSE;
}
- fileDataStartPos += strlen (MAG_START_MARKER);
+ fileDataStartPos += (int) strlen (MAG_START_MARKER);
if (!LoadInt32 (path, &crc, fileDataEndPos + strlen (MagEndMarker) + 1))
{
@@ -423,9 +489,9 @@ BOOL VerifyPackageIntegrity (void)
// Zero all bytes that change when an exe is digitally signed (except appended blocks).
WipeSignatureAreas (tmpBuffer);
- if (crc != GetCrc32 (tmpBuffer, fileDataEndPos + 1 + strlen (MagEndMarker)))
+ if (crc != GetCrc32 (tmpBuffer, fileDataEndPos + 1 + (int) strlen (MagEndMarker)))
{
free (tmpBuffer);
Error ("DIST_PACKAGE_CORRUPTED", NULL);
return FALSE;
@@ -443,13 +509,13 @@ BOOL IsSelfExtractingPackage (void)
wchar_t path [TC_MAX_PATH];
GetModuleFileName (NULL, path, ARRAYSIZE (path));
- return (FindStringInFile (path, MagEndMarker, strlen (MagEndMarker)) != -1);
+ return (FindStringInFile (path, MagEndMarker, (int) strlen (MagEndMarker)) != -1);
}
-static void FreeAllFileBuffers (void)
+void FreeAllFileBuffers (void)
{
int fileNo;
if (DecompressedData != NULL)
@@ -465,16 +531,18 @@ static void FreeAllFileBuffers (void)
Decompressed_Files[fileNo].fileNameLength = 0;
Decompressed_Files[fileNo].fileLength = 0;
Decompressed_Files[fileNo].crc = 0;
}
+
+ Decompressed_Files_Count = 0;
}
// Assumes that VerifyPackageIntegrity() has been used. Returns TRUE, if successful (otherwise FALSE).
// Creates a table of pointers to buffers containing the following objects for each file:
// filename size, filename (not null-terminated!), file size, file CRC-32, uncompressed file contents.
// For details, see the definition of the DECOMPRESSED_FILE structure.
-BOOL SelfExtractInMemory (wchar_t *path)
+BOOL SelfExtractInMemory (wchar_t *path, BOOL bSkipCountCheck)
{
int filePos = 0, fileNo = 0;
int fileDataEndPos = 0;
int fileDataStartPos = 0;
@@ -485,25 +553,25 @@ BOOL SelfExtractInMemory (wchar_t *path)
unsigned char *bufPos = NULL, *bufEndPos = NULL;
FreeAllFileBuffers();
- fileDataEndPos = (int) FindStringInFile (path, MagEndMarker, strlen (MagEndMarker));
+ fileDataEndPos = (int) FindStringInFile (path, MagEndMarker, (int) strlen (MagEndMarker));
if (fileDataEndPos < 0)
{
Error ("CANNOT_READ_FROM_PACKAGE", NULL);
return FALSE;
}
fileDataEndPos--;
- fileDataStartPos = (int) FindStringInFile (path, MAG_START_MARKER, strlen (MAG_START_MARKER));
+ fileDataStartPos = (int) FindStringInFile (path, MAG_START_MARKER, (int) strlen (MAG_START_MARKER));
if (fileDataStartPos < 0)
{
Error ("CANNOT_READ_FROM_PACKAGE", NULL);
return FALSE;
}
- fileDataStartPos += strlen (MAG_START_MARKER);
+ fileDataStartPos += (int) strlen (MAG_START_MARKER);
filePos = fileDataStartPos;
// Read the stored total size of the uncompressed data
@@ -526,11 +594,19 @@ BOOL SelfExtractInMemory (wchar_t *path)
if (compressedLen != fileDataEndPos - fileDataStartPos - 8 + 1)
{
Error ("DIST_PACKAGE_CORRUPTED", NULL);
+ return FALSE;
}
- decompressedDataLen = uncompressedLen + 524288; // + 512K reserve
+ // Test to make Coverity happy. It will always be false
+ if (uncompressedLen >= (INT_MAX - 524288))
+ {
+ Error ("DIST_PACKAGE_CORRUPTED", NULL);
+ return FALSE;
+ }
+
+ decompressedDataLen = uncompressedLen;
DecompressedData = malloc (decompressedDataLen);
if (DecompressedData == NULL)
{
Error ("ERR_MEM_ALLOC", NULL);
@@ -587,14 +663,16 @@ BOOL SelfExtractInMemory (wchar_t *path)
fileNo++;
}
- if (fileNo < NBR_COMPRESSED_FILES)
+ if (!bSkipCountCheck && (fileNo < NBR_COMPRESSED_FILES))
{
Error ("DIST_PACKAGE_CORRUPTED", NULL);
goto sem_end;
}
+ Decompressed_Files_Count = fileNo;
+
free (compressedData);
return TRUE;
sem_end:
@@ -602,9 +680,9 @@ sem_end:
free (compressedData);
return FALSE;
}
-
+#ifdef SETUP
void __cdecl ExtractAllFilesThread (void *hwndDlg)
{
int fileNo;
BOOL bSuccess = FALSE;
@@ -615,9 +693,9 @@ void __cdecl ExtractAllFilesThread (void *hwndDlg)
ClearLogWindow (hwndDlg);
GetModuleFileName (NULL, packageFile, ARRAYSIZE (packageFile));
- if (!(bSuccess = SelfExtractInMemory (packageFile)))
+ if (!(bSuccess = SelfExtractInMemory (packageFile, FALSE)))
goto eaf_end;
if (mkfulldir (DestExtractPath, TRUE) != 0)
{
@@ -636,22 +714,40 @@ void __cdecl ExtractAllFilesThread (void *hwndDlg)
for (fileNo = 0; fileNo < NBR_COMPRESSED_FILES; fileNo++)
{
wchar_t fileName [TC_MAX_PATH] = {0};
wchar_t filePath [TC_MAX_PATH] = {0};
+ BOOL bResult = FALSE, zipFile = FALSE;
// Filename
StringCchCopyNW (fileName, ARRAYSIZE(fileName), Decompressed_Files[fileNo].fileName, Decompressed_Files[fileNo].fileNameLength);
StringCchCopyW (filePath, ARRAYSIZE(filePath), DestExtractPath);
StringCchCatW (filePath, ARRAYSIZE(filePath), fileName);
+ if ((wcslen (fileName) > 4) && (0 == wcscmp (L".zip", &fileName[wcslen(fileName) - 4])))
+ zipFile = TRUE;
+
StatusMessageParam (hwndDlg, "EXTRACTING_VERB", filePath);
+ if (zipFile)
+ {
+ bResult = DecompressZipToDir (
+ Decompressed_Files[fileNo].fileContent,
+ Decompressed_Files[fileNo].fileLength,
+ DestExtractPath,
+ CopyMessage,
+ hwndDlg);
+ }
+ else
+ {
+ bResult = SaveBufferToFile (
+ (char *) Decompressed_Files[fileNo].fileContent,
+ filePath,
+ Decompressed_Files[fileNo].fileLength,
+ FALSE, FALSE);
+ }
+
// Write the file
- if (!SaveBufferToFile (
- Decompressed_Files[fileNo].fileContent,
- filePath,
- Decompressed_Files[fileNo].fileLength,
- FALSE, FALSE))
+ if (!bResult)
{
wchar_t szTmp[512];
StringCbPrintfW (szTmp, sizeof (szTmp), GetString ("CANNOT_WRITE_FILE_X"), filePath);
@@ -669,5 +765,5 @@ eaf_end:
PostMessage (MainDlg, TC_APPMSG_EXTRACTION_SUCCESS, 0, 0);
else
PostMessage (MainDlg, TC_APPMSG_EXTRACTION_FAILURE, 0, 0);
}
-
+#endif
diff --git a/src/Setup/SelfExtract.h b/src/Setup/SelfExtract.h
index 91e2ca7c..bcdb6fdb 100644
--- a/src/Setup/SelfExtract.h
+++ b/src/Setup/SelfExtract.h
@@ -3,9 +3,9 @@
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)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages.
*/
@@ -26,16 +26,19 @@ typedef struct
unsigned char *fileContent;
} DECOMPRESSED_FILE;
extern DECOMPRESSED_FILE Decompressed_Files [NBR_COMPRESSED_FILES];
+extern int Decompressed_Files_Count;
void SelfExtractStartupInit (void);
-BOOL SelfExtractInMemory (wchar_t *path);
+BOOL SelfExtractInMemory (wchar_t *path, BOOL bSkipCountCheck);
void __cdecl ExtractAllFilesThread (void *hwndDlg);
-BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir);
-BOOL VerifyPackageIntegrity (void);
+BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir, BOOL bSkipX64);
+BOOL VerifyPackageIntegrity (const wchar_t *path);
+BOOL VerifySelfPackageIntegrity (void);
BOOL IsSelfExtractingPackage (void);
-static void DeobfuscateMagEndMarker (void);
+void FreeAllFileBuffers (void);
+void DeobfuscateMagEndMarker (void);
extern wchar_t DestExtractPath [TC_MAX_PATH];
#ifdef __cplusplus
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index 6f35e282..ed236616 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -1,13 +1,13 @@
-/*
+/*
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
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 all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages. */
@@ -58,8 +58,9 @@ BOOL bRestartRequired = FALSE;
BOOL bMakePackage = FALSE;
BOOL bDone = FALSE;
BOOL Rollback = FALSE;
BOOL bUpgrade = FALSE;
+BOOL bUpdateRescueDisk = FALSE;
BOOL bDowngrade = FALSE;
BOOL SystemEncryptionUpdate = FALSE;
BOOL PortableMode = FALSE;
BOOL bRepairMode = FALSE;
@@ -72,24 +73,126 @@ BOOL UnloadDriver = TRUE;
BOOL bSystemRestore = TRUE;
BOOL bDisableSwapFiles = FALSE;
BOOL bForAllUsers = TRUE;
+BOOL bDisableMemoryProtection = FALSE;
+BOOL bOriginalDisableMemoryProtection = FALSE;
BOOL bRegisterFileExt = TRUE;
BOOL bAddToStartMenu = TRUE;
BOOL bDesktopIcon = TRUE;
+BOOL bUserSetLanguage = FALSE;
+
BOOL bDesktopIconStatusDetermined = FALSE;
HMODULE volatile SystemRestoreDll = 0;
+extern HMODULE hcrypt32dll;
+
void localcleanup (void)
{
localcleanupwiz ();
cleanup ();
CloseAppSetupMutex ();
}
+#define WAIT_PERIOD 3
+
+BOOL StartStopService (HWND hwndDlg, wchar_t *lpszService, BOOL bStart, DWORD argc, LPCWSTR* argv)
+{
+ SC_HANDLE hManager, hService = NULL;
+ BOOL bOK = FALSE, bRet;
+ SERVICE_STATUS status = {0};
+ int x;
+ DWORD dwExpectedState = bStart? SERVICE_RUNNING : SERVICE_STOPPED;
+
+ hManager = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS);
+ if (hManager == NULL)
+ goto error;
+
+ hService = OpenService (hManager, lpszService, SERVICE_ALL_ACCESS);
+ if (hService == NULL)
+ goto error;
+
+ if (bStart)
+ StatusMessageParam (hwndDlg, "STARTING", lpszService);
+ else
+ StatusMessageParam (hwndDlg, "STOPPING", lpszService);
+
+ if (bStart)
+ {
+ if (!StartService (hService, argc, argv) && (GetLastError () != ERROR_SERVICE_ALREADY_RUNNING))
+ goto error;
+ }
+ else
+ ControlService (hService, SERVICE_CONTROL_STOP, &status);
+
+ for (x = 0; x < WAIT_PERIOD; x++)
+ {
+ bRet = QueryServiceStatus (hService, &status);
+ if (bRet != TRUE)
+ goto error;
+
+ if (status.dwCurrentState == dwExpectedState)
+ break;
+
+ Sleep (1000);
+ }
+
+ bRet = QueryServiceStatus (hService, &status);
+ if (bRet != TRUE)
+ goto error;
+
+ if (status.dwCurrentState != dwExpectedState)
+ goto error;
+
+ bOK = TRUE;
+
+error:
+
+ if (bOK == FALSE && GetLastError () == ERROR_SERVICE_DOES_NOT_EXIST)
+ {
+ bOK = TRUE;
+ }
+
+ if (hService != NULL)
+ CloseServiceHandle (hService);
+
+ if (hManager != NULL)
+ CloseServiceHandle (hManager);
+
+ return bOK;
+}
+
+BOOL ForceCopyFile (LPCWSTR szSrcFile, LPCWSTR szDestFile)
+{
+ BOOL bRet = CopyFileW (szSrcFile, szDestFile, FALSE);
+ if (!bRet)
+ {
+ wstring renamedPath = szDestFile;
+ renamedPath += VC_FILENAME_RENAMED_SUFFIX;
+
+ /* rename the locked file in order to be able to create a new one */
+ if (MoveFileExW (szDestFile, renamedPath.c_str(), MOVEFILE_REPLACE_EXISTING))
+ {
+ bRet = CopyFileW (szSrcFile, szDestFile, FALSE);
+ if (bRet)
+ {
+ /* delete the renamed file when the machine reboots */
+ MoveFileEx (renamedPath.c_str(), NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
+ }
+ else
+ {
+ /* restore the original file name */
+ MoveFileEx (renamedPath.c_str(), szDestFile, MOVEFILE_REPLACE_EXISTING);
+ }
+ }
+ }
+
+ return bRet;
+}
+
BOOL ForceDeleteFile (LPCWSTR szFileName)
{
if (!DeleteFile (szFileName))
{
@@ -385,46 +488,8 @@ void SearchAndDeleteRegistrySubString (HKEY hKey, const wchar_t *subKey, const w
}
}
}
-/* Set the given privilege of the current process */
-BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable)
-{
- TOKEN_PRIVILEGES tp;
- LUID luid;
- HANDLE hProcessToken;
- BOOL bStatus = FALSE;
-
- if ( OpenProcessToken(GetCurrentProcess(),
- TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
- &hProcessToken) )
- {
- if ( LookupPrivilegeValue(
- NULL,
- szPrivilegeName,
- &luid ) )
- {
-
- tp.PrivilegeCount = 1;
- tp.Privileges[0].Luid = luid;
- tp.Privileges[0].Attributes = bEnable? SE_PRIVILEGE_ENABLED : SE_PRIVILEGE_REMOVED;
-
- // Enable the privilege
- bStatus = AdjustTokenPrivileges(
- hProcessToken,
- FALSE,
- &tp,
- sizeof(TOKEN_PRIVILEGES),
- (PTOKEN_PRIVILEGES) NULL,
- (PDWORD) NULL);
- }
-
- CloseHandle(hProcessToken);
- }
-
- return bStatus;
-}
-
/*
* Creates a VT_LPWSTR propvariant.
* we use our own implementation to use SHStrDupW function pointer
* that we retreive ourselves to avoid dll hijacking attacks
@@ -506,28 +571,15 @@ 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))
- && (dwValue == 1)
- )
- {
- bEnabled = TRUE;
- }
- }
- else
+ if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"RPSessionInterval", NULL, NULL, (LPBYTE) &dwValue, &cbValue))
+ && (dwValue == 1)
+ )
{
- if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"DisableSR", NULL, NULL, (LPBYTE) &dwValue, &cbValue))
- && (dwValue == 0)
- )
- {
- bEnabled = TRUE;
- }
+ bEnabled = TRUE;
}
-
RegCloseKey (hKey);
}
return bEnabled;
@@ -556,9 +608,9 @@ void StatusMessage (HWND hwndDlg, char *stringId)
SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_SETTOPINDEX,
SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_GETCOUNT, 0, 0) - 1, 0);
}
-void StatusMessageParam (HWND hwndDlg, char *stringId, wchar_t *param)
+void StatusMessageParam (HWND hwndDlg, char *stringId, const wchar_t *param)
{
wchar_t szTmp[1024];
if (Rollback)
@@ -575,29 +627,76 @@ void ClearLogWindow (HWND hwndDlg)
{
SendMessage (GetDlgItem (hwndDlg, IDC_LOG_WINDOW), LB_RESETCONTENT, 0, 0);
}
-void RegMessage (HWND hwndDlg, wchar_t *txt)
+void RegMessage (HWND hwndDlg, const wchar_t *txt)
{
StatusMessageParam (hwndDlg, "ADDING_REG", txt);
}
-void CopyMessage (HWND hwndDlg, wchar_t *txt)
+void _cdecl CopyMessage (HWND hwndDlg, const wchar_t *txt)
{
StatusMessageParam (hwndDlg, "INSTALLING", txt);
}
-void RemoveMessage (HWND hwndDlg, wchar_t *txt)
+void RemoveMessage (HWND hwndDlg, const wchar_t *txt)
{
if (!Rollback)
StatusMessageParam (hwndDlg, "REMOVING", txt);
}
-void IconMessage (HWND hwndDlg, wchar_t *txt)
+void IconMessage (HWND hwndDlg, const wchar_t *txt)
{
StatusMessageParam (hwndDlg, "ADDING_ICON", txt);
}
+#ifdef VC_EFI_CUSTOM_MODE
+BOOL CheckSecureBootCompatibility (HWND hWnd)
+{
+ BOOL bRet = FALSE;
+ BOOL bDriverAttached = FALSE;
+ if (hDriver == INVALID_HANDLE_VALUE)
+ {
+ int status = DriverAttach();
+ if (status || (hDriver == INVALID_HANDLE_VALUE))
+ return FALSE;
+ bDriverAttached = TRUE;
+ }
+
+ try
+ {
+ BootEncryption bootEnc (hWnd);
+ if (bootEnc.GetDriverServiceStartType() == SERVICE_BOOT_START)
+ {
+ SystemDriveConfiguration config = bootEnc.GetSystemDriveConfiguration ();
+ if (config.SystemPartition.IsGPT)
+ {
+ BOOL bSecureBootEnabled = FALSE, bVeraCryptKeysLoaded = FALSE;
+ bootEnc.GetSecureBootConfig (&bSecureBootEnabled, &bVeraCryptKeysLoaded);
+ if (!bSecureBootEnabled || bVeraCryptKeysLoaded)
+ {
+ bRet = TRUE;
+ }
+ }
+ else
+ bRet = TRUE;
+ }
+ else
+ bRet = TRUE;
+ }
+ catch (...)
+ {
+ }
+
+ if (bDriverAttached)
+ {
+ CloseHandle (hDriver);
+ hDriver = INVALID_HANDLE_VALUE;
+ }
+ return bRet;
+}
+#endif
+
void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersionPtr)
{
LONG driverVersion = VERSION_NUM;
int status = 0;
@@ -609,12 +708,8 @@ void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersi
{
DWORD dwResult;
BOOL bResult = DeviceIoControl (hDriver, TC_IOCTL_GET_DRIVER_VERSION, NULL, 0, &driverVersion, sizeof (driverVersion), &dwResult, NULL);
- if (!bResult)
- bResult = DeviceIoControl (hDriver, TC_IOCTL_LEGACY_GET_DRIVER_VERSION, NULL, 0, &driverVersion, sizeof (driverVersion), &dwResult, NULL);
-
-
bUpgrade = (bResult && driverVersion <= VERSION_NUM);
bDowngrade = (bResult && driverVersion > VERSION_NUM);
bReinstallMode = (bResult && driverVersion == VERSION_NUM);
@@ -629,8 +724,26 @@ void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersi
*driverVersionPtr = driverVersion;
}
+BOOL isMsiInstalled ()
+{
+ BOOL bRet = FALSE;
+ HKEY hKey;
+ if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\VeraCrypt_MSI", 0, KEY_READ | KEY_WOW64_64KEY, &hKey))
+ {
+ DWORD dwType = 0;
+ if ( (ERROR_SUCCESS == RegQueryValueExW(hKey, L"ProductGuid", NULL, &dwType, NULL, NULL))
+ && (REG_SZ == dwType))
+ {
+ bRet = TRUE;
+ }
+ RegCloseKey(hKey);
+ }
+
+ return bRet;
+}
+
static BOOL IsFileInUse (const wstring &filePath)
{
HANDLE useTestHandle = CreateFile (filePath.c_str(), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
@@ -651,16 +764,19 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
wchar_t szTmp[TC_MAX_PATH];
BOOL bOK = TRUE;
int i, x, fileNo;
wchar_t curFileName [TC_MAX_PATH] = {0};
+#ifndef PORTABLE
+ PRIVILEGE_STATE originalPrivileges = { 0 };
+#endif
if (!bUninstall && !bDevm)
{
// Self-extract all files to memory
GetModuleFileName (NULL, szTmp, ARRAYSIZE (szTmp));
- if (!SelfExtractInMemory (szTmp))
+ if (!SelfExtractInMemory (szTmp, FALSE))
return FALSE;
}
x = wcslen (szDestDir);
@@ -669,11 +785,15 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
if (szDestDir[x - 1] != L'\\')
StringCbCatW (szDestDir, MAX_PATH, L"\\");
+#ifndef PORTABLE
+ EnableRequiredSetupPrivileges(&originalPrivileges);
+#endif
+
for (i = 0; i < sizeof (szFiles) / sizeof (szFiles[0]); i++)
{
- BOOL bResult, driver64 = FALSE;
+ BOOL bResult, zipFile = FALSE;
wchar_t szDir[TC_MAX_PATH];
if (wcsstr (szFiles[i], L"VeraCrypt Setup") != 0)
{
@@ -683,42 +803,41 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
if (bRepairMode)
continue; // Destination = target
}
- // skip files that don't apply to the current architecture
- if ( (Is64BitOs () && (wcscmp (szFiles[i], L"AVeraCrypt-x64.exe") == 0))
- || (Is64BitOs () && (wcscmp (szFiles[i], L"AVeraCryptExpander-x64.exe") == 0))
- || (Is64BitOs () && (wcscmp (szFiles[i], L"AVeraCrypt Format-x64.exe") == 0))
- || (!Is64BitOs () && (wcscmp (szFiles[i], L"AVeraCrypt-x86.exe") == 0))
- || (!Is64BitOs () && (wcscmp (szFiles[i], L"AVeraCryptExpander-x86.exe") == 0))
- || (!Is64BitOs () && (wcscmp (szFiles[i], L"AVeraCrypt Format-x86.exe") == 0))
- )
- {
- continue;
- }
-
- if (*szFiles[i] == L'A')
+ if ((*szFiles[i] == L'A') || (*szFiles[i] == L'X'))
StringCbCopyW (szDir, sizeof(szDir), szDestDir);
else if (*szFiles[i] == L'D')
{
- if (Is64BitOs ())
- driver64 = TRUE;
-
- GetSystemDirectory (szDir, ARRAYSIZE (szDir));
+ if (!GetSystemDirectory (szDir, ARRAYSIZE (szDir)))
+ StringCbCopyW(szDir, sizeof(szDir), L"C:\\Windows\\System32");
x = wcslen (szDir);
if (szDir[x - 1] != L'\\')
StringCbCatW (szDir, sizeof(szDir), L"\\");
StringCbCatW (szDir, sizeof(szDir), L"Drivers\\");
}
else if (*szFiles[i] == L'W')
- GetWindowsDirectory (szDir, ARRAYSIZE (szDir));
+ {
+ if (!GetWindowsDirectory(szDir, ARRAYSIZE(szDir)))
+ StringCbCopyW(szDir, sizeof(szDir), L"C:\\Windows");
+ }
if (*szFiles[i] == L'I')
continue;
+ if (*szFiles[i] == L'X')
+ zipFile = TRUE;
+
StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szDir, szFiles[i] + 1);
+ if (zipFile)
+ {
+ // build folder name by removing .zip extension
+ wchar_t* ptr = wcsrchr (szTmp, L'.');
+ if (ptr)
+ *ptr = 0;
+ }
if (bUninstall == FALSE)
CopyMessage (hwndDlg, szTmp);
else
@@ -741,48 +860,46 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
{
StringCchCopyNW (curFileName, ARRAYSIZE(curFileName), szFiles[i] + 1, wcslen (szFiles[i]) - 1);
curFileName [wcslen (szFiles[i]) - 1] = 0;
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"Dveracrypt.sys") == 0)
- {
- StringCbCopyNW (curFileName, sizeof(curFileName), FILENAME_64BIT_DRIVER, sizeof (FILENAME_64BIT_DRIVER));
- }
-
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0)
- {
- StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt-x64.exe", sizeof (L"VeraCrypt-x64.exe"));
- }
-
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"AVeraCrypt-x86.exe") == 0)
+ if ((wcscmp (szFiles[i], L"Dveracrypt.sys") == 0) || (wcscmp (szFiles[i], L"Averacrypt.sys") == 0))
{
- StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt.exe", sizeof (L"VeraCrypt.exe"));
+ if (IsARM())
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-arm64.sys", sizeof(L"veracrypt-arm64.sys"));
+ else
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-x64.sys", sizeof(L"veracrypt-x64.sys"));
}
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"AVeraCryptExpander.exe") == 0)
+ if (wcscmp (szFiles[i], L"Averacrypt.cat") == 0)
{
- StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander-x64.exe", sizeof (L"VeraCryptExpander-x64.exe"));
+ if (IsARM())
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-arm64.cat", sizeof(L"veracrypt-arm64.cat"));
+ else
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-x64.cat", sizeof (L"veracrypt-x64.cat"));
}
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"AVeraCryptExpander-x86.exe") == 0)
+ if (wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0)
{
- StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander.exe", sizeof (L"VeraCryptExpander.exe"));
+ if (IsARM())
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt-arm64.exe", sizeof(L"VeraCrypt-arm64.exe"));
+ else
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt-x64.exe", sizeof (L"VeraCrypt-x64.exe"));
}
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"AVeraCrypt Format.exe") == 0)
+ if (wcscmp (szFiles[i], L"AVeraCryptExpander.exe") == 0)
{
- StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format-x64.exe", sizeof (L"VeraCrypt Format-x64.exe"));
+ if (IsARM())
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander-arm64.exe", sizeof(L"VeraCryptExpander-arm64.exe"));
+ else
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander-x64.exe", sizeof (L"VeraCryptExpander-x64.exe"));
}
- if (Is64BitOs ()
- && wcscmp (szFiles[i], L"AVeraCrypt Format-x86.exe") == 0)
+ if (wcscmp (szFiles[i], L"AVeraCrypt Format.exe") == 0)
{
- StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format.exe", sizeof (L"VeraCrypt Format.exe"));
+ if (IsARM())
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format-arm64.exe", sizeof(L"VeraCrypt Format-arm64.exe"));
+ else
+ StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format-x64.exe", sizeof (L"VeraCrypt Format-x64.exe"));
}
if (!bDevm)
{
@@ -798,124 +915,144 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
Decompressed_Files[fileNo].fileName,
min (wcslen (curFileName), (size_t) Decompressed_Files[fileNo].fileNameLength)) == 0)
{
// Dump filter driver cannot be installed to SysWOW64 directory
- if (driver64 && !EnableWow64FsRedirection (FALSE))
+ if (!EnableWow64FsRedirection (FALSE))
{
handleWin32Error (hwndDlg, SRC_POS);
bResult = FALSE;
goto err;
}
-
- bResult = SaveBufferToFile (
- (char *) Decompressed_Files[fileNo].fileContent,
- szTmp,
- Decompressed_Files[fileNo].fileLength,
- FALSE,
- TRUE);
-
- if (driver64)
+ if (zipFile)
{
- if (!EnableWow64FsRedirection (TRUE))
- {
- handleWin32Error (hwndDlg, SRC_POS);
- bResult = FALSE;
- goto err;
- }
+ bResult = DecompressZipToDir (
+ Decompressed_Files[fileNo].fileContent,
+ Decompressed_Files[fileNo].fileLength,
+ szDir,
+ CopyMessage,
+ hwndDlg);
+ }
+ else
+ {
+ bResult = SaveBufferToFile (
+ (char *) Decompressed_Files[fileNo].fileContent,
+ szTmp,
+ Decompressed_Files[fileNo].fileLength,
+ FALSE,
+ TRUE);
+ }
- if (!bResult)
- goto err;
+ if (!EnableWow64FsRedirection (TRUE))
+ {
+ handleWin32Error (hwndDlg, SRC_POS);
+ bResult = FALSE;
+ goto err;
}
+ if (!bResult)
+ goto err;
+
break;
}
}
}
else
{
- if (driver64)
- EnableWow64FsRedirection (FALSE);
+ EnableWow64FsRedirection (FALSE);
bResult = TCCopyFile (curFileName, szTmp);
- if (driver64)
- EnableWow64FsRedirection (TRUE);
+ EnableWow64FsRedirection (TRUE);
}
if (bResult && wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0)
{
- if (Is64BitOs ())
- EnableWow64FsRedirection (FALSE);
+ EnableWow64FsRedirection (FALSE);
wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false);
wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true);
wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false);
wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true);
- if ( FileExists (servicePath.c_str())
- || (Is64BitOs () && FileExists (serviceLegacyPath.c_str()))
- )
- {
- CopyMessage (hwndDlg, (wchar_t *) servicePath.c_str());
- bResult = CopyFile (szTmp, servicePath.c_str(), FALSE);
- }
-
- if (bResult && Is64BitOs ()
+ if (bResult
&& FileExists (favoritesLegacyFile.c_str())
&& !FileExists (favoritesFile.c_str()))
{
// copy the favorites XML file to the native system directory
bResult = CopyFile (favoritesLegacyFile.c_str(), favoritesFile.c_str(), FALSE);
}
- if (bResult && Is64BitOs () && FileExists (favoritesFile.c_str()) && FileExists (servicePath.c_str()))
+ if (bResult)
{
// Update the path of the service
BootEncryption BootEncObj (hwndDlg);
try
{
if (BootEncObj.GetDriverServiceStartType() == SERVICE_BOOT_START)
{
+ uint32 driverFlags = ReadDriverConfigurationFlags ();
+ uint32 serviceFlags = BootEncObj.ReadServiceConfigurationFlags ();
+
BootEncObj.UpdateSystemFavoritesService ();
+
+ CopyMessage (hwndDlg, (wchar_t *) servicePath.c_str());
+
+ // Tell the service not to update loader on stop
+ BootEncObj.SetServiceConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER, true);
+
+ if (StartStopService (hwndDlg, TC_SYSTEM_FAVORITES_SERVICE_NAME, FALSE, 0, NULL))
+ {
+ // we tell the service not to load system favorites on startup
+ LPCWSTR szArgs[2] = { TC_SYSTEM_FAVORITES_SERVICE_NAME, VC_SYSTEM_FAVORITES_SERVICE_ARG_SKIP_MOUNT};
+ if (!CopyFile (szTmp, servicePath.c_str(), FALSE))
+ ForceCopyFile (szTmp, servicePath.c_str());
+
+ StartStopService (hwndDlg, TC_SYSTEM_FAVORITES_SERVICE_NAME, TRUE, 2, szArgs);
+ }
+ else
+ ForceCopyFile (szTmp, servicePath.c_str());
+
+ BootEncObj.SetDriverConfigurationFlag (driverFlags, true);
+
+ // remove the service flag if it was set originally
+ if (!(serviceFlags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
+ BootEncObj.SetServiceConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER, false);
}
}
catch (...) {}
}
- if (Is64BitOs ())
+ // delete files from legacy path
+ if (FileExists (favoritesLegacyFile.c_str()))
{
- // delete files from legacy path
- if (FileExists (favoritesLegacyFile.c_str()))
- {
- RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str());
- ForceDeleteFile (favoritesLegacyFile.c_str());
- }
-
- if (FileExists (serviceLegacyPath.c_str()))
- {
- RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str());
- ForceDeleteFile (serviceLegacyPath.c_str());
- }
+ RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str());
+ ForceDeleteFile (favoritesLegacyFile.c_str());
+ }
- EnableWow64FsRedirection (TRUE);
+ if (FileExists (serviceLegacyPath.c_str()))
+ {
+ RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str());
+ ForceDeleteFile (serviceLegacyPath.c_str());
}
+
+ EnableWow64FsRedirection (TRUE);
}
}
}
else
{
- if (driver64)
- EnableWow64FsRedirection (FALSE);
- bResult = StatDeleteFile (szTmp, TRUE);
- if (driver64)
- EnableWow64FsRedirection (TRUE);
+ EnableWow64FsRedirection (FALSE);
+ if (zipFile)
+ bResult = StatRemoveDirectory (szTmp);
+ else
+ bResult = StatDeleteFile (szTmp, TRUE);
+ EnableWow64FsRedirection (TRUE);
if (bResult && wcscmp (szFiles[i], L"AVeraCrypt.exe") == 0)
{
- if (Is64BitOs ())
- EnableWow64FsRedirection (FALSE);
+ EnableWow64FsRedirection (FALSE);
wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false);
wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true);
wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false);
@@ -933,24 +1070,21 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
RemoveMessage (hwndDlg, (wchar_t *) servicePath.c_str());
ForceDeleteFile (servicePath.c_str());
}
- if (Is64BitOs ())
+ if (FileExists (favoritesLegacyFile.c_str()))
{
- if (FileExists (favoritesLegacyFile.c_str()))
- {
- RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str());
- ForceDeleteFile (favoritesLegacyFile.c_str());
- }
-
- if (FileExists (serviceLegacyPath.c_str()))
- {
- RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str());
- ForceDeleteFile (serviceLegacyPath.c_str());
- }
+ RemoveMessage (hwndDlg, (wchar_t *) favoritesLegacyFile.c_str());
+ ForceDeleteFile (favoritesLegacyFile.c_str());
+ }
- EnableWow64FsRedirection (TRUE);
+ if (FileExists (serviceLegacyPath.c_str()))
+ {
+ RemoveMessage (hwndDlg, (wchar_t *) serviceLegacyPath.c_str());
+ ForceDeleteFile (serviceLegacyPath.c_str());
}
+
+ EnableWow64FsRedirection (TRUE);
}
}
err:
@@ -986,48 +1120,70 @@ err:
StringCbPrintfW (szTmp2, sizeof(szTmp2), GetString ("UNINSTALL_OF_FAILED"), szTmp, pszDesc);
if (lpMsgBuf) LocalFree (lpMsgBuf);
- if (!Silent && MessageBoxW (hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES)
+ if (!Silent && MessageBoxW(hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES)
+ {
+#ifndef PORTABLE
+ RestorePrivilegeState(&originalPrivileges);
+#endif
return FALSE;
+ }
}
}
- // Language pack
+#ifndef PORTABLE
+ RestorePrivilegeState(&originalPrivileges);
+#endif
+
if (bUninstall == FALSE)
{
WIN32_FIND_DATA f;
HANDLE h;
- SetCurrentDirectory (SetupFilesDir);
- h = FindFirstFile (L"Language.*.xml", &f);
+ SetCurrentDirectory (szDestDir);
+
+ // remove PDF from previous version if any
+ h = FindFirstFile (L"VeraCrypt User Guide*.pdf", &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.*.pdf", &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);
}
+
+ // remvove legacy files that are not needed anymore
+ for (i = 0; i < sizeof (szLegacyFiles) / sizeof (szLegacyFiles[0]); i++)
+ {
+ StatDeleteFile (szLegacyFiles [i], TRUE);
+ }
+
SetCurrentDirectory (SetupFilesDir);
}
return bOK;
}
+#ifndef PORTABLE
BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType)
{
wchar_t szDir[TC_MAX_PATH], *key;
wchar_t szTmp[TC_MAX_PATH*4];
@@ -1040,12 +1196,12 @@ BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType)
{
if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt",
0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE | KEY_WOW64_32KEY, NULL, &hkey, &dw) == ERROR_SUCCESS)
{
- StringCbCopyW (szTmp, sizeof(szTmp), _T(VERSION_STRING));
+ StringCbCopyW (szTmp, sizeof(szTmp), _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX));
RegSetValueEx (hkey, L"DisplayVersion", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t));
- StringCbCopyW (szTmp, sizeof(szTmp), _T(TC_HOMEPAGE));
+ StringCbCopyW (szTmp, sizeof(szTmp), TC_HOMEPAGE);
RegSetValueEx (hkey, L"URLInfoAbout", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t));
RegCloseKey (hkey);
}
@@ -1156,9 +1312,9 @@ BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType)
StringCbPrintfW (szTmp, sizeof(szTmp), L"\"%sVeraCrypt Setup.exe\"", szDir);
if (RegSetValueEx (hkey, L"DisplayIcon", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS)
goto error;
- StringCbCopyW (szTmp, sizeof(szTmp), _T(VERSION_STRING));
+ StringCbCopyW (szTmp, sizeof(szTmp), _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX));
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");
@@ -1168,9 +1324,9 @@ BOOL DoRegInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bInstallType)
StringCbCopyW (szTmp, sizeof(szTmp), L"IDRIX");
if (RegSetValueEx (hkey, L"Publisher", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS)
goto error;
- StringCbCopyW (szTmp, sizeof(szTmp), _T(TC_HOMEPAGE));
+ StringCbCopyW (szTmp, sizeof(szTmp), TC_HOMEPAGE);
if (RegSetValueEx (hkey, L"URLInfoAbout", 0, REG_SZ, (BYTE *) szTmp, (wcslen (szTmp) + 1) * sizeof (wchar_t)) != ERROR_SUCCESS)
goto error;
bOK = TRUE;
@@ -1185,15 +1341,12 @@ error:
Error ("REG_INSTALL_FAILED", hwndDlg);
}
// Register COM servers for UAC
- if (IsOSAtLeast (WIN_VISTA))
+ if (!RegisterComServers (szDir))
{
- if (!RegisterComServers (szDir))
- {
- Error ("COM_REG_FAILED", hwndDlg);
- return FALSE;
- }
+ Error ("COM_REG_FAILED", hwndDlg);
+ return FALSE;
}
return bOK;
}
@@ -1264,36 +1417,22 @@ BOOL DoApplicationDataUninstall (HWND hwndDlg)
BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated)
{
wchar_t regk [64];
- typedef LSTATUS (WINAPI *RegDeleteKeyExWFn) (HKEY hKey,LPCWSTR lpSubKey,REGSAM samDesired,WORD Reserved);
- RegDeleteKeyExWFn RegDeleteKeyExWPtr = NULL;
- HMODULE hAdvapiDll = LoadLibrary (L"Advapi32.dll");
- if (hAdvapiDll)
- {
- RegDeleteKeyExWPtr = (RegDeleteKeyExWFn) GetProcAddress(hAdvapiDll, "RegDeleteKeyExW");
- }
// Unregister COM servers
- if (!bRemoveDeprecated && IsOSAtLeast (WIN_VISTA))
+ if (!bRemoveDeprecated)
{
if (!UnregisterComServers (InstallationPath))
StatusMessage (hwndDlg, "COM_DEREG_FAILED");
}
if (!bRemoveDeprecated)
StatusMessage (hwndDlg, "REMOVING_REG");
- if (RegDeleteKeyExWPtr)
- {
- RegDeleteKeyExWPtr (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", KEY_WOW64_32KEY, 0);
- RegDeleteKeyExWPtr (HKEY_CURRENT_USER, L"Software\\VeraCrypt", KEY_WOW64_32KEY, 0);
- }
- else
- {
- RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt");
- RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\VeraCrypt");
- }
+ RegDeleteKeyExW (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", KEY_WOW64_32KEY, 0);
+ RegDeleteKeyExW (HKEY_CURRENT_USER, L"Software\\VeraCrypt", KEY_WOW64_32KEY, 0);
+
RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell\\open\\command");
RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell\\open");
RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell");
RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\DefaultIcon");
@@ -1330,11 +1469,8 @@ BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated)
SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
}
- if (hAdvapiDll)
- FreeLibrary (hAdvapiDll);
-
return TRUE;
}
@@ -1376,10 +1512,8 @@ retry:
}
else
StatusMessageParam (hwndDlg, "STOPPING", lpszService);
-#define WAIT_PERIOD 3
-
for (x = 0; x < WAIT_PERIOD; x++)
{
bRet = QueryServiceStatus (hService, &status);
if (bRet != TRUE)
@@ -1507,9 +1641,8 @@ BOOL DoDriverUnload (HWND hwndDlg)
}
if (hDriver != INVALID_HANDLE_VALUE)
{
- MOUNT_LIST_STRUCT driver;
LONG driverVersion = VERSION_NUM;
int refCount;
DWORD dwResult;
BOOL bResult;
@@ -1553,8 +1686,12 @@ BOOL DoDriverUnload (HWND hwndDlg)
{
if (CurrentOSMajor == 6 && CurrentOSMinor == 0 && CurrentOSServicePack < 1)
AbortProcess ("SYS_ENCRYPTION_UPGRADE_UNSUPPORTED_ON_VISTA_SP0");
+ // check if we are upgrading a system encrypted with unsupported algorithms
+ if (bootEnc.IsUsingUnsupportedAlgorithm(driverVersion))
+ AbortProcess ("SYS_ENCRYPTION_UPGRADE_UNSUPPORTED_ALGORITHM");
+
SystemEncryptionUpdate = TRUE;
PortableMode = FALSE;
}
}
@@ -1577,15 +1714,8 @@ BOOL DoDriverUnload (HWND hwndDlg)
// Check mounted volumes
bResult = DeviceIoControl (hDriver, TC_IOCTL_IS_ANY_VOLUME_MOUNTED, NULL, 0, &volumesMounted, sizeof (volumesMounted), &dwResult, NULL);
- if (!bResult)
- {
- bResult = DeviceIoControl (hDriver, TC_IOCTL_LEGACY_GET_MOUNTED_VOLUMES, NULL, 0, &driver, sizeof (driver), &dwResult, NULL);
- if (bResult)
- volumesMounted = driver.ulMountedDrives;
- }
-
if (bResult)
{
if (volumesMounted != 0)
{
@@ -1657,9 +1787,12 @@ BOOL UpgradeBootLoader (HWND hwndDlg)
bootEnc.InstallBootLoader (true);
if (bootEnc.GetInstalledBootLoaderVersion() <= TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION)
+ {
+ bUpdateRescueDisk = TRUE;
Info (IsHiddenOSRunning() ? "BOOT_LOADER_UPGRADE_OK_HIDDEN_OS" : "BOOT_LOADER_UPGRADE_OK", hwndDlg);
+ }
}
return TRUE;
}
catch (Exception &e)
@@ -1727,13 +1860,8 @@ 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"\\Uninstall VeraCrypt.lnk");
- 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);
// Start menu group
@@ -1761,17 +1889,17 @@ error:
return bOK;
}
-BOOL DoShortcutsInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bProgGroup, BOOL bDesktopIcon)
+BOOL DoShortcutsInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bProgGroup, BOOL bUseDesktopIcon)
{
wchar_t szLinkDir[TC_MAX_PATH], szDir[TC_MAX_PATH];
- wchar_t szTmp[TC_MAX_PATH], szTmp2[TC_MAX_PATH], szTmp3[TC_MAX_PATH];
+ wchar_t szTmp[TC_MAX_PATH], szTmp2[TC_MAX_PATH];
BOOL bSlash, bOK = FALSE;
HRESULT hOle;
int x;
- if (bProgGroup == FALSE && bDesktopIcon == FALSE)
+ if (bProgGroup == FALSE && bUseDesktopIcon == FALSE)
return TRUE;
hOle = OleInitialize (NULL);
@@ -1833,34 +1961,24 @@ BOOL DoShortcutsInstall (HWND hwndDlg, wchar_t *szDestDir, BOOL bProgGroup, BOOL
IconMessage (hwndDlg, szTmp2);
f = _wfopen (szTmp2, L"w");
if (f)
{
- fprintf (f, "[InternetShortcut]\nURL=%s\n", TC_APPLINK);
+ fwprintf (f, L"[InternetShortcut]\nURL=%s\n", TC_APPLINK);
CheckFileStreamWriteErrors (hwndDlg, f, szTmp2);
fclose (f);
}
else
goto error;
- StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szDir, L"VeraCrypt Setup.exe");
StringCbPrintfW (szTmp2, sizeof(szTmp2), L"%s%s", szLinkDir, L"\\Uninstall VeraCrypt.lnk");
- if (GetSystemDirectory (szTmp3, ARRAYSIZE(szTmp3)))
- {
- StringCbCatW (szTmp3, sizeof(szTmp3), L"\\control.exe");
- }
- else
- StringCbCopyW(szTmp3, sizeof(szTmp3), L"C:\\Windows\\System32\\control.exe");
-
- IconMessage (hwndDlg, szTmp2);
- if (CreateLink (szTmp3, L"appwiz.cpl", szTmp2, szTmp, 0) != S_OK)
- goto error;
+ StatDeleteFile (szTmp2, FALSE);
StringCbPrintfW (szTmp2, sizeof(szTmp2), L"%s%s", szLinkDir, L"\\VeraCrypt User's Guide.lnk");
StatDeleteFile (szTmp2, FALSE);
}
- if (bDesktopIcon)
+ if (bUseDesktopIcon)
{
StringCbCopyW (szDir, sizeof(szDir), szDestDir);
x = wcslen (szDestDir);
if (szDestDir[x - 1] == L'\\')
@@ -1892,8 +2010,39 @@ error:
return bOK;
}
+void RemoveLegacyFiles (wchar_t *szDestDir)
+{
+ const wchar_t* oldFileNames[] = {
+ L"docs\\html\\en\\BCH_Logo_48x30.png",
+ L"docs\\html\\en\\LinuxPrepAndBuild.sh",
+ L"docs\\html\\en\\LinuxPrepAndBuild.zip",
+ L"docs\\html\\en\\RIPEMD-160.html",
+ L"docs\\html\\en\\ru\\BCH_Logo_48x30.png",
+ L"Languages\\Language.ru - Copy.xml",
+ };
+ wchar_t szDir[TC_MAX_PATH];
+ wchar_t oldPath[TC_MAX_PATH];
+ BOOL bSlash;
+ size_t x, i;
+
+ StringCbCopyW (szDir, sizeof(szDir), szDestDir);
+ x = wcslen (szDestDir);
+ if (szDestDir[x - 1] == L'\\')
+ bSlash = TRUE;
+ else
+ bSlash = FALSE;
+
+ if (bSlash == FALSE)
+ StringCbCatW (szDir, sizeof(szDir), L"\\");
+
+ for (i = 0; i < ARRAYSIZE(oldFileNames); i++)
+ {
+ StringCbPrintfW (oldPath, sizeof(oldPath), L"%s%s", szDestDir, oldFileNames[i]);
+ StatDeleteFile (oldPath, FALSE);
+ }
+}
void OutcomePrompt (HWND hwndDlg, BOOL bOK)
{
if (bOK)
@@ -2075,16 +2224,23 @@ void DoInstall (void *arg)
{
HWND hwndDlg = (HWND) arg;
BOOL bOK = TRUE;
wchar_t path[MAX_PATH];
-
BootEncryption bootEnc (hwndDlg);
// Refresh the main GUI (wizard thread)
InvalidateRect (MainDlg, NULL, TRUE);
ClearLogWindow (hwndDlg);
+ if (isMsiInstalled())
+ {
+ MessageBoxW (hwndDlg, GetString ("CANT_INSTALL_WITH_EXE_OVER_MSI"), lpszTitle, MB_ICONHAND);
+ Error ("INSTALL_FAILED", hwndDlg);
+ PostMessage (MainDlg, TC_APPMSG_INSTALL_FAILURE, 0, 0);
+ return;
+ }
+
if (mkfulldir (InstallationPath, TRUE) != 0)
{
if (mkfulldir (InstallationPath, FALSE) != 0)
{
@@ -2111,14 +2267,17 @@ void DoInstall (void *arg)
if (bUpgrade
&& (IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L".exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"-x86.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"-x64.exe")
+ || IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"-arm64.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format-x86.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format-x64.exe")
+ || IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format-arm64.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander-x86.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander-x64.exe")
+ || IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander-arm64.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Setup.exe")
)
)
{
@@ -2202,8 +2361,20 @@ void DoInstall (void *arg)
if (bSystemRestore)
SetSystemRestorePoint (hwndDlg, TRUE);
+ if (bOK && (bDisableMemoryProtection != bOriginalDisableMemoryProtection))
+ {
+ WriteMemoryProtectionConfig(bDisableMemoryProtection? FALSE : TRUE);
+ bRestartRequired = TRUE; // Restart is required to apply the new memory protection settings
+ }
+
+ if (bOK && bUpgrade)
+ {
+ // delete legacy files
+ RemoveLegacyFiles (InstallationPath);
+ }
+
if (bOK)
{
UpdateProgressBarProc(100);
UninstallBatch[0] = 0;
@@ -2236,8 +2407,17 @@ void DoInstall (void *arg)
OutcomePrompt (hwndDlg, bOK);
if (bOK && !bUninstall && !bDowngrade && !bRepairMode && !bDevm)
{
+ BOOL bHibernateEnabled = FALSE, bHiberbootEnabled = FALSE;
+ if (GetHibernateStatus (bHibernateEnabled, bHiberbootEnabled))
+ {
+ if (bHiberbootEnabled)
+ {
+ bPromptFastStartup = TRUE;
+ }
+ }
+
if (!IsHiddenOSRunning()) // A hidden OS user should not see the post-install notes twice (on decoy OS and then on hidden OS).
{
if (bRestartRequired || SystemEncryptionUpdate)
{
@@ -2245,8 +2425,12 @@ void DoInstall (void *arg)
if (bUpgrade)
{
SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_RELEASE_NOTES);
+ if (bUpdateRescueDisk)
+ {
+ SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_RESCUE_DISK);
+ }
}
else if (bPossiblyFirstTimeInstall)
{
SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_TUTORIAL);
@@ -2273,47 +2457,11 @@ void DoInstall (void *arg)
void SetInstallationPath (HWND hwndDlg)
{
- HKEY hkey;
BOOL bInstallPathDetermined = FALSE;
- wchar_t path[MAX_PATH+20];
- ITEMIDLIST *itemList;
-
- memset (InstallationPath, 0, sizeof (InstallationPath));
-
- // Determine if VeraCrypt is already installed and try to determine its "Program Files" location
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", 0, KEY_READ | KEY_WOW64_32KEY, &hkey) == ERROR_SUCCESS)
- {
- /* Default 'UninstallString' registry strings written by VeraCrypt:
- ------------------------------------------------------------------------------------
- 5.0+ "C:\Program Files\VeraCrypt\VeraCrypt Setup.exe" /u
- */
-
- wchar_t rv[MAX_PATH*4];
- DWORD size = sizeof (rv);
- if (RegQueryValueEx (hkey, L"UninstallString", 0, 0, (LPBYTE) &rv, &size) == ERROR_SUCCESS && wcsrchr (rv, L'/'))
- {
- size_t len = 0;
-
- // Cut and paste the location (path) where VeraCrypt is installed to InstallationPath
- if (rv[0] == L'"')
- {
- len = wcsrchr (rv, L'/') - rv - 2;
- StringCchCopyNW (InstallationPath, ARRAYSIZE(InstallationPath), rv + 1, len);
- InstallationPath [len] = 0;
- bInstallPathDetermined = TRUE;
-
- if (InstallationPath [wcslen (InstallationPath) - 1] != L'\\')
- {
- len = wcsrchr (InstallationPath, L'\\') - InstallationPath;
- InstallationPath [len] = 0;
- }
- }
-
- }
- RegCloseKey (hkey);
- }
+
+ GetInstallationPath (hwndDlg, InstallationPath, ARRAYSIZE (InstallationPath), &bInstallPathDetermined);
if (bInstallPathDetermined)
{
wchar_t mp[MAX_PATH];
@@ -2327,38 +2475,8 @@ void SetInstallationPath (HWND hwndDlg)
if (!IsNonInstallMode() && !bDevm)
bChangeMode = TRUE;
}
}
- else
- {
- /* VeraCrypt is not installed or it wasn't possible to determine where it is installed. */
-
- // Default "Program Files" path.
- SHGetSpecialFolderLocation (hwndDlg, CSIDL_PROGRAM_FILES, &itemList);
- SHGetPathFromIDList (itemList, path);
-
- if (Is64BitOs())
- {
- // Use a unified default installation path (registry redirection of %ProgramFiles% does not work if the installation path is user-selectable)
- wstring s = path;
- size_t p = s.find (L" (x86)");
- if (p != wstring::npos)
- {
- s = s.substr (0, p);
- if (_waccess (s.c_str(), 0) != -1)
- StringCbCopyW (path, sizeof (path), s.c_str());
- }
- }
-
- StringCbCatW (path, sizeof(path), L"\\VeraCrypt\\");
- StringCbCopyW (InstallationPath, sizeof(InstallationPath), path);
- }
-
- // Make sure the path ends with a backslash
- if (InstallationPath [wcslen (InstallationPath) - 1] != L'\\')
- {
- StringCbCatW (InstallationPath, sizeof(InstallationPath), L"\\");
- }
}
// Handler for uninstall only (install is handled by the wizard)
@@ -2454,41 +2572,185 @@ BOOL CALLBACK UninstallDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
return 0;
}
+#endif
+typedef struct
+{
+ LPCWSTR name;
+ int resourceid;
+ WORD langid;
+ LPCSTR internalId;
+ LPCWSTR langtag;
+} tLanguageEntry;
+
+static tLanguageEntry g_languagesEntries[] = {
+ {L"العربية", IDR_LANG_AR, LANG_ARABIC, "ar", NULL},
+ {L"Беларуская", IDR_LANG_BE, LANG_BELARUSIAN, "be", NULL},
+ {L"Български", IDR_LANG_BG, LANG_BULGARIAN, "bg", NULL},
+ {L"Català", IDR_LANG_CA, LANG_CATALAN, "ca", NULL},
+ {L"Corsu", IDR_LANG_CO, LANG_CORSICAN, "co", NULL},
+ {L"Čeština", IDR_LANG_CS, LANG_CZECH, "cs", NULL},
+ {L"Dansk", IDR_LANG_DA, LANG_DANISH, "da", NULL},
+ {L"Deutsch", IDR_LANG_DE, LANG_GERMAN, "de", NULL},
+ {L"Ελληνικά", IDR_LANG_EL, LANG_GREEK, "el", NULL},
+ {L"English", IDR_LANGUAGE, LANG_ENGLISH, "en", NULL},
+ {L"Español", IDR_LANG_ES, LANG_SPANISH, "es", NULL},
+ {L"Eesti", IDR_LANG_ET, LANG_ESTONIAN, "et", NULL},
+ {L"Euskara", IDR_LANG_EU, LANG_BASQUE, "eu", NULL},
+ {L"فارسي", IDR_LANG_FA, LANG_PERSIAN, "fa", NULL},
+ {L"Suomi", IDR_LANG_FI, LANG_FINNISH, "fi", NULL},
+ {L"Français", IDR_LANG_FR, LANG_FRENCH, "fr", NULL},
+ {L"עברית", IDR_LANG_HE, LANG_HEBREW, "he", NULL},
+ {L"Magyar", IDR_LANG_HU, LANG_HUNGARIAN, "hu", NULL},
+ {L"Bahasa Indonesia", IDR_LANG_ID, LANG_INDONESIAN, "id", NULL},
+ {L"Italiano", IDR_LANG_IT, LANG_ITALIAN, "it", NULL},
+ {L"日本語", IDR_LANG_JA, LANG_JAPANESE, "ja", NULL},
+ {L"ქართული", IDR_LANG_KA, LANG_GEORGIAN, "ka", NULL},
+ {L"한국어", IDR_LANG_KO, LANG_KOREAN, "ko", NULL},
+ {L"Latviešu", IDR_LANG_LV, LANG_LATVIAN, "lv", NULL},
+ {L"Norsk Bokmål", IDR_LANG_NB, LANG_NORWEGIAN, "nb", NULL},
+ {L"Nederlands", IDR_LANG_NL, LANG_DUTCH, "nl", NULL},
+ {L"Norsk Nynorsk", IDR_LANG_NN, LANG_NORWEGIAN, "nn", NULL},
+ {L"Polski", IDR_LANG_PL, LANG_POLISH, "pl", NULL},
+ {L"Română", IDR_LANG_RO, LANG_ROMANIAN, "ro", NULL},
+ {L"Русский", IDR_LANG_RU, LANG_RUSSIAN, "ru", NULL},
+ {L"Português-Brasil", IDR_LANG_PTBR, LANG_PORTUGUESE, "pt-br", L"pt-BR"},
+ {L"Slovenčina", IDR_LANG_SK, LANG_SLOVAK, "sk", NULL},
+ {L"Slovenščina", IDR_LANG_SL, LANG_SLOVENIAN, "sl", NULL},
+ {L"Svenska", IDR_LANG_SV, LANG_SWEDISH, "sv", NULL},
+ {L"ภาษาไทย", IDR_LANG_TH, LANG_THAI, "th", NULL},
+ {L"Türkçe", IDR_LANG_TR, LANG_TURKISH, "tr", NULL},
+ {L"Українська", IDR_LANG_UK, LANG_UKRAINIAN, "uk", NULL},
+ {L"Ўзбекча", IDR_LANG_UZ, LANG_UZBEK, "uz", NULL},
+ {L"Tiếng Việt", IDR_LANG_VI, LANG_VIETNAMESE, "vi", NULL},
+ {L"简体中文", IDR_LANG_ZHCN, LANG_CHINESE, "zh-cn", L"zh-CN"},
+ {L"繁體中文(香港)", IDR_LANG_ZHHK, LANG_CHINESE, "zh-hk", L"zh-HK"},
+ {L"繁體中文", IDR_LANG_ZHTW, LANG_CHINESE, "zh-tw", L"zh-TW"},
+};
+
+typedef int (WINAPI *LCIDToLocaleNameFn)(
+ LCID Locale,
+ LPWSTR lpName,
+ int cchName,
+ DWORD dwFlags);
+
+static void UpdateSelectLanguageDialog (HWND hwndDlg)
+{
+ HWND hLangList = GetDlgItem (hwndDlg, IDC_LANGUAGES_LIST);
+ LPARAM nIndex = SendMessage (hLangList, CB_GETCURSEL, 0, 0);
+ int resourceid = (int) SendMessage (hLangList, CB_GETITEMDATA, nIndex, 0);
+ BOOL bVal;
+
+ LoadLanguageFromResource (resourceid, TRUE, TRUE);
+
+ bVal = LocalizationActive;
+ LocalizationActive = TRUE;
+ LocalizeDialog (hwndDlg, "IDD_INSTL_DLG");
+ InvalidateRect (hwndDlg, NULL, FALSE);
+ LocalizationActive = bVal;
+}
-int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpszCommandLine, int nCmdShow)
+BOOL CALLBACK SelectLanguageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- atexit (localcleanup);
+ WORD lw = LOWORD (wParam);
- SelfExtractStartupInit();
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ char* preferredLanguage = GetPreferredLangId ();
+ if (strlen (preferredLanguage))
+ {
+ // language already selected by user in current install
+ // use it for the setup
+ for (size_t i = 0; i < ARRAYSIZE (g_languagesEntries); i++)
+ {
+ if (0 == strcmp (preferredLanguage, g_languagesEntries[i].internalId))
+ {
+ LoadLanguageFromResource (g_languagesEntries[i].resourceid, FALSE, TRUE);
+ break;
+ }
+ }
+ EndDialog (hwndDlg, IDCANCEL);
+ return FALSE;
+ }
+ else
+ {
+ // Get the default UI language
+ LCIDToLocaleNameFn LCIDToLocaleNamePtr = (LCIDToLocaleNameFn) GetProcAddress (GetModuleHandle (L"kernel32.dll"), "LCIDToLocaleName");
+ WCHAR langtag[256];
+ LANGID defaultLanguage = GetUserDefaultUILanguage ();
+ WORD langid = (WORD) (defaultLanguage & 0x03FF); // primary language ID
- lpszTitle = L"VeraCrypt Setup";
+ InitDialog (hwndDlg);
- /* Call InitApp to initialize the common code */
- InitApp (hInstance, NULL);
+ LCIDToLocaleNamePtr (MAKELCID (defaultLanguage, 0), langtag, ARRAYSIZE (langtag), 0); // language tag (e.g. "en-US")
+ int resourceid = IDR_LANGUAGE;
+ for (size_t i = 0; i < ARRAYSIZE (g_languagesEntries); i++)
+ {
+ if (g_languagesEntries[i].langid == langid)
+ {
+ if (!g_languagesEntries[i].langtag || (0 == _wcsicmp (g_languagesEntries[i].langtag, langtag)))
+ {
+ resourceid = g_languagesEntries[i].resourceid;
+ break;
+ }
+ }
+ }
- if (IsAdmin () != TRUE)
- if (MessageBoxW (NULL, GetString ("SETUP_ADMIN"), lpszTitle, MB_YESNO | MB_ICONQUESTION) != IDYES)
+ for (size_t i = 0; i < ARRAYSIZE (g_languagesEntries); i++)
+ {
+ AddComboPair (GetDlgItem (hwndDlg, IDC_LANGUAGES_LIST), g_languagesEntries[i].name, g_languagesEntries[i].resourceid);
+ }
+
+ SelectAlgo (GetDlgItem (hwndDlg, IDC_LANGUAGES_LIST), &resourceid);
+
+ UpdateSelectLanguageDialog (hwndDlg);
+ }
+
+ }
+ return TRUE;
+
+ case WM_COMMAND:
+ if (CBN_SELCHANGE == HIWORD (wParam))
{
- FinalizeApp ();
- exit (1);
+ UpdateSelectLanguageDialog (hwndDlg);
+ return 1;
}
- /* Setup directory */
- {
- wchar_t *s;
- GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir));
- s = wcsrchr (SetupFilesDir, L'\\');
- if (s)
- s[1] = 0;
+ if (lw == IDOK)
+ {
+ bUserSetLanguage = TRUE;
+ EndDialog (hwndDlg, IDOK);
+ return 1;
+ }
+
+ if (lw == IDCANCEL)
+ {
+ SetPreferredLangId ("");
+ EndDialog (hwndDlg, IDCANCEL);
+ return 1;
+ }
+ return 0;
}
+ return 0;
+}
+
+
+int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpszCommandLine, int nCmdShow)
+{
+ atexit (localcleanup);
+
+ SelfExtractStartupInit();
+
/* Parse command line arguments */
if (lpszCommandLine[0] == L'/')
{
+#ifndef PORTABLE
if (lpszCommandLine[1] == L'u')
{
// Uninstall: /u
@@ -2499,9 +2761,11 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
// Change: /c
bChangeMode = TRUE;
}
- else if (lpszCommandLine[1] == L'p')
+ else
+#endif
+ if (lpszCommandLine[1] == L'p')
{
// Create self-extracting package: /p
bMakePackage = TRUE;
@@ -2512,36 +2776,76 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
bDevm = TRUE;
}
}
+#ifdef PORTABLE
+ lpszTitle = L"VeraCrypt Portable";
+#else
+ lpszTitle = L"VeraCrypt Setup";
+#endif
+ /* Call InitApp to initialize the common code */
+ InitApp (hInstance, NULL);
+
+#ifndef PORTABLE
+ if (IsAdmin () != TRUE)
+ if (MessageBoxW (NULL, GetString ("SETUP_ADMIN"), lpszTitle, MB_YESNO | MB_ICONQUESTION) != IDYES)
+ {
+ exit (1);
+ }
+#endif
+ /* Setup directory */
+ {
+ wchar_t *s;
+ GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir));
+ s = wcsrchr (SetupFilesDir, L'\\');
+ if (s)
+ s[1] = 0;
+ }
+
if (bMakePackage)
{
/* Create self-extracting package */
- MakeSelfExtractingPackage (NULL, SetupFilesDir);
+ MakeSelfExtractingPackage (NULL, SetupFilesDir, FALSE);
}
else
{
+#ifndef PORTABLE
SetInstallationPath (NULL);
+#endif
+ if (bUninstall)
+ {
+ wchar_t path [TC_MAX_PATH];
- if (!bUninstall)
+ GetModuleFileName (NULL, path, ARRAYSIZE (path));
+ if (!VerifyModuleSignature (path))
+ {
+ Error ("DIST_PACKAGE_CORRUPTED", NULL);
+ exit (1);
+ }
+ }
+ else
{
if (IsSelfExtractingPackage())
{
- if (!VerifyPackageIntegrity())
+ if (!VerifySelfPackageIntegrity())
{
// Package corrupted
exit (1);
}
bDevm = FALSE;
}
else if (!bDevm)
{
+#ifndef PORTABLE
MessageBox (NULL, L"Error: This installer file does not contain any compressed files.\n\nTo create a self-extracting installation package (with embedded compressed files), run:\n\"VeraCrypt Setup.exe\" /p", L"VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
- FinalizeApp ();
+#else
+ MessageBox (NULL, L"Error: This portable installer file does not contain any compressed files.\n\nTo create a self-extracting portable installation package (with embedded compressed files), run:\n\"VeraCrypt Portable.exe\" /p", L"VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
+#endif
exit (1);
}
+#ifndef PORTABLE
if (bChangeMode)
{
/* VeraCrypt is already installed on this system and we were launched from the Program Files folder */
@@ -2556,14 +2860,15 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
case 2:
bUninstall = TRUE;
break;
default:
- FinalizeApp ();
exit (1);
}
}
+#endif
}
+#ifndef PORTABLE
// System Restore
if (IsSystemRestoreEnabled ())
{
wchar_t dllPath[MAX_PATH];
@@ -2576,16 +2881,29 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
SystemRestoreDll = LoadLibrary (dllPath);
}
else
SystemRestoreDll = 0;
+#endif
if (!bUninstall)
{
+ if (!bDevm && !LocalizationActive)
+ {
+ BOOL bHasPreferredLanguage = (strlen (GetPreferredLangId ()) > 0)? TRUE : FALSE;
+ if ((IDCANCEL == DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_INSTALL_LANGUAGE), NULL, (DLGPROC) SelectLanguageDialogProc, (LPARAM) 0 ))
+ && !bHasPreferredLanguage
+ )
+ {
+ // Language dialog cancelled by user: exit the installer
+ exit (1);
+ }
+ }
/* Create the main dialog for install */
DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_INSTL_DLG), NULL, (DLGPROC) MainDialogProc,
(LPARAM)lpszCommandLine);
}
+#ifndef PORTABLE
else
{
/* Create the main dialog for uninstall */
@@ -2609,8 +2927,8 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
CloseHandle (pi.hThread);
}
}
}
+#endif
}
- FinalizeApp ();
return 0;
}
diff --git a/src/Setup/Setup.h b/src/Setup/Setup.h
index 76cc7e9a..5ab62bb6 100644
--- a/src/Setup/Setup.h
+++ b/src/Setup/Setup.h
@@ -5,9 +5,9 @@
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 all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages. */
@@ -20,134 +20,71 @@ 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"ALicense.txt",
L"ALICENSE",
L"ANOTICE",
L"AVeraCrypt.exe",
L"AVeraCryptExpander.exe",
L"AVeraCrypt Format.exe",
- L"AVeraCrypt-x86.exe",
- L"AVeraCryptExpander-x86.exe",
- L"AVeraCrypt Format-x86.exe",
- L"AVeraCrypt-x64.exe",
- L"AVeraCryptExpander-x64.exe",
- L"AVeraCrypt Format-x64.exe",
+ L"Averacrypt.inf",
+ L"Averacrypt.cat",
L"Averacrypt.sys",
- L"Averacrypt-x64.sys",
L"Dveracrypt.sys",
L"AVeraCrypt Setup.exe",
- L"ALanguage.ar.xml",
- L"ALanguage.be.xml",
- L"ALanguage.bg.xml",
- L"ALanguage.ca.xml",
- L"ALanguage.cs.xml",
- L"ALanguage.da.xml",
- L"ALanguage.de.xml",
- L"ALanguage.el.xml",
- L"ALanguage.es.xml",
- L"ALanguage.et.xml",
- L"ALanguage.eu.xml",
- L"ALanguage.fa.xml",
- L"ALanguage.fi.xml",
- L"ALanguage.fr.xml",
- L"ALanguage.hu.xml",
- L"ALanguage.id.xml",
- L"ALanguage.it.xml",
- L"ALanguage.ja.xml",
- L"ALanguage.ka.xml",
- L"ALanguage.ko.xml",
- L"ALanguage.lv.xml",
- L"ALanguage.my.xml",
- L"ALanguage.nl.xml",
- L"ALanguage.nn.xml",
- L"ALanguage.pl.xml",
- L"ALanguage.pt-br.xml",
- L"ALanguage.ru.xml",
- L"ALanguage.sk.xml",
- L"ALanguage.sl.xml",
- L"ALanguage.sv.xml",
- L"ALanguage.tr.xml",
- L"ALanguage.uk.xml",
- L"ALanguage.uz.xml",
- L"ALanguage.vi.xml",
- L"ALanguage.zh-cn.xml",
- L"ALanguage.zh-hk.xml",
- L"ALanguage.zh-tw.xml"
+ L"XLanguages.zip",
+ L"Xdocs.zip",
};
// 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"License.txt",
L"LICENSE",
L"NOTICE",
- L"VeraCrypt.exe",
- L"VeraCryptExpander.exe",
- L"VeraCrypt Format.exe",
L"VeraCrypt-x64.exe",
L"VeraCryptExpander-x64.exe",
L"VeraCrypt Format-x64.exe",
- L"veracrypt.sys",
+ L"VeraCrypt-arm64.exe",
+ L"VeraCryptExpander-arm64.exe",
+ L"VeraCrypt Format-arm64.exe",
+ L"veracrypt.inf",
+ L"veracrypt-x64.cat",
+ L"veracrypt-x64.sys",
+ L"veracrypt-arm64.cat",
+ L"veracrypt-arm64.sys",
+ L"Languages.zip",
+ L"docs.zip"
+};
+
+// Specifies what legacy files to remove during install
+static wchar_t *szLegacyFiles[]=
+{
+ L"VeraCrypt-x86.exe",
+ L"VeraCryptExpander-x86.exe",
+ L"VeraCrypt Format-x86.exe",
+ L"VeraCrypt-x64.exe",
+ L"VeraCryptExpander-x64.exe",
+ L"VeraCrypt Format-x64.exe",
L"veracrypt-x64.sys",
- L"Language.ar.xml",
- L"Language.be.xml",
- L"Language.bg.xml",
- L"Language.ca.xml",
- L"Language.cs.xml",
- L"Language.da.xml",
- L"Language.de.xml",
- L"Language.el.xml",
- L"Language.es.xml",
- L"Language.et.xml",
- L"Language.eu.xml",
- L"Language.fa.xml",
- L"Language.fi.xml",
- L"Language.fr.xml",
- L"Language.hu.xml",
- L"Language.id.xml",
- L"Language.it.xml",
- L"Language.ja.xml",
- L"Language.ka.xml",
- L"Language.ko.xml",
- L"Language.lv.xml",
- L"Language.my.xml",
- L"Language.nl.xml",
- L"Language.nn.xml",
- L"Language.pl.xml",
- L"Language.pt-br.xml",
- L"Language.ru.xml",
- L"Language.sk.xml",
- L"Language.sl.xml",
- L"Language.sv.xml",
- L"Language.tr.xml",
- L"Language.uk.xml",
- L"Language.uz.xml",
- L"Language.vi.xml",
- L"Language.zh-cn.xml",
- L"Language.zh-hk.xml",
- L"Language.zh-tw.xml"
};
-#define FILENAME_64BIT_DRIVER L"veracrypt-x64.sys"
#define NBR_COMPRESSED_FILES (sizeof(szCompressedFiles) / sizeof(szCompressedFiles[0]))
void localcleanup (void);
BOOL StatDeleteFile ( wchar_t *lpszFile, BOOL bCheckForOldFile );
BOOL StatRemoveDirectory ( wchar_t *lpszDir );
HRESULT CreateLink ( wchar_t *lpszPathObj , wchar_t *lpszArguments , wchar_t *lpszPathLink );
void GetProgramPath ( HWND hwndDlg , wchar_t *path );
void StatusMessage (HWND hwndDlg, char *stringId);
-void StatusMessageParam (HWND hwndDlg, char *stringId, wchar_t *param);
+void StatusMessageParam (HWND hwndDlg, char *stringId, const wchar_t *param);
void ClearLogWindow (HWND hwndDlg);
-void RegMessage ( HWND hwndDlg , wchar_t *txt );
-void RegRemoveMessage (HWND hwndDlg, wchar_t *txt);
-void CopyMessage ( HWND hwndDlg , wchar_t *txt );
-void RemoveMessage ( HWND hwndDlg , wchar_t *txt );
-void IconMessage ( HWND hwndDlg , wchar_t *txt );
+void RegMessage ( HWND hwndDlg , const wchar_t *txt );
+void RegRemoveMessage (HWND hwndDlg, const wchar_t *txt);
+void _cdecl CopyMessage ( HWND hwndDlg , const wchar_t *txt );
+void RemoveMessage ( HWND hwndDlg , const wchar_t *txt );
+void IconMessage ( HWND hwndDlg , const wchar_t *txt );
static int CALLBACK BrowseCallbackProc ( HWND hwnd , UINT uMsg , LPARAM lp , LPARAM pData );
void LoadLicense ( HWND hwndDlg );
void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersionPtr);
BOOL DoFilesInstall ( HWND hwndDlg , wchar_t *szDestDir );
@@ -162,18 +99,24 @@ void DoUninstall ( void *hwndDlg );
void DoInstall ( void *hwndDlg );
void SetInstallationPath (HWND hwndDlg);
BOOL UpgradeBootLoader (HWND hwndDlg);
BOOL CALLBACK InstallDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
+#ifdef VC_EFI_CUSTOM_MODE
+BOOL CheckSecureBootCompatibility (HWND hWnd);
+#endif
extern BOOL bDevm;
extern BOOL Rollback;
extern BOOL bUpgrade;
+extern BOOL bUpdateRescueDisk;
extern BOOL bPossiblyFirstTimeInstall;
extern BOOL bRepairMode;
extern BOOL bReinstallMode;
extern BOOL bSystemRestore;
extern BOOL bDisableSwapFiles;
extern BOOL bForAllUsers;
+extern BOOL bDisableMemoryProtection;
+extern BOOL bOriginalDisableMemoryProtection;
extern BOOL bRegisterFileExt;
extern BOOL bAddToStartMenu;
extern BOOL bDesktopIcon;
extern BOOL bDesktopIconStatusDetermined;
diff --git a/src/Setup/Setup.manifest b/src/Setup/Setup.manifest
index afd4c1c0..abc1ef65 100644
--- a/src/Setup/Setup.manifest
+++ b/src/Setup/Setup.manifest
@@ -13,9 +13,15 @@
</asmv3:windowsSettings>
</asmv3:application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 10 and Windows 11 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
<dependency>
diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc
index 381b359b..34b138b7 100644
--- a/src/Setup/Setup.rc
+++ b/src/Setup/Setup.rc
@@ -6,9 +6,9 @@
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "winres.h"
#include "..\\common\\resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -27,10 +27,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,20,2,0
- PRODUCTVERSION 1,20,2,0
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
@@ -45,13 +45,13 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Setup"
- VALUE "FileVersion", "1.20-BETA2"
+ VALUE "FileVersion", "1.26.17"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt Setup.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.20-BETA2"
+ VALUE "ProductVersion", "1.26.17"
END
END
BLOCK "VarFileInfo"
BEGIN
@@ -75,8 +75,55 @@ IDR_SETUP_RSRC_HEADER HEADER "resource.h"
IDR_COMREG REGISTRY "ComSetup.rgs"
/////////////////////////////////////////////////////////////////////////////
//
+// LANGUAGES
+//
+
+IDR_LANG_AR LANGUAGES "..\\..\\Translations\\Language.ar.xml"
+IDR_LANG_CS LANGUAGES "..\\..\\Translations\\Language.cs.xml"
+IDR_LANG_DE LANGUAGES "..\\..\\Translations\\Language.de.xml"
+IDR_LANG_ES LANGUAGES "..\\..\\Translations\\Language.es.xml"
+IDR_LANG_FR LANGUAGES "..\\..\\Translations\\Language.fr.xml"
+IDR_LANG_IT LANGUAGES "..\\..\\Translations\\Language.it.xml"
+IDR_LANG_JA LANGUAGES "..\\..\\Translations\\Language.ja.xml"
+IDR_LANG_NL LANGUAGES "..\\..\\Translations\\Language.nl.xml"
+IDR_LANG_PL LANGUAGES "..\\..\\Translations\\Language.pl.xml"
+IDR_LANG_RO LANGUAGES "..\\..\\Translations\\Language.ro.xml"
+IDR_LANG_RU LANGUAGES "..\\..\\Translations\\Language.ru.xml"
+IDR_LANG_VI LANGUAGES "..\\..\\Translations\\Language.vi.xml"
+IDR_LANG_ZHCN LANGUAGES "..\\..\\Translations\\Language.zh-cn.xml"
+IDR_LANG_ZHHK LANGUAGES "..\\..\\Translations\\Language.zh-hk.xml"
+IDR_LANG_BE LANGUAGES "..\\..\\Translations\\Language.be.xml"
+IDR_LANG_BG LANGUAGES "..\\..\\Translations\\Language.bg.xml"
+IDR_LANG_CA LANGUAGES "..\\..\\Translations\\Language.ca.xml"
+IDR_LANG_CO LANGUAGES "..\\..\\Translations\\Language.co.xml"
+IDR_LANG_DA LANGUAGES "..\\..\\Translations\\Language.da.xml"
+IDR_LANG_EL LANGUAGES "..\\..\\Translations\\Language.el.xml"
+IDR_LANG_ET LANGUAGES "..\\..\\Translations\\Language.et.xml"
+IDR_LANG_EU LANGUAGES "..\\..\\Translations\\Language.eu.xml"
+IDR_LANG_FA LANGUAGES "..\\..\\Translations\\Language.fa.xml"
+IDR_LANG_FI LANGUAGES "..\\..\\Translations\\Language.fi.xml"
+IDR_LANG_HE LANGUAGES "..\\..\\Translations\\Language.he.xml"
+IDR_LANG_HU LANGUAGES "..\\..\\Translations\\Language.hu.xml"
+IDR_LANG_ID LANGUAGES "..\\..\\Translations\\Language.id.xml"
+IDR_LANG_KA LANGUAGES "..\\..\\Translations\\Language.ka.xml"
+IDR_LANG_KO LANGUAGES "..\\..\\Translations\\Language.ko.xml"
+IDR_LANG_LV LANGUAGES "..\\..\\Translations\\Language.lv.xml"
+IDR_LANG_NB LANGUAGES "..\\..\\Translations\\Language.nb.xml"
+IDR_LANG_NN LANGUAGES "..\\..\\Translations\\Language.nn.xml"
+IDR_LANG_PTBR LANGUAGES "..\\..\\Translations\\Language.pt-br.xml"
+IDR_LANG_SK LANGUAGES "..\\..\\Translations\\Language.sk.xml"
+IDR_LANG_SL LANGUAGES "..\\..\\Translations\\Language.sl.xml"
+IDR_LANG_SV LANGUAGES "..\\..\\Translations\\Language.sv.xml"
+IDR_LANG_TH LANGUAGES "..\\..\\Translations\\Language.th.xml"
+IDR_LANG_TR LANGUAGES "..\\..\\Translations\\Language.tr.xml"
+IDR_LANG_UK LANGUAGES "..\\..\\Translations\\Language.uk.xml"
+IDR_LANG_UZ LANGUAGES "..\\..\\Translations\\Language.uz.xml"
+IDR_LANG_ZHTW LANGUAGES "..\\..\\Translations\\Language.zh-tw.xml"
+
+/////////////////////////////////////////////////////////////////////////////
+//
// Dialog
//
IDD_UNINSTALL DIALOGEX 0, 0, 349, 234
@@ -99,14 +146,17 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
EDITTEXT IDC_DESTINATION,11,41,260,13,ES_AUTOHSCROLL
PUSHBUTTON "Bro&wse...",IDC_BROWSE,278,40,59,14
- CONTROL "Install &for all users",IDC_ALL_USERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,77,168,11
+ CONTROL "Install &for all users",IDC_ALL_USERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,68,168,11
+ CONTROL "Add VeraCrypt to &Start menu",IDC_PROG_GROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,80,168,11
+ CONTROL "Add VeraCrypt icon to &desktop",IDC_DESKTOP_ICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,92,168,11
CONTROL "Associate the .hc file &extension with VeraCrypt",IDC_FILE_TYPE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,113,232,11
- CONTROL "Add VeraCrypt to &Start menu",IDC_PROG_GROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,89,168,11
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,104,232,11
+ CONTROL "Disable memory protection for Accessibility tools compatibility",IDC_DISABLE_MEMORY_PROTECTION,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,115,315,10
+ PUSHBUTTON "?",IDC_DISABLE_MEMORY_PROTECTION_HELP,337,111,7,14
CONTROL "Create System &Restore point",IDC_SYSTEM_RESTORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,125,194,11
- CONTROL "Add VeraCrypt icon to &desktop",IDC_DESKTOP_ICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,101,168,11
LTEXT "Please select or type the location where you want to install the VeraCrypt program files. If the specified folder does not exist, it will be automatically created.",IDT_INSTALL_DESTINATION,11,14,319,25
END
IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 217, 156
@@ -119,9 +169,9 @@ END
IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 346, 152
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "",IDC_LICENSE_TEXT,"RichEdit20A",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,0,23,345,108
+ CONTROL "",IDC_LICENSE_TEXT,"RichEdit20W",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,0,23,345,108
CONTROL "",IDC_AGREE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,137,126,10
LTEXT "",IDC_BOX_HELP,0,0,346,22
END
@@ -134,16 +184,16 @@ BEGIN
PUSHBUTTON "&Help",IDHELP,150,211,50,14
PUSHBUTTON "",IDC_PREV,209,211,50,14
DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14
PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14
- LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT
+ LTEXT "",IDC_BOX_TITLE,11,2,324,12,0,WS_EX_TRANSPARENT
CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30
CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10
CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE
CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE
LTEXT "VeraCrypt Installer",IDC_STATIC,4,200,62,8,WS_DISABLED
- LTEXT "",IDC_BOX_INFO,18,18,317,13,0,WS_EX_TRANSPARENT
+ LTEXT "",IDC_BOX_INFO,18,15,317,16,0,WS_EX_TRANSPARENT
LTEXT "",IDC_MAIN_CONTENT_CANVAS,0,36,374,164
LTEXT "",IDC_POS_BOX,14,42,346,155,0,WS_EX_TRANSPARENT
END
@@ -184,8 +234,20 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14
END
+IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 214, 75
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "VeraCrypt Setup Wizard"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,102,54,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,157,54,50,14
+ ICON IDI_SETUP,IDC_STATIC,10,10,32,32
+ LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,158,17
+ COMBOBOX IDC_LANGUAGES_LIST,42,36,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+END
+
/////////////////////////////////////////////////////////////////////////////
//
// Icon
@@ -227,9 +289,9 @@ END
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_UNINSTALL, DIALOG
BEGIN
LEFTMARGIN, 7
@@ -298,8 +360,16 @@ BEGIN
RIGHTMARGIN, 339
TOPMARGIN, 7
BOTTOMMARGIN, 147
END
+
+ IDD_INSTALL_LANGUAGE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 207
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 68
+ END
END
#endif // APSTUDIO_INVOKED
diff --git a/src/Setup/Setup.vcproj b/src/Setup/Setup.vcproj
deleted file mode 100644
index a1a6a81f..00000000
--- a/src/Setup/Setup.vcproj
+++ /dev/null
@@ -1,484 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="Setup"
- ProjectGUID="{DF5F654D-BD44-4E31-B92E-B68074DC37A8}"
- RootNamespace="Setup"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11"
- PreprocessorDefinitions="SETUP;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/NODEFAULTLIB:LIBCMTD"
- AdditionalDependencies="libcmtd.lib atlsd.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptSetup.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- UACExecutionLevel="2"
- DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/Setup.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="Setup.manifest"
- EmbedManifest="true"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="md &quot;..\Debug\Setup Files&quot; 2&gt;NUL:&#x0D;&#x0A;copy Debug\VeraCryptSetup.exe &quot;..\Debug\Setup Files\VeraCrypt Setup.exe&quot; &gt;NUL:&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/w34189"
- Optimization="2"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11"
- PreprocessorDefinitions="SETUP;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- AssemblerOutput="2"
- AssemblerListingLocation="$(IntDir)/"
- WarningLevel="4"
- DebugInformationFormat="0"
- DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/IGNORE:4089"
- AdditionalDependencies="mpr.lib"
- OutputFile="$(OutDir)/VeraCryptSetup.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- UACExecutionLevel="2"
- DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll"
- GenerateDebugInformation="false"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="Setup.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy Release\VeraCryptSetup.exe &quot;..\Release\Setup Files\VeraCrypt Setup.exe&quot;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\ComSetup.cpp"
- >
- </File>
- <File
- RelativePath=".\ComSetup.rgs"
- >
- </File>
- <File
- RelativePath=".\Dir.c"
- >
- </File>
- <File
- RelativePath=".\SelfExtract.c"
- >
- </File>
- <File
- RelativePath=".\Setup.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Wizard.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Xml.c"
- >
- </File>
- <Filter
- Name="Common"
- >
- <File
- RelativePath="..\Common\BootEncryption.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\Crc.c"
- >
- </File>
- <File
- RelativePath="..\Common\Dictionary.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Dlgcode.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Endian.c"
- >
- </File>
- <File
- RelativePath="..\Common\Inflate.c"
- >
- </File>
- <File
- RelativePath="..\Common\Language.c"
- >
- </File>
- <File
- RelativePath="..\Common\Registry.c"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\Common\Apidrvr.h"
- >
- </File>
- <File
- RelativePath="..\Common\Combo.h"
- >
- </File>
- <File
- RelativePath=".\ComSetup.h"
- >
- </File>
- <File
- RelativePath="..\Common\Crc.h"
- >
- </File>
- <File
- RelativePath=".\Dir.h"
- >
- </File>
- <File
- RelativePath="..\Common\Dlgcode.h"
- >
- </File>
- <File
- RelativePath="..\Common\Exception.h"
- >
- </File>
- <File
- RelativePath="..\Common\Inflate.h"
- >
- </File>
- <File
- RelativePath="..\Common\Language.h"
- >
- </File>
- <File
- RelativePath="..\Common\Registry.h"
- >
- </File>
- <File
- RelativePath="..\Common\Resource.h"
- >
- </File>
- <File
- RelativePath=".\Resource.h"
- >
- </File>
- <File
- RelativePath=".\SelfExtract.h"
- >
- </File>
- <File
- RelativePath=".\Setup.h"
- >
- </File>
- <File
- RelativePath="..\Common\Tcdefs.h"
- >
- </File>
- <File
- RelativePath=".\Wizard.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\Setup.ico"
- >
- </File>
- <File
- RelativePath=".\Setup.manifest"
- >
- </File>
- <File
- RelativePath=".\Setup.rc"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt.ico"
- >
- </File>
- <File
- RelativePath=".\VeraCrypt_setup.bmp"
- >
- </File>
- <File
- RelativePath=".\VeraCrypt_setup_background.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt_Volume.ico"
- >
- </File>
- <Filter
- Name="Common"
- >
- <File
- RelativePath="..\Common\Common.rc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Language.xml"
- >
- </File>
- <File
- RelativePath="..\Resources\Texts\License.rtf"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_288dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_96dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_background.bmp"
- >
- </File>
- </Filter>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/Setup/Setup.vcxproj b/src/Setup/Setup.vcxproj
index 843dc659..a82b967d 100644
--- a/src/Setup/Setup.vcxproj
+++ b/src/Setup/Setup.vcxproj
@@ -4,8 +4,16 @@
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseCustomEFI|Win32">
+ <Configuration>ReleaseCustomEFI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
@@ -13,50 +21,80 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{DF5F654D-BD44-4E31-B92E-B68074DC37A8}</ProjectGuid>
<RootNamespace>Setup</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <ProjectName>Setup</ProjectName>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Debug\Int\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Release\Int\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(ProjectDir)Release\Int\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(ProjectDir)Release\Int\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptSetup</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptSetup</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptSetup</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptSetup</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SETUP;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -68,221 +106,178 @@
<DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcmtd.lib;atls.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Setup.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
</Link>
<Manifest>
<AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>md "..\Debug\Setup Files" 2&gt;NUL:
copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" &gt;NUL:
+
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SETUP;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>atls.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>false</GenerateDebugInformation>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
- <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"</Command>
+ <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe" &amp;&amp; copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt COMReg.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Common\libzip\mkstemp.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add.c" />
- <ClCompile Include="..\Common\libzip\zip_add_dir.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_entry.c" />
- <ClCompile Include="..\Common\libzip\zip_buffer.c" />
- <ClCompile Include="..\Common\libzip\zip_close.c" />
- <ClCompile Include="..\Common\libzip\zip_delete.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dirent.c" />
- <ClCompile Include="..\Common\libzip\zip_dir_add.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_discard.c" />
- <ClCompile Include="..\Common\libzip\zip_entry.c" />
- <ClCompile Include="..\Common\libzip\zip_error.c" />
- <ClCompile Include="..\Common\libzip\zip_error_clear.c" />
- <ClCompile Include="..\Common\libzip\zip_error_get.c" />
- <ClCompile Include="..\Common\libzip\zip_error_get_sys_type.c" />
- <ClCompile Include="..\Common\libzip\zip_error_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_error_to_str.c" />
- <ClCompile Include="..\Common\libzip\zip_err_str.c" />
- <ClCompile Include="..\Common\libzip\zip_extra_field.c" />
- <ClCompile Include="..\Common\libzip\zip_extra_field_api.c" />
- <ClCompile Include="..\Common\libzip\zip_fclose.c" />
- <ClCompile Include="..\Common\libzip\zip_fdopen.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_filerange_crc.c" />
- <ClCompile Include="..\Common\libzip\zip_file_add.c" />
- <ClCompile Include="..\Common\libzip\zip_file_error_clear.c" />
- <ClCompile Include="..\Common\libzip\zip_file_error_get.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_external_attributes.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_offset.c" />
- <ClCompile Include="..\Common\libzip\zip_file_rename.c" />
- <ClCompile Include="..\Common\libzip\zip_file_replace.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_external_attributes.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_mtime.c" />
- <ClCompile Include="..\Common\libzip\zip_file_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_encrypted.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_index.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_index_encrypted.c" />
- <ClCompile Include="..\Common\libzip\zip_fread.c" />
- <ClCompile Include="..\Common\libzip\zip_get_archive_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_get_archive_flag.c" />
- <ClCompile Include="..\Common\libzip\zip_get_compression_implementation.c" />
- <ClCompile Include="..\Common\libzip\zip_get_encryption_implementation.c" />
- <ClCompile Include="..\Common\libzip\zip_get_file_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_get_name.c" />
- <ClCompile Include="..\Common\libzip\zip_get_num_entries.c" />
- <ClCompile Include="..\Common\libzip\zip_get_num_files.c" />
- <ClCompile Include="..\Common\libzip\zip_hash.c" />
- <ClCompile Include="..\Common\libzip\zip_io_util.c" />
- <ClCompile Include="..\Common\libzip\zip_memdup.c" />
- <ClCompile Include="..\Common\libzip\zip_name_locate.c" />
- <ClCompile Include="..\Common\libzip\zip_new.c" />
- <ClCompile Include="..\Common\libzip\zip_open.c" />
- <ClCompile Include="..\Common\libzip\zip_rename.c" />
- <ClCompile Include="..\Common\libzip\zip_replace.c" />
- <ClCompile Include="..\Common\libzip\zip_set_archive_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_set_archive_flag.c" />
- <ClCompile Include="..\Common\libzip\zip_set_default_password.c" />
- <ClCompile Include="..\Common\libzip\zip_set_file_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_set_file_compression.c" />
- <ClCompile Include="..\Common\libzip\zip_set_name.c" />
- <ClCompile Include="..\Common\libzip\zip_source_begin_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_buffer.c" />
- <ClCompile Include="..\Common\libzip\zip_source_call.c" />
- <ClCompile Include="..\Common\libzip\zip_source_close.c" />
- <ClCompile Include="..\Common\libzip\zip_source_commit_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_crc.c" />
- <ClCompile Include="..\Common\libzip\zip_source_deflate.c" />
- <ClCompile Include="..\Common\libzip\zip_source_error.c" />
- <ClCompile Include="..\Common\libzip\zip_source_filep.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_free.c" />
- <ClCompile Include="..\Common\libzip\zip_source_function.c" />
- <ClCompile Include="..\Common\libzip\zip_source_is_deleted.c" />
- <ClCompile Include="..\Common\libzip\zip_source_layered.c" />
- <ClCompile Include="..\Common\libzip\zip_source_open.c" />
- <ClCompile Include="..\Common\libzip\zip_source_pkware.c" />
- <ClCompile Include="..\Common\libzip\zip_source_read.c" />
- <ClCompile Include="..\Common\libzip\zip_source_remove.c" />
- <ClCompile Include="..\Common\libzip\zip_source_rollback_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_seek.c" />
- <ClCompile Include="..\Common\libzip\zip_source_seek_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_stat.c" />
- <ClCompile Include="..\Common\libzip\zip_source_supports.c" />
- <ClCompile Include="..\Common\libzip\zip_source_tell.c" />
- <ClCompile Include="..\Common\libzip\zip_source_tell_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32a.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32handle.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32utf8.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32w.c" />
- <ClCompile Include="..\Common\libzip\zip_source_window.c" />
- <ClCompile Include="..\Common\libzip\zip_source_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_zip.c" />
- <ClCompile Include="..\Common\libzip\zip_source_zip_new.c" />
- <ClCompile Include="..\Common\libzip\zip_stat.c" />
- <ClCompile Include="..\Common\libzip\zip_stat_index.c" />
- <ClCompile Include="..\Common\libzip\zip_stat_init.c" />
- <ClCompile Include="..\Common\libzip\zip_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_string.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_all.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_archive.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_data.c" />
- <ClCompile Include="..\Common\libzip\zip_utf-8.c" />
- <ClCompile Include="..\Common\zlib\adler32.c" />
- <ClCompile Include="..\Common\zlib\compress.c" />
- <ClCompile Include="..\Common\zlib\crc32.c" />
- <ClCompile Include="..\Common\zlib\deflate.c" />
- <ClCompile Include="..\Common\zlib\inffast.c" />
- <ClCompile Include="..\Common\zlib\inflate.c" />
- <ClCompile Include="..\Common\zlib\inftrees.c" />
- <ClCompile Include="..\Common\zlib\trees.c" />
- <ClCompile Include="..\Common\zlib\uncompr.c" />
- <ClCompile Include="..\Common\zlib\zutil.c" />
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
<ClCompile Include="ComSetup.cpp" />
<ClCompile Include="Dir.c" />
<ClCompile Include="SelfExtract.c" />
<ClCompile Include="Setup.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="Wizard.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Xml.c" />
<ClCompile Include="..\Common\BootEncryption.cpp" />
<ClCompile Include="..\Common\Crc.c" />
<ClCompile Include="..\Common\Dictionary.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Dlgcode.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Endian.c" />
<ClCompile Include="..\Common\Language.c" />
<ClCompile Include="..\Common\Registry.c" />
@@ -302,26 +297,8 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" &gt;NUL
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Common\Apidrvr.h" />
<ClInclude Include="..\Common\Combo.h" />
- <ClInclude Include="..\Common\libzip\compat.h" />
- <ClInclude Include="..\Common\libzip\config.h" />
- <ClInclude Include="..\Common\libzip\zconf.h" />
- <ClInclude Include="..\Common\libzip\zip.h" />
- <ClInclude Include="..\Common\libzip\zipint.h" />
- <ClInclude Include="..\Common\libzip\zipwin32.h" />
- <ClInclude Include="..\Common\XUnzip.h" />
- <ClInclude Include="..\Common\XZip.h" />
- <ClInclude Include="..\Common\zlib\crc32.h" />
- <ClInclude Include="..\Common\zlib\deflate.h" />
- <ClInclude Include="..\Common\zlib\inffast.h" />
- <ClInclude Include="..\Common\zlib\inffixed.h" />
- <ClInclude Include="..\Common\zlib\inflate.h" />
- <ClInclude Include="..\Common\zlib\inftrees.h" />
- <ClInclude Include="..\Common\zlib\trees.h" />
- <ClInclude Include="..\Common\zlib\zconf.h" />
- <ClInclude Include="..\Common\zlib\zlib.h" />
- <ClInclude Include="..\Common\zlib\zutil.h" />
<ClInclude Include="ComSetup.h" />
<ClInclude Include="..\Common\Crc.h" />
<ClInclude Include="Dir.h" />
<ClInclude Include="..\Common\Dlgcode.h" />
@@ -343,26 +320,15 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" &gt;NUL
<ResourceCompile Include="Setup.rc" />
<ResourceCompile Include="..\Common\Common.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Boot\Windows\Boot.vcxproj">
- <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj">
- <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Format\Format.vcxproj">
- <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Mount\Mount.vcxproj">
- <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <ProjectReference Include="..\Common\Lzma.vcxproj">
+ <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/src/Setup/Setup.vcxproj.filters b/src/Setup/Setup.vcxproj.filters
index 18728ab8..d747363f 100644
--- a/src/Setup/Setup.vcxproj.filters
+++ b/src/Setup/Setup.vcxproj.filters
@@ -18,14 +18,8 @@
</Filter>
<Filter Include="Resource Files\Common">
<UniqueIdentifier>{a540fb0a-850b-4cb9-85f9-ade0112ebb50}</UniqueIdentifier>
</Filter>
- <Filter Include="Source Files\Common\libzip">
- <UniqueIdentifier>{72792e98-38ea-4b68-a06e-140c3941d057}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\Common\zlib">
- <UniqueIdentifier>{25bed244-7b06-46a3-8912-a3493143f281}</UniqueIdentifier>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ComSetup.cpp">
<Filter>Source Files</Filter>
@@ -56,358 +50,16 @@
</ClCompile>
<ClCompile Include="..\Common\Dlgcode.c">
<Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\Endian.c">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
<ClCompile Include="..\Common\Language.c">
<Filter>Source Files\Common</Filter>
</ClCompile>
<ClCompile Include="..\Common\Registry.c">
<Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\mkstemp.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_dir.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_entry.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_buffer.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_close.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_delete.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dir_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dirent.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_discard.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_entry.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_err_str.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_clear.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_get.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_get_sys_type.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_to_str.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_extra_field.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_extra_field_api.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fclose.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fdopen.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_error_clear.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_error_get.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_external_attributes.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_offset.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_rename.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_replace.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_external_attributes.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_mtime.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_filerange_crc.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_encrypted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_index.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_index_encrypted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fread.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_archive_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_archive_flag.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_compression_implementation.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_encryption_implementation.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_file_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_name.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_num_entries.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_num_files.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_hash.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_io_util.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_memdup.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_name_locate.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_new.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_open.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_rename.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_replace.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_archive_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_archive_flag.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_default_password.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_file_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_file_compression.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_name.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_begin_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_buffer.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_call.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_close.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_commit_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_crc.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_deflate.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_error.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_filep.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_free.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_function.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_is_deleted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_layered.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_open.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_pkware.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_read.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_remove.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_rollback_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_seek.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_seek_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_stat.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_supports.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_tell.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_tell_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32a.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32handle.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32utf8.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32w.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_window.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_zip.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_zip_new.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat_index.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat_init.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_string.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_all.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_archive.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_data.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_utf-8.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\adler32.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\compress.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\crc32.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\deflate.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\inffast.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\inflate.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\inftrees.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\trees.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\uncompr.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\zutil.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\Endian.c">
+ <Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="ComSetup.rgs">
@@ -492,62 +144,8 @@
</ClInclude>
<ClInclude Include="Wizard.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\XZip.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\XUnzip.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\compat.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\config.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zconf.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zip.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zipint.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zipwin32.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\crc32.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\deflate.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inffast.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inffixed.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inflate.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inftrees.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\trees.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\zconf.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\zlib.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\zutil.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<Manifest Include="Setup.manifest">
<Filter>Resource Files</Filter>
diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c
index f6bb70a4..abf76f69 100644
--- a/src/Setup/Wizard.c
+++ b/src/Setup/Wizard.c
@@ -5,15 +5,16 @@
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 all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages. */
#include "Tcdefs.h"
#include <Shlobj.h>
+#include <Richedit.h>
#include <io.h>
#include <stdio.h>
#include <time.h>
#include "SelfExtract.h"
@@ -22,28 +23,31 @@
#include "Language.h"
#include "Common/Resource.h"
#include "Resource.h"
#include "Setup.h"
+#include "Registry.h"
#include <tchar.h>
#include <Strsafe.h>
using namespace std;
enum wizard_pages
{
INTRO_PAGE,
+#ifndef PORTABLE
WIZARD_MODE_PAGE,
INSTALL_OPTIONS_PAGE,
INSTALL_PROGRESS_PAGE,
+#endif
EXTRACTION_OPTIONS_PAGE,
EXTRACTION_PROGRESS_PAGE,
DONATIONS_PAGE
};
HWND hCurPage = NULL; /* Handle to current wizard page */
int nCurPageNo = -1; /* The current wizard page */
-wchar_t WizardDestInstallPath [TC_MAX_PATH];
-wchar_t WizardDestExtractPath [TC_MAX_PATH];
+wchar_t WizardDestInstallPath [TC_MAX_PATH] = { 0 };
+wchar_t WizardDestExtractPath [TC_MAX_PATH] = { 0 };
wchar_t SelfFile [TC_MAX_PATH];
HBITMAP hbmWizardBitmapRescaled = NULL;
@@ -55,8 +59,11 @@ BOOL bStartInstall = FALSE;
BOOL bStartExtraction = FALSE;
BOOL bInProgress = FALSE;
BOOL bPromptTutorial = FALSE;
BOOL bPromptReleaseNotes = FALSE;
+BOOL bPromptFastStartup = FALSE;
+
+extern BOOL bUserSetLanguage;
int nPbar = 0; /* Control ID of progress bar */
static HFONT hDonTextFont;
@@ -124,8 +131,9 @@ void LoadPage (HWND hwndDlg, int nPageNo)
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_INTRO_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
+#ifndef PORTABLE
case WIZARD_MODE_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_WIZARD_MODE_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
@@ -138,8 +146,9 @@ void LoadPage (HWND hwndDlg, int nPageNo)
case INSTALL_PROGRESS_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_PROGRESS_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
break;
+#endif
case EXTRACTION_OPTIONS_PAGE:
hCurPage = CreateDialogW (hInst, MAKEINTRESOURCEW (IDD_EXTRACTION_OPTIONS_PAGE_DLG), hwndDlg,
(DLGPROC) PageDialogProc);
@@ -202,8 +211,9 @@ static int GetDonVal (int minVal, int maxVal)
not. - see DialogProc */
BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static char PageDebugId[128];
+ static HWND hDisableMemProtectionTooltipWnd = NULL;
WORD lw = LOWORD (wParam);
WORD hw = HIWORD (wParam);
hCurPage = hwndDlg;
@@ -221,12 +231,26 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case INTRO_PAGE:
{
char *licenseText = NULL;
+#ifdef PORTABLE
+ bExtractOnly = TRUE;
+#endif
+
+ // increase size limit of rich edit control
+ SendMessage (GetDlgItem (hwndDlg, IDC_LICENSE_TEXT), EM_EXLIMITTEXT, 0, -1);
+ // Left margin for license text
+ SendMessage (GetDlgItem (hwndDlg, IDC_LICENSE_TEXT), EM_SETMARGINS, (WPARAM) EC_LEFTMARGIN, (LPARAM) CompensateXDPI (4));
+
licenseText = GetLegalNotices ();
if (licenseText != NULL)
{
- SetWindowTextA (GetDlgItem (hwndDlg, IDC_LICENSE_TEXT), licenseText);
+ SETTEXTEX TextInfo = {0};
+
+ TextInfo.flags = ST_SELECTION;
+ TextInfo.codepage = CP_ACP;
+
+ SendMessage(GetDlgItem (hwndDlg, IDC_LICENSE_TEXT), EM_SETTEXTEX, (WPARAM)&TextInfo, (LPARAM)licenseText);
free (licenseText);
}
else
{
@@ -257,14 +281,12 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), bLicenseAccepted);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDHELP), bLicenseAccepted);
-
- // Left margin for license text
- SendMessage (GetDlgItem (hwndDlg, IDC_LICENSE_TEXT), EM_SETMARGINS, (WPARAM) EC_LEFTMARGIN, (LPARAM) CompensateXDPI (4));
}
return 1;
+#ifndef PORTABLE
case WIZARD_MODE_PAGE:
{
LONG driverVersion;
@@ -301,8 +323,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
}
return 1;
+#endif
case EXTRACTION_OPTIONS_PAGE:
if (wcslen(WizardDestExtractPath) < 2)
@@ -373,8 +396,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
return 1;
+#ifndef PORTABLE
case INSTALL_OPTIONS_PAGE:
{
LONG driverVersion;
@@ -415,11 +439,18 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetCheckBox (hwndDlg, IDC_SYSTEM_RESTORE, FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_SYSTEM_RESTORE), FALSE);
}
+ hDisableMemProtectionTooltipWnd = CreateToolTip (IDC_DISABLE_MEMORY_PROTECTION, hwndDlg, "DISABLE_MEMORY_PROTECTION_WARNING");
+ // make IDC_DISABLE_MEMORY_PROTECTION control fit the text so that the tooltip is shown only when mouse is over the text
+ AccommodateCheckBoxTextWidth(hwndDlg, IDC_DISABLE_MEMORY_PROTECTION);
+ // make the help button adjacent to the checkbox
+ MakeControlsContiguous(hwndDlg, IDC_DISABLE_MEMORY_PROTECTION, IDC_DISABLE_MEMORY_PROTECTION_HELP);
+
SetCheckBox (hwndDlg, IDC_ALL_USERS, bForAllUsers);
SetCheckBox (hwndDlg, IDC_FILE_TYPE, bRegisterFileExt);
SetCheckBox (hwndDlg, IDC_PROG_GROUP, bAddToStartMenu);
+ SetCheckBox (hwndDlg, IDC_DISABLE_MEMORY_PROTECTION, bDisableMemoryProtection);
SetCheckBox (hwndDlg, IDC_DESKTOP_ICON, bDesktopIcon);
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString (bUpgrade ? "UPGRADE" : "INSTALL"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
@@ -476,8 +507,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
return 1;
+#endif
case DONATIONS_PAGE:
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bExtractOnly ? "EXTRACTION_FINISHED_TITLE_DON" : (bUpgrade ? "SETUP_FINISHED_UPGRADE_TITLE_DON" : "SETUP_FINISHED_TITLE_DON")));
@@ -591,9 +623,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), IsButtonChecked (GetDlgItem (hwndDlg, IDC_AGREE)));
return 1;
}
-
+#ifndef PORTABLE
if (lw == IDC_WIZARD_MODE_EXTRACT_ONLY && nCurPageNo == WIZARD_MODE_PAGE)
{
bExtractOnly = TRUE;
return 1;
@@ -603,27 +635,27 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
bExtractOnly = FALSE;
return 1;
}
-
+#endif
if ( nCurPageNo == EXTRACTION_OPTIONS_PAGE && hw == EN_CHANGE )
{
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), (GetWindowTextLength (GetDlgItem (hCurPage, IDC_DESTINATION)) > 1));
return 1;
}
-
+#ifndef PORTABLE
if ( nCurPageNo == INSTALL_OPTIONS_PAGE && hw == EN_CHANGE )
{
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), (GetWindowTextLength (GetDlgItem (hCurPage, IDC_DESTINATION)) > 1));
return 1;
}
-
+#endif
if ( nCurPageNo == EXTRACTION_OPTIONS_PAGE )
{
switch (lw)
{
case IDC_BROWSE:
- if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestExtractPath))
+ if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestExtractPath, WizardDestExtractPath))
{
if (WizardDestExtractPath [wcslen(WizardDestExtractPath)-1] != L'\\')
{
StringCbCatW (WizardDestExtractPath, sizeof(WizardDestExtractPath), L"\\");
@@ -636,15 +668,15 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bOpenContainingFolder = IsButtonChecked (GetDlgItem (hCurPage, IDC_OPEN_CONTAINING_FOLDER));
return 1;
}
}
-
+#ifndef PORTABLE
if ( nCurPageNo == INSTALL_OPTIONS_PAGE )
{
switch (lw)
{
case IDC_BROWSE:
- if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestInstallPath))
+ if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestInstallPath, WizardDestInstallPath))
{
if (WizardDestInstallPath [wcslen(WizardDestInstallPath)-1] != L'\\')
{
StringCbCatW (WizardDestInstallPath, sizeof(WizardDestInstallPath), L"\\");
@@ -660,8 +692,20 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case IDC_ALL_USERS:
bForAllUsers = IsButtonChecked (GetDlgItem (hCurPage, IDC_ALL_USERS));
return 1;
+ case IDC_DISABLE_MEMORY_PROTECTION:
+ bDisableMemoryProtection = IsButtonChecked (GetDlgItem (hCurPage, IDC_DISABLE_MEMORY_PROTECTION));
+ if (bDisableMemoryProtection)
+ {
+ Warning ("DISABLE_MEMORY_PROTECTION_WARNING", hwndDlg);
+ }
+ return 1;
+
+ case IDC_DISABLE_MEMORY_PROTECTION_HELP:
+ Applink("memoryprotection");
+ return 1;
+
case IDC_FILE_TYPE:
bRegisterFileExt = IsButtonChecked (GetDlgItem (hCurPage, IDC_FILE_TYPE));
return 1;
@@ -674,20 +718,16 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
}
}
-
+#endif
if (nCurPageNo == DONATIONS_PAGE)
{
switch (lw)
{
case IDC_DONATE:
{
- char tmpstr [200];
-
- StringCbPrintfA (tmpstr, sizeof(tmpstr), "&ref=%d", DonColorSchemeId);
-
- Applink ("donate", FALSE, tmpstr);
+ Applink ("donate");
}
return 1;
}
}
@@ -739,8 +779,18 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
ReleaseDC (hCurPage, hdc);
}
return 0;
+ case WM_DESTROY:
+
+ if (hDisableMemProtectionTooltipWnd != NULL)
+ {
+ DestroyWindow (hDisableMemProtectionTooltipWnd);
+ hDisableMemProtectionTooltipWnd = NULL;
+ }
+
+ break;
+
}
return 0;
}
@@ -824,13 +874,19 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
nPbar = IDC_PROGRESS_BAR;
SendMessage (GetDlgItem (hwndDlg, IDC_BOX_TITLE), WM_SETFONT, (WPARAM) hUserBoldFont, (LPARAM) TRUE);
-
- SetWindowText (hwndDlg, L"VeraCrypt Setup " _T(VERSION_STRING));
+#ifndef PORTABLE
+ SetWindowText (hwndDlg, L"VeraCrypt Setup " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX));
+#else
+ SetWindowText (hwndDlg, L"VeraCrypt Portable " _T(VERSION_STRING) _T(VERSION_STRING_SUFFIX));
+#endif
DonColorSchemeId = GetDonVal (2, 9);
+ // get the initial value of bDisableMemoryProtection by reading the registry
+ bDisableMemoryProtection = bOriginalDisableMemoryProtection = ReadMemoryProtectionConfig()? FALSE : TRUE;
+
if (bDevm)
{
InitWizardDestInstallPath ();
bSystemRestore = FALSE;
@@ -838,9 +894,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bAddToStartMenu = FALSE;
bDesktopIcon = TRUE;
bLicenseAccepted = TRUE;
bStartInstall = TRUE;
+#ifdef PORTABLE
+ bExtractOnly = TRUE;
+ LoadPage (hwndDlg, EXTRACTION_PROGRESS_PAGE);
+#else
LoadPage (hwndDlg, INSTALL_PROGRESS_PAGE);
+#endif
}
else
LoadPage (hwndDlg, INTRO_PAGE);
@@ -887,26 +948,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
}
bLicenseAccepted = TRUE;
EnableWindow (GetDlgItem (hwndDlg, IDHELP), TRUE);
-
- if (nCurrentOS == WIN_2000)
- {
- WarningDirect (L"Warning: Please note that this may be the last version of VeraCrypt that supports Windows 2000. If you want to be able to upgrade to future versions of VeraCrypt (which is highly recommended), you will need to upgrade to Windows XP or a later version of Windows.\n\nNote: Microsoft stopped issuing security updates for Windows 2000 to the general public on 7/13/2010 (the last non-security update for Windows 2000 was issued to the general public in 2005).", hwndDlg);
-
-
- HKEY hkey;
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Updates\\Windows 2000\\SP5\\Update Rollup 1", 0, KEY_READ, &hkey) != ERROR_SUCCESS)
- {
- ErrorDirect (L"VeraCrypt requires Update Rollup 1 for Windows 2000 SP4 to be installed.\n\nFor more information, see http://support.microsoft.com/kb/891861", hwndDlg);
- AbortProcessSilent ();
- }
-
- RegCloseKey (hkey);
- }
}
-
+#ifndef PORTABLE
else if (nCurPageNo == WIZARD_MODE_PAGE)
{
if (IsButtonChecked (GetDlgItem (hCurPage, IDC_WIZARD_MODE_EXTRACT_ONLY)))
{
@@ -920,17 +965,24 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bExtractOnly = TRUE;
nCurPageNo = EXTRACTION_OPTIONS_PAGE - 1;
}
+#ifdef VC_EFI_CUSTOM_MODE
+ else if (bUpgrade && !CheckSecureBootCompatibility (hwndDlg))
+ {
+ WarningDirect(L"This installer version supports only custom EFI SecureBoot.\nPlease use regular installer to update your system", hwndDlg);
+ return 1;
+ }
+#endif
}
-
+#endif
else if (nCurPageNo == EXTRACTION_OPTIONS_PAGE)
{
GetWindowText (GetDlgItem (hCurPage, IDC_DESTINATION), WizardDestExtractPath, ARRAYSIZE (WizardDestExtractPath));
bStartExtraction = TRUE;
}
-
+#ifndef PORTABLE
else if (nCurPageNo == INSTALL_OPTIONS_PAGE)
{
GetWindowText (GetDlgItem (hCurPage, IDC_DESTINATION), WizardDestInstallPath, ARRAYSIZE (WizardDestInstallPath));
@@ -941,9 +993,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
PostMessage (hwndDlg, WM_CLOSE, 0, 0);
return 1;
}
-
+#endif
else if (nCurPageNo == EXTRACTION_PROGRESS_PAGE)
{
PostMessage (hwndDlg, WM_CLOSE, 0, 0);
return 1;
@@ -964,24 +1016,27 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if (lw == IDC_PREV)
{
+#ifndef PORTABLE
if (nCurPageNo == WIZARD_MODE_PAGE)
{
bExtractOnly = IsButtonChecked (GetDlgItem (hCurPage, IDC_WIZARD_MODE_EXTRACT_ONLY));
- }
-
- else if (nCurPageNo == EXTRACTION_OPTIONS_PAGE)
+ } else
+#endif
+ if (nCurPageNo == EXTRACTION_OPTIONS_PAGE)
{
GetWindowText (GetDlgItem (hCurPage, IDC_DESTINATION), WizardDestExtractPath, ARRAYSIZE (WizardDestExtractPath));
+#ifndef PORTABLE
nCurPageNo = WIZARD_MODE_PAGE + 1;
+#endif
}
-
+#ifndef PORTABLE
else if (nCurPageNo == INSTALL_OPTIONS_PAGE)
{
GetWindowText (GetDlgItem (hCurPage, IDC_DESTINATION), WizardDestInstallPath, ARRAYSIZE (WizardDestInstallPath));
}
-
+#endif
LoadPage (hwndDlg, --nCurPageNo);
return 1;
}
@@ -1041,8 +1096,16 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case TC_APPMSG_INSTALL_SUCCESS:
/* Installation completed successfully */
+ /* if user selected a language, use for GUI in the next run */
+ if (bUserSetLanguage)
+ {
+ WCHAR langId[6];
+ MultiByteToWideChar (CP_ACP, 0, GetPreferredLangId(), -1, langId, ARRAYSIZE (langId));
+ WriteRegistryString (L"Software\\VeraCrypt", L"SetupUILanguage", langId);
+ }
+
bInProgress = FALSE;
nCurPageNo = DONATIONS_PAGE;
LoadPage (hwndDlg, DONATIONS_PAGE);
@@ -1159,22 +1222,31 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
if (bPromptReleaseNotes
&& AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES", hwndDlg) == IDYES)
{
- Applink ("releasenotes", TRUE, "");
+ Applink ("releasenotes");
}
bPromptReleaseNotes = FALSE;
if (bPromptTutorial
&& AskYesNo ("AFTER_INSTALL_TUTORIAL", hwndDlg) == IDYES)
{
- Applink ("beginnerstutorial", TRUE, "");
+ Applink ("beginnerstutorial");
}
bPromptTutorial = FALSE;
}
+ if (bPromptFastStartup
+ && AskWarnYesNo ("CONFIRM_DISABLE_FAST_STARTUP", hwndDlg) == IDYES)
+ {
+ WriteLocalMachineRegistryDword (L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0);
+ bRestartRequired = TRUE;
+ }
+
+ bPromptFastStartup = FALSE;
+
if (bRestartRequired
&& AskYesNo (bUpgrade ? "UPGRADE_OK_REBOOT_REQUIRED" : "CONFIRM_RESTART", hwndDlg) == IDYES)
{
RestartComputer(FALSE);
diff --git a/src/Setup/Wizard.h b/src/Setup/Wizard.h
index f52e32d6..40ff0353 100644
--- a/src/Setup/Wizard.h
+++ b/src/Setup/Wizard.h
@@ -5,9 +5,9 @@
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 all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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
code distribution packages. */
@@ -24,8 +24,9 @@ BOOL CALLBACK PageDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM
BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
extern BOOL bPromptTutorial;
extern BOOL bPromptReleaseNotes;
+extern BOOL bPromptFastStartup;
#ifdef __cplusplus
}
#endif