Commit 6a9eb3d
committed
feat(installer): add standalone Windows .exe installer (vp-setup.exe) (#1293)
Add a standalone `vp-setup.exe` Windows installer binary that installs
the vp CLI without requiring PowerShell, complementing the existing
`irm https://vite.plus/ps1 | iex` script-based installer.
- Create `vite_setup` shared library crate extracting installation logic
(platform detection, registry queries, integrity verification, tarball
extraction, symlink/junction management) from `vite_global_cli`
- Create `vite_installer` binary crate producing `vp-setup.exe` with
interactive prompts, silent mode (-y), progress bars, and Windows PATH
modification via direct registry API (no PowerShell dependency)
- Update `vite_global_cli` to use `vite_setup` instead of inline upgrade
modules, ensuring upgrade and installer share identical logic
- Add CI build/upload steps for installer in release workflow, attached
as GitHub Release assets
- Add RFC document at rfcs/windows-installer.md
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Adds a new Windows installer binary that performs downloads, filesystem/link manipulation, and registry PATH updates, plus refactors `vp upgrade` to share that code; failures could impact Windows install/upgrade behavior and release packaging.
>
> **Overview**
> Introduces a **standalone Windows installer** (`vp-setup.exe`) with interactive and silent modes that downloads the correct platform tarball, verifies integrity, installs dependencies, sets up shims/Node manager, and (on Windows) updates the user PATH via registry.
>
> Extracts the existing `vp upgrade` install pipeline into a new shared crate `vite_setup`, and switches `vite_global_cli` upgrade + upgrade-check to use it (including unified errors/constants and new helpers like `read_current_version`/`create_env_files`).
>
> Updates CI/release workflows to **build, cache, test, and attach** `vp-setup.exe` artifacts to GitHub Releases, and updates docs + Netlify redirect to advertise the new installer.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bfaa80f. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent e22fc93 commit 6a9eb3d
File tree
25 files changed
+1702
-55
lines changed- .github
- actions/build-upstream
- workflows
- crates
- vite_global_cli
- src
- commands/upgrade
- vite_installer
- src
- vite_setup
- src
- docs/guide
- rfcs
25 files changed
+1702
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
| 165 | + | |
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| |||
241 | 249 | | |
242 | 250 | | |
243 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
244 | 258 | | |
245 | 259 | | |
246 | 260 | | |
| |||
265 | 279 | | |
266 | 280 | | |
267 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
268 | 295 | | |
269 | 296 | | |
270 | 297 | | |
| |||
318 | 345 | | |
319 | 346 | | |
320 | 347 | | |
| 348 | + | |
| 349 | + | |
321 | 350 | | |
322 | 351 | | |
323 | 352 | | |
| |||
332 | 361 | | |
333 | 362 | | |
334 | 363 | | |
| 364 | + | |
| 365 | + | |
335 | 366 | | |
336 | 367 | | |
337 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
786 | 788 | | |
787 | 789 | | |
788 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
25 | | - | |
26 | 22 | | |
27 | 23 | | |
28 | 24 | | |
| |||
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
| 33 | + | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 6 | | |
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 34 | | |
42 | 35 | | |
43 | 36 | | |
| |||
154 | 147 | | |
155 | 148 | | |
156 | 149 | | |
157 | | - | |
| 150 | + | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
| |||
184 | 177 | | |
185 | 178 | | |
186 | 179 | | |
187 | | - | |
| 180 | + | |
| 181 | + | |
188 | 182 | | |
189 | 183 | | |
190 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 55 | + | |
| 56 | + | |
60 | 57 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
0 commit comments