chore(pack): add CPack configuration to build a deb package
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 脚本 装到系统后也能找到注册表。
This commit is contained in:
1 parent
898763eb74
commit
8b9a8c420e
9 files changed
+401
-5
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# 安装后刷新桌面数据库与图标缓存,否则刚装完的应用菜单里可能看不到这个条目。
|
||||
# (本包的共享库在 /usr/lib/live-caption/,靠二进制的 RPATH 查找,不走 ldconfig,
|
||||
# 这里仍然调一下只是兜底。)
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
ldconfig
|
||||
|
||||
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
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
@@ -0,0 +1,17 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Live Caption
|
||||
Name[zh_CN]=实时字幕
|
||||
GenericName=Real-time captions
|
||||
GenericName[zh_CN]=实时字幕
|
||||
Comment=Show live subtitles for the audio your system is playing
|
||||
Comment[zh_CN]=把系统正在播放的声音实时转写成字幕
|
||||
Exec=live-caption
|
||||
TryExec=live-caption
|
||||
Icon=live-caption
|
||||
Terminal=false
|
||||
Categories=AudioVideo;Audio;
|
||||
Keywords=caption;subtitle;subtitles;speech;transcription;asr;
|
||||
Keywords[zh_CN]=字幕;实时字幕;语音识别;听写;
|
||||
StartupNotify=false
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
live-caption 图标。
|
||||
|
||||
刻意不用文字(字形)而画成「字幕面板」:SVG 里的 <text> 依赖渲染环境有对应字体,
|
||||
而这条图标要跟着主题一起渲染。所以画成和悬浮窗一样的样子 ——
|
||||
深色圆角面板 + 一行已稳定文本(白)+ 一行不稳定尾部(灰)。
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||
<defs>
|
||||
<clipPath id="panel">
|
||||
<rect x="2" y="11" width="60" height="42" rx="10"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
<!-- 面板 -->
|
||||
<rect x="2" y="11" width="60" height="42" rx="10" fill="#1b1b1b"/>
|
||||
<rect x="2" y="11" width="60" height="42" rx="10" fill="none"
|
||||
stroke="#3a3a3a" stroke-width="1.5"/>
|
||||
|
||||
<!-- 已稳定文本 -->
|
||||
<g clip-path="url(#panel)">
|
||||
<rect x="11" y="24" width="42" height="6" rx="3" fill="#f5f5f5"/>
|
||||
<!-- 不稳定尾部 -->
|
||||
<rect x="11" y="35" width="26" height="6" rx="3" fill="#8d8d8d"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1016 B |
Reference in new issue
Block a user