-
Notifications
You must be signed in to change notification settings - Fork 1
/
neutrino-itako.json
78 lines (78 loc) · 3.5 KB
/
neutrino-itako.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"version": "1.3.0",
"description": "東北イタコ NEUTRINO 歌声ライブラリ",
"homepage": "https://studio-neutrino.com/",
"license": [
{
"identifier": "Proprietary"
}
],
"suggest": {
"NEUTRINO": [
"neutrino",
"dtm/neutrino"
]
},
"notes": [
"ダウンロード・インストールに長時間かかります。ダウンロードに失敗した場合は最初からのダウンロードになります。"
],
"url": "https://studio-neutrino.com/wp-content/uploads/2021/02/logo_light-1536x384.png",
"hash": "61681822df456676d83d7d991cffc7196167cbc56cfabcac5e9bdcc20200a8e6",
"installer": {
"script": [
"$id = \"1TDWS-ilFDWjWSyZ2jFqs9zqaqbU7fF1x\"",
"$filename = \"東北イタコ(NEUTRINO-Library)-v1.3.0.zip\"",
"$hash =\"086d9a74bd11c53e844bd90b12fdc6972c5716d17fdbc7741f73e745fffa4e62\"",
"$model_dir =\"東北イタコ(NEUTRINO-Library)\\ITAKO\"",
"$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}'\"",
" Write-Warning \"expected: ${hash}\"",
" Write-Warning \"actual: ${filehash}\"",
" 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(\"&\",\"&\")",
" (New-Object System.Net.WebClient).DownloadFile($url, \"${file}.tmp\")",
" Rename-Item -Path \"${file}.tmp\" -NewName $filename",
" if([string]::IsNullOrEmpty($hash)){",
" $filehash = (Get-FileHash -Path $file -Algorithm SHA256 | Select-Object -ExpandProperty Hash).ToLower()",
" Write-Warning \"Warning: No hash in manifest. SHA256 for '${filename}' is:\"",
" Write-Host \" $filehash\" -ForegroundColor Yellow",
" }",
" } else {",
" Write-Warning $response",
" }",
"}",
"Expand-Archive -Path $file -DestinationPath $dir",
"Copy-Item -Force -Recurse -Path \"${dir}\\${model_dir}\" -Destination \"${persist_dir}\\..\\neutrino\\NEUTRINO\\model\"",
"Remove-Item -Force -Recurse -Path \"${dir}\\${model_dir}\""
]
},
"uninstaller": {
"script": [
"$model =\"ITAKO\"",
"Remove-Item -Force -Recurse -Path \"${persist_dir}\\..\\neutrino\\NEUTRINO\\model\\${model}\""
]
},
"checkver": {
"url": "https://studio-neutrino.com/535/",
"regex": "%E6%9D%B1%E5%8C%97%E3%82%A4%E3%82%BF%E3%82%B3%EF%BC%88NEUTRINO-Library%EF%BC%89-v([\\d.]+[^.]*).zip"
}
}