-
Notifications
You must be signed in to change notification settings - Fork 0
/
wechat.sh
30 lines (24 loc) · 885 Bytes
/
wechat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# wechat-beta only support xcb
BWRAP_ENV_APPEND="--setenv QT_QPA_PLATFORM xcb "
if [ -z ${QT_IM_MODULE} ]; then
BWRAP_ENV_APPEND="${BWRAP_ENV_APPEND} --setenv QT_IM_MODULE fcitx"
fi
#if [ -z ${QT_SCALE_FACTOR} ]; then
# BWRAP_ENV_APPEND="${BWRAP_ENV_APPEND} --setenv QT_SCALE_FACTOR 1.5"
#fi
if [ -z ${GTK_USE_PORTAL} ]; then
BWRAP_ENV_APPEND="${BWRAP_ENV_APPEND} --setenv GTK_USE_PORTAL 1"
fi
if [ ! -d "${HOME}/Documents/WeChat_Data" ]; then
mkdir -p ${HOME}/Documents/WeChat_Data
fi
exec bwrap \
--dev-bind / / \
--bind ${HOME}/Documents/WeChat_Data ${HOME} \
--ro-bind /usr/share/wechat-kylin/lsb-release /etc/lsb-release \
--ro-bind /usr/share/wechat-kylin/.kyact /etc/.kyact \
--ro-bind /usr/share/wechat-kylin/LICENSE /etc/LICENSE \
--ro-bind-try /usr/lib/snapd-xdg-open/xdg-open /usr/bin/xdg-open \
${BWRAP_ENV_APPEND} \
/opt/wechat-beta/wechat $@