summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimiblock Moe2024-03-19 20:48:01 +0800
committerKimiblock Moe2024-03-19 20:48:01 +0800
commit19478893e9c1b248807b6af3fa1d1719b8663d63 (patch)
tree18fdb241e3cdc9cb5ce7369ced3b451e5d6fc020
parent8b8ba5035bab1b6b1f30d971ed0a2e68e1ddcae8 (diff)
downloadaur-19478893e9c1b248807b6af3fa1d1719b8663d63.tar.gz
Fix package
-rw-r--r--PKGBUILD11
-rw-r--r--wechat-uos-beta.desktop6
-rw-r--r--wechat.sh5
3 files changed, 10 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 95580ea8f960..e822219389bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,6 +10,7 @@ license=('proprietary')
groups=()
depends=(
+ "zenity"
"nss"
"bubblewrap"
"xcb-util-renderutil"
@@ -84,8 +85,8 @@ source_loong64=(
wechat-loong64-${pkgver}.deb::"https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_1.0.0.238_arm64.deb"
)
-md5sums=('266ac6d045cc5a7931a83bc11ee65180'
- '65e149fb82392df02d587c19a1a97f78'
+md5sums=('77b5e62a5b1b9e3f290b6a9f8d157449'
+ '424bba66915fcfc40a234260691136e6'
'600e74549ce2258c045d5c2f7689ea63'
'e49130d3e6185335db9a60f31d4b7429'
'6b159c6e9d21a98925489bc37a9aea43')
@@ -93,11 +94,6 @@ md5sums_x86_64=('aa52e39afd9c16eee7f924093ce4c5b6')
md5sums_aarch64=('280d9b202390954c011dbd12e28f892d')
md5sums_loong64=('280d9b202390954c011dbd12e28f892d')
-
-function prepare_wechat-uos-bwrap() {
- tar -xf data.tar.xz ./opt/apps/com.tencent.wechat
-}
-
function package_wechat-uos-qt() {
depends+=(wechat-uos-bwrap)
conflicts+=(wechat-universal-bwrap wechat-beta-bwrap)
@@ -105,6 +101,7 @@ function package_wechat-uos-qt() {
}
function package_wechat-uos-bwrap() {
+ tar -xf data.tar.xz ./opt/apps/com.tencent.wechat
mkdir -p "${pkgdir}"/opt
cp opt/apps/com.tencent.wechat "${pkgdir}"/opt/wechat-uos-bwrap -r
install -Dm644 wechat-uos-beta.desktop "${pkgdir}/usr/share/applications/wechat-uos-beta.desktop"
diff --git a/wechat-uos-beta.desktop b/wechat-uos-beta.desktop
index fed1dd1e904e..0b096a6dd086 100644
--- a/wechat-uos-beta.desktop
+++ b/wechat-uos-beta.desktop
@@ -17,7 +17,7 @@ Actions=nosandbox;
StartupWMClass=wechat
[Desktop Action nosandbox]
-Name=Disable Bubblewrap
+Name=Disable Sandbox
Name[zh_CN]=禁用沙盒
-Exec=bash -c '/usr/bin/killall wechat && /usr/bin/wechat-uos-beta --actions f5aaebc6-0014-4d30-beba-72bce57e0650'
-Icon=application-exit \ No newline at end of file
+Exec=/usr/bin/wechat-uos-beta --actions f5aaebc6-0014-4d30-beba-72bce57e0650
+#Icon=application-exit \ No newline at end of file
diff --git a/wechat.sh b/wechat.sh
index 509f9f8ba9a9..059c9ad621d3 100644
--- a/wechat.sh
+++ b/wechat.sh
@@ -149,6 +149,7 @@ EOF
}
function execAppUnsafe() {
+ killall wechat
bwrap \
--dev-bind / / \
--ro-bind /usr/share/wechat-uos-bwrap/license/var/ /var/ \
@@ -163,9 +164,9 @@ function execAppUnsafe() {
}
function disableSandbox() {
- if [[ $@ =~ "f5aaebc6-0014-4d30-beba-72bce57e0650" ]]; then
+ if [[ $@ =~ "f5aaebc6-0014-4d30-beba-72bce57e0650" ]] && [[ $@ =~ "--actions" ]]; then
if [[ "LANG" =~ 'zh_CN' ]]; then
- zenity --title "警告" --question --text="确认以继续危险操作"
+ zenity --title "警告" --question --text="确认以继续危险操作..."
else
zenity --title "Alert" --question --text="Confirm to proceed dangerous operation..."
fi