Files

30 lines
718 B
Batchfile

@echo off
setlocal
cd /d "%~dp0"
echo Generating Windows icon resources...
go run ./tools/mkico
if errorlevel 1 exit /b 1
where goversioninfo >nul 2>&1
if errorlevel 1 (
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
)
goversioninfo -64 -icon assets\navis.ico -manifest assets\app.manifest -o cmd\vpnapp\resource.syso versioninfo.json
if errorlevel 1 exit /b 1
echo Building Navis GUI and CLI...
go build -ldflags="-H windowsgui -s -w" -trimpath -o Navis.exe ./cmd/vpnapp
if errorlevel 1 exit /b 1
go build -ldflags="-s -w" -trimpath -o vpnclient.exe ./cmd/vpnclient
if errorlevel 1 exit /b 1
echo.
echo Done:
echo Navis.exe
echo vpnclient.exe
echo assets\navis.ico
endlocal