summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimiblock Moe2024-05-02 09:38:26 +0800
committerKimiblock Moe2024-05-02 09:38:26 +0800
commit173d221acb8dc592d4fc3a1a192a32720cd22897 (patch)
tree3f818e8b80ef5fde1108f025525ac7082fad236e
parentd4e6ba3d6d7765681665e086581267543fd15ca7 (diff)
downloadaur-173d221acb8dc592d4fc3a1a192a32720cd22897.tar.gz
Defer WeChat's priority
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--wechat.env6
-rw-r--r--wechat.sh33
4 files changed, 31 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c3225f149f65..e07a3fa5ecc9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -60,12 +60,14 @@ pkgbase = wechat-uos-bwrap
source = open.sh
source = license.tar.gz
source = user-dirs.dirs
- md5sums = 3d73bc63fbbc9e6dabeb613faa6911f3
+ source = wechat.env
+ md5sums = 011e935274727780fadf07253fb0323d
md5sums = 82a5663ce32a0504f1f7575d51f2c7cb
md5sums = 600e74549ce2258c045d5c2f7689ea63
md5sums = dfc069e6c8d9dbaa90fe388cab4002c9
md5sums = 6b159c6e9d21a98925489bc37a9aea43
md5sums = 38e98220da64adc1d8f9dc17d04b3a39
+ md5sums = 3ea11df827d1d4bf8d494f36bd57ca31
source_x86_64 = wechat-x86-1.0.0.241.deb::https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_1.0.0.241_amd64.deb
md5sums_x86_64 = 2c2c8ec69b6b798b7ccaf873e27d977a
source_aarch64 = wechat-arm-1.0.0.241.deb::https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_1.0.0.241_arm64.deb
diff --git a/PKGBUILD b/PKGBUILD
index f9f93356b798..202375f5a86d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -72,6 +72,7 @@ source=(
open.sh
license.tar.gz
user-dirs.dirs
+ wechat.env
)
source_x86_64=(
@@ -86,12 +87,13 @@ source_loong64=(
wechat-loong64-${pkgver}.deb::"https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_${pkgver}_arm64.deb"
)
-md5sums=('3d73bc63fbbc9e6dabeb613faa6911f3'
+md5sums=('9b65c2ff50c4490e127e04b671b9e07f'
'82a5663ce32a0504f1f7575d51f2c7cb'
'600e74549ce2258c045d5c2f7689ea63'
'dfc069e6c8d9dbaa90fe388cab4002c9'
'6b159c6e9d21a98925489bc37a9aea43'
- '38e98220da64adc1d8f9dc17d04b3a39')
+ '38e98220da64adc1d8f9dc17d04b3a39'
+ 'dcdf6a599cc7bab27ab85c880401f717')
md5sums_x86_64=('2c2c8ec69b6b798b7ccaf873e27d977a')
md5sums_aarch64=('c4d443515fe76ec35e792d43e9521887')
md5sums_loong64=('c4d443515fe76ec35e792d43e9521887')
@@ -107,11 +109,10 @@ function package_wechat-uos-qt() {
install -Dm755 wechat.sh "${pkgdir}/usr/bin/wechat-uos-qt"
install -Dm644 user-dirs.dirs "${pkgdir}/usr/lib/wechat-uos-qt/user-dirs.dirs"
install -Dm755 open.sh "${pkgdir}/usr/lib/wechat-uos-qt/open"
+ install -Dm644 wechat.env "${pkgdir}/usr/lib/wechat-uos-qt/envs"
install -Dm644 wechat-uos-qt.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/wechat-uos-qt.svg"
mkdir -p "${pkgdir}/usr/share/wechat-uos-qt/license"
- #install -Dm755 "${pkgdir}/opt/wechat-uos-qt/files/libuosdevicea.so" "${pkgdir}/usr/lib/license/libuosdevicea.so"
install -d "${pkgdir}/usr/lib/license"
- touch "${pkgdir}/usr/lib/license/libuosdevicea.so"
chmod 0755 "${pkgdir}/usr/lib/license" -R
cp "${srcdir}/license"/* -r "${pkgdir}/usr/share/wechat-uos-qt/license"
chmod 0755 -R "${pkgdir}/usr/share/wechat-uos-qt/license"
diff --git a/wechat.env b/wechat.env
new file mode 100644
index 000000000000..cb86f1a9484e
--- /dev/null
+++ b/wechat.env
@@ -0,0 +1,6 @@
+WAYLAND_DISPLAY=
+QT_QPA_PLATFORM=xcb
+IBUS_USE_PORTAL=1
+QT_AUTO_SCREEN_SCALE_FACTOR=1
+LD_LIBRARY_PATH=/opt/wechat-uos-qt/files:/usr/lib/wechat-uos-qt/so
+PATH=/sandbox:/usr/bin
diff --git a/wechat.sh b/wechat.sh
index 5c457453507c..ed1e793e6cae 100644
--- a/wechat.sh
+++ b/wechat.sh
@@ -78,9 +78,6 @@ function lnDir() {
ln -srf "${XDG_DATA_HOME}"/WeChat_Data/xwechat_files \
"${HOME}"/xwechat_files
fi
- #cd "${XDG_DOCUMENTS_DIR}"
- #ln -sfr "${XDG_DATA_HOME}"/WeChat_Data/Documents/xwechat_files \
- # "${XDG_DOCUMENTS_DIR}"/xwechat_files
}
function importEnv() {
@@ -117,6 +114,18 @@ function execApp() {
cameraDect
importEnv
systemd-run --user ${sdOption} \
+ -p CPUWeight=50 \
+ -p IOWeight=50 \
+ -p IPAccounting=yes \
+ -p UnsetEnvironment=XDG_CURRENT_DESKTOP \
+ -p PrivateIPC=yes \
+ -p DeviceAllow=/dev/dri/* \
+ -p DeviceAllow=/dev/video* \
+ -p DevicePolicy=closed \
+ -p EnvironmentFile=/usr/lib/wechat-uos-qt/envs \
+ -p EnvironmentFile="${XDG_DATA_HOME}"/WeChat_Data/wechat.env \
+ -p Environment=GTK_IM_MODULE="${GTK_IM_MODULE}" \
+ -p Environment=QT_IM_MODULE="${QT_IM_MODULE}" \
-p IPAddressDeny=localhost \
-p IPAddressDeny=link-local \
-p IPAddressDeny=multicast \
@@ -167,8 +176,8 @@ function execApp() {
--dir /sandbox \
--bind /tmp /tmp \
--bind /usr /usr \
- --bind /opt/wechat-uos-qt/files/libuosdevicea.so \
- /usr/lib/license/libuosdevicea.so \
+ --ro-bind /opt/wechat-uos-qt/files \
+ /usr/lib/license \
--ro-bind /etc /etc \
--symlink usr/lib /lib \
--symlink usr/lib64 /lib64 \
@@ -208,17 +217,9 @@ function execApp() {
/run/systemd/resolve/stub-resolv.conf \
--dir "${XDG_DOCUMENTS_DIR}" \
${bwCamPar} \
- --setenv QT_QPA_PLATFORM xcb \
- --setenv LD_LIBRARY_PATH \
- /opt/wechat-uos-qt/files:/usr/lib/wechat-uos-qt/so \
- --setenv QT_AUTO_SCREEN_SCALE_FACTOR 1 \
- --setenv PATH /sandbox:"${PATH}" \
--setenv XDG_DOCUMENTS_DIR "${XDG_DOCUMENTS_DIR}" \
--setenv XDG_DATA_HOME "${XDG_DATA_HOME}" \
- --setenv QT_IM_MODULE "${QT_IM_MODULE}" \
- --setenv GTK_IM_MODULE "${GTK_IM_MODULE}" \
- --setenv IBUS_USE_PORTAL 1 \
- bash -c "export $(grep -v '^#' "${XDG_DATA_HOME}"/WeChat_Data/wechat.env | xargs) && ${launchTarget}"
+ "${launchTarget}"
}
function dbusProxy() {
@@ -250,8 +251,8 @@ function execAppUnsafe() {
killall wechat
bwrap \
--dev-bind / / \
- --bind /opt/wechat-uos-qt/files/libuosdevicea.so \
- /usr/lib/license/libuosdevicea.so \
+ --bind /opt/wechat-uos-qt/files \
+ /usr/lib/license \
--ro-bind /usr/share/wechat-uos-qt/license/var/ \
/var/ \
--ro-bind /usr/share/wechat-uos-qt/license/etc/os-release \