Skip to content

feat: add Windows support#6

Open
a-essawy wants to merge 4 commits intopolarsource:mainfrom
a-essawy:main
Open

feat: add Windows support#6
a-essawy wants to merge 4 commits intopolarsource:mainfrom
a-essawy:main

Conversation

@a-essawy
Copy link
Copy Markdown

Adding full Windows x64 support.

Tested on Windows 11 x64, Bun 1.3.9.

Closes #3

Prevents Windows Firewall prompt on first login and stops
exposing the OAuth callback to the local network.
The redirectUrl already uses 127.0.0.1, so this is consistent.
- Add win32 platform detection and Windows ARM64 guard
- Use PowerShell Expand-Archive for .zip extraction on Windows
  (bare tar resolves to Git's GNU tar which breaks on Windows paths)
- Escape single quotes in paths passed to PowerShell
- Write-first binary replacement pattern for crash-safe self-update
  (running .exe cannot be overwritten on Windows, only renamed)
- Recover interrupted updates on startup by completing pending .new files
- Add bun-windows-x64 matrix entry with zip packaging
- Use matrix-driven --outfile and archive format
- Checksums and release assets use polar-* wildcard
- Add build:binary:windows-x64 script to package.json
Usage: powershell -ExecutionPolicy ByPass -c "irm .../install.ps1 | iex"

Installs to ~/.polar/bin/, verifies SHA256 checksums, validates
version response, and updates user PATH.
@a-essawy
Copy link
Copy Markdown
Author

Hi @emilwidlund would appreciate you taking a look at this.

@Abhijit47
Copy link
Copy Markdown

Adding full Windows x64 support.

Tested on Windows 11 x64, Bun 1.3.9.

hi, can i use now in windows
https://polar.sh/docs/integrate/webhooks/locally#install-polar-cli,
how you install in windows?,
docs still shows me old ways

@a-essawy
Copy link
Copy Markdown
Author

Hi @Abhijit47 Yeah you can use it on Windows right now, just hasn't been merged yet.

easiest way is to install from my fork:
powershell -ExecutionPolicy ByPass -c "(irm https://raw.githubusercontent.com/a-essawy/polar-cli/60e87ac/install.ps1) -replace 'polarsource/cli','a-essawy/polar-cli' | iex"

this should handle everything for you.

or if you prefer to build it yourself:

git clone https://github.com/a-essawy/polar-cli.git
cd polar-cli
bun install
bun run build:binary:windows-x64

then just move polar.exe somewhere on your PATH and you're good to go.
let me know if you run into any issues.

@Abhijit47
Copy link
Copy Markdown

Hi @Abhijit47 Yeah you can use it on Windows right now, just hasn't been merged yet.

easiest way is to install from my fork: powershell -ExecutionPolicy ByPass -c "(irm https://raw.githubusercontent.com/a-essawy/polar-cli/60e87ac/install.ps1) -replace 'polarsource/cli','a-essawy/polar-cli' | iex"

this should handle everything for you.

or if you prefer to build it yourself:

git clone https://github.com/a-essawy/polar-cli.git
cd polar-cli
bun install
bun run build:binary:windows-x64

then just move polar.exe somewhere on your PATH and you're good to go. let me know if you run into any issues.

Thanks for reply, i'll test in my pc and inform you.

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.

Windows not supported 🥹🥹🥹

2 participants