diff --git a/README.md b/README.md index 2715b67..19469d4 100644 --- a/README.md +++ b/README.md @@ -48,49 +48,27 @@ Update pulls the latest code, copies updated templates/static, rebuilds the bina --- -## 📦 Binary Download (manual) +## 🔧 Building from Source (install.sh does this automatically) -Pre-compiled static binaries are on the [Releases page](https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases): +The installer automatically installs Go (if missing) and builds from source. +No pre-built binaries are distributed — building from source guarantees the latest code compiled for your exact platform. -```bash -# Linux amd64 -curl -L -o app https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/v1.0.0/app-linux-amd64 -chmod +x app -./app - -# Linux arm64 (Raspberry Pi, etc.) -curl -L -o app https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/v1.0.0/app-linux-arm64 -chmod +x app -./app -``` - -No dependencies, no CGO, no libc. Drop it on any Linux box and run. - ---- - -## 🔧 Building from Source - -### Prerequisites - -- **Go 1.23+** — [Download](https://go.dev/dl/) -- No GCC, no CGO, no cross-compilers needed - -### Build +### Manual Build ```bash git clone https://git.lohmar.co.uk/cclohmar/ReceiptNext.git cd ReceiptNext # Build for your current platform -CGO_ENABLED=0 go build -o app . +CGO_ENABLED=0 go build -buildvcs=false -ldflags="-s -w" -o app . # Cross-compile for any platform (no extra tools needed!) -CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o app-linux-arm64 . -CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o app-darwin-amd64 . -CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o app-darwin-arm64 . +CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -buildvcs=false -ldflags="-s -w" -o app-linux-arm64 . +CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -buildvcs=false -ldflags="-s -w" -o app-darwin-amd64 . +CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -buildvcs=false -ldflags="-s -w" -o app-darwin-arm64 . ``` -The binary is fully static — zero runtime dependencies. +The binary is fully static — zero runtime dependencies, no CGO, no libc. ---