Keep dist/navis-release/ path and ship Navis.exe as a same-hash alias of EvilFox.exe so 3.x clients can still update from the Windows branch feed.
51 lines
1.9 KiB
Batchfile
51 lines
1.9 KiB
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
|
|
|
|
REM Bake Remnawave panel credentials into the binary (NordVPN-style centralized provisioning).
|
|
REM Source of truth: configs\remnawave-api.json (gitignored). Never commit the embedded copy.
|
|
if exist "configs\remnawave-api.json" (
|
|
mkdir "internal\remnawave\embeddedcfg" 2>nul
|
|
copy /Y "configs\remnawave-api.json" "internal\remnawave\embeddedcfg\remnawave-api.json" >nul
|
|
echo Embedded panel credentials from configs\remnawave-api.json
|
|
) else (
|
|
echo WARNING: configs\remnawave-api.json missing — build will use external file / no auto-provision
|
|
)
|
|
|
|
echo Building EvilFox GUI and CLI...
|
|
go build -ldflags="-H windowsgui -s -w" -trimpath -o EvilFox.exe ./cmd/vpnapp
|
|
if errorlevel 1 exit /b 1
|
|
|
|
go build -ldflags="-s -w" -trimpath -o evilfox-cli.exe ./cmd/vpnclient
|
|
if errorlevel 1 exit /b 1
|
|
|
|
mkdir "dist\navis-release\windows" 2>nul
|
|
copy /Y EvilFox.exe "dist\navis-release\windows\EvilFox.exe" >nul
|
|
REM Keep Navis.exe path for existing 3.x clients that fetch the old feed URL.
|
|
copy /Y EvilFox.exe "dist\navis-release\windows\Navis.exe" >nul
|
|
copy /Y evilfox-cli.exe "dist\navis-release\windows\evilfox-cli.exe" >nul
|
|
copy /Y evilfox-cli.exe "dist\navis-release\windows\vpnclient.exe" >nul
|
|
|
|
echo.
|
|
echo Done:
|
|
echo EvilFox.exe
|
|
echo evilfox-cli.exe
|
|
echo dist\navis-release\windows\EvilFox.exe
|
|
echo dist\navis-release\windows\Navis.exe (compat alias for 3.x updater)
|
|
echo dist\navis-release\windows\evilfox-cli.exe
|
|
echo dist\navis-release\windows\vpnclient.exe
|
|
echo assets\navis.ico
|
|
endlocal
|