-
Notifications
You must be signed in to change notification settings - Fork 1
/
lmroid.json
61 lines (61 loc) · 2.61 KB
/
lmroid.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
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"version": "1.2",
"description": "LMROID",
"homepage": "https://lmroidsoftware.wixsite.com/nhoshio",
"license": [
{
"identifier": "Proprietary",
"url": "https://lmroidsoftware.wixsite.com/nhoshio/%E5%88%A9%E7%94%A8%E8%A6%8F%E7%B4%84"
}
],
"notes": [
"ダウンロード・インストールに長時間かかります。",
"ダウンロードに失敗した場合は最初からのダウンロードになります。ブラウザでダウンロードしたファイルを scoop\\cache ディレクトリに配置するほうが確実です。"
],
"url": "https://lmroidsoftware.wixsite.com/nhoshio/%E5%88%A9%E7%94%A8%E8%A6%8F%E7%B4%84",
"hash": "bf2d7f5b14ba45d03f127a3a6a9be40185a7e4b22b82a277da555e8d5104ea09",
"installer": {
"script": [
"$id = \"1AljrRpnY32rXGRIkXGvPupEeooP15HBJ\"",
"$filename = \"LMROID v1.2.zip\"",
"$hash =\"c715397c9a1427651fcd2951c985e87f89695d649722bc76009842dc5b7c49d9\"",
"$file = $cachedir + \"\\\" + $filename",
"if(Test-Path -Path $file -PathType Leaf){",
" Write-Host \"Checking hash of $file ... \" -NoNewline",
" $filehash = (Get-FileHash -Path $file -Algorithm SHA256 | Select-Object -ExpandProperty Hash).ToLower()",
" if([string]::IsNullOrEmpty($hash)){",
" Write-Host \"skip\" -ForegroundColor Yellow",
" Write-Warning \"Warning: No hash in manifest. SHA256 for '${filename}' is:\"",
" Write-Host \" $filehash\" -ForegroundColor Yellow",
" }else{",
" if($hash -eq $filehash){",
" Write-Host \"ok\" -ForegroundColor Green",
" }else{",
" Write-Host \"error\" -ForegroundColor Red",
" Write-Warning \"Warning: Cache file corrupted for '${filename}'\"",
" Remove-Item -Path $file -Force",
" }",
" }",
"}",
"if(-not(Test-Path -Path $file -PathType Leaf)){",
" Write-Host Download file $id from Google Drive",
" $response = Invoke-WebRequest -Uri \"https://drive.google.com/uc?export=download&id=${id}\"",
" if($response -match 'id=\"downloadForm\" action=\"([^\"]+)\" method=\"post\"'){",
" $url = $matches[1].Replace(\"&\",\"&\")",
" Invoke-WebRequest -Uri $url -OutFile $file",
" }",
"}",
"Expand-Archive -Path $file -DestinationPath $dir"
]
},
"shortcuts": [
[
"LMROID v1.2\\LMROID.exe",
"LMROID"
]
],
"checkver": {
"url": "https://lmroidsoftware.wixsite.com/nhoshio/%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89",
"regex": "LMROID Ver([\\d\\.]+)</span>"
}
}