1. 어셈블러 및 기타 필요한 툴 설치
NASM
https://www.nasm.us/pub/nasm/releasebuilds/2.08/win32/
YASM
https://github.com/cseri/yasm-1.3.0-win64
upx
https://github.com/upx/upx/releases/tag/v5.0.2
7-zip
https://www.7-zip.org/download.html
gzip
https://gnuwin32.sourceforge.net/packages/gzip.htm
wix toolset
https://github.com/wixtoolset/wix/releases/
2. VeraCrypt 소스코드 다운로드
https://github.com/veracrypt/VeraCrypt/releases
3. RUN_ADDBOM.bat으로 addbom으로 일부 소스파일의 UTF-8을 UTF-8 BOM으로 변경
https://github.com/YeeYoungHan/winutility/tree/master/Publish
4.Visual Studio Community 2022 설치
https://visualstudio.microsoft.com/ko/vs/community/
5. vs_component_install.bat 로 필요한 추가 컴포넌트 설치
6. Windows Driver Kit 설치
https://learn.microsoft.com/ko-kr/windows-hardware/drivers/download-the-wdk
RUN_ADDBOM.bat
@ECHO OFF REM ########################################################################## REM # REM # UTF-8에 BOM 추가 REM # REM ########################################################################## CHCP 65001 1> NUL 2> NUL SET BASESRCDIR=D:\VeraCrypt-VeraCrypt_1.26.24 SET FILEPATH[0]=%BASESRCDIR%\src\Crypto\t1ha.h SET FILEPATH[1]=%BASESRCDIR%\src\Crypto\t1ha_bits.h SET FILEPATH[2]=%BASESRCDIR%\src\Crypto\t1ha_selfcheck.c SET FILEPATH[3]=%BASESRCDIR%\src\Crypto\t1ha_selfcheck.h SET FILEPATH[4]=%BASESRCDIR%\src\Crypto\t1ha2.c SET FILEPATH[5]=%BASESRCDIR%\src\Crypto\t1ha2_selfcheck.c SET FILEPATH[6]=%BASESRCDIR%\src\ExpandVolume\ExpandVolume.c SET FILEPATH[7]=%BASESRCDIR%\src\Common\Dlgcode.c SET FILEPATH[8]=EXIT IF NOT EXIST AddBOM.exe ( ECHO AddBOM.exe not found. PAUSE EXIT /B ) ECHO ######################################################################### ECHO # 배열에 등록된 파일들에 대해 작업 진행 ECHO ######################################################################### SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION SET /A COUNT=0 :LABEL_NEXT1 IF DEFINED FILEPATH[%COUNT%] ( SET THISFILE=%%FILEPATH[%COUNT%]%% CALL ECHO ADDBOM %THISFILE% OUTPUT.TXT CALL ADDBOM %THISFILE% OUTPUT.TXT CALL COPY /B /Y OUTPUT.TXT %THISFILE% SET /A COUNT+=1 GOTO :LABEL_NEXT1 ) ENDLOCAL DEL /F /Q OUTPUT.TXT PAUSE
vs_component_install.bat
@ECHO OFF REM ################################################# REM # REM # Visual Studio workload and component IDs: REM # https://learn.microsoft.com/en-us/visualstudio/install/workload-and-component-ids?view=vs-2022 REM # REM # Channel ID: REM # https://learn.microsoft.com/ko-kr/visualstudio/install/command-line-parameter-examples?view=vs-2022#using---channeluri REM # REM ################################################# SET "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer" SET VS_INSTALLER=vs_installer.exe install --passive --norestart --includeRecommended --channelId VisualStudio.17.Release --productId Microsoft.VisualStudio.Product.Community REM MSVC v143 - VS 2022 C++ x64/x86 build tools (v14.30-17.0) (Out of support) REM .NET 6.0 Runtime (Out of support) REM Windows 11 SDK (10.0.22621.0) REM MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) REM MSVC v143 - VS 2022 C++ ARM64/ARM64EC Spectre-mitigated libs (Latest) REM MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest) REM C++ ATL for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC) REM C++ ATL for latest v143 build tools with Spectre Mitigations (x86 & x64) REM C++ MFC for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC) REM C++ MFC for latest v143 build tools with Spectre Mitigations (x86 & x64) REM Windows Driver Kit @ECHO ON %VS_INSTALLER% ^ --add Microsoft.VisualStudio.Component.VC.14.30.17.0.x86.x64 ^ --add Microsoft.NetCore.Component.Runtime.6.0 ^ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ --add Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre ^ --add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre ^ --add Microsoft.VisualStudio.Component.VC.ATL.Spectre ^ --add Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre ^ --add Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre ^ --add Component.Microsoft.Windows.DriverKit @PAUSE