🔨 resolve mouse binary via DevConfig in dev and pasteAppExePath in prod#4304
Closed
guiyanakuang wants to merge 1 commit into
Closed
🔨 resolve mouse binary via DevConfig in dev and pasteAppExePath in prod#4304guiyanakuang wants to merge 1 commit into
guiyanakuang wants to merge 1 commit into
Conversation
The previous default candidate `$HOME/crosspaste-mouse/target/release/crosspaste-mouse` was a developer-machine convention that breaks on Windows (no `.exe` suffix) and has no defined production location. - Read the dev binary path from a new `mouseBinaryPath` key in `development.properties` (added to the tracked template). - In production, look at `pasteAppExePath / crosspaste-mouse[.exe]` — add `MouseDaemonBinary.binaryName(platform)` for the `.exe` suffix. - Move env-aware candidate assembly into the caller (`DesktopMouseModule`) so `MouseDaemonBinary` stays a generic resolver. - Make the "binary not found" error environment-aware: dev points at `development.properties`, prod surfaces the attempted bundled path and tells the user to reinstall. - Keep `-Dcrosspaste.mouse.binary` and `$CROSSPASTE_MOUSE_BIN` as per-launch / per-shell escape hatches. Closes #4303
Member
Author
|
Closing — this commit belongs in the broader crosspaste-mouse integration (#4222), not as a standalone PR. Moving the commit to claude/elastic-hypatia-c325a1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4303
Summary
mouseBinaryPathkey indevelopment.properties(template updated).pasteAppExePath / crosspaste-mouse[.exe], with.exesuffix appended on Windows only via newMouseDaemonBinary.binaryName(platform).MouseDaemonBinary.resolvenow takes a caller-suppliedcandidatePathslist — env-aware assembly moved intoDesktopMouseModule.development.propertiesand the override env vars; prod surfaces the attempted bundled path and asks the user to reinstall.-Dcrosspaste.mouse.binaryand$CROSSPASTE_MOUSE_BINas per-launch / per-shell escape hatches.Why
The old default
$HOME/crosspaste-mouse/target/release/crosspaste-mousewas a developer-machine convention that breaks on Windows (Cargo emitscrosspaste-mouse.exe) and had no defined production location. This change gives both environments a clear, intentional resolution path.Test plan
./gradlew app:desktopTest --tests com.crosspaste.mouse.MouseDaemonBinaryTest— 6/6 passing (includes newbinaryNameandcandidate paths usedcases)../gradlew app:compileKotlinDesktop app:compileTestKotlinDesktop— clean build../gradlew ktlintFormat— clean.mouseBinaryPathset indevelopment.properties; verify mouse daemon spawns.mouseBinaryPathset to...crosspaste-mouse.exe; verify mouse daemon spawns.mouseBinaryPathempty and no env var override; verify the error message in dev mode is clear and actionable.