master
yutent 2024-03-13 12:13:54 +08:00
parent 919e0decb2
commit 234b925615
1 changed files with 2 additions and 14 deletions

View File

@ -8,7 +8,6 @@ release="1.0.0.145"
deb_url="https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb" deb_url="https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb"
# 创建临时目录, 用于下载官方包 # 创建临时目录, 用于下载官方包
if [ -d $tmp_dir ]; then if [ -d $tmp_dir ]; then
# echo ""
rm -rf $tmp_dir rm -rf $tmp_dir
fi fi
@ -42,9 +41,6 @@ echo "解包完成, 复制到待打包目录..."
cp -r "${tmp_dir}/${app_name}/opt" "./unpack/" cp -r "${tmp_dir}/${app_name}/opt" "./unpack/"
cp -r "${tmp_dir}/${app_name}/usr" "./unpack/" cp -r "${tmp_dir}/${app_name}/usr" "./unpack/"
mv ./unpack/opt/wechat-beta/icons/wechat.png ./unpack/usr/share/icons/hicolor/256x256/apps/wechat.png
rm -rf ./unpack/opt/wechat-beta/icons
rm -rf $tmp_dir rm -rf $tmp_dir
echo "复制uos环境文件..." echo "复制uos环境文件..."
@ -59,7 +55,7 @@ echo """
Name=WeChat Name=WeChat
Name[zh_CN]=微信 Name[zh_CN]=微信
Exec=wechat %u Exec=wechat %u
Icon=wechat Icon=/opt/wechat-beta/icons/wechat.png
Categories=Utility;Network;InstantMessaging;Chat; Categories=Utility;Network;InstantMessaging;Chat;
Terminal=false Terminal=false
Type=Application Type=Application
@ -74,7 +70,6 @@ echo """
# wechat only support xcb # wechat only support xcb
BWRAP_ENV_APPEND=\"--setenv QT_QPA_PLATFORM xcb \" BWRAP_ENV_APPEND=\"--setenv QT_QPA_PLATFORM xcb \"
WECHAT_HOME_DIR=\"\$(xdg-user-dir DOCUMENTS)/WeChat_Data\"
if [ -z \${QT_IM_MODULE} ]; then if [ -z \${QT_IM_MODULE} ]; then
BWRAP_ENV_APPEND=\"\${BWRAP_ENV_APPEND} --setenv QT_IM_MODULE fcitx\" BWRAP_ENV_APPEND=\"\${BWRAP_ENV_APPEND} --setenv QT_IM_MODULE fcitx\"
@ -94,16 +89,9 @@ if [ -z \${GTK_USE_PORTAL} ]; then
BWRAP_ENV_APPEND=\"\${BWRAP_ENV_APPEND} --setenv GTK_USE_PORTAL 1\" BWRAP_ENV_APPEND=\"\${BWRAP_ENV_APPEND} --setenv GTK_USE_PORTAL 1\"
fi fi
if [ ! -d \"\${WECHAT_HOME_DIR}\" ]; then
mkdir -p \${WECHAT_HOME_DIR}
fi
exec bwrap \\ exec bwrap \\
--dev-bind / / \\ --dev-bind / / \\
--bind \"\${WECHAT_HOME_DIR}\" \"\${HOME}\" \\
--ro-bind-try \"\${HOME}/.cache/fontconfig/\" \"\${HOME}/.cache/fontconfig/\" \\
--ro-bind-try \"\${HOME}/.config/fontconfig\" \"\${HOME}/.config/fontconfig\" \\
--ro-bind-try \"\${HOME}/.local/share/fonts\" \"\${HOME}/.local/share/fonts\" \\
--ro-bind /usr/share/wechat-uos/var/ /var/ \\ --ro-bind /usr/share/wechat-uos/var/ /var/ \\
--ro-bind /usr/share/wechat-uos/etc/os-release /etc/os-release \\ --ro-bind /usr/share/wechat-uos/etc/os-release /etc/os-release \\
--ro-bind /usr/share/wechat-uos/etc/lsb-release /etc/lsb-release \\ --ro-bind /usr/share/wechat-uos/etc/lsb-release /etc/lsb-release \\
@ -128,7 +116,7 @@ IFS=$'\t' read -ra size <<< "$(du -d 0)"
echo """ echo """
Package: ${app_name} Package: ${app_name}
Version: ${version} Version: ${version}-1
Architecture: amd64 Architecture: amd64
Maintainer: Yutent <yutent.io@gmail.com> Maintainer: Yutent <yutent.io@gmail.com>
Installed-Size: ${size[0]} Installed-Size: ${size[0]}