From 0ac5f369f17fb22331f9593feead5ac28a0b631c Mon Sep 17 00:00:00 2001 From: Linrador <68631622+Linrador@users.noreply.github.com> Date: Tue, 23 Jun 2026 07:59:13 +0200 Subject: [PATCH] added debian to build --- backend/build.bat | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/backend/build.bat b/backend/build.bat index ec92206..36408c8 100644 --- a/backend/build.bat +++ b/backend/build.bat @@ -1 +1,34 @@ -go build -ldflags="-H=windowsgui" -o nsfwapp.exe \ No newline at end of file +@echo off +setlocal + +echo Baue Windows x64... + +set GOOS=windows +set GOARCH=amd64 +set CGO_ENABLED=1 + +go build -ldflags="-H=windowsgui" -o nsfwapp.exe +if errorlevel 1 goto error + +echo. +echo Baue Debian/Linux x64 via WSL... + +for /f "delims=" %%i in ('wsl wslpath -a "%CD%"') do set "WSL_CWD=%%i" + +wsl --cd "%WSL_CWD%" bash -lc "GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o nsfwapp-linux-amd64" +if errorlevel 1 goto error + +echo. +echo Build erfolgreich. +echo Windows: nsfwapp.exe +echo Debian: nsfwapp-linux-amd64 +goto end + +:error +echo. +echo Build fehlgeschlagen. +exit /b 1 + +:end +endlocal +pause \ No newline at end of file