From a926226546d5ee2e73b64b947fe2c16caf468b1d Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Fri, 20 Nov 2026 22:15:34 +0800 Subject: [PATCH] Align webview authentication features across client builds --- Makefile | 15 ++++++--------- README.md | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index a31f485..e1dd239 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,12 @@ PUBLISH ?= 0 # Indicates whether to build the GUI components BUILD_GUI_HELPER ?= 1 -# Indicates whether to build embedded webview auth support into gpauth +# Build embedded webview authentication support into gpclient and gpauth BUILD_WEBVIEW_AUTH ?= 1 +ifneq ($(BUILD_WEBVIEW_AUTH),1) +AUTH_FEATURE_ARGS = --no-default-features +endif + ifeq ($(shell uname -s),Linux) PREFIX ?= /usr GPGUI_BINARY ?= .build/gpgui/gpgui_$(VERSION)/gpgui @@ -135,14 +139,7 @@ build-rs: rm -vf rust-toolchain.toml; \ fi - $(CARGO) build $(CARGO_BUILD_ARGS) -p gpclient -p gpservice - - # Build gpauth with or without embedded webview auth support - if [ $(BUILD_WEBVIEW_AUTH) -eq 1 ]; then \ - $(CARGO) build $(CARGO_BUILD_ARGS) -p gpauth; \ - else \ - $(CARGO) build $(CARGO_BUILD_ARGS) -p gpauth --no-default-features; \ - fi + $(CARGO) build $(CARGO_BUILD_ARGS) $(AUTH_FEATURE_ARGS) -p gpclient -p gpservice -p gpauth # Only build the GUI components if BUILD_GUI_HELPER is set to 1 if [ $(BUILD_GUI_HELPER) -eq 1 ]; then \ diff --git a/README.md b/README.md index b5022fb..fd518a8 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ sudo make install **Build Options:** - `INCLUDE_GUI=1` – Download and install the matching desktop application bundle. -- `BUILD_WEBVIEW_AUTH=0` – Build `gpauth` without embedded browser authentication (uses external browser or manual mode). +- `BUILD_WEBVIEW_AUTH=0` – Disable embedded browser authentication in both `gpclient` and `gpauth`. External-browser and manual sign-in remain available. - `BUILD_GUI_HELPER=0` – Skip building the helper UI. ## Troubleshooting