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
+2 -2
View File
@@ -12,7 +12,6 @@ Thumbs.db
*.coff
v1.0/
build*.ps1
build*.bat
icon.c
stub.c
inject_icon.c
@@ -20,4 +19,5 @@ inject_icon.exe
main.a
build_hook.go
*.md
!LICENSE
!LICENSE
!.bat
+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
+29
View File
@@ -0,0 +1,29 @@
@echo off
setlocal enabledelayedexpansion
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_DIR%"
echo ========================================
echo MHR-CFW Go
echo ========================================
echo.
if not exist "mhr-cfw-go.exe" (
echo Error: mhr-cfw-go.exe not found.
echo Run build.bat first to build the executable.
pause
exit /b 1
)
echo Starting proxy server...
echo.
echo Default: http://127.0.0.1:8080
echo.
echo Press Ctrl+C to stop.
echo ========================================
echo.
mhr-cfw-go.exe %*
pause