麒麟版微信迁移到Ubuntu或Debian
1. 麒麟版微信下载地址
https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/all/
下面以1.0.0.241_amd64版为例。
2. 解包
# 提取程序文件
dpkg -X wechat-beta_1.0.0.241_amd64.deb extract
# 提取控制文件
dpkg -e wechat-beta_1.0.0.241_amd64.deb extract/DEBIAN/
3. 修改
3.1. 添加下列文件
extract/etc/LICENSE
extract/etc/lsb-release-ukui
extract/etc/.kyact
extract/usr/lib/libactivation.so
3.2. 修改下列文件
extract/DEBIAN/postinst
该文件最后添加下面脚本:
if [ -e "/etc/lsb-release" ]; then
mv /etc/lsb-release /etc/lsb-release-old
fi
mv /etc/lsb-release-ukui /etc/lsb-release
extract/DEBIAN/postrm
在该文件最后添加以下脚本:
if [ -e "/etc/lsb-release-old" ]; then
mv /etc/lsb-release-old /etc/lsb-release
fi
4. 打包
mkdir build
dpkg-deb -b extract build
最后完成的包为:build/wechat-beta_1.0.0.241_amd64.deb。然后就可以在ubuntu或者debian中用dpkg命令正常安装了。
License:
CC BY 4.0