Sunny
deepin
2025-02-26 09:08 或者说,如何制作deb包让它在用deepin-deb-installer安装过程中能够接收用户输入?
Reply Like 0 View the author
或者说,如何制作deb包让它在用deepin-deb-installer安装过程中能够接收用户输入?
deepin-deb-installer 我记得只能处理简单的 templates,根据当前 dpkg 输出匹配 templates 里面的关键词判断是否显示配置窗口之类的......
可以参考下 mysql-apt-config
这个安装包是怎么做的,安装时会要求用户选择发行版和代号,是可以选择对应数字的。
deepin-deb-installer 我记得只能处理简单的 templates,根据当前 dpkg 输出匹配 templates 里面的关键词判断是否显示配置窗口之类的......
可以参考下 mysql-apt-config
这个安装包是怎么做的,安装时会要求用户选择发行版和代号,是可以选择对应数字的。
我下载下来试了一下,双击这个包,安装过程中没有交互,直到结束。
Popular Ranking
ChangePopular Events
More
我自制的deb包,签过名了。用deepin-deb-installer安装失败了,不知道是哪里出的问题
我的deb包是有交互的,会问配置文件路径,所以我有写DEBIAN/templates文件,内容如下:
```
Template: ******/config_path
Type: string
Description: Please input the configuration file path:
Json file from server
```
在postinst文件中有以下语句:
```
db_input critical ******/config_path || true
db_go
db_get ******/config_path
CONFIG_PATH="$RET"
```
用终端命令dpkg -i可以安装成功,会在打出“Please input the configuration file path:”之后接收用户输入,而且脚本也成功拿到了值。
但是用deepin-deb-installer装的时候一直出现一个输入框,提示:请输入序号进行配置,然后输入什么都不行,请问是哪里出了问题?
谢谢