generated from Ash258/GenericBucket
/
xanmod-WSL2-lts.json
48 lines (48 loc) 路 2.71 KB
/
xanmod-WSL2-lts.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
{
"homepage": "https://github.com/Locietta/xanmod-kernel-WSL2",
"license": "GPL-2.0",
"extract_dir": "",
"bin": "",
"post_install": [
"#########################################",
"# set `.wslconfig` to use custom kernel #",
"#########################################",
"$ini = Add-Type -memberDefinition @\"",
"[DllImport(\"Kernel32\")]",
"public static extern long WritePrivateProfileString (string section, string key, string val, string filePath);",
"[DllImport(\"Kernel32\")]",
"public static extern int GetPrivateProfileString (string section, string key, string def, StringBuilder retVal, int size, string filePath);",
"\"@ -passthru -name CustomWSL2ProfileInstall -UsingNamespace System.Text",
"$kernel_path=\"$dir\\bzImage\" -replace \"\\\\\", \"\\\\\" # double all back-slashess",
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $kernel_path, \"$env:USERPROFILE\\.wslconfig\")"
],
"post_uninstall": [
"##########################################",
"# recover `.wslconfig` to default kernel #",
"##########################################",
"$ini = Add-Type -memberDefinition @\"",
"[DllImport(\"Kernel32\")]",
"public static extern long WritePrivateProfileString (string section,string key, string val, string filePath);",
"[DllImport(\"Kernel32\")]",
"public static extern int GetPrivateProfileString (string section, string key, string def, StringBuilder retVal, int size, string filePath);",
"\"@ -passthru -name CustomWSL2ProfileUninstall -UsingNamespace System.Text",
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $null, \"$env:USERPROFILE\\.wslconfig\")"
],
"version": "6.6.29-1.1",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.6.29-locietta-WSL2-xanmod1.1-lts/bzImage",
"hash": "2fdf1c3d11ede72098c958f3a59149f91740369d269f5f22f24aee2288f0a87f",
"checkver": {
"script": [
"$LATEST = ((curl.exe -sL -H \"Authorization: Bearer $(Get-GitHubToken)\" https://api.github.com/repos/Locietta/xanmod-kernel-WSL2/tags?per_page=60 | ConvertFrom-Json).name | Select-String 'lts')[0]",
"$LATEST"
],
"regex": "(?<main>[\\d.]+)-locietta-WSL2-xanmod(?<xanmod>[\\d.]+)",
"replace": "${1}-${2}"
},
"autoupdate": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage.sha256"
}
}
}