/
font-hackgen-console-nf.json
62 lines (62 loc) · 3.11 KB
/
font-hackgen-console-nf.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
{
"version": "2.9.0",
"description": "a composite font of Hack and GenJyuu-Gothic",
"license": {
"identifier": "OFL-1.1",
"url": "https://github.com/yuru7/HackGen/blob/master/LICENSE.txt"
},
"homepage": "https://github.com/yuru7/HackGen",
"url": "https://github.com/yuru7/HackGen/releases/download/v2.9.0/HackGen_NF_v2.9.0.zip",
"hash": "277cb874bbcf8a884e512bb2a01d62341d57286d8947057d652fab6488fc941c",
"extract_dir": "HackGen_NF_v2.9.0",
"installer": {
"script": [
"$fontName = 'HackGenConsoleNF-(Regular|Bold)'",
"",
"if ($global -and !(is_admin)) { error \"Administrator rights are required to install $app.\"; return }",
"$fontInstallDir = if ($global) { (Join-Path $env:windir Fonts) } else { (Join-Path $env:LOCALAPPDATA Microsoft Windows Fonts) }",
"$registryRoot = if ($global) { \"HKLM:\" } else { \"HKCU:\" }",
"$registryBranch = (Join-Path SOFTWARE Microsoft 'Windows NT' CurrentVersion Fonts)",
"$registryKey = (Join-Path $registryRoot $registryBranch)",
"",
"Get-ChildItem $dir -Filter '*.ttf' `",
"| Where-Object { $_.Name -match $fontName } `",
"| ForEach-Object {",
" $regName = $_.Name.Replace($_.Extension, ' (TrueType)')",
" $value = if ($global) { $_.Name } else { (Join-Path $fontInstallDir $_.Name) }",
" New-ItemProperty -Path $registryKey -Name $regName -Value $value -Force | Out-Null",
" Copy-Item $_.FullName -Destination $fontInstallDir",
"}",
"",
"Get-ChildItem $dir -Filter '*.ttf' `",
"| Where-Object { $_.Name -notmatch $fontName } `",
"| ForEach-Object {",
" Remove-Item $_",
"}"
]
},
"uninstaller": {
"script": [
"$fontName = 'HackGenConsoleNF-(Regular|Bold)'",
"",
"if ($global -and !(is_admin)) { error \"Administrator rights are required to uninstall $app.\"; return }",
"$fontInstallDir = if ($global) { (Join-Path $env:windir Fonts) } else { (Join-Path $env:LOCALAPPDATA Microsoft Windows Fonts) }",
"$registryRoot = if ($global) { \"HKLM:\" } else { \"HKCU:\" }",
"$registryBranch = (Join-Path SOFTWARE Microsoft 'Windows NT' CurrentVersion Fonts)",
"$registryKey = (Join-Path $registryRoot $registryBranch)",
"",
"Get-ChildItem $dir -Filter '*.ttf' `",
"| Where-Object { $_.Name -match $fontName } `",
"| ForEach-Object {",
" $regName = $_.Name.Replace($_.Extension, ' (TrueType)')",
" Remove-ItemProperty -Path $registryKey -Name $regName -Force -ErrorAction SilentlyContinue",
" Remove-Item (Join-Path $fontInstallDir $_.Name) -Force -ErrorAction SilentlyContinue",
"}"
]
},
"checkver": "github",
"autoupdate": {
"url": "https://github.com/yuru7/HackGen/releases/download/v$version/HackGen_NF_v$version.zip",
"extract_dir": "HackGen_NF_v$version"
}
}