Commit graph

369 commits

Author SHA1 Message Date
yiliang114
b2b43b51da test(installer): stabilize Windows fake tool path 2026-05-15 22:22:28 +08:00
yiliang114
c959913dfc fix(installer): harden Windows target detection 2026-05-15 21:49:41 +08:00
yiliang114
7d665f39df fix(installer): address release review follow-ups 2026-05-15 21:00:13 +08:00
yiliang114
7fd314a358 fix(installer): print standalone uninstall commands 2026-05-15 18:26:49 +08:00
yiliang114
a79745b4d8 style(installer): align standalone install output 2026-05-15 17:13:11 +08:00
yiliang114
bae933332e fix(installer): address standalone review feedback 2026-05-15 15:14:34 +08:00
yiliang114
40ac124927 fix(installer): harden standalone release fallback 2026-05-15 01:54:27 +08:00
yiliang114
db8677f01b fix(installer): cleanup mirror probe temp dirs 2026-05-14 23:09:15 +08:00
yiliang114
8fb2bc1254 fix(installer): resolve Aliyun latest via version pointer 2026-05-14 22:49:07 +08:00
yiliang114
db0a44d620 fix(installer): update download commands to use progress indicators for curl and wget 2026-05-14 20:22:27 +08:00
yiliang114
d2ebed9ac1 fix(uninstall): match shell-quoted paths when removing the wrapper
The installer's write_unix_wrapper shell-quotes the binary path, so
paths containing single quotes (or other shell metacharacters) appear
as shell-quoted strings in the generated wrapper file. The uninstall
script's literal grep -qF missed these, leaving the wrapper orphaned.

Add shell_quote to the uninstall script and match against both the raw
and shell-quoted forms before removing the wrapper.
2026-05-14 17:44:17 +08:00
yiliang114
75e5b58806 feat(installer): add standalone uninstall scripts 2026-05-14 17:31:44 +08:00
yiliang114
74130fc79e fix(installer): make Windows standalone shim available in cmd 2026-05-14 17:00:03 +08:00
yiliang114
564f899359 fix(installer): remove non-functional doskey approach for cmd parent
doskey /exename from a child PowerShell process cannot modify the
parent cmd.exe session. Replace with a simple set PATH=... command
that the user can copy-paste.
2026-05-14 16:48:41 +08:00
yiliang114
38c4706d76 feat(installer): make qwen usable immediately from PowerShell after install
- .ps1: detect parent process, update current session PATH, and for
  cmd.exe parents emit a `set PATH=...` command
- .bat: skip final instructions when called from PowerShell to avoid
  duplicate "Run: qwen" output
2026-05-14 16:44:41 +08:00
yiliang114
bdf101b0ee docs(installer): document cmd.exe one-liner for immediate PATH availability
Add curl-based one-liner for cmd.exe users. Running the .bat directly
in the current cmd session makes `qwen` available immediately via the
`endlocal & set` trick. The `powershell -c "irm | iex"` path creates
a child process so PATH changes cannot propagate to the parent.
2026-05-14 16:29:51 +08:00
yiliang114
c3b488f9d7 fix(installer): persist PATH to current terminal session on Windows
Use the `endlocal & set` trick (same as bun/Rust installers) to export
the install bin directory from the setlocal scope to the current cmd
session. qwen is now usable immediately without restarting the terminal.
2026-05-14 16:14:34 +08:00
yiliang114
b7f190a75f fix(installer): always persist install bin to user PATH
Previously MaybeUpdateUserPath was only called when shadow qwen
executables were detected. When no shadow was found, the PATH update
was skipped entirely, leaving the user without qwen on PATH after
restarting their terminal.

Now always persist the bin directory to PATH (unless --no-modify-path
is set), regardless of whether other qwen installations exist.
2026-05-14 16:08:07 +08:00
yiliang114
31e3c4350a fix(installer): fix cmd.exe parsing error in backup fallback code
The %s in the for /f fallback command string was interpreted as a variable
reference by cmd.exe, causing "此时不应有 >" on Chinese Windows. Replace
with a safe fallback and re-enable Expand-Archive progress suppression.
2026-05-14 16:02:07 +08:00
yiliang114
24cb1c7a12 fix(installer): revert Expand-Archive progress suppression in bat
The inline $ProgressPreference = 'SilentlyContinue' caused a cmd.exe
parsing error ("此时不应有 >") on Chinese Windows. Revert to the
original Expand-Archive invocation.
2026-05-14 15:50:33 +08:00
yiliang114
ccbdd34f39 fix(installer): auto-backup non-qwen directories and simplify output
- ensure_managed_install_dir / :EnsureManagedInstallDir now back up
  non-qwen directories instead of refusing to install, so users
  upgrading from npm or old installers don't hit a hard error
- Simplify header/footer output: remove banner bars, verbose INFO
  lines, and redundant "Installation completed!" message
- Match bun.sh / code-server style: minimal, to the point
2026-05-14 15:23:18 +08:00
yiliang114
046d200293 fix(installer): suppress progress bars for small downloads and Expand-Archive
- .ps1: replace curl.exe -# with silent mode, suppress Invoke-WebRequest
  progress bar; save/restore $global:ProgressPreference
- .bat: add $ProgressPreference = 'SilentlyContinue' before Expand-Archive
  to prevent full-screen extraction progress UI
- .sh: remove --progress-bar / --show-progress from download_file, always
  use silent curl/wget
2026-05-14 15:09:45 +08:00
yiliang114
01e9767421 fix(installer): use curl.exe -# progress bar in Windows downloads
Prefer curl.exe with -# (hash-mark progress bar) for archive and installer
downloads on Windows 10+. Falls back to Invoke-WebRequest (which shows its
own progress bar) when curl.exe is unavailable. Matches the approach used
by code-server (curl -#fL) and bun.sh (curl.exe -#SfLo).
2026-05-14 13:47:04 +08:00
yiliang114
4b950aba7c fix(installer): suppress PowerShell progress bar in bat installer downloads
Add $ProgressPreference = 'SilentlyContinue' to DownloadFile so the
full-screen progress UI does not appear during archive downloads in
interactive PowerShell sessions, consistent with the .ps1 shim.
2026-05-14 13:34:08 +08:00
yiliang114
4095171f64 fix(installer): suppress PowerShell progress bar in hosted entrypoint shim
Add $ProgressPreference = 'SilentlyContinue' to the .ps1 wrapper so
Invoke-WebRequest downloads don't render a progress bar when invoked
via the irm | iex one-liner.
2026-05-14 13:29:01 +08:00
yiliang114
540bcb8c28 fix(installer): harden hosted release script checks 2026-05-14 10:34:46 +08:00
yiliang114
c6005a74bb feat(installer): refactor argument parsing and utility functions for release scripts 2026-05-14 01:11:19 +08:00
yiliang114
0c8022d491 fix(installer): address hosted installer review gaps 2026-05-13 23:54:05 +08:00
yiliang114
645edb8ec2 chore(installer): remove temporary OSS smoke workflow 2026-05-13 23:35:44 +08:00
yiliang114
48977aeef9 fix(installer): make OSS release assets public-readable
Some checks failed
OSS Smoke Test / Verify Aliyun OSS Credentials (push) Has been cancelled
2026-05-13 23:19:30 +08:00
yiliang114
b0ae7f89f9 ci(installer): add temporary OSS smoke test 2026-05-13 23:12:40 +08:00
yiliang114
7d328be114 feat(installer): wire Aliyun OSS sync, address review followups
- Add Aliyun OSS sync steps to release workflow: package hosted assets,
  install pinned ossutil, configure credentials, upload versioned and
  latest paths, and verify upload via verify:installation-release plus
  curl probes against the hosted installer endpoint.
- Document required production-release environment secrets and bucket
  variables in INSTALLATION_GUIDE.md.
- Restructure hosted endpoint guidance to lead with the pre-sync
  warning, splitting "Run today" (local checkout) from "After the OSS
  sync" (hosted one-liners) so users no longer copy a one-liner that
  silently installs latest.
- Distinguish mirror auto-selection timeout from successful selection
  in install-qwen-standalone.sh and install-qwen-standalone.bat: emit
  a "timed out; defaulting to github" log instead of pretending the
  HEAD probe picked github.
- Support QWEN_INSTALLER_BAT_URL override (https only) in the
  PowerShell shim so staging mirrors can be exercised without forking
  the file.
- Strip a leading UTF-8 BOM in verify-installation-release.js
  parseSha256Sums so BOM-prefixed SHA256SUMS reports a useful
  "Missing checksum entry" error instead of "Malformed SHA256SUMS
  line 1".
- Add tests for verifier HEAD→Range fallback, partial-failure
  formatting, all-failure wording, and BOM tolerance.
2026-05-13 21:22:39 +08:00
yiliang114
72a5efe744 fix(installer): make Windows option validation readable 2026-05-13 20:43:30 +08:00
yiliang114
90935774a2 fix(installer): stabilize Windows installer tests 2026-05-13 19:58:07 +08:00
yiliang114
984b1a9a0e fix(installer): address hosted installer review followups 2026-05-13 19:29:49 +08:00
yiliang114
5f649c9523 chore(installer): stage standalone hosted entrypoints 2026-05-13 19:09:20 +08:00
yiliang114
af64da874f feat(installer): restore hosted PowerShell entrypoint 2026-05-13 18:53:45 +08:00
yiliang114
fedcbae1c9 chore(installer): narrow hosted release diff 2026-05-13 17:26:05 +08:00
yiliang114
b8e54900f2 chore(installer): trim hosted release diff scope 2026-05-13 16:58:20 +08:00
yiliang114
eeabd1b8dd fix(installer): stage direct hosted install scripts 2026-05-13 16:47:33 +08:00
yiliang114
68f05db518 feat(installer): add hosted install-qwen.ps1 shim for irm|iex one-liner
The previous Windows quick-install one-liner used `Invoke-WebRequest -OutFile
(Join-Path $env:TEMP 'install-qwen.bat'); & (Join-Path …)`. When pasted into a
narrow terminal, line wrap could land on `-OutFile`, orphaning the parameter
from its value and producing the "missing argument for OutFile" failure
followed by a "file not found" when the second `&` ran. PowerShell's line
continuation rules cannot resolve this for parameter-name-at-EOL.

Add `install-qwen.ps1` as a thin hosted entrypoint that downloads
`install-qwen.bat` into TEMP, runs it, and cleans up. Documented one-liner
becomes the standard pattern used by bun, uv, scoop, deno, pnpm:

    powershell -ExecutionPolicy Bypass -c "irm <url>/install-qwen.ps1 | iex"

The `.bat` remains the source of truth for installer behavior; `.ps1` is just
the modern hosted entrypoint. Version pinning via `$env:QWEN_INSTALL_VERSION`
flows through unchanged. Stored with `*.ps1 -text` so CRLF survives both
GitHub raw and OSS uploads, matching the existing `.bat` handling.
2026-05-13 14:27:50 +08:00
yiliang114
bd7602b775 fix(installer): surface download errors and add MaximumRedirection 10 2026-05-13 01:15:01 +08:00
yiliang114
3549a34fd8 fix(installer): follow HTTP redirects in UrlExists and RaceMirrorHead probes
GitHub release asset URLs return HTTP 302 to objects.githubusercontent.com.
[Net.WebRequest] with HEAD does not auto-redirect by default, so the
existence check and mirror-race probe both incorrectly reported the file
as missing. Set AllowAutoRedirect=true on HttpWebRequest instances.
2026-05-13 01:06:10 +08:00
yiliang114
2ca9dcd26d fix(installer): store .bat files with CRLF in git blob for raw GitHub downloads
GitHub raw file serving bypasses gitattributes eol conversion and serves
blob bytes directly, so eol=crlf alone was not enough. Use -text to disable
normalization and commit with actual CRLF so raw downloads work on Windows.
2026-05-13 00:54:52 +08:00
yiliang114
2ae9d0c058 feat(installer): support QWEN_INSTALL_GITHUB_REPO env var for custom repo 2026-05-13 00:39:59 +08:00
yiliang114
926c10a604 feat(installer): add standalone archive installer with multi-platform release workflow
- Add standalone archive installer (bat/sh) that downloads platform binaries
  from GitHub/Aliyun without requiring Node.js or npm on the target machine
- Add fork-friendly release-test workflow for manual GitHub Release creation
  covering all 5 platforms (darwin-arm64/x64, linux-arm64/x64, win-x64)
- Add OSS upload/mirror tools for staging and release distribution
- Update .gitignore to exclude generated build artifacts (release-staging/,
  hosted-staging/)
- Fix Windows PowerShell test command in copy-release-to-latest tool
2026-05-13 00:29:22 +08:00
yiliang114
d0bd8c6639 fix(scripts): address release verifier review feedback 2026-05-12 00:27:23 +08:00
yiliang114
a10bd1c0a8 refactor(installer): reuse standaloneArchiveName in release verifier
The verify-installation-release script was duplicating the archive name
derivation logic with a hardcoded ternary instead of reusing the
standaloneArchiveName helper from build-standalone-release. Export the
helper and import it so the extension mapping lives in one place.
2026-05-11 21:39:47 +08:00
yiliang114
d2acf7f86f fix(installer): remove stale node 20 installer references 2026-05-11 21:22:09 +08:00
yiliang114
bb8b81043f test(installer): allow Windows archive validation more time 2026-05-11 20:59:17 +08:00