From 40c6f61751df44627a2df16ae035736623aab1b2 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 14 Mar 2024 12:04:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=AD=A3=E5=BC=8F=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wechat/package.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/wechat/package.sh b/wechat/package.sh index bcbeaec..35223e4 100755 --- a/wechat/package.sh +++ b/wechat/package.sh @@ -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 Installed-Size: ${size[0]}