Build from source
Requirements
- Go. The module declares
go 1.23.0. - Node.js and npm, for the frontend (React 18, TypeScript, Vite).
- Wails v2 (the project uses v2.12.0) and its platform
prerequisites, for the desktop application. On Linux Wails needs the GTK and WebKit development packages. Run
wails doctorto see what is missing.
The command line tools need only Go.
Get the source
git clone https://git.tinkerbus.org/<owner>/tinkerbus.git
cd tinkerbus
The repository path above is a placeholder: use the address shown on git.tinkerbus.org.
The application
The Go program embeds the built frontend with //go:embed all:frontend/dist. The frontend has to be built before Go
can build the application, whether you call go build or wails build.
cd frontend
npm install
npm run build # runs tsc, then vite build
cd ..
wails build # produces build/bin/tinkerbus
For development with live reload, run wails dev in the repository root. It also serves the frontend in a browser on
http://localhost:34115; that is a developer tool only, Tinkerbus has no web server and no HTTP API of its own.
If you prefer plain Go once the frontend is built, go build in the root directory builds the same program. Use
wails build for the platform packaging (for example the Windows installer or the macOS bundle); those files are
under build/ and come from the Wails template.
The command line tools
go build -o bin/ ./cmd/...
This builds knxproj, knxprobe, knxdownload, knxprogram and knxcap into bin/. They do not need the
frontend. See command line tools.
Tests
go test ./...
The TypeScript tests in frontend/src/*.test.ts use Node’s built-in test runner (node:test). package.json does
not define a script for them yet.
Some Go tests need private project files that are not in the repository. They read the path from environment
variables such as ETS_TEST_PROJECT, ETS_TEST_PASSWORD_FILE, ETS_TEST_ESYLUX_PROJECT and
ETS_TEST_PARTIAL_PROJECT, and are skipped without them. See Testing.