From 9881744c95737264c7cd9f13b3c70042c03584aa Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 1 Jan 2021 23:58:06 +0100 Subject: Windows: Add support for ARM64 platform (e.g. Microsoft Surface Pro X). System encryption still not implemented on ARM64 --- src/Mount/Mount.c | 56 +++ src/Mount/Mount_vs2019.vcxproj | 787 ++++++++++++++++++++++++++++++++++++ src/Mount/Mount_vs2019.vcxproj.user | 4 + 3 files changed, 847 insertions(+) create mode 100644 src/Mount/Mount_vs2019.vcxproj create mode 100644 src/Mount/Mount_vs2019.vcxproj.user (limited to 'src/Mount') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 07980c76..343be9d4 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -4639,6 +4639,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa goto stop; } + // Main app ARM 64-bit + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\VeraCrypt-arm64.exe", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt-arm64.exe", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } + // Wizard if (copyWizard) { @@ -4669,6 +4683,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa handleWin32Error (hwndDlg, SRC_POS); goto stop; } + + // Wizard ARM 64-bit + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\VeraCrypt Format-arm64.exe", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt Format-arm64.exe", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } } // Expander @@ -4701,6 +4729,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa handleWin32Error (hwndDlg, SRC_POS); goto stop; } + + // Expander ARM 64-bit + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\VeraCryptExpander-arm64.exe", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCryptExpander-arm64.exe", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } } // Driver @@ -4730,6 +4772,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa handleWin32Error (hwndDlg, SRC_POS); goto stop; } + + // Driver ARM64 + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\veracrypt-arm64.sys", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\veracrypt-arm64.sys", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } } else { diff --git a/src/Mount/Mount_vs2019.vcxproj b/src/Mount/Mount_vs2019.vcxproj new file mode 100644 index 00000000..8529a2a8 --- /dev/null +++ b/src/Mount/Mount_vs2019.vcxproj @@ -0,0 +1,787 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseCustomEFI + ARM64 + + + ReleaseCustomEFI + Win32 + + + ReleaseCustomEFI + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {E4C40F94-E7F9-4981-86E4-186B46F993F3} + Mount + Win32Proj + 10.0 + Mount + + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + Application + Unicode + v142 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + Debug\ + Debug\ + true + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + true + true + true + Release\ + Release\ + Release\ + Release\ + false + false + true + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + false + false + true + true + true + true + VeraCrypt + VeraCrypt + VeraCrypt + VeraCrypt + VeraCrypt + VeraCrypt + VeraCrypt + VeraCrypt + VeraCrypt + + + + %(AdditionalIncludeDirectories) + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + Disabled + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebug + true + false + + + + + + + Level4 + EditAndContinue + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + $(OutDir)Mount.pdb + Windows + false + true + MachineX86 + + + Mount.manifest;%(AdditionalManifestFiles) + + + md "..\Debug\Setup Files" 2>NUL: +copy Debug\VeraCrypt.exe "..\Debug\Setup Files" >NUL: + + + + + + %(AdditionalIncludeDirectories) + X64 + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + Disabled + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebug + true + false + + + + + + + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + $(OutDir)Mount.pdb + Windows + false + true + MachineX64 + + + Mount.manifest;%(AdditionalManifestFiles) + + + md "..\Debug\Setup Files" 2>NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" >NUL: + + + + WIN64;%(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + Disabled + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebug + true + false + + + + + + + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + $(OutDir)Mount.pdb + Windows + true + + + Mount.manifest;%(AdditionalManifestFiles) + + + md "..\Debug\Setup Files" 2>NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.exe" >NUL: + + + + WIN64;ARM64;%(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + /w34189 %(AdditionalOptions) + MaxSpeed + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + MultiThreaded + true + + + All + $(IntDir) + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + true + Windows + true + true + true + true + MachineX86 + + + Mount.manifest;%(AdditionalManifestFiles) + + + copy Release\VeraCrypt.exe "..\Release\Setup Files" + + + + + %(AdditionalIncludeDirectories) + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + /w34189 %(AdditionalOptions) + MaxSpeed + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + MultiThreaded + true + + + All + $(IntDir) + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + true + Windows + true + true + true + true + MachineX86 + + + Mount.manifest;%(AdditionalManifestFiles) + + + copy Release\VeraCrypt.exe "..\Release\Setup Files" + + + VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + X64 + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + /w34189 %(AdditionalOptions) + MaxSpeed + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + MultiThreaded + true + + + All + $(IntDir) + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + true + Windows + true + true + true + true + MachineX64 + + + Mount.manifest;%(AdditionalManifestFiles) + + + copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe" + + + WIN64;%(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + /w34189 %(AdditionalOptions) + MaxSpeed + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + MultiThreaded + true + + + All + $(IntDir) + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + true + Windows + true + true + true + true + + + Mount.manifest;%(AdditionalManifestFiles) + + + copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.exe" + + + WIN64;ARM64;%(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + X64 + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + /w34189 %(AdditionalOptions) + MaxSpeed + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + MultiThreaded + true + + + All + $(IntDir) + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + true + Windows + true + true + true + true + MachineX64 + + + Mount.manifest;%(AdditionalManifestFiles) + + + copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe" + + + VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + $(SolutionDir)/$(ProjectName)/$(ProjectName).tlb + + + + + /w34189 %(AdditionalOptions) + MaxSpeed + ..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories) + TCMOUNT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions) + MultiThreaded + true + + + All + $(IntDir) + Level4 + ProgramDatabase + 4057;4100;4127;4201;4701;4706;4131;%(DisableSpecificWarnings) + + + ..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies) + $(OutDir)VeraCrypt.exe + false + mpr.dll;%(DelayLoadDLLs) + true + true + Windows + true + true + true + true + + + Mount.manifest;%(AdditionalManifestFiles) + + + copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.exe" + + + VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(PreprocessorDefinitions) + + + + + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + true + true + true + true + true + + + + + {993245cf-6b70-47ee-91bb-39f8fc6dc0e7} + false + + + {9dc1abe2-d18b-48fb-81d2-8c50adc57bcf} + false + + + + + + \ No newline at end of file diff --git a/src/Mount/Mount_vs2019.vcxproj.user b/src/Mount/Mount_vs2019.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/src/Mount/Mount_vs2019.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file -- cgit v1.2.3