Add install rules and CPack settings so cpack produces an installable .deb. Dependencies are derived with dpkg-shlibdeps, so they follow the binaries. The sherpa-onnx runtime the streaming backend needs is bundled because no distro package provides it. The fetch-models script now also locates its registry when installed system-wide. 增加 CPack 配置,可直接用 cpack 打出 deb:安装规则含桌面入口、应用图标、 模型注册表与下载脚本、用户文档;依赖由 dpkg-shlibdeps 自动推导;流式后端 需要的 sherpa-onnx 运行时(发行版无对应包)随包携带;fetch-models 脚本 装到系统后也能找到注册表。
17 lines
469 B
Bash
Executable File
17 lines
469 B
Bash
Executable File
#!/bin/sh
|
|
# 卸载后同样刷新缓存,避免菜单里留下一个指向已删除程序的条目。
|
|
set -e
|
|
|
|
case "$1" in
|
|
remove|purge)
|
|
if command -v update-desktop-database >/dev/null 2>&1; then
|
|
update-desktop-database -q /usr/share/applications || true
|
|
fi
|
|
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
|
|
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
exit 0
|