Add build.bat, run.bat, and update .gitignore

This commit is contained in:
ThisIsDara
2026-05-04 08:09:39 +03:30
parent 70575aa5a5
commit d64acaab95
3 changed files with 74 additions and 2 deletions
+43
View File
@@ -0,0 +1,43 @@
@echo off
setlocal enabledelayedexpansion
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_DIR%"
echo ========================================
echo MHR-CFW Go Builder
echo ========================================
echo.
if not exist "go.mod" (
echo Error: go.mod not found. Make sure you are in the project directory.
pause
exit /b 1
)
echo Building mhr-cfw-go.exe...
echo.
go build -ldflags "-s -w" -o mhr-cfw-go.exe ./cmd/mhr-cfw
if errorlevel 1 (
echo.
echo Build FAILED!
pause
exit /b 1
)
echo.
echo Build successful: mhr-cfw-go.exe
echo.
if exist "ivk.ico" (
echo Adding icon...
echo Note: Icon injection requires inject_icon.exe (run separately if needed)
)
echo.
echo ========================================
echo Done! Run with: mhr-cfw-go.exe
echo ========================================
pause