diff --git a/backend/build.bat b/backend/build.bat index 7c9887b..2a4dfa6 100644 --- a/backend/build.bat +++ b/backend/build.bat @@ -41,11 +41,25 @@ wsl bash -lc "cd ""%WSL_CWD%"" && mkdir -p .gocache-linux && GOOS=linux GOARCH=a if errorlevel 1 goto error if not exist nsfwapp-linux-amd64 goto linux_output_missing +if not exist dist mkdir dist +copy /y nsfwapp.exe dist\nsfwapp.exe >nul +if errorlevel 1 goto dist_copy_error +copy /y nsfwapp-linux-amd64 dist\nsfwapp-linux-amd64 >nul +if errorlevel 1 goto dist_copy_error + +echo. +echo Baue Debian Application Package via WSL... + +wsl bash -lc "cd ""%WSL_CWD%"" && DEB_SKIP_REBUILD=1 bash ./build_deb.sh" +if errorlevel 1 goto deb_package_error + echo. echo Build erfolgreich. echo Windows: nsfwapp.exe echo Debian: nsfwapp-linux-amd64 -echo Debian-Paket: build_deb.bat +echo Dist: dist\nsfwapp.exe +echo Dist: dist\nsfwapp-linux-amd64 +echo Debian-Paket: dist\nsfwapp_*.deb goto end :error @@ -111,6 +125,18 @@ echo Pruefe, ob in WSL eine Debian/Ubuntu-Distribution mit Go und den Build-Abha call :cleanup_cache exit /b 1 +:dist_copy_error +echo. +echo Build-Artefakte konnten nicht nach dist kopiert werden. +call :cleanup_cache +exit /b 1 + +:deb_package_error +echo. +echo Debian-Paket-Build fehlgeschlagen. +call :cleanup_cache +exit /b 1 + :end call :cleanup_cache endlocal diff --git a/backend/build_deb.sh b/backend/build_deb.sh index 0ee924d..500a2e8 100644 --- a/backend/build_deb.sh +++ b/backend/build_deb.sh @@ -52,6 +52,14 @@ fi [ -f "$BIN_PATH" ] || fail "Linux-Binary nicht gefunden: $BIN_PATH" +mkdir -p "$OUT_DIR" +cp -f "$BIN_PATH" "$OUT_DIR/nsfwapp-linux-amd64" +chmod 0755 "$OUT_DIR/nsfwapp-linux-amd64" 2>/dev/null || true + +if [ -f "$SCRIPT_DIR/nsfwapp.exe" ]; then + cp -f "$SCRIPT_DIR/nsfwapp.exe" "$OUT_DIR/nsfwapp.exe" +fi + mkdir -p \ "$PKG_ROOT/DEBIAN" \ "$PKG_ROOT/opt/nsfwapp" \ @@ -295,12 +303,17 @@ exit 0 EOF chmod 0755 "$PKG_ROOT/DEBIAN/postrm" -mkdir -p "$OUT_DIR" dpkg-deb --root-owner-group --build "$PKG_ROOT" "$OUT_FILE" echo echo "Debian-Paket erzeugt:" echo " $OUT_FILE" echo +echo "Build-Artefakte:" +echo " $OUT_DIR/nsfwapp-linux-amd64" +if [ -f "$OUT_DIR/nsfwapp.exe" ]; then + echo " $OUT_DIR/nsfwapp.exe" +fi +echo echo "Installieren:" echo " sudo apt install ./dist/$(basename "$OUT_FILE")" diff --git a/backend/dist/nsfwapp-linux-amd64 b/backend/dist/nsfwapp-linux-amd64 new file mode 100644 index 0000000..a82ff87 Binary files /dev/null and b/backend/dist/nsfwapp-linux-amd64 differ diff --git a/backend/dist/nsfwapp.exe b/backend/dist/nsfwapp.exe new file mode 100644 index 0000000..dcb5405 Binary files /dev/null and b/backend/dist/nsfwapp.exe differ diff --git a/backend/dist/nsfwapp_0.1.0_amd64.deb b/backend/dist/nsfwapp_0.1.0_amd64.deb index 493e0eb..7924cb7 100644 Binary files a/backend/dist/nsfwapp_0.1.0_amd64.deb and b/backend/dist/nsfwapp_0.1.0_amd64.deb differ diff --git a/backend/nsfwapp.exe b/backend/nsfwapp.exe index a2ddeed..dcb5405 100644 Binary files a/backend/nsfwapp.exe and b/backend/nsfwapp.exe differ