chore: migrate to pure Go SQLite build

This commit is contained in:
Andy Dixon
2026-06-24 10:22:41 +01:00
parent 614f87b8f2
commit 4fc3b19441
24 changed files with 94 additions and 4156 deletions
+4 -8
View File
@@ -35,10 +35,6 @@ function Check-Deps {
Write-Info "Node: $(& node --version)"
Write-Info "Wails: $(& $wailsPath version | Select-Object -First 1)"
if (-not (Get-Command gcc -ErrorAction SilentlyContinue)) {
Write-Warn 'gcc not found. SQLite requires cgo + a C compiler (e.g. MSYS2 mingw-w64).'
}
return $wailsPath
}
@@ -91,9 +87,9 @@ function Build {
$version = Get-BuildVersion
$ldflags = Get-Ldflags $version
$env:CGO_ENABLED = '1'
if (-not $env:CGO_CFLAGS) { $env:CGO_CFLAGS = '-O2 -g0' }
if (-not $env:CGO_CXXFLAGS) { $env:CGO_CXXFLAGS = '-O2 -g0' }
$env:CGO_ENABLED = '0'
Remove-Item Env:CGO_CFLAGS -ErrorAction SilentlyContinue
Remove-Item Env:CGO_CXXFLAGS -ErrorAction SilentlyContinue
$buildArgs = @('build', '-trimpath')
if (Test-BoolEnabled $env:NEXUS_COMPRESS) {
@@ -107,7 +103,7 @@ function Build {
}
$buildArgs += @('-ldflags', $ldflags)
Write-Info 'Building production binary (CGO_ENABLED=1)...'
Write-Info 'Building production binary (CGO_ENABLED=0)...'
& $wailsPath @buildArgs
Write-Info 'Build complete: build\bin\'
}