Desktop: Remove POSIX dependencies from snapshots and runtime - #404
Merged
Conversation
priethor
marked this pull request as ready for review
July 28, 2026 22:40
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.
What
This is the first app-side PR for Windows support. It replaces
zip,unzip, andwhichwith JavaScript helpers, adds Windows-aware executable lookup, and makes site extraction and runtime shutdown asynchronous.The site refresh keeps the existing database, uploads, and
wp-config.php. There's no Windows runtime or installer here yet, and this PR doesn't touch Buildkite or signing.Why
Most of the desktop app still assumes macOS or Linux paths, tools, and process signals. We need to remove those assumptions before the Windows build can start and shut down cleanly.
How
Cortext now checks ZIP entries before extraction and only moves a site into place once the extraction has finished. On Windows, PHP uses
php.exe, runs as one hidden worker without POSIX process groups, and falls back totaskkillif it doesn't exit normally.The app also waits for PHP to stop before quitting or applying an update.
Only one copy runs at a time. Opening Cortext again brings the existing window to the front instead of starting a second app against the same site folder.
Testing Instructions
snapshot.zipfromapps/desktop.