Files
ccextractor/windows/rust.bat
Carlos Fernandez 1aa9762f19 Add 32-bit (x86) Windows build support
Re-introduce Win32 platform configurations to support 32-bit Windows,
which was dropped in 2023. This enables CCExtractor to run on 32-bit
Windows 10 systems.

Changes:
- Add Win32 (x86) platform to VS solution and project configs
- Make vcpkg triplet conditional (x86-windows-static for Win32)
- Update rust.bat to support i686-pc-windows-msvc via RUST_TARGET env var
- Add preprocessor conditional in installer.wxs for ProgramFilesFolder
- Convert CI build workflow to matrix strategy (x64 + x86)
- Update release workflow to produce both x64 and x86 installers

Closes #2116

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:35:11 -08:00

18 lines
623 B
Batchfile

for /f "delims=" %%i in ('cd') do set output=%%i
set CARGO_TARGET_DIR=%output%
cd ..\src\rust
REM Default to x86_64 if RUST_TARGET is not set
IF "%RUST_TARGET%"=="" set RUST_TARGET=x86_64-pc-windows-msvc
REM Allow overriding FFmpeg version via environment variable
IF "%FFMPEG_VERSION%"=="" (
cargo build %1 --features "hardsubx_ocr" --target %RUST_TARGET%
) ELSE (
cargo build %1 --features "hardsubx_ocr,%FFMPEG_VERSION%" --target %RUST_TARGET%
)
cd ..\..\windows
IF "%~1"=="-r" (
copy %RUST_TARGET%\release\ccx_rust.lib .\ccx_rust.lib
) ELSE (
copy %RUST_TARGET%\release-with-debug\ccx_rust.lib .\ccx_rust.lib
)