Files
mines/rin/miner/build-windows.bat
Dobromir Popov 9a2d14de90 windows
2025-09-08 01:38:23 +03:00

55 lines
2.0 KiB
Batchfile

@echo off
REM Windows Docker Build Script for RinHash Miner
REM This script builds the Windows executable using Docker cross-compilation
echo === RinHash Windows Docker Build Script ===
echo Building Windows executable with NO_CURL fallback networking...
echo.
REM Check if Docker is available
docker --version >nul 2>&1
if %errorlevel% neq 0 (
echo ❌ Error: Docker is not installed or not in PATH
echo Please install Docker Desktop and try again.
pause
exit /b 1
)
echo 📁 Working directory: %CD%
echo 🐳 Using Docker container: cpuminer-windows-builder
echo.
REM Build the Windows executable
echo 🔨 Building Windows executable...
docker run --rm -v "%CD%/cpuminer-opt-rin:/work" -v "%CD%/cpuminer-opt-rin/build/win:/output" cpuminer-windows-builder bash -c "cd /work && make clean && rm -rf Makefile Makefile.in configure config.* && ./autogen.sh && ./configure --host=x86_64-w64-mingw32 CFLAGS='-O3 -march=x86-64 -DNO_CURL' LDFLAGS='-static' && make -j4 && cp cpuminer.exe /output/"
REM Check if build was successful
if %errorlevel% equ 0 (
echo.
echo ✅ Build completed successfully!
echo 📁 Checking output files...
if exist "cpuminer-opt-rin\build\win\cpuminer.exe" (
for %%A in ("cpuminer-opt-rin\build\win\cpuminer.exe") do set FILE_SIZE=%%~zA
echo 📦 Windows executable ready: cpuminer-opt-rin\build\win\cpuminer.exe (%FILE_SIZE% bytes)
echo.
echo 🚀 Ready for shipping to Windows systems!
echo 💡 Mining command example:
echo cpuminer.exe -a rinhash -o stratum+tcp://pool.example.com:3333 -u wallet -p x -t 4
) else (
echo ❌ Warning: Executable not found in output directory
)
) else (
echo.
echo ❌ Build failed!
echo 💡 Troubleshooting:
echo - Check Docker Desktop is running
echo - Ensure cpuminer-windows-builder image is available
echo - Verify source files are present in cpuminer-opt-rin/
pause
exit /b 1
)
echo.
echo === Build Complete ===
pause