v0.2.1: the update no longer stops at adb.exe - #9
Merged
Merged
Conversation
The adb server Plugcam starts keeps running after the app exits and holds adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll open, so an update stopped at "Error opening file for writing". The install and uninstall hooks now run adb kill-server and, if the server stays, move its files aside like the camera DLL.
- Version 0.2.1 in package.json, tauri.conf.json, Cargo.toml and Cargo.lock - Release notes for the installer fix, with what to do if an update is stuck - Site: version 0.2.1; the installer is still 7.2 MB
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.
Updating from the app stopped at Error opening file for writing for
resources\adb.exe,AdbWinApi.dllandAdbWinUsbApi.dll.Why: the adb server Plugcam starts keeps running after the app exits and holds those files open. The Tauri installer only checks
Plugcam.exe, andController::shutdownstops the camera but not adb.Fix (
src-tauri/windows/hooks.nsh), before files are copied on install and before uninstall:adb kill-serverfrom the install folder (5 s limit)..old. A running exe or DLL can be renamed but not overwritten; the camera DLL is already handled this way. The.oldfiles are deleted after install, or at reboot if they are still locked.The new installer runs the hooks, so updating from 0.2.0 to 0.2.1 already gets the fix.
Also: version 0.2.1, release notes
docs/releases/v0.2.1.md, site version.Tested
Built and tested locally (Actions is locked):
cargo test --release: 87 passed, 2 ignored.kill-serverstops the server, the new files are written and no.oldfiles are left;kill-server, the install still succeeds and the old files are moved to.old.Plugcam_0.2.1_x64-setup.exe(7.25 MiB), portable zip,latest.json. The signatures use the key inplugins.updater.pubkey(FD67DFC875B6FFB0). The generatedinstaller.nsiincludes the hooks beforeCheckIfAppIsRunningand before files are copied.Not tested: the full 0.2.1 installer over a real installation (it needs UAC).
Co-authored-by: Claude noreply@anthropic.com