Files
desktop/scripts/dev-run-daemon-windows.ps1
Zane Schepke 74db54772f feat: core backend and nucleus migration (#26)
* initial v2 migration

Migrate to nucleus, graalvm builds, new core backend

* Update winsw

* chore: trigger window build

* ci: fix jdk conflict

* ci: trigger windows build

* chore: bump core to 1.5.3

* ci: switch to nucleus fork

* ci: fix quotes

* ci: fix windows build

* ci: windows fix missing mingw32

* ci: fix mingw setup for windows

* ci: fix winsw build

* fix: winsw build error

* fix: building keyring module on windows

* fix: keyring build for windows

* build: fix service install

* build: add nsis icons, fix daemon and service wrapper inclusion

* build: fix bmp paths

* build: fix lincense

* build: fix winsw paths

* build: fix nsis installer script for admin checks

* refactor: wintun moved to core

Fixe nsis images

* fix lang

* fix: daemon sync UX and disable daemon settings with messaging

Bump core for graalvm fix

* fix: windows native linker issue in core, dev daemon script after nucleus migration

* fix: ktor logging in daemon and core bump for windows cgo long fix

* refactor: user facing strings to res

* fix: add wintun.dlls and packaging

* fix: both proxy clients disabled handling

* fix: ui and windows build changes

* fix: daemon required settings

* refactor: remove mode icon, waiting for stats

* refactor: ui improvements and dns validator integration

* refactor: request active tunnel restart on settings changes when tunnel active

* refactor: better theme integration, auto tunnel status display, config name header comment

* fix: ui changes, logger fixes, install scripts, toasts, daemon sync

* feat: add update checker and tracking

* refactor: display mode in footer and proxy servers in expanded tunnel row

* fix: windows WinSW logging integration

* fix: windows log view, refactor daemon logging

* fix: update docs, add apt repo, CI fixes, windows daemon logs fix
2026-09-13 03:58:56 -04:00

37 lines
1.3 KiB
PowerShell

#Requires -Version 5.1
$ErrorActionPreference = "Stop"
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Error "This script needs an elevated (Run as Administrator) PowerShell window -- WFP/wintun require it."
exit 1
}
if (-not $env:WGTUNNEL_VARIANT) {
$env:WGTUNNEL_VARIANT = "debug"
}
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location (Split-Path -Parent $ScriptDir)
Write-Host "Building daemon (variant=$($env:WGTUNNEL_VARIANT))..."
$output = & .\gradlew.bat --no-watch-fs -q :daemon:printDevRunInfo
if ($LASTEXITCODE -ne 0) {
Write-Error "printDevRunInfo failed"
exit $LASTEXITCODE
}
$lines = $output | Where-Object { $_.Trim() -ne "" } | Select-Object -Last 3
if ($lines.Count -lt 3) {
Write-Error "Expected 3 lines from printDevRunInfo (java path, jvm args, classpath), got $($lines.Count):`n$output"
exit 1
}
$javaBin = $lines[0].Trim()
$jvmArgs = $lines[1].Trim() -split '\s+' | Where-Object { $_ -ne "" }
$classpath = $lines[2].Trim()
Write-Host "Starting debug daemon (elevated)..."
& $javaBin @jvmArgs -cp $classpath com.zaneschepke.wireguardautotunnel.daemon.MainKt @args
exit $LASTEXITCODE