generated from ScoopInstaller/BucketTemplate
/
vscode.json
76 lines (76 loc) · 3.23 KB
/
vscode.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
{
"version": "1.83.1",
"description": "Lightweight but powerful source code editor",
"homepage": "https://code.visualstudio.com/",
"license": {
"identifier": "Freeware",
"url": "https://code.visualstudio.com/License/"
},
"notes": [
"Add Visual Studio Code as a context menu option by running: '$dir\\install-context.reg'",
"For file associations, run '$dir\\install-associations.reg'"
],
"architecture": {
"64bit": {
"url": "https://update.code.visualstudio.com/1.83.1/win32-x64-archive/stable#/dl.7z",
"hash": "bf53268e45d12cd43d4f7c61cd782d11d13646eb21e7d57532739a952f4d7ff5"
},
"32bit": {
"url": "https://update.code.visualstudio.com/1.83.1/win32-archive/stable#/dl.7z",
"hash": "91f1e91dfc17caaa23d7c0bdf889581b79621362eb10bda00ed0a9bb0c13ff77"
}
},
"env_add_path": "bin",
"shortcuts": [
[
"code.exe",
"Visual Studio Code"
]
],
"post_install": [
"$dirpath = \"$dir\".Replace('\\', '\\\\')",
"$exepath = \"$dir\\Code.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)",
" 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\\extensions\")) {",
" info '[Portable Mode] Copying extensions...'",
" Copy-Item \"$env:USERPROFILE\\.vscode\\extensions\" \"$dir\\data\" -Recurse",
"}",
"if (!(Test-Path \"$dir\\data\\user-data\") -and (Test-Path \"$env:AppData\\Code\")) {",
" info '[Portable Mode] Copying user data...'",
" Copy-Item \"$env:AppData\\Code\" \"$dir\\data\\user-data\" -Recurse",
"}"
],
"persist": "data",
"checkver": {
"url": "https://code.visualstudio.com/sha?build=stable",
"jsonpath": "$.products[?(@.platform.os == 'win32-x64-archive')].name"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://update.code.visualstudio.com/$version/win32-x64-archive/stable#/dl.7z",
"hash": {
"url": "https://code.visualstudio.com/sha?build=stable",
"jsonpath": "$.products[?(@.platform.os == 'win32-x64-archive')].sha256hash"
}
},
"32bit": {
"url": "https://update.code.visualstudio.com/$version/win32-archive/stable#/dl.7z",
"hash": {
"url": "https://code.visualstudio.com/sha?build=stable",
"jsonpath": "$.products[?(@.platform.os == 'win32-archive')].sha256hash"
}
}
}
}
}