This commit is contained in:
Zoltán Papp
2026-03-02 15:59:09 +01:00
parent 9a6a72e88e
commit 04a982263d
89 changed files with 8147 additions and 22 deletions
+61
View File
@@ -0,0 +1,61 @@
version: '3'
tasks:
go:mod:tidy:
summary: Runs `go mod tidy`
internal: true
cmds:
- go mod tidy
install:frontend:deps:
summary: Install frontend dependencies
dir: frontend
sources:
- package.json
- package-lock.json
generates:
- node_modules
preconditions:
- sh: npm version
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
cmds:
- npm install
build:frontend:
label: build:frontend (DEV={{.DEV}})
summary: Build the frontend project
dir: frontend
sources:
- "**/*"
- exclude: node_modules/**/*
generates:
- dist/**/*
deps:
- task: install:frontend:deps
cmds:
- npm run {{.BUILD_COMMAND}} -q
env:
PRODUCTION: '{{if eq .DEV "true"}}false{{else}}true{{end}}'
vars:
BUILD_COMMAND: '{{if eq .DEV "true"}}build:dev{{else}}build{{end}}'
generate:icons:
summary: Generates Windows `.ico` and Mac `.icns` from an image
dir: build
sources:
- "appicon.png"
generates:
- "icons.icns"
- "icon.ico"
cmds:
- echo "Icon generation skipped (no appicon.png)"
status:
- test ! -f appicon.png
dev:frontend:
summary: Runs the frontend in development mode
dir: frontend
deps:
- task: install:frontend:deps
cmds:
- npm run dev -- --port {{.VITE_PORT}} --strictPort
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Build script for NetBird Wails v3 on Linux
set -e
echo "Installing system dependencies for Wails v3 on Linux..."
sudo apt-get update
sudo apt-get install -y \
libayatana-appindicator3-dev \
gcc \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libglib2.0-dev \
libsoup-3.0-dev \
libx11-dev \
npm
echo "Installing wails3 CLI..."
go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.72
echo "Building fancyui..."
cd "$(dirname "$0")/.."
wails3 build
echo "Build complete."
+35
View File
@@ -0,0 +1,35 @@
version: '3'
includes:
common: ../Taskfile.yml
tasks:
build:
summary: Builds the application for Linux
cmds:
- task: build:native
vars:
DEV: '{{.DEV}}'
OUTPUT: '{{.OUTPUT}}'
build:native:
summary: Builds the application natively on Linux
internal: true
deps:
- task: common:build:frontend
vars:
DEV:
ref: .DEV
cmds:
- go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
vars:
BUILD_FLAGS: '{{if eq .DEV "true"}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production -trimpath -buildvcs=false -ldflags="-w -s"{{end}}'
DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}'
OUTPUT: '{{ .OUTPUT | default .DEFAULT_OUTPUT }}'
env:
GOOS: linux
CGO_ENABLED: 1
run:
cmds:
- '{{.BIN_DIR}}/{{.APP_NAME}}'