-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathautohotkey.json
86 lines (86 loc) · 3.79 KB
/
autohotkey.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
79
80
81
82
83
84
85
86
{
"version": "2.0.19",
"description": "The ultimate automation scripting language for Windows.",
"homepage": "https://www.autohotkey.com/",
"license": "GPL-2.0-or-later",
"notes": [
"Install specific version of Interpreter(Default: Latest 1.x):",
" - 'autohotkey /script \"$dir\\UX\\install-version.ahk\" [version]'",
"Uninstall Sub-versions of Interpreter:",
" - 'autohotkey /script \"$dir\\UX\\ui-uninstall.ahk\"'",
"See also: https://github.com/ScoopInstaller/Extras/issues/10066"
],
"url": "https://github.com/AutoHotkey/AutoHotkey/releases/download/v2.0.19/AutoHotkey_2.0.19.zip",
"hash": "4e0d0e65655066a646a210951320feaef0729a3597177131adaec4066bef5869",
"extract_to": "installer",
"installer": {
"script": [
"$ahk = @('/script', \"`\"$dir\\installer\\UX\\install.ahk`\"\", '/to', \"`\"$dir`\"\", '/user', '/silent')",
"if ($global) { $ahk = @('/script', \"`\"$dir\\installer\\UX\\install.ahk`\"\", '/to', \"`\"$dir`\"\", '/silent') }",
"Start-Process \"$dir\\installer\\AutoHotkey32.exe\" -ArgumentList $ahk -Wait"
]
},
"post_install": [
"Remove-Item \"$dir\\installer\" -Force -Recurse",
"# Persistence",
"if (Test-Path \"$persist_dir\\installed-files.csv\") {",
" Get-Content \"$persist_dir\\installed-files.csv\" | Add-Content \"$dir\\UX\\installed-files.csv\"",
" Copy-Item \"$persist_dir\\installed-files\\*\" \"$dir\" -Recurse -ErrorAction SilentlyContinue",
" # Remove old files",
" Remove-Item \"$persist_dir\\installed-files.csv\" -Force",
" Remove-Item \"$persist_dir\\installed-files\" -Force -Recurse",
"}"
],
"architecture": {
"64bit": {
"bin": [
[
"UX\\AutohotkeyUX.exe",
"autohotkey"
],
[
"v2\\AutoHotkey32.exe",
"autohotkey32"
]
]
},
"32bit": {
"bin": [
"UX\\AutohotkeyUX.exe",
"autohotkey"
]
}
},
"pre_uninstall": [
"# Persistence",
"ensure \"$persist_dir\" | Out-Null",
"ensure \"$persist_dir\\installed-files\" | Out-Null",
"if (Test-Path \"$dir\\UX\\installed-files.csv\") {",
" $csv = Import-Csv \"$dir\\UX\\installed-files.csv\" | Where-Object 'Version' -ne $version",
" if ($csv) {",
" $export = @()",
" $dirs = @()",
" $csv | ForEach-Object {",
" $current = (Get-Item \"$dir\\$($_.'Path')\" -ErrorAction SilentlyContinue).Directory.Name",
" $export += \"$($_.'Hash'),$($_.'Version'),$($_.'Path'),$($_.'Description')\"",
" if (!($dirs.Contains($current)) -and ($_.'Path' -notlike '*.lnk')) { $dirs += $current }",
" }",
" $export | Out-File \"$persist_dir\\installed-files.csv\" -Encoding ASCII",
" $dirs | ForEach-Object { Copy-Item \"$dir\\$_\" \"$persist_dir\\installed-files\" -Recurse -ErrorAction SilentlyContinue }",
" }",
"}"
],
"uninstaller": {
"script": "Start-Process \"$dir\\UX\\AutoHotkeyUX.exe\" -ArgumentList @('/script', \"`\"$dir\\UX\\install.ahk`\"\", '/uninstall', '/silent') -Wait"
},
"checkver": {
"url": "https://www.autohotkey.com/download/2.0/version.txt",
"regex": "([\\d.]+)"
},
"autoupdate": {
"url": "https://github.com/AutoHotkey/AutoHotkey/releases/download/v$version/AutoHotkey_$version.zip",
"hash": {
"url": "https://www.autohotkey.com/download/$majorVersion.$minorVersion/AutoHotkey_$version.zip.sha256"
}
}
}