]> FriiDump Source - friidump.git/blob - build_msvc32.cmd
PFES-REPO-008: Import FriiDump 0.5.3.5 Project Frankenstein baseline
[friidump.git] / build_msvc32.cmd
1 @echo off
2 setlocal EnableExtensions
3 cd /d "%~dp0"
4
5 if /I "%~1"=="clean" goto clean
6
7 if not exist "config.h" (
8   echo [ERROR] config.h is missing from the source root.
9   echo Please extract the full source ZIP before building.
10   exit /b 1
11 )
12
13 findstr /n /c:"#define snprintf" "%~dp0libmultihash\multihash.h" "%~dp0libfriidump\win32compat.h" >nul 2>nul
14 if not errorlevel 1 (
15   echo [ERROR] Legacy snprintf macro still present. Overwrite libmultihash\multihash.h and libfriidump\win32compat.h from this package.
16   exit /b 1
17 )
18
19
20 if not exist "build-msvc32" mkdir "build-msvc32"
21
22 call "%~dp0.vscode\msvc32.cmd" cl @"%~dp0msvc32_friidump.rsp"
23 if errorlevel 1 exit /b %ERRORLEVEL%
24
25 "%~dp0friidump.exe" --help
26 if errorlevel 1 exit /b %ERRORLEVEL%
27
28 powershell -NoProfile -ExecutionPolicy Bypass -Command "Compress-Archive -Force -Path friidump.exe,docs,README,AUTHORS,COPYING,config.h,msvc32_friidump.rsp,build_msvc32.cmd,.vscode -DestinationPath friidump_msvc32_build_results.zip"
29 exit /b %ERRORLEVEL%
30
31 :clean
32 if exist "friidump.exe" del /q "friidump.exe"
33 if exist "build-msvc32" rmdir /s /q "build-msvc32"
34 if exist "friidump_msvc32_build_results.zip" del /q "friidump_msvc32_build_results.zip"
35 exit /b 0