generated from Ash258/GenericBucket
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxanmod-WSL2.json
46 lines (46 loc) · 2.48 KB
/
xanmod-WSL2.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
{
"homepage": "https://github.com/Locietta/xanmod-kernel-WSL2",
"description": "Xanmod Kernel for WSL2.",
"license": "GPL-2.0",
"extract_dir": "",
"bin": "",
"notes": "The manifest is from https://github.com/Locietta/sniffer",
"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);",
"\"@ -passthru -name CustomWSL2ProfileInstall -UsingNamespace System.Text",
"$kernel_path=\"$dir\\bzImage-x64v3\" -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);",
"\"@ -passthru -name CustomWSL2ProfileUninstall -UsingNamespace System.Text",
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $null, \"$env:USERPROFILE\\.wslconfig\")"
],
"version": "6.8.11-1.1",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.8.11-locietta-WSL2-xanmod1.1/bzImage-x64v3",
"hash": "bcfec289be8d318bca26226e9337217fd41fc7118ce7f6ada4483f852ed7acca",
"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' -NotMatch)[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/bzImage-x64v3",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod/bzImage-x64v3.sha256"
}
}
}