VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Build
diff options
context:
space:
mode:
Diffstat (limited to 'src/Build')
-rw-r--r--src/Build/CMakeLists.txt316
-rw-r--r--src/Build/Include/Makefile.inc12
-rw-r--r--src/Build/Packaging/debian-control/prerm9
-rw-r--r--src/Build/Packaging/rpm-control/prerm.sh9
-rw-r--r--src/Build/Resources/MacOSX/Info.plist.legacy.xml106
-rw-r--r--src/Build/Resources/MacOSX/Info.plist.xml10
-rwxr-xr-xsrc/Build/build_cmake_deb.sh43
-rw-r--r--src/Build/build_cmake_opensuse.sh71
-rw-r--r--src/Build/build_cmake_rpm_gtk2.sh69
-rw-r--r--src/Build/build_cmake_rpm_gtk3.sh69
-rwxr-xr-xsrc/Build/build_veracrypt_macosx.sh20
-rwxr-xr-xsrc/Build/build_veracrypt_macosx_legacy.sh33
12 files changed, 745 insertions, 22 deletions
diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt
new file mode 100644
index 0000000..47a1547
--- /dev/null
+++ b/src/Build/CMakeLists.txt
@@ -0,0 +1,316 @@
+# - Minimum CMake version
+cmake_minimum_required(VERSION 2.8.0)
+
+# - Obligatory parameters
+# -DVERACRYPT_BUILD_DIR : folder that contains 'usr' folder
+# -DNOGUI : TRUE if building 'Console' version, 'FALSE' if building 'GUI' version
+if ( NOT DEFINED VERACRYPT_BUILD_DIR )
+ MESSAGE(FATAL_ERROR "VERACRYPT_BUILD_DIR variable MUST BE set to the path of the folder which contains 'usr' folder")
+elseif ( NOT DEFINED NOGUI )
+ MESSAGE(FATAL_ERROR "NOGUI variable MUST BE set to TRUE if building 'Console' version, 'FALSE' otherwise")
+endif()
+
+# - Set version of the package
+set( FULL_VERSION "1.24-Update2" )
+set( VERSION "1.24.9" )
+set( RELEASE "1" )
+
+# - Set PROJECT_NAME and CONFLICT_PACKAGE values
+if (NOGUI)
+ set( PROJECT_NAME "veracrypt-console" )
+ set( CONFLICT_PACKAGE "veracrypt" )
+else()
+ set( PROJECT_NAME "veracrypt" )
+ set( CONFLICT_PACKAGE "veracrypt-console" )
+endif()
+project(${PROJECT_NAME})
+
+# - Check whether 'Tcdefs.h' and 'License.txt' exist
+if(NOT EXISTS "$ENV{SOURCEPATH}/Common/Tcdefs.h")
+ MESSAGE(FATAL_ERROR "Tcdefs.h does not exist.")
+elseif(NOT EXISTS "$ENV{SOURCEPATH}/License.txt")
+ MESSAGE(FATAL_ERROR "License.txt does not exist.")
+endif()
+
+# - Detect build system bitness
+# The following variable will be set
+# $SUFFIX 32 64
+# $CMAKE_SYSTEM_NAME Windows Linux Darwin
+# N.B :
+# To build for 32-bit under 64-bit, set 'CMAKE_SIZEOF_VOID_P' to '4'
+if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+
+ # Build System is under 64-bit arch
+ set (SUFFIX "64")
+ MESSAGE(STATUS "Build System = ${CMAKE_SYSTEM_NAME} - Bitness : 64-bit - Compiler : ${CMAKE_CXX_COMPILER_ID}")
+
+elseif( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+
+ # Build System is under 32-bit arch
+ set (SUFFIX "32")
+ MESSAGE(STATUS "Build System = ${CMAKE_SYSTEM_NAME} - Bitness : 32-bit - Compiler : ${CMAKE_CXX_COMPILER_ID}")
+
+else( )
+
+ MESSAGE(FATAL_ERROR "Could not detect system bitness")
+
+endif( )
+
+# - Detect OSX, CentOS, Debian, Ubuntu or openSUSE platform of the build system
+# The following variable(s) will be set
+# $PLATFORM Debian Ubuntu CentOS openSUSE (TODO)
+# $PLATFORM_VERSION
+# 9.x 16.04 7.X 42.3
+# 10.X 18.04 8.X 15.0
+# ... ... ... ...
+# $DISTRO_NAME ${PLATFORM}-${PLATFORM_VERSION}
+if ( UNIX )
+
+ # /etc/debian_version exists for both Debian and Ubuntu
+ if(EXISTS "/etc/debian_version")
+
+ set ( PLATFORM "Debian" )
+
+ # Read lsb-release to get flavour name and flavour release version (only supported one for now is Ubuntu)
+ if(EXISTS "/etc/lsb-release")
+
+ file(READ "/etc/lsb-release" LSB_RELEASE_ID)
+ string(REGEX MATCH "DISTRIB_ID=([a-zA-Z0-9 /\\.]+)" _ ${LSB_RELEASE_ID})
+ set(FULL_FLAVOUR ${CMAKE_MATCH_1})
+
+ if (FULL_FLAVOUR MATCHES "^.*Ubuntu.*$")
+
+ set ( PLATFORM "Ubuntu" )
+
+ file(READ "/etc/lsb-release" UBUNTU_RELEASE)
+ string(REGEX MATCH "DISTRIB_RELEASE=([0-9 /\\.]+)" _ ${UBUNTU_RELEASE})
+ set(PLATFORM_VERSION ${CMAKE_MATCH_1})
+
+ else()
+
+ file(READ "/etc/debian_version" DEBIAN_RELEASE)
+ string(REGEX MATCH "([0-9]+\\.[0-9]+)" _ ${DEBIAN_RELEASE})
+ set(PLATFORM_VERSION ${CMAKE_MATCH_1})
+
+ endif()
+
+ # Get debian release version
+ elseif(EXISTS "/etc/debian_version")
+
+ file(READ "/etc/debian_version" DEBIAN_RELEASE)
+ string(REGEX MATCH "([0-9]+\\.[0-9]+)" _ ${DEBIAN_RELEASE})
+ set(PLATFORM_VERSION ${CMAKE_MATCH_1})
+
+ endif()
+
+ # Get centos release version
+ elseif(EXISTS "/etc/centos-release")
+
+ set ( PLATFORM "CentOS" )
+
+ file(READ "/etc/centos-release" CENTOS_RELEASE)
+ string(REGEX MATCH "release ([0-9 /\\.]+)" _ ${CENTOS_RELEASE})
+ set(PLATFORM_VERSION ${CMAKE_MATCH_1})
+
+ # Only if distribution uses systemd and if all previous files didn't exist
+ # i.e OpenSUSE
+ elseif(EXISTS "/etc/os-release")
+
+ file(READ "/etc/os-release" OS_RELEASE_NAME)
+ string(REGEX MATCH "NAME=\"([a-zA-Z0-9 /\\.]+)\"" _ ${OS_RELEASE_NAME})
+ set(FULL_PLATFORM ${CMAKE_MATCH_1})
+
+ if (FULL_PLATFORM MATCHES "^.*openSUSE.*$")
+ set ( PLATFORM "openSUSE" )
+ elseif ( FULL_PLATFORM MATCHES "^.*Ubuntu.*$")
+ set ( PLATFORM "Ubuntu" )
+ elseif ( FULL_PLATFORM MATCHES "^.*Debian.*$")
+ set ( PLATFORM "Debian" )
+ elseif ( FULL_PLATFORM MATCHES "^.*CentOS.*$" )
+ set ( PLATFORM "CentOS" )
+ endif ( )
+
+ # Get ditribution release version
+ file(READ "/etc/os-release" OS_RELEASE)
+ string(REGEX MATCH "VERSION=\"([a-zA-Z0-9 /\\.]+)\"" _ ${OS_RELEASE})
+ set(PLATFORM_VERSION ${CMAKE_MATCH_1})
+
+ endif()
+
+endif ( )
+string(REGEX REPLACE " $" "" PLATFORM_VERSION "${PLATFORM_VERSION}") # Trim the last trailing whitespace
+set ( DISTRO_NAME ${PLATFORM}-${PLATFORM_VERSION} )
+MESSAGE ( STATUS "Platform = ${PLATFORM}" )
+MESSAGE ( STATUS "Platform Version = ${PLATFORM_VERSION}" )
+MESSAGE ( STATUS "Distribution name = ${DISTRO_NAME}" )
+
+# - Detect the architecture under OSX, Debian, CentOS and OpenSUSE platforms
+# The following variable will be set
+# $ARCHITECTURE
+if ( PLATFORM STREQUAL "Debian" OR PLATFORM STREQUAL "Ubuntu" )
+
+ # There is no such thing as i686 architecture on debian, i386 is to be used instead
+ # dpkg --print-architecture
+ find_program(DPKG_CMD dpkg)
+ if(NOT DPKG_CMD)
+ # Cannot find dpkg in path
+ # Try best guess following SUFFIX value calculated from CMAKE_SIZEOF_VOID_P
+ if (SUFFIX STREQUAL "32")
+ SET(ARCHITECTURE i386)
+ elseif (SUFFIX STREQUAL "64")
+ SET(ARCHITECTURE amd64)
+ endif()
+ else( )
+ execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif( )
+
+elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) )
+
+ execute_process(COMMAND arch OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+else ()
+
+ MESSAGE(FATAL_ERROR "Unrecognized / unsupported distribution")
+
+endif ( )
+MESSAGE ( STATUS "Architecture = ${ARCHITECTURE}" )
+
+# - Create installation folder directory at install time
+# This won't lead to the files being actually installed (in CMAKE_INSTALL_PREFIX)
+# unless "cmake --build . --target install" is executed, which is not the case here.
+#
+# Doing things like the following
+# - install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr DESTINATION /)
+# - install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr/bin DESTINATION /usr)
+# lead to conflicts despite the usage of CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
+# because install() forces CpackRPM to create the DESTINATION folders.
+#
+# We fix this by installing ALL directories inside '/usr' in '.', and setting
+# CPACK_PACKAGING_INSTALL_PREFIX to '/usr'.
+# This way, during the packaging, 'bin' and 'share' folders will be installed
+# inside '${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages/<system_name>/DEB,RPM/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGING_INSTALL_PREFIX}'.
+#
+# Also, we use USE_SOURCE_PERMISSIONS to save the permissions
+install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr/bin
+ DESTINATION .
+ USE_SOURCE_PERMISSIONS)
+install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr/share
+ DESTINATION .
+ USE_SOURCE_PERMISSIONS)
+set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+
+# For packaging
+# CPack will first install into ${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages/<system_name>/DEB,RPM/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGING_INSTALL_PREFIX}
+# See https://gitlab.kitware.com/cmake/community/wikis/doc/cpack/PackageGenerators
+# See https://cmake.org/cmake/help/latest/cpack_gen/deb.html
+# See https://cmake.org/cmake/help/latest/cpack_gen/rpm.html
+#
+
+# Installation scripts should be provided in this order
+# PREINST;POSTINST;PRERM;POSTRM
+
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Packaging) # creates the Packaging directory under build directory when CMake generates the build system
+
+set( VENDOR "IDRIX" )
+set( LICENSE "VeraCrypt License" )
+set( CONTACT "VeraCrypt Team <veracrypt@idrix.fr>" )
+set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Disk encryption with strong security based on TrueCrypt." )
+set( CPACK_PACKAGE_DESCRIPTION "This package contains binaries for VeraCrypt, a disk encryption with strong security based on TrueCrypt." )
+set( CPACK_PACKAGE_NAME ${PROJECT_NAME} )
+set( CPACK_PACKAGE_VERSION ${VERSION} )
+set( CPACK_PACKAGE_RELEASE ${RELEASE} )
+set( CPACK_PACKAGE_VENDOR ${VENDOR} )
+set( CPACK_PACKAGE_LICENSE ${LICENSE} )
+set( CPACK_RESOURCE_FILE_LICENSE "$ENV{SOURCEPATH}/License.txt")
+set( CPACK_PACKAGE_CONTACT ${CONTACT} )
+set( CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${FULL_VERSION}-${DISTRO_NAME}-${ARCHITECTURE} )
+set( CPACK_PACKAGE_CHECKSUM SHA256 )
+set( CPACK_PACKAGE_RELOCATABLE "OFF") # Disable package relocation (especially for rpm)
+set( CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Packaging )
+
+if ( ( PLATFORM STREQUAL "Debian" ) OR ( PLATFORM STREQUAL "Ubuntu" ) )
+
+ # Debian control script(s)
+ file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Packaging/debian-control)
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Packaging/debian-control/prerm ${CMAKE_CURRENT_BINARY_DIR}/Packaging/debian-control/prerm)
+ set( DEBIAN_PRERM ${CMAKE_CURRENT_BINARY_DIR}/Packaging/debian-control/prerm)
+
+ set( CPACK_GENERATOR "DEB" ) # mandatory
+ set( CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME} ) # mandatory
+ set( CPACK_DEBIAN_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.deb ) # mandatory
+ set( CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION} ) # mandatory
+ set( CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE} )
+ set( CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE} ) # mandatory
+
+ # Link against gtk3 version of wxWidgets if >= Debian 10 or >= Ubuntu 18.04
+ # Otherwise, link against gtk2 version of wxWidgets
+ if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) )
+ OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "18.04" ) ) )
+
+ set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libfuse2, dmsetup, sudo" )
+
+ else ()
+
+ set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-0v5, libfuse2, dmsetup, sudo" )
+
+ endif()
+
+ set( CPACK_DEBIAN_PACKAGE_MAINTAINER ${CONTACT} ) # mandatory
+ set( CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} ) # mandatory
+ set( CPACK_DEBIAN_ARCHIVE_TYPE "gnutar") # mandatory
+ set( CPACK_DEBIAN_COMPRESSION_TYPE "gzip") # mandatory
+ set( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" ) # mandatory
+ set( CPACK_DEBIAN_PACKAGE_SECTION "libs" ) # recommended, Section relative to Debian sections (https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections)
+ set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${DEBIAN_PREINST};${DEBIAN_POSTINST};${DEBIAN_PRERM};${DEBIAN_POSTRM})
+ set(CPACK_DEBIAN_PACKAGE_CONFLICTS "${CONFLICT_PACKAGE}")
+
+elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) )
+
+ # RPM control script(s)
+ file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control)
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Packaging/rpm-control/prerm.sh ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control/prerm.sh)
+ set( RPM_PRERM ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control/prerm.sh)
+
+ set( CPACK_GENERATOR "RPM" ) # mandatory
+ set( CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY} ) # mandatory
+ set( CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION} ) # mandatory
+ set( CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME} ) # mandatory
+ set( CPACK_RPM_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.rpm ) # mandatory
+ set( CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION} ) # mandatory
+ set( CPACK_RPM_PACKAGE_ARCHITECTURE ${ARCHITECTURE} ) # mandatory
+ set( CPACK_RPM_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE} ) # mandatory
+ set( CPACK_RPM_PACKAGE_LICENSE ${CPACK_PACKAGE_LICENSE} ) # mandatory
+ set( CPACK_RPM_PACKAGE_GROUP "Applications/System" ) # mandatory, https://fedoraproject.org/wiki/RPMGroups
+ set( CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR} ) # mandatory
+ set( CPACK_RPM_PACKAGE_AUTOREQ "no" ) # disable automatic shared libraries dependency detection (most of the time buggy)
+
+ if ( PLATFORM STREQUAL "CentOS" )
+
+ if ( DEFINED WITHGTK3 AND WITHGTK3 )
+ set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo" )
+ else ()
+ set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" )
+ endif()
+
+ elseif ( PLATFORM STREQUAL "openSUSE" )
+
+ set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" )
+ endif()
+
+ set( CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${RPM_PRERM}) # optional
+
+ # Prevents CPack from generating file conflicts
+ # This is to avoid having %dir of these directories in the .spec file
+ set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/bin" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/applications" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/doc" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/pixmaps" )
+
+ set( CPACK_RPM_PACKAGE_RELOCATABLE "OFF" )
+ set( CPACK_RPM_PACKAGE_CONFLICTS "${CONFLICT_PACKAGE}")
+
+endif()
+
+include(CPack)
diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc
index b39021d..ba166b6 100644
--- a/src/Build/Include/Makefile.inc
+++ b/src/Build/Include/Makefile.inc
@@ -14,12 +14,16 @@ $(NAME): $(NAME).a
clean:
@echo Cleaning $(NAME)
- rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJS:.o=.d) *.gch
+ rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJSNOOPT) $(OBJS:.o=.d) $(OBJSEX:.oo=.d) $(OBJSNOOPT:.o0=.d) *.gch
%.o: %.c
@echo Compiling $(<F)
$(CC) $(CFLAGS) -c $< -o $@
+%.o0: %.c
+ @echo Compiling $(<F)
+ $(CC) $(CFLAGS) -O0 -c $< -o $@
+
%.o: %.cpp
@echo Compiling $(<F)
$(CXX) $(CXXFLAGS) -c $< -o $@
@@ -64,10 +68,10 @@ TR_SED_BIN := tr '\n' ' ' | tr -s ' ' ',' | sed -e 's/^,//g' -e 's/,$$/n/' | tr
# Dependencies
--include $(OBJS:.o=.d) $(OBJSEX:.oo=.d)
+-include $(OBJS:.o=.d) $(OBJSEX:.oo=.d) $(OBJSNOOPT:.o0=.d)
-$(NAME).a: $(OBJS) $(OBJSEX)
+$(NAME).a: $(OBJS) $(OBJSEX) $(OBJSNOOPT)
@echo Updating library $@
- $(AR) $(AFLAGS) -rcu $@ $(OBJS) $(OBJSEX)
+ $(AR) $(AFLAGS) -rcu $@ $(OBJS) $(OBJSEX) $(OBJSNOOPT)
$(RANLIB) $@
diff --git a/src/Build/Packaging/debian-control/prerm b/src/Build/Packaging/debian-control/prerm
new file mode 100644
index 0000000..d2e3894
--- /dev/null
+++ b/src/Build/Packaging/debian-control/prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+V="$(mount | grep veracrypt_aux_mnt)"
+if [ ! -z "$V" ]
+then
+ echo "Error: All VeraCrypt volumes must be dismounted first." >&2
+ exit 1
+else
+ exit 0
+fi \ No newline at end of file
diff --git a/src/Build/Packaging/rpm-control/prerm.sh b/src/Build/Packaging/rpm-control/prerm.sh
new file mode 100644
index 0000000..d2e3894
--- /dev/null
+++ b/src/Build/Packaging/rpm-control/prerm.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+V="$(mount | grep veracrypt_aux_mnt)"
+if [ ! -z "$V" ]
+then
+ echo "Error: All VeraCrypt volumes must be dismounted first." >&2
+ exit 1
+else
+ exit 0
+fi \ No newline at end of file
diff --git a/src/Build/Resources/MacOSX/Info.plist.legacy.xml b/src/Build/Resources/MacOSX/Info.plist.legacy.xml
new file mode 100644
index 0000000..f0e9282
--- /dev/null
+++ b/src/Build/Resources/MacOSX/Info.plist.legacy.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundleIdentifier</key>
+ <string>org.idrix.VeraCrypt</string>
+
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>org.idrix.veracrypt.hc</string>
+
+ <key>UTTypeDescription</key>
+ <string>VeraCrypt Container File</string>
+
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>hc</string>
+ <string>tc</string>
+ </array>
+
+ <key>public.mime-type</key>
+ <string>application/veracrypt</string>
+ </dict>
+ </dict>
+ </array>
+
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeIconFile</key>
+ <string>VeraCrypt_Volume.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>VeraCrypt Container File</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>LSHandlerRank</key>
+ <string>Owner</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <!-- my app supports files with my custom extension (see UTExportedTypeDeclarations) -->
+ <string>org.idrix.veracrypt.hc</string>
+ </array>
+ </dict>
+ </array>
+
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+
+ <key>CFBundleExecutable</key>
+ <string>VeraCrypt</string>
+
+ <key>CFBundleIconFile</key>
+ <string>VeraCrypt.icns</string>
+
+ <key>CFBundleName</key>
+ <string>VeraCrypt</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleSignature</key>
+ <string>TRUE</string>
+
+ <key>CFBundleVersion</key>
+ <string>1.24.9</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>_VERSION_</string>
+
+ <key>CFBundleLongVersionString</key>
+ <string>VeraCrypt _VERSION_</string>
+
+ <key>LSArchitecturePriority</key>
+ <array>
+ <string>x86_64</string>
+ <string>i386</string>
+ </array>
+
+ <key>LSMinimumSystemVersion</key>
+ <string>10.7.0</string>
+
+ <key>LSRequiresCarbon</key>
+ <false/>
+
+ <key>CSResourcesFileMapped</key>
+ <true/>
+
+ <key>NSHighResolutionCapable</key>
+ <true/>
+
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/src/Build/Resources/MacOSX/Info.plist.xml b/src/Build/Resources/MacOSX/Info.plist.xml
index b5b5a85..fbd9c21 100644
--- a/src/Build/Resources/MacOSX/Info.plist.xml
+++ b/src/Build/Resources/MacOSX/Info.plist.xml
@@ -74,7 +74,7 @@
<string>TRUE</string>
<key>CFBundleVersion</key>
- <string>1.24.5</string>
+ <string>1.24.9</string>
<key>CFBundleShortVersionString</key>
<string>_VERSION_</string>
@@ -82,14 +82,8 @@
<key>CFBundleLongVersionString</key>
<string>VeraCrypt _VERSION_</string>
- <key>LSArchitecturePriority</key>
- <array>
- <string>x86_64</string>
- <string>i386</string>
- </array>
-
<key>LSMinimumSystemVersion</key>
- <string>10.7.0</string>
+ <string>10.9.0</string>
<key>LSRequiresCarbon</key>
<false/>
diff --git a/src/Build/build_cmake_deb.sh b/src/Build/build_cmake_deb.sh
new file mode 100755
index 0000000..3be23dd
--- /dev/null
+++ b/src/Build/build_cmake_deb.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# Errors should cause script to exit
+set -e
+
+# Absolute path to this script
+export SCRIPT=$(readlink -f "$0")
+# Absolute path this script is in
+export SCRIPTPATH=$(dirname "$SCRIPT")
+# Source directory which contains the Makefile
+export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..")
+# Directory where the VeraCrypt has been checked out
+export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..")
+
+cd $SOURCEPATH
+
+echo "Building GUI version of VeraCrypt for DEB using system wxWidgets"
+make clean || exit 1
+make || exit 1
+make install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+echo "Building console version of VeraCrypt for DEB using system wxWidgets"
+
+# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?"
+# when building over SSH without X11 Forwarding
+# export DISPLAY=:0.0
+
+make NOGUI=1 clean || exit 1
+make NOGUI=1 || exit 1
+make NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+echo "Creating VeraCrypt DEB packages"
+
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack DEB
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack DEB
+
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
+
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1
diff --git a/src/Build/build_cmake_opensuse.sh b/src/Build/build_cmake_opensuse.sh
new file mode 100644
index 0000000..340440a
--- /dev/null
+++ b/src/Build/build_cmake_opensuse.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Errors should cause script to exit
+set -e
+
+# Absolute path to this script
+export SCRIPT=$(readlink -f "$0")
+# Absolute path this script is in
+export SCRIPTPATH=$(dirname "$SCRIPT")
+# Source directory which contains the Makefile
+export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..")
+# Directory where the VeraCrypt has been checked out
+export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..")
+
+# The sources of wxWidgets 3.0.4 must be extracted to the parent directory
+export WX_ROOT=$PARENTDIR/wxWidgets-3.0.4
+echo "Using wxWidgets sources in $WX_ROOT"
+
+cd $SOURCEPATH
+
+echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries"
+
+# This will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildGui
+
+# To build wxWidgets using GTK-2
+make WXSTATIC=1 wxbuild || exit 1
+ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64
+make WXSTATIC=1 clean || exit 1
+make WXSTATIC=1 || exit 1
+make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+# Uncomment below and comment lines above to reuse existing wxWidgets build
+# make WXSTATIC=1 clean || exit 1
+# make WXSTATIC=1 || exit 1
+# make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries"
+
+# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?"
+# when building over SSH without X11 Forwarding
+# export DISPLAY=:0.0
+
+# This will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole
+
+# To build wxWidgets using GTK-2
+make WXSTATIC=1 NOGUI=1 wxbuild || exit 1
+ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64
+make WXSTATIC=1 NOGUI=1 clean || exit 1
+make WXSTATIC=1 NOGUI=1 || exit 1
+make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+# Uncomment below and comment lines above to reuse existing wxWidgets build
+# make WXSTATIC=1 NOGUI=1 clean || exit 1
+# make WXSTATIC=1 NOGUI=1 || exit 1
+# make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+echo "Creating VeraCrypt RPM packages "
+
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM
+
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
+
+# wxWidgets was built using GTK-2
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DWITHGTK3=TRUE -DNOGUI=FALSE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DWITHGTK3=TRUE -DNOGUI=TRUE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake|| exit 1
diff --git a/src/Build/build_cmake_rpm_gtk2.sh b/src/Build/build_cmake_rpm_gtk2.sh
new file mode 100644
index 0000000..38c66a9
--- /dev/null
+++ b/src/Build/build_cmake_rpm_gtk2.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Errors should cause script to exit
+set -e
+
+# Absolute path to this script
+export SCRIPT=$(readlink -f "$0")
+# Absolute path this script is in
+export SCRIPTPATH=$(dirname "$SCRIPT")
+# Source directory which contains the Makefile
+export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..")
+# Directory where the VeraCrypt has been checked out
+export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..")
+
+# The sources of wxWidgets 3.0.4 must be extracted to the parent directory
+export WX_ROOT=$PARENTDIR/wxWidgets-3.0.4
+echo "Using wxWidgets sources in $WX_ROOT"
+
+cd $SOURCEPATH
+
+echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries"
+
+# This will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildGui
+
+# To build wxWidgets using GTK-2
+make WXSTATIC=1 wxbuild || exit 1
+make WXSTATIC=1 clean || exit 1
+make WXSTATIC=1 || exit 1
+make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+# Uncomment below and comment lines above to reuse existing wxWidgets build
+# make WXSTATIC=1 clean || exit 1
+# make WXSTATIC=1 || exit 1
+# make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries"
+
+# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?"
+# when building over SSH without X11 Forwarding
+# export DISPLAY=:0.0
+
+# This will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole
+
+# To build wxWidgets using GTK-2
+make WXSTATIC=1 NOGUI=1 wxbuild || exit 1
+make WXSTATIC=1 NOGUI=1 clean || exit 1
+make WXSTATIC=1 NOGUI=1 || exit 1
+make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+# Uncomment below and comment lines above to reuse existing wxWidgets build
+# make WXSTATIC=1 NOGUI=1 clean || exit 1
+# make WXSTATIC=1 NOGUI=1 || exit 1
+# make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+echo "Creating VeraCrypt RPM packages "
+
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM
+
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
+
+# wxWidgets was built using GTK-2
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DWITHGTK3=FALSE -DNOGUI=FALSE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DWITHGTK3=FALSE -DNOGUI=TRUE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1
diff --git a/src/Build/build_cmake_rpm_gtk3.sh b/src/Build/build_cmake_rpm_gtk3.sh
new file mode 100644
index 0000000..97091ce
--- /dev/null
+++ b/src/Build/build_cmake_rpm_gtk3.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Errors should cause script to exit
+set -e
+
+# Absolute path to this script
+export SCRIPT=$(readlink -f "$0")
+# Absolute path this script is in
+export SCRIPTPATH=$(dirname "$SCRIPT")
+# Source directory which contains the Makefile
+export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..")
+# Directory where the VeraCrypt has been checked out
+export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..")
+
+# The sources of wxWidgets 3.0.4 must be extracted to the parent directory
+export WX_ROOT=$PARENTDIR/wxWidgets-3.0.4
+echo "Using wxWidgets sources in $WX_ROOT"
+
+cd $SOURCEPATH
+
+echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries"
+
+# This will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildGui
+
+# To build wxWidgets using GTK-3
+make WXSTATIC=1 WITHGTK3=1 wxbuild || exit 1
+make WXSTATIC=1 clean || exit 1
+make WXSTATIC=1 || exit 1
+make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+# Uncomment below and comment lines above to reuse existing wxWidgets build
+# make WXSTATIC=1 clean || exit 1
+# make WXSTATIC=1 || exit 1
+# make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries"
+
+# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?"
+# when building over SSH without X11 Forwarding
+# export DISPLAY=:0.0
+
+# This will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole
+
+# To build wxWidgets using GTK-3
+make WXSTATIC=1 WITHGTK3=1 NOGUI=1 wxbuild || exit 1
+make WXSTATIC=1 NOGUI=1 clean || exit 1
+make WXSTATIC=1 NOGUI=1 || exit 1
+make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+# Uncomment below and comment lines above to reuse existing wxWidgets build
+# make WXSTATIC=1 NOGUI=1 clean || exit 1
+# make WXSTATIC=1 NOGUI=1 || exit 1
+# make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
+
+echo "Creating VeraCrypt RPM packages "
+
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM
+# -DCPACK_RPM_PACKAGE_DEBUG=TRUE for debugging cpack RPM
+
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
+mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
+
+# wxWidgets was built using GTK-3
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DWITHGTK3=TRUE -DNOGUI=FALSE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
+cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DWITHGTK3=TRUE -DNOGUI=TRUE || exit 1
+cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake|| exit 1
diff --git a/src/Build/build_veracrypt_macosx.sh b/src/Build/build_veracrypt_macosx.sh
index 233afb2..e22f2df 100755
--- a/src/Build/build_veracrypt_macosx.sh
+++ b/src/Build/build_veracrypt_macosx.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2017 IDRIX
+# Copyright (c) 2013-2019 IDRIX
# 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.
@@ -12,22 +12,22 @@ SOURCEPATH=$(cd "$(dirname "$SCRIPTPATH/../.")"; pwd)
# directory where the VeraCrypt project has been checked out
PARENTDIR=$(cd "$(dirname "$SCRIPTPATH/../../../.")"; pwd)
-# the sources of wxWidgets 3.0.3 must be extracted to the parent directory
-export WX_ROOT=$PARENTDIR/wxWidgets-3.0.4
+# the sources of wxWidgets 3.1.2 must be extracted to the parent directory (for night mode)
+export WX_ROOT=$PARENTDIR/wxWidgets-3.1.3
echo "Using wxWidgets sources in $WX_ROOT"
# this will be the temporary wxWidgets directory
-export WX_BUILD_DIR=$PARENTDIR/wxBuild
-
-# define the SDK version to use. We use 10.7 by default
-export VC_OSX_TARGET=10.7
-echo "Using MacOSX SDK $VC_OSX_TARGET"
+export WX_BUILD_DIR=$PARENTDIR/wxBuild-3.1.3
+# define the SDK version to use and OSX minimum target. We target 10.9 by default
+export VC_OSX_TARGET=10.9
+export VC_OSX_SDK=10.14
+echo "Using MacOSX SDK $VC_OSX_SDK with target set to $VC_OSX_TARGET"
cd $SOURCEPATH
echo "Building VeraCrypt"
-make WXSTATIC=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package
+make WXSTATIC=FULL wxbuild && make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package
# Uncomment below and comment line above to reuse existing wxWidgets build
-# make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package \ No newline at end of file
+# make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package \ No newline at end of file
diff --git a/src/Build/build_veracrypt_macosx_legacy.sh b/src/Build/build_veracrypt_macosx_legacy.sh
new file mode 100755
index 0000000..70226f2
--- /dev/null
+++ b/src/Build/build_veracrypt_macosx_legacy.sh
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2013-2017 IDRIX
+# 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.
+#
+
+# Absolute path this script is in
+SCRIPTPATH=$(cd "$(dirname "$0")"; pwd)
+# source directory which contains the Makefile
+SOURCEPATH=$(cd "$(dirname "$SCRIPTPATH/../.")"; pwd)
+# directory where the VeraCrypt project has been checked out
+PARENTDIR=$(cd "$(dirname "$SCRIPTPATH/../../../.")"; pwd)
+
+# the sources of wxWidgets 3.1.2 must be extracted to the parent directory
+export WX_ROOT=$PARENTDIR/wxWidgets-3.1.2
+echo "Using wxWidgets sources in $WX_ROOT"
+# this will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuild
+
+# define the SDK version to use. We use 10.7 by default
+export VC_OSX_TARGET=10.7
+export VC_OSX_SDK=10.9
+echo "Using MacOSX SDK $VC_OSX_TARGET"
+
+
+cd $SOURCEPATH
+
+echo "Building VeraCrypt"
+make WXSTATIC=FULL wxbuild && make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package
+
+# Uncomment below and comment line above to reuse existing wxWidgets build
+# make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package