/
chatbox.json
66 lines (66 loc) · 3.44 KB
/
chatbox.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
{
"description": "Chatbox is a desktop app for GPT-4 / GPT-3.5 (OpenAI API)",
"homepage": "https://github.com/Bin-Huang/chatbox",
"license": "GPL-3.0-only",
"version": "1.3.5",
"checkver": {
"url": "https://chatboxai.app/help-center/changelog",
"regex": "<h2>Changelog</h2>\\s*<a(?:(?!<a|</a>).)*</a>\\s*<h3>v(?<Version>\\d+(\\.\\d+)*)</h3>",
"replace": "${Version}"
},
"autoupdate": {
"url": "https://chatboxai.app/install_chatbox/win64#/setup.7z",
"hash": {
"mode": "download"
}
},
"url": "https://chatboxai.app/install_chatbox/win64#/setup.7z",
"hash": "6b4275ba5a70c76d47725c0c9c1c5f7b8ae5ecae24aa206b82d1a5db604b44a2",
"shortcuts": [
[
"Chatbox.exe",
"ChatGPT"
]
],
"installer": {
"script": [
"Move-Item -Path \"$dir\\`$PLUGINSDIR\\*\" -Destination $dir\\ -Force",
"Move-Item -Path \"$dir\\`$R0\\*\" -Destination $dir\\ -Force",
"Remove-Item -Path \"$dir\\`$PLUGINSDIR\" -Recurse -Force",
"Remove-Item -Path \"$dir\\`$R0\" -Recurse -Force",
"7z x -o\"$dir\" \"$dir\\app-64.7z\" -y | Out-Null",
"Remove-Item -Path \"$dir\\app-64.7z\" -Force"
]
},
"post_install": [
"if (Test-Path -Path \"$persist_dir\\.use_original_icon\") {return}",
"if (Get-Command magick -ErrorAction SilentlyContinue) {",
" Push-Location $dir",
" Invoke-WebRequest https://cdn.openai.com/brand/openai-logos.zip -OutFile openai-logos.zip",
" Expand-Archive openai-logos.zip -DestinationPath logos",
" Move-Item -Path logos\\openai-logos\\SVGs\\openai-logomark.svg -Destination logo.svg",
" Remove-Item -Path openai-logos.zip",
" Remove-Item -Path logos -Recurse",
" magick -size 256x256 xc:none -fill \"#1ea078\" -draw \"circle 128,128 128,0\" logo_circle.png",
" magick convert -density 128x128 -background transparent logo.svg -define icon:auto-resize -colors 256 logo.png",
null,
" magick logo.png -resize 150x150 logo_resized.png",
" magick composite -gravity center logo_resized.png logo_circle.png OpenAI.ico",
" Remove-Item logo*",
" $shortcutPath = Join-Path -Path (Convert-Path([System.IO.Path]::Combine([Environment]::GetFolderPath($global ? 'CommonStartMenu':'StartMenu'), 'Programs', 'Scoop Apps'))) -ChildPath 'ChatGPT.lnk'",
" Copy-Item -Path $shortcutPath -Destination OriginalShortcut.lnk",
" $shortcut = (New-Object -ComObject WScript.Shell).CreateShortcut($shortcutPath)",
" $shortcut.IconLocation = (Join-Path -Path $dir -ChildPath 'OpenAI.ico')",
" $shortcut.Save()",
" Pop-Location",
" Write-Host 'A custom icon has been set for the shortcut. The original shortcut is saved as OriginalShortcut.lnk in the app folder.'",
"} else {",
" Write-Host 'Falling back to the original icon as ImageMagick is not installed.'",
"}"
],
"notes": [
"By default, if ImageMagick is installed, the installer will set the icon of the shortcut to the OpenAI logo.",
"Follow the instructions in the post instalaltion log to revert to the original icon if needed.",
"To always prefer the original icon, create a file named .use_original_icon in the persist direcotory, which usually defaults to $HOME\\scoop\\persist\\chatbox"
]
}