-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathvscodium.json
89 lines (89 loc) · 3.91 KB
/
vscodium.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"version": "1.96.4.25017",
"description": "A community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code.",
"homepage": "https://vscodium.com/",
"license": "MIT",
"notes": [
"Add VSCodium as a context menu option by running 'reg import \"$dir\\install-context.reg\"'",
"For file associations, run 'reg import \"$dir\\install-associations.reg\"'"
],
"architecture": {
"64bit": {
"url": "https://github.com/VSCodium/vscodium/releases/download/1.96.4.25017/VSCodium-win32-x64-1.96.4.25017.zip",
"hash": "17c409afb4ad0de5a7a6bfa2d99c80bfafc84ad434f195e4e3622128d833a9d1"
},
"arm64": {
"url": "https://github.com/VSCodium/vscodium/releases/download/1.96.4.25017/VSCodium-win32-arm64-1.96.4.25017.zip",
"hash": "c7482a50271a50f78bda81d35663d03326d07b4c1ebc7bedbbcae4fb53d8372d"
}
},
"pre_install": [
"$product_path = \"$dir\\resources\\app\\product.json\"",
"if (Test-Path -Path $product_path) {",
" $product = Get-Content -Path $product_path -Raw -Encoding UTF8 | ConvertFrom-Json",
" if (![string]::IsNullOrEmpty($product.updateUrl)) {",
" Get-Content -Path $product_path | Where-Object {$_ -notmatch \"updateurl\"} | Set-Content temp.json",
" Move-Item -Path temp.json -Destination $product_path -Force",
" }",
"}"
],
"post_install": [
"$dirpath = \"$dir\".Replace('\\', '\\\\')",
"$exepath = \"$dir\\VSCodium.exe\".Replace('\\', '\\\\')",
"'install-associations', 'uninstall-associations', 'install-context', 'uninstall-context' | ForEach-Object {",
" if (Test-Path \"$bucketsdir\\extras\\scripts\\vscode\\$_.reg\") {",
" $content = Get-Content \"$bucketsdir\\extras\\scripts\\vscode\\$_.reg\"",
" $content = $content.Replace('$codedir', $dirpath)",
" $content = $content.Replace('$code', $exepath)",
" $content = $content.Replace('&Code', '&VSCodium')",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" $content | Set-Content -Path \"$dir\\$_.reg\"",
" }",
"}",
"if (!(Test-Path \"$dir\\data\\extensions\") -and (Test-Path \"$env:USERPROFILE\\.vscode-oss\\extensions\")) {",
" info '[Portable Mode] Copying extensions...'",
" Copy-Item \"$env:USERPROFILE\\.vscode-oss\\extensions\" \"$dir\\data\" -Recurse",
"}",
"if (!(Test-Path \"$dir\\data\\user-data\") -and (Test-Path \"$env:AppData\\VSCodium\")) {",
" info '[Portable Mode] Copying user data...'",
" Copy-Item \"$env:AppData\\VSCodium\" \"$dir\\data\\user-data\" -Recurse",
"}",
"$extensions_file = \"$dir\\data\\extensions\\extensions.json\"",
"if ((Test-Path \"$extensions_file\")) {",
" info 'Adjusting path in extensions file...'",
" (Get-Content \"$extensions_file\") -replace '(?<=vscodium(/|\\\\\\\\)).*?(?=(/|\\\\\\\\)data(/|\\\\\\\\)extensions)', $version | Set-Content \"$extensions_file\"",
"}"
],
"env_add_path": "bin",
"bin": [
[
"bin/codium.cmd",
"vscodium"
]
],
"shortcuts": [
[
"VSCodium.exe",
"VSCodium"
]
],
"persist": "data",
"checkver": {
"github": "https://github.com/VSCodium/vscodium"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/VSCodium/vscodium/releases/download/$version/VSCodium-win32-x64-$version.zip"
},
"arm64": {
"url": "https://github.com/VSCodium/vscodium/releases/download/$version/VSCodium-win32-arm64-$version.zip"
}
},
"hash": {
"url": "$url.sha256"
}
}
}