C:\Program Files\NASM
(32位NASM安装程序则使用“C:\Program Files (x86)\nasm”)where.exe nasm
nasm -v
C:\Program Files\YASM
where.exe yasm
yasm --version
使用Visual Studio 2022和当前WDK编译标准VeraCrypt应用程序二进制文件或Windows驱动程序不需要这些工具。仅当你需要重新构建“src\Boot\Windows”中的旧版BIOS引导加载程序,或者构建包含Boot项目的解决方案配置(例如“ReleaseCustomEFI”)时才安装它们。
nasm
gzip
upx
dd --help
如果已安装上面列出的Visual Studio 2022组件,则可以跳过此步骤。仅在需要不带完整Visual Studio IDE的命令行构建环境时安装Build Tools。
msbuild src\VeraCrypt.sln /m /p:Configuration=Release /p:Platform=x64
msbuild src\VeraCrypt.sln /m /p:Configuration=Release /p:Platform=ARM64
msbuild src\VeraCrypt.sln /m /p:Configuration=Release /p:Platform=Win32
msbuild src\Driver\Driver.vcxproj /m /p:Configuration=Release /p:Platform=x64
msbuild src\Driver\Driver.vcxproj /m /p:Configuration=Release /p:Platform=ARM64
msbuild src\VeraCrypt.sln /m /p:Configuration=ReleaseCustomEFI /p:Platform=x64
msbuild src\VeraCrypt.sln /m /p:Configuration=ReleaseCustomEFI /p:Platform=ARM64
使用sign_test.bat脚本,你刚刚对VeraCrypt可执行文件进行了签名。这是必要的,因为Windows仅接受由签名证书颁发机构信任的驱动程序。
由于你没有使用官方的VeraCrypt签名证书来签署代码,而是使用了公共开发版本,因此你需要导入并信任所使用的证书。
error MSB8040: Spectre-mitigated libraries are required for this project
在Visual Studio Installer的“单个组件”中,安装与工具集版本和各目标体系结构(x64/x86或ARM64)匹配的MSVC v143 Spectre缓解库,以及对应的“with Spectre Mitigations”ATL组件。error C1083: Cannot open include file: 'atlbase.h' (or 'atlcomcli.h')
未安装ATL组件。在Visual Studio Installer的“单个组件”中,为每个构建目标体系结构安装“C++ ATL for latest v143 build tools”(及其Spectre版本)。error MSB8066: Custom build for 'Aes_hw_cpu.asm;...' exited with code 9009
找不到汇编器:“nasm.exe”和“yasm.exe”都必须在Path中可用(退出代码9009表示“找不到命令”)。请注意,更改Path变量时已经打开的命令提示符或Visual Studio实例无法读取新值,请重新打开后再次构建。
if (!IsOSAtLeast (WIN_10))
return TRUE;
return TRUE;