微信正式版

master
yutent 2024-03-14 12:04:16 +08:00
parent 234b925615
commit 40c6f61751
1 changed files with 16 additions and 12 deletions

View File

@ -2,10 +2,10 @@
app_name="wechat"
tmp_dir="/tmp/${app_name}_tmp"
version="1.0.0.145"
release="1.0.0.145"
version="1.0.0.236"
release="1.0.0.236"
deb_url="https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb"
deb_url="https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_${version}_amd64.deb"
# 创建临时目录, 用于下载官方包
if [ -d $tmp_dir ]; then
rm -rf $tmp_dir
@ -28,25 +28,29 @@ mkdir -p "./unpack/DEBIAN"
mkdir -p "./unpack/usr/bin"
mkdir -p "./unpack/usr/lib/license"
mkdir -p "./unpack/usr/share/wechat-uos"
mkdir -p "./unpack/usr/share/icons/hicolor/256x256/apps"
mkdir -p "./unpack/usr/share/applications"
mkdir -p "./unpack/usr/share/icons"
mkdir -p "./unpack/opt/apps"
echo "下载官方原包..."
wget $deb_url -O "${tmp_dir}/${app_name}.deb"
# wget $deb_url -O "${tmp_dir}/${app_name}.deb"
cp ~/Downloads/bf103d215f344e4e8d0e17a7a37eebe8.deb "${tmp_dir}/${app_name}.deb"
echo "下载完成, 解包中..."
dpkg-deb -R "${tmp_dir}/${app_name}.deb" "${tmp_dir}/${app_name}"
echo "解包完成, 复制到待打包目录..."
cp -r "${tmp_dir}/${app_name}/opt" "./unpack/"
cp -r "${tmp_dir}/${app_name}/usr" "./unpack/"
cp -r "${tmp_dir}/${app_name}/opt/apps/com.tencent.wechat/files" "./unpack/opt/apps/com.tencent.wechat"
cp -r "${tmp_dir}/${app_name}/opt/apps/com.tencent.wechat/entries/icons/hicolor" "./unpack/usr/share/icons/"
rm -rf $tmp_dir
echo "复制uos环境文件..."
cp -r ./license/etc ./unpack/usr/share/wechat-uos/
cp -r ./license/var ./unpack/usr/share/wechat-uos/
cp ./license/libuosdevicea.so ./unpack/usr/lib/license/libuosdevicea.so
mv ./unpack/opt/apps/com.tencent.wechat/libuosdevicea.so ./unpack/usr/lib/license/libuosdevicea.so
echo "复制完成, 创建可执行文件及程序桌面入口文件..."
@ -55,14 +59,14 @@ echo """
Name=WeChat
Name[zh_CN]=微信
Exec=wechat %u
Icon=/opt/wechat-beta/icons/wechat.png
Icon=com.tencent.wechat
Categories=Utility;Network;InstantMessaging;Chat;
Terminal=false
Type=Application
StartupWMClass=WeChat
X-GNOME-SingleWindow=true
SingleMainWindow=true
""" > "./unpack/usr/share/applications/wechat.desktop"
""" > "./unpack/usr/share/applications/com.tencent.wechat.desktop"
echo """
@ -96,7 +100,7 @@ exec bwrap \\
--ro-bind /usr/share/wechat-uos/etc/os-release /etc/os-release \\
--ro-bind /usr/share/wechat-uos/etc/lsb-release /etc/lsb-release \\
\${BWRAP_ENV_APPEND} \\
/opt/wechat-beta/wechat \$@
/opt/apps/com.tencent.wechat/wechat \$@
""" > ./unpack/usr/bin/wechat
@ -116,7 +120,7 @@ IFS=$'\t' read -ra size <<< "$(du -d 0)"
echo """
Package: ${app_name}
Version: ${version}-1
Version: ${release}
Architecture: amd64
Maintainer: Yutent <yutent.io@gmail.com>
Installed-Size: ${size[0]}