[fix] 尝试修复 GDM Wayland 问题

This commit is contained in:
Yidaozhan Ya 2023-02-13 19:36:04 +08:00
parent 9aefc883d5
commit 4e1130acde
4 changed files with 23 additions and 33 deletions

View file

@ -1,9 +1,8 @@
pkgbase = linuxqq-nt-bwrap
pkgdesc = New Linux QQ based on Electron, with bubblewrap sandbox and some tweaks
pkgver = 3.0.0_571
pkgrel = 5
pkgrel = 6
url = https://im.qq.com/linuxqq/index.shtml
install = linuxqq.install
arch = x86_64
arch = aarch64
license = custom
@ -30,7 +29,7 @@ pkgbase = linuxqq-nt-bwrap
source = start.sh
source = config.json
source = xdg-open.sh
sha256sums = ee4e8dac9c6208acefbcb773e838b88d1f313bc346bda2725545677ae0418f3a
sha256sums = 5d660062a87e2e6eda732c61db9ab07af3e5cc431fe6acb67ccd235aced92c0c
sha256sums = 82182e49c883e16c7ff38e4722c3950e2758b4342c51521147423026965196a9
sha256sums = 78a573867355fb4c3e728d0c8ac0746d47fa7d64f90ee2b62ee9f0ccae095edb
source_x86_64 = https://dldir1.qq.com/qqfile/qq/QQNT/c005c911/linuxqq_3.0.0-571_amd64.deb

View file

@ -2,7 +2,7 @@
_pkgname=linuxqq
pkgname=linuxqq-nt-bwrap
pkgver=3.0.0_571
pkgrel=5
pkgrel=6
pkgdesc="New Linux QQ based on Electron, with bubblewrap sandbox and some tweaks"
arch=('x86_64' 'aarch64')
url='https://im.qq.com/linuxqq/index.shtml'
@ -13,7 +13,7 @@ optdepends=('libappindicator-gtk3: 以显示托盘图标' 'gjs: 提供 GNOME Way
provides=('qq' 'linuxqq')
conflicts=('linuxqq')
options=('!strip' '!emptydirs')
install=${_pkgname}.install
#install=${_pkgname}.install
source_x86_64=("https://dldir1.qq.com/qqfile/qq/QQNT/c005c911/linuxqq_3.0.0-571_amd64.deb") # 底包
# "https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-x64/${pkgver//_/-}/${pkgver//_/-}.zip.zip") # 热更新补丁
source_aarch64=("https://dldir1.qq.com/qqfile/qq/QQNT/c005c911/linuxqq_3.0.0-571_arm64.deb") # 底包
@ -23,7 +23,7 @@ sha256sums_x86_64=('f0a714859c20785cc6cab4084d69c953310f1993828f42c81cb991b8aaa4
# '814ddc3eea99bf2e291e2eeff0c3805928e3059e23b12d41cc8bf75bb8cd5fd3') # 热更新补丁
sha256sums_aarch64=('2ef13e3ebcaae0a2eef8115856b1a24f005d80eac182e3c741def730c1657e26') # 底包
# 'f2f61581a5c09e4a7bfb23922a667e8df327d58fed9601034c4b60a08ad29049') # 热更新补丁
sha256sums=('ee4e8dac9c6208acefbcb773e838b88d1f313bc346bda2725545677ae0418f3a' # start.sh
sha256sums=('5d660062a87e2e6eda732c61db9ab07af3e5cc431fe6acb67ccd235aced92c0c' # start.sh
'82182e49c883e16c7ff38e4722c3950e2758b4342c51521147423026965196a9' # config.json
'78a573867355fb4c3e728d0c8ac0746d47fa7d64f90ee2b62ee9f0ccae095edb') # xdg-open.sh

View file

@ -1,20 +0,0 @@
post_install() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
# SUID chrome-sandbox for Electron 5+
# chmod 4755 '/opt/QQ/chrome-sandbox' || true
update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true
update-desktop-database -q
}
post_upgrade() {
post_install
}
post_remove() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
update-desktop-database -q
}

View file

@ -1,20 +1,27 @@
#!/bin/bash
USER_RUN_DIR="/run/user/$(id -u)"
XAUTHORITY="${XAUTHORITY:-$HOME/.Xauthority}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
FONTCONFIG_HOME="${XDG_CONFIG_HOME}/fontconfig"
QQ_APP_DIR="${XDG_CONFIG_HOME}/QQ"
DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
if [ -z "${QQ_DOWNLOAD_DIR}" ]; then
if [ -z "${XDG_DOWNLOAD_DIR}"]; then
XDG_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
fi
QQ_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}"
fi
QQ_HOTUPDATE_DIR="${QQ_APP_DIR}/versions"
QQ_HOTUPDATE_VERSION="3.0.0-571"
QQ_PREVIOUS_VERSIONS=("2.0.1-429" "2.0.1-453" "2.0.2-510" "2.0.3-543" "3.0.0-565")
if [ "${DOWNLOAD_DIR%*/}" == "${HOME}" ]; then
DOWNLOAD_DIR="${HOME}/Downloads"
if [ ! -e "${DOWNLOAD_DIR}" ]; then mkdir -p "${DOWNLOAD_DIR}"; fi
if [ "${QQ_DOWNLOAD_DIR%*/}" == "${HOME}" ]; then
QQ_DOWNLOAD_DIR="${HOME}/Downloads"
if [ ! -e "${QQ_DOWNLOAD_DIR}" ]; then mkdir -p "${QQ_DOWNLOAD_DIR}"; fi
fi
if [ ! -e "${QQ_APP_DIR}" ]; then mkdir -p "${QQ_APP_DIR}"; fi
if [ ! -e "${QQ_HOTUPDATE_DIR}/${QQ_HOTUPDATE_VERSION}" ]; then ln -sfd "/opt/QQ/resources/app" "${QQ_HOTUPDATE_DIR}/${QQ_HOTUPDATE_VERSION}"; fi
rm -rf "${QQ_HOTUPDATE_DIR}/"**".zip"
@ -55,7 +62,7 @@ bwrap --new-session --cap-drop ALL --unshare-user-try --unshare-pid --unshare-cg
--dev-bind /tmp /tmp \
--bind-try "${HOME}/.pki" "${HOME}/.pki" \
--ro-bind-try "${XAUTHORITY}" "${XAUTHORITY}" \
--bind-try "${DOWNLOAD_DIR}" "${DOWNLOAD_DIR}" \
--bind-try "${QQ_DOWNLOAD_DIR}" "${QQ_DOWNLOAD_DIR}" \
--bind "${QQ_APP_DIR}" "${QQ_APP_DIR}" \
--ro-bind-try "${FONTCONFIG_HOME}" "${FONTCONFIG_HOME}" \
--ro-bind-try "${HOME}/.icons" "${HOME}/.icons" \
@ -66,7 +73,11 @@ bwrap --new-session --cap-drop ALL --unshare-user-try --unshare-pid --unshare-cg
# 移除无用崩溃报告和日志
# 如果需要向腾讯反馈 bug请注释掉如下几行
rm -rf "${QQ_APP_DIR}/crash_files"
if [ -d "${QQ_APP_DIR}/crash_files" ]; then
rm -rf "${QQ_APP_DIR}/crash_files"
fi
rm "${QQ_APP_DIR}/log/app_launcher-"*".log"
rm "${QQ_APP_DIR}/nt_qq_"*"/nt_data/log/"*
rm "${QQ_APP_DIR}/Crashpad/pending/"*
if [ -d "${QQ_APP_DIR}/Crashpad" ]; then
rm -rf "${QQ_APP_DIR}/Crashpad"
fi