From ea34f644f31ff871d8766d3971dac5eed5bb2c3b Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Wed, 29 May 2024 15:42:15 -0400 Subject: [PATCH] Add "wsl_clipboard" build tag for creating Linux binaries that use the Windows clipboard --- README.md | 5 ++++- src/backend/copyTERMUX.go | 2 +- src/backend/copyUNIXGeneric.go | 2 +- src/backend/copyWIN.go | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 058bf8a..c4748c6 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,12 @@ CGO_ENABLED=0 go build -ldflags="-s -w" ./mutn.go CGO_ENABLED=0 go build -ldflags="-s -w" ./libmuttonserver.go ``` +Additionally, some custom build tags can be used to create different binaries. The following tags are not used in official builds: +- `wsl_clipboard`: Allows creating a Linux binary that can interact with the Windows clipboard (for WSL) +- `termux`: Allows creating a Linux binary that can interact with the Termux clipboard (for Android) + # Roadmap #### Release v0.2.0 - Make repo public - No binaries -- Add custom build option for WSL support - Add fail-specific error codes - Address most TODOs - Hunt and fix bugs in preparation for public debut diff --git a/src/backend/copyTERMUX.go b/src/backend/copyTERMUX.go index 662e8b1..724596e 100644 --- a/src/backend/copyTERMUX.go +++ b/src/backend/copyTERMUX.go @@ -1,4 +1,4 @@ -//go:build termux +//go:build termux && !windows && !darwin package backend diff --git a/src/backend/copyUNIXGeneric.go b/src/backend/copyUNIXGeneric.go index f6c7bff..6ca7883 100644 --- a/src/backend/copyUNIXGeneric.go +++ b/src/backend/copyUNIXGeneric.go @@ -1,4 +1,4 @@ -//go:build !windows && !darwin && !termux +//go:build !windows && !darwin && !termux && !wsl_clipboard package backend diff --git a/src/backend/copyWIN.go b/src/backend/copyWIN.go index ae912de..b54b847 100644 --- a/src/backend/copyWIN.go +++ b/src/backend/copyWIN.go @@ -1,4 +1,4 @@ -//go:build windows +//go:build windows || (!windows && !darwin && !termux && wsl_clipboard) package backend