/
super-ttc-iosevka-aile.json
64 lines (64 loc) 路 4.1 KB
/
super-ttc-iosevka-aile.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
{
"version": "27.3.5",
"description": "Iosevka is an open-source, sans-serif + slab-serif, monospace + quasi-proportional typeface family",
"homepage": "https://github.com/be5invis/Iosevka",
"license": "OFL-1.1",
"url": "https://github.com/be5invis/Iosevka/releases/download/v27.3.5/super-ttc-iosevka-aile-27.3.5.zip",
"hash": "8404c941d3fac293355b65c23a6bee8be499a468d660c163f2dfea70d1e2da49",
"installer": {
"script": [
"$currentBuildNumber = [int] (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\").CurrentBuildNumber",
"$windows1809BuildNumber = 17763",
"$isPerUserFontInstallationSupported = $currentBuildNumber -ge $windows1809BuildNumber",
"$isFontInstallationForAllUsers = $global -or !$isPerUserFontInstallationSupported",
"if ($isFontInstallationForAllUsers -and !(is_admin)) {",
" error \"Administrator rights are required to install $app.\"",
" exit 1",
"}",
"$fontInstallDir = if ($isFontInstallationForAllUsers) { \"$env:windir\\Fonts\" } else { \"$env:LOCALAPPDATA\\Microsoft\\Windows\\Fonts\" }",
"$registryRoot = if ($isFontInstallationForAllUsers) { \"HKLM\" } else { \"HKCU\" }",
"$registryKey = \"${registryRoot}:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\"",
"New-Item $fontInstallDir -ItemType Directory -ErrorAction SilentlyContinue | Out-Null",
"Get-ChildItem $dir -Filter '*.ttc' | ForEach-Object {",
" $value = if ($isFontInstallationForAllUsers) { $_.Name } else { \"$fontInstallDir\\$($_.Name)\" }",
" Copy-Item $_.FullName -Destination $fontInstallDir",
" New-ItemProperty -Path $registryKey -Name $_.Name.Replace($_.Extension, ' (TrueType)') -Value $value -Force | Out-Null",
"}"
]
},
"uninstaller": {
"script": [
"$currentBuildNumber = [int] (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\").CurrentBuildNumber",
"$windows1809BuildNumber = 17763",
"$isPerUserFontInstallationSupported = $currentBuildNumber -ge $windows1809BuildNumber",
"$isFontInstallationForAllUsers = $global -or !$isPerUserFontInstallationSupported",
"if ($isFontInstallationForAllUsers -and !(is_admin)) {",
" error \"Administrator rights are required to uninstall $app.\"",
" exit 1",
"}",
"$fontInstallDir = if ($isFontInstallationForAllUsers) { \"$env:windir\\Fonts\" } else { \"$env:LOCALAPPDATA\\Microsoft\\Windows\\Fonts\" }",
"$registryRoot = if ($isFontInstallationForAllUsers) { \"HKLM\" } else { \"HKCU\" }",
"$registryKey = \"${registryRoot}:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\"",
"Get-ChildItem $dir -Filter '*.ttc' | ForEach-Object {",
" Get-ChildItem $fontInstallDir -Filter $_.Name | ForEach-Object {",
" try {",
" Rename-Item $_.FullName $_.FullName -ErrorVariable LockError -ErrorAction Stop",
" } catch {",
" error \"'$app' is being used by another process.\"",
" error \"Please close all applications (e.g. vscode) that are using '$app' before uninstall or upgrade.\"",
" exit 1",
" }",
" }",
"}",
"Get-ChildItem $dir -Filter '*.ttc' | ForEach-Object {",
" Remove-ItemProperty -Path $registryKey -Name $_.Name.Replace($_.Extension, ' (TrueType)') -Force -ErrorAction SilentlyContinue",
" Remove-Item \"$fontInstallDir\\$($_.Name)\" -Force -ErrorAction SilentlyContinue",
"}",
"Write-Host \"The '$app' Font family has been uninstalled and will not be present after restarting your computer.\" -Foreground Magenta"
]
},
"checkver": "github",
"autoupdate": {
"url": "https://github.com/be5invis/Iosevka/releases/download/v$version/super-ttc-iosevka-aile-$version.zip"
}
}