Skip to content

Commit

Permalink
xanmod-WSL2: update naming for Locietta/xanmod-kernel-WSL2#57
Browse files Browse the repository at this point in the history
  • Loading branch information
Locietta committed May 2, 2024
1 parent 6365ccb commit 94033b0
Show file tree
Hide file tree
Showing 9 changed files with 259 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"[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-old\" -replace \"\\\\\", \"\\\\\" # double all back-slashess",
"$kernel_path=\"$dir\\bzImage-x64v2\" -replace \"\\\\\", \"\\\\\" # double all back-slashess",
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $kernel_path, \"$env:USERPROFILE\\.wslconfig\")"
],
"post_uninstall": [
Expand All @@ -29,7 +29,7 @@
"$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-old",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.6.29-locietta-WSL2-xanmod1.1-lts/bzImage-x64v2",
"hash": "6489b142f690a0d4b33d5af56f58efda1d4bffd0c96ef5127d861fc8380271a9",
"checkver": {
"script": [
Expand All @@ -40,9 +40,9 @@
"replace": "${1}-${2}"
},
"autoupdate": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-old",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-x64v2",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-old.sha256"
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-x64v2.sha256"
}
}
}
48 changes: 48 additions & 0 deletions bucket/xanmod-WSL2-lts-x64v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,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-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);",
"[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-x64v3",
"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-x64v3",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-x64v3.sha256"
}
}
}
48 changes: 48 additions & 0 deletions bucket/xanmod-WSL2-lts-x64v4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,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-x64v4\" -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-x64v4",
"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-x64v4",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-x64v4.sha256"
}
}
}
8 changes: 4 additions & 4 deletions bucket/xanmod-WSL2-lts.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"[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",
"$kernel_path=\"$dir\\bzImage-x64v3\" -replace \"\\\\\", \"\\\\\" # double all back-slashess",
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $kernel_path, \"$env:USERPROFILE\\.wslconfig\")"
],
"post_uninstall": [
Expand All @@ -29,7 +29,7 @@
"$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",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.6.29-locietta-WSL2-xanmod1.1-lts/bzImage-x64v3",
"hash": "2fdf1c3d11ede72098c958f3a59149f91740369d269f5f22f24aee2288f0a87f",
"checkver": {
"script": [
Expand All @@ -40,9 +40,9 @@
"replace": "${1}-${2}"
},
"autoupdate": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-x64v3",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage.sha256"
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod-lts/bzImage-x64v3.sha256"
}
}
}
49 changes: 49 additions & 0 deletions bucket/xanmod-WSL2-x64v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"homepage": "https://github.com/Locietta/xanmod-kernel-WSL2",
"description": "Xanmod Kernel for 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-x64v2\" -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.8.8-1.1",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.8.8-locietta-WSL2-xanmod1.1/bzImage-x64v2",
"hash": "a235d6ef59827e3cfcac599e61a2da89baebc88e54238abe7e9b2bdff649b1ac",
"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-x64v2",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod/bzImage-x64v2.sha256"
}
}
}
49 changes: 49 additions & 0 deletions bucket/xanmod-WSL2-x64v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"homepage": "https://github.com/Locietta/xanmod-kernel-WSL2",
"description": "Xanmod Kernel for 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-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);",
"[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.8.8-1.1",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.8.8-locietta-WSL2-xanmod1.1/bzImage-x64v3",
"hash": "9ae1395dd9b0a69c6802b57a370ff9070fe1cb60126cf674a4c7452f7dfda822",
"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"
}
}
}
49 changes: 49 additions & 0 deletions bucket/xanmod-WSL2-x64v4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"homepage": "https://github.com/Locietta/xanmod-kernel-WSL2",
"description": "Xanmod Kernel for 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-x64v4\" -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.8.8-1.1",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.8.8-locietta-WSL2-xanmod1.1/bzImage-x64v4",
"hash": "9ae1395dd9b0a69c6802b57a370ff9070fe1cb60126cf674a4c7452f7dfda822",
"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-x64v4",
"hash": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod/bzImage-x64v4.sha256"
}
}
}
8 changes: 4 additions & 4 deletions bucket/xanmod-WSL2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"[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",
"$kernel_path=\"$dir\\bzImage-x64v3\" -replace \"\\\\\", \"\\\\\" # double all back-slashess",
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $kernel_path, \"$env:USERPROFILE\\.wslconfig\")"
],
"post_uninstall": [
Expand All @@ -30,7 +30,7 @@
"$null = $ini::WritePrivateProfileString(\"wsl2\", \"kernel\", $null, \"$env:USERPROFILE\\.wslconfig\")"
],
"version": "6.8.8-1.1",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.8.8-locietta-WSL2-xanmod1.1/bzImage",
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/6.8.8-locietta-WSL2-xanmod1.1/bzImage-x64v3",
"hash": "9ae1395dd9b0a69c6802b57a370ff9070fe1cb60126cf674a4c7452f7dfda822",
"checkver": {
"script": [
Expand All @@ -41,9 +41,9 @@
"replace": "${1}-${2}"
},
"autoupdate": {
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod/bzImage",
"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.sha256"
"url": "https://github.com/Locietta/xanmod-kernel-WSL2/releases/download/$matchMain-locietta-WSL2-xanmod$matchXanmod/bzImage-x64v3.sha256"
}
}
}
Loading

0 comments on commit 94033b0

Please sign in to comment.