|
8 | 8 | },
|
9 | 9 | "architecture": {
|
10 | 10 | "64bit": {
|
11 |
| - "url": "https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-windows-x64.zip", |
12 |
| - "hash": "60e9291d09657ab315bcc6bc07cbf67d2e9b9b18c21bb7cf9ce2d9fa983c9719" |
| 11 | + "url": [ |
| 12 | + "https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-windows-x64.zip", |
| 13 | + "https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-windows-x64-baseline.zip" |
| 14 | + ], |
| 15 | + "hash": [ |
| 16 | + "60e9291d09657ab315bcc6bc07cbf67d2e9b9b18c21bb7cf9ce2d9fa983c9719", |
| 17 | + "b4e1e0051a18bc6d104a4990e9abfa9b802d1ecd4d52752c6c9154e17bf987cb" |
| 18 | + ] |
13 | 19 | }
|
14 | 20 | },
|
15 | 21 | "pre_install": [
|
16 | 22 | "$avx2 = Start-Job -ScriptBlock {",
|
17 | 23 | " Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);' -Name Kernel32 -Namespace Win32",
|
18 | 24 | " return [Win32.Kernel32]::IsProcessorFeaturePresent(40)",
|
19 | 25 | "} | Receive-Job -Wait -AutoRemoveJob",
|
| 26 | + "$target = 'bun-windows-x64'", |
20 | 27 | "if (-not $avx2) {",
|
21 |
| - " Write-Host -Foreground Red \"This CPU does not support the AVX2 instruction set. Please install 'bun-baseline' instead.\"", |
22 |
| - " break", |
23 |
| - "}" |
| 28 | + " $target += '-baseline'", |
| 29 | + "}", |
| 30 | + "Move-Item \"$dir\\$target\\bun.exe\" \"$dir\\bun.exe\"", |
| 31 | + "Remove-Item \"$dir\\bun-windows-*\" -Recurse" |
24 | 32 | ],
|
25 |
| - "extract_dir": "bun-windows-x64", |
26 | 33 | "bin": [
|
27 | 34 | "bun.exe",
|
28 | 35 | [
|
|
38 | 45 | "autoupdate": {
|
39 | 46 | "architecture": {
|
40 | 47 | "64bit": {
|
41 |
| - "url": "https://github.com/oven-sh/bun/releases/download/bun-v$version/bun-windows-x64.zip" |
| 48 | + "url": [ |
| 49 | + "https://github.com/oven-sh/bun/releases/download/bun-v$version/bun-windows-x64.zip", |
| 50 | + "https://github.com/oven-sh/bun/releases/download/bun-v$version/bun-windows-x64-baseline.zip" |
| 51 | + ] |
42 | 52 | }
|
43 | 53 | },
|
44 | 54 | "hash": {
|
|
0 commit comments