-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathvscodium.json
More file actions
99 lines (99 loc) 路 4.19 KB
/
Copy pathvscodium.json
File metadata and controls
99 lines (99 loc) 路 4.19 KB
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
90
91
92
93
94
95
96
97
98
99
{
"version": "1.135.06055",
"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.135.06055/VSCodium-win32-x64-1.135.06055.zip",
"hash": "0bec978f201238624bc9ad43966f5e201ed8afacc37d77035a822252d9c9c200"
},
"arm64": {
"url": "https://github.com/VSCodium/vscodium/releases/download/1.135.06055/VSCodium-win32-arm64-1.135.06055.zip",
"hash": "079aafaf0a141abd3a0b2078eca0a86b502cee38089014b81415ebb8e3675f21"
}
},
"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('\\\\$versionfolder', '')",
" $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",
"uninstaller": {
"script": [
"if ($cmd -eq 'uninstall') {",
" reg import \"$dir\\uninstall-associations.reg\" *> $null",
" reg import \"$dir\\uninstall-context.reg\" *> $null",
"}"
]
},
"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"
}
}
}