mirror of
https://github.com/Calinou/scoop-games.git
synced 2026-08-02 15:59:43 +08:00
48 lines
2.3 KiB
JSON
48 lines
2.3 KiB
JSON
{
|
|
"version": "1.19.3.3219",
|
|
"description": "Blizzard's official games client",
|
|
"homepage": "https://battle.net/",
|
|
"license": {
|
|
"identifier": "Freeware",
|
|
"url": "https://www.blizzard.com/en-us/legal/"
|
|
},
|
|
"url": "https://us.battle.net/download/getInstaller?os=win&installer=Battle.net-Setup.exe#/Battle.net-Setup.exe",
|
|
"hash": "de5d32d4ea5eed5a9e120027fb68b370976dbfecc8f2a8f91305977f0b87fcaf",
|
|
"pre_install": [
|
|
"if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
|
|
"$setup = \"$dir/Battle.net-Setup.exe\"",
|
|
"& $setup --installpath=$dir",
|
|
"$StartDate = Get-Date",
|
|
"Do { $SetupProcess = Get-Process Battle.net-Setup -ErrorAction Ignore } Until ($null -ne $SetupProcess -or $StartDate.AddSeconds(10) -lt (Get-Date))",
|
|
"if ($null -ne $SetupProcess) { Wait-Process $SetupProcess.Id }",
|
|
"$BattlenetProcess = Get-Process Battle.net -ErrorAction Ignore",
|
|
"if ($null -ne $BattlenetProcess) { Stop-Process $BattlenetProcess -Force -ErrorAction Ignore } else { error \"Unable to $cmd $app\" successfully; break }",
|
|
"Remove-Item $setup",
|
|
"Remove-Item \"$dir/.battlenet\" -Recurse -ErrorAction SilentlyContinue"
|
|
],
|
|
"shortcuts": [
|
|
[
|
|
"Battle.net Launcher.exe",
|
|
"Battle.net"
|
|
]
|
|
],
|
|
"pre_uninstall": [
|
|
"if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
|
|
"if ($null -ne (Get-Process 'Agent', 'Battle.net' -ErrorAction Ignore)) { error 'Make sure neither Battle.net nor Agent.exe are running before uninstalling.'; break }"
|
|
],
|
|
"post_uninstall": [
|
|
"\"$env:ALLUSERSPROFILE/Battle.net\",",
|
|
"\"$env:ALLUSERSPROFILE/Battle.net_components\",",
|
|
"\"$env:ALLUSERSPROFILE/Microsoft/Windows/Start Menu/Programs/Battle.net\",",
|
|
"'HKLM:/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/Battle.net',",
|
|
"'HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/Battle.net' | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue"
|
|
],
|
|
"checkver": {
|
|
"url": "https://formulae.brew.sh/api/cask/battle-net.json",
|
|
"jsonpath": "$.version"
|
|
},
|
|
"autoupdate": {
|
|
"url": "https://us.battle.net/download/getInstaller?os=win&installer=Battle.net-Setup.exe#/Battle.net-Setup.exe"
|
|
}
|
|
}
|