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/Setup/Setup.c | 25 ++++++++++++++++++++----- src/Setup/Setup.h | 5 +++++ 2 files changed, 25 insertions(+), 5 deletions(-) (limited to 'src/Setup') diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index 364395d8..fc119a81 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -851,31 +851,46 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir) if (Is64BitOs () && ((wcscmp (szFiles[i], L"Dveracrypt.sys") == 0) || (wcscmp (szFiles[i], L"Averacrypt.sys") == 0))) { - StringCbCopyNW (curFileName, sizeof(curFileName), FILENAME_64BIT_DRIVER, sizeof (FILENAME_64BIT_DRIVER)); + if (IsARM()) + StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-arm64.sys", sizeof(L"veracrypt-arm64.sys")); + else + StringCbCopyNW (curFileName, sizeof(curFileName), FILENAME_64BIT_DRIVER, sizeof (FILENAME_64BIT_DRIVER)); } if (Is64BitOs () && wcscmp (szFiles[i], L"Averacrypt.cat") == 0) { - StringCbCopyNW (curFileName, sizeof(curFileName), L"veracrypt-x64.cat", sizeof (L"veracrypt-x64.cat")); + 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"AVeraCrypt.exe") == 0) { - StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt-x64.exe", sizeof (L"VeraCrypt-x64.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"AVeraCryptExpander.exe") == 0) { - StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCryptExpander-x64.exe", sizeof (L"VeraCryptExpander-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.exe") == 0) { - StringCbCopyNW (curFileName, sizeof(curFileName), L"VeraCrypt Format-x64.exe", sizeof (L"VeraCrypt Format-x64.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) diff --git a/src/Setup/Setup.h b/src/Setup/Setup.h index 60c95395..e38dd75a 100644 --- a/src/Setup/Setup.h +++ b/src/Setup/Setup.h @@ -48,11 +48,16 @@ static wchar_t *szCompressedFiles[]= L"VeraCrypt-x64.exe", L"VeraCryptExpander-x64.exe", L"VeraCrypt Format-x64.exe", + L"VeraCrypt-arm64.exe", + L"VeraCryptExpander-arm64.exe", + L"VeraCrypt Format-arm64.exe", L"veracrypt.inf", L"veracrypt.cat", L"veracrypt.sys", L"veracrypt-x64.cat", L"veracrypt-x64.sys", + L"veracrypt-arm64.cat", + L"veracrypt-arm64.sys", L"Languages.zip", L"docs.zip" }; -- cgit v1.2.3