Skip to content

Commit

Permalink
[add bucket] add clash for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenway committed Oct 14, 2023
1 parent cd31825 commit c48617e
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 0 deletions.
68 changes: 68 additions & 0 deletions bucket/Clash-for-Windows_Chinese.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"version": "0.20.38",
"description": "clash for windows汉化版. 提供clash for windows的汉化版, 汉化补丁及汉化版安装程序",
"homepage": "https://github.com/Z-Siqi/Clash-for-Windows_Chinese",
"license": "Closed source Freeware",
"notes": "",
"architecture": {
"64bit": {
"url": "https://github.com/Z-Siqi/Clash-for-Windows_Chinese/releases/download/CFW-V0.20.38_CN/Clash.for.Windows-0.20.38-win.7z",
"hash": "76e4de1cfcfe5c44d3f2553fee4984e3a856079c408b9426abe417d06607676f",
"pre_install": [
"Expand-7zipArchive \"$dir\\`$PLUGINSDIR\\app-64.7z\" \"$dir\"",
"Remove-Item \"$dir\\`$PLUGINSDIR\", \"$dir\\`$R0\" -Force -Recurse"
]
}
},
"installer": {
"script": [
"if (!(Test-Path \"$persist_dir\\data\")) {",
" New-Item \"$persist_dir\\data\" -Type Directory -Force | Out-Null",
" if (Test-Path \"$env:USERPROFILE\\.config\\clash\") {",
" Copy-Item -Path \"$env:USERPROFILE\\.config\\clash\\*\" -Destination \"$persist_dir\\data\" -Recurse -Container",
" }",
"}",
"$runtimeCache = \"$env:APPDATA\\clash_win\"",
"$runtimeCachePersist = \"$persist_dir\\clash_win\"",
"if (Test-Path $runtimeCachePersist) {",
" Remove-Item $runtimeCache -Force -Recurse -ErrorAction SilentlyContinue",
" New-Item -Type Junction -Path $runtimeCache -Target $runtimeCachePersist | Out-Null",
"} else {",
" if (Test-Path $runtimeCache) {",
" Move-Item $runtimeCache $runtimeCachePersist -Force",
" New-Item -Type Junction -Path $runtimeCache -Target $runtimeCachePersist | Out-Null",
" }",
"}"
]
},
"uninstaller": {
"script": [
"$runtimeCache = \"$env:APPDATA\\clash_win\"",
"$runtimeCachePersist = \"$persist_dir\\clash_win\"",
"if (!(Test-Path $runtimeCachePersist)) {",
" Move-Item $runtimeCache $runtimeCachePersist -Force",
"} else {",
" Remove-Item $runtimeCache -Force -Recurse -ErrorAction SilentlyContinue",
"}"
]
},
"shortcuts": [
[
"Clash for Windows.exe",
"Clash for Windows"
]
],
"persist": "data",
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/Z-Siqi/Clash-for-Windows_Chinese/releases/download/CFW-V$version_CN/Clash.for.Windows-$version-win.7z"
}
},
"hash": {
"url": "https://github.com/Z-Siqi/Clash-for-Windows_Chinese/releases/download/$version/sha256sum",
"regex": "(?m)^7z: $sha256"
}
}
}
69 changes: 69 additions & 0 deletions bucket/clash-for-windows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"version": "0.20.38",
"description": "A Windows/macOS GUI based on Clash",
"homepage": "https://github.com/Fndroid/clash_for_windows_pkg",
"license": "Closed source Freeware",
"notes": "Clash for Windows data are now saved into '$persist_dir' and persisted by Scoop.",
"architecture": {
"64bit": {
"url": "https://github.com/Fndroid/clash_for_windows_pkg/releases/download/0.20.38/Clash.for.Windows.Setup.0.20.38.exe#/dl.7z",
"hash": "be1210f80e96f5c5da58a46cb4db43f432f6d7212fe1d9319aba65b773cf08da",
"pre_install": [
"Expand-7zipArchive \"$dir\\`$PLUGINSDIR\\app-64.7z\" \"$dir\"",
"Remove-Item \"$dir\\`$PLUGINSDIR\", \"$dir\\`$R0\" -Force -Recurse"
]
}
},
"installer": {
"script": [
"if (!(Test-Path \"$persist_dir\\data\")) {",
" New-Item \"$persist_dir\\data\" -Type Directory -Force | Out-Null",
" if (Test-Path \"$env:USERPROFILE\\.config\\clash\") {",
" Copy-Item -Path \"$env:USERPROFILE\\.config\\clash\\*\" -Destination \"$persist_dir\\data\" -Recurse -Container",
" }",
"}",
"$runtimeCache = \"$env:APPDATA\\clash_win\"",
"$runtimeCachePersist = \"$persist_dir\\clash_win\"",
"if (Test-Path $runtimeCachePersist) {",
" Remove-Item $runtimeCache -Force -Recurse -ErrorAction SilentlyContinue",
" New-Item -Type Junction -Path $runtimeCache -Target $runtimeCachePersist | Out-Null",
"} else {",
" if (Test-Path $runtimeCache) {",
" Move-Item $runtimeCache $runtimeCachePersist -Force",
" New-Item -Type Junction -Path $runtimeCache -Target $runtimeCachePersist | Out-Null",
" }",
"}"
]
},
"uninstaller": {
"script": [
"$runtimeCache = \"$env:APPDATA\\clash_win\"",
"$runtimeCachePersist = \"$persist_dir\\clash_win\"",
"if (!(Test-Path $runtimeCachePersist)) {",
" Move-Item $runtimeCache $runtimeCachePersist -Force",
"} else {",
" Remove-Item $runtimeCache -Force -Recurse -ErrorAction SilentlyContinue",
"}"
]
},
"shortcuts": [
[
"Clash for Windows.exe",
"Clash for Windows"
]
],
"persist": "data",
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/Fndroid/clash_for_windows_pkg/releases/download/$version/Clash.for.Windows.Setup.$version.exe#/dl.7z",
"hash": {
"url": "https://github.com/Fndroid/clash_for_windows_pkg/releases/download/$version/sha256sum",
"mode": "extract",
"regex": "(?m)^exe: $sha256"
}
}
}
}
}

0 comments on commit c48617e

Please sign in to comment.