Skip to content

Fix Windows support: persistent mode, relaunch script, and terminal launch#130

Merged
PureWeen merged 1 commit intomainfrom
fix/test-20260217-0552
Feb 17, 2026
Merged

Fix Windows support: persistent mode, relaunch script, and terminal launch#130
PureWeen merged 1 commit intomainfrom
fix/test-20260217-0552

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

Summary

Fixes several issues preventing PolyPilot from working correctly on Windows.

Persistent Mode Binary Resolution

  • *\GetBundledCliPath()* — looked for \copilot\ instead of \copilot.exe\ on Windows
  • *\ResolveBundledCliPath()* — MonoBundle fallback had the same issue
  • *\ResolveSystemCliPath()* — split PATH by :\ instead of \Path.PathSeparator\ (;\ on Windows), searched for \copilot\ without .exe, and had no Windows-specific well-known npm paths

Relaunch Script

  • Added
    elaunch.ps1\ (Windows equivalent of
    elaunch.sh)
  • Kills old instance before building (required on Windows since the running exe locks the output file)
  • Updated
    elaunch.sh\ to match MauiDevFlow pattern (kill-before-launch to free ports)

Terminal Launch (Fix a Bug / Add a Feature)

  • \LaunchCopilotInTerminal\ used \chmod\ and \open -a Terminal\ which don't exist on Windows
  • Now uses PowerShell + \UseShellExecute\ on Windows
  • \BuildCopilotPrompt\ uses correct target framework per platform
  • System message uses
    elaunch.ps1\ on Windows

MauiDevFlow

  • Added .mauidevflow\ config (port 9347)

All changes are backward-compatible with Mac Catalyst.

@PureWeen PureWeen force-pushed the fix/test-20260217-0552 branch from cde5164 to 747194e Compare February 17, 2026 06:36
…pt, and terminal launch

- Fix GetBundledCliPath/ResolveBundledCliPath to use copilot.exe on Windows
- Fix ResolveSystemCliPath to use Path.PathSeparator and Windows npm paths
- Add relaunch.ps1 (Windows equivalent of relaunch.sh)
- Fix LaunchCopilotInTerminal to use PowerShell on Windows instead of chmod/Terminal.app
- Fix BuildCopilotPrompt to use correct target framework on Windows
- Fix system message to use relaunch.ps1 on Windows
@PureWeen PureWeen force-pushed the fix/test-20260217-0552 branch from 747194e to e0d9085 Compare February 17, 2026 06:37
@PureWeen PureWeen merged commit 32858eb into main Feb 17, 2026
@PureWeen PureWeen deleted the fix/test-20260217-0552 branch February 22, 2026 00:15
PureWeen added a commit that referenced this pull request Mar 11, 2026
The build command doesn't specify -r win-x64, so dotnet outputs to the
non-RID folder (bin\Debug\net10.0-windows10.0.19041.0\) rather than the
RID-specific subfolder (win-x64\).

This bug was introduced in the original script (PR #130) and caused
launch failures on fresh clones where no previous RID-specific build
existed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Mar 11, 2026
## Problem

\ elaunch.ps1\ was looking for the exe in
\�in\Debug\net10.0-windows10.0.19041.0\win-x64\ but the build command
doesn't specify \-r win-x64\, so dotnet outputs to
\�in\Debug\net10.0-windows10.0.19041.0\ (no RID subfolder).

This bug was introduced in the original script creation (PR #130) and
caused launch failures:
\\\
Start-Process: This command cannot be run due to the error: The system
cannot find the file specified.
\\\

## Root Cause

The script hardcoded \\win-x64\ in \\\ but the build command was:
\\\powershell
dotnet build PolyPilot.csproj -f net10.0-windows10.0.19041.0
\\\

Without \-r win-x64\, the output goes to the framework folder directly.

## Fix

Remove \\win-x64\ from \\\ to match the actual build output location.

## Testing

Verified the fix works - build succeeds and app launches correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant