summarylogtreecommitdiffstats
path: root/wemeet.sh
blob: d884d46e7d8b159a76f78caa80407fca6d35c554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -eu
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_STYLE_OVERRIDE=fusion # 解决使用自带 Qt 情况下,字体颜色全白看不到的问题
export IBUS_USE_PORTAL=1        # fix ibus
export LD_LIBRARY_PATH="/usr/lib/wemeet:$PATH" # 否则启动失败
USER_RUN_DIR="/run/user/$(id -u)"
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
FONTCONFIG_DIR="$CONFIG_DIR/fontconfig"
KDE_GLOBALS_FILE="$CONFIG_DIR/kdeglobals"
KDE_ICON_CACHE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/icon-cache.kcache"
WEMEET_APP_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/wemeetapp"
LD_PRELOAD_WRAP="${LD_PRELOAD:-}:/usr/lib/wemeet/libwemeetwrap.so:/usr/lib/wemeet/libhook.so"

if [ "$(basename "$0")" = 'wemeet-x11' ]; then
    # force x11
    export XDG_SESSION_TYPE=x11
    export EGL_PLATFORM=x11
    export QT_QPA_PLATFORM=xcb
    unset WAYLAND_DISPLAY
fi
export LD_PRELOAD="$LD_PRELOAD_WRAP"
exec /opt/wemeet/bin/wemeetapp "$@"