Package Details: wechat-universal-bwrap 4.0.1.11-1

Git Clone URL: https://aur.archlinux.org/wechat-universal-bwrap.git (read-only, click to copy)
Package Base: wechat-universal-bwrap
Description: WeChat (Universal) with bwrap sandbox
Upstream URL: https://linux.weixin.qq.com/
Licenses: GPLv3, proprietary
Conflicts: wechat-universal
Provides: wechat-universal
Replaces: wechat-beta, wechat-beta-bwrap
Submitter: 7Ji
Maintainer: 7Ji (leaeasy)
Last Packager: 7Ji
Votes: 129
Popularity: 7.99
First Submitted: 2024-03-14 03:09 (UTC)
Last Updated: 2024-12-24 07:50 (UTC)

Pinned Comments

shilka commented on 2025-02-13 11:08 (UTC)

@dazuixia @lyhokia @swimming03 你们是否也使用了非GNOME/KDE的其他wayland WM/DE? 又研究了一下这个问题,如果不使用bwrap沙盒直接执行wechat是可以的,排除了wechat本身的问题。我认为问题出在bwrap、xwayland的配合和调用上面,导致微信无法在xwayland中启动。我使用的WM是Hyprland,推测可能和各个WM/DE有一定的关系。目前我找到一个可行的缓解方式,安装:xwayland-satellite,并提前执行这一程序,之后正常启动wechat-universal。

@7Ji 如果其他人也可以缓解,烦请置顶一下这个解决方案,或者如果您很熟悉bwrap,是否可以看看通过某些参数解决它和xwayland的交互问题。

7Ji commented on 2024-03-14 06:21 (UTC) (edited on 2024-12-26 09:08 (UTC) by 7Ji)

本软件包在Github上亦有仓库: https://github.com/7Ji-PKGBUILDs/wechat-universal-bwrap/ (仓库未启用issues,有问题请直接在此页面提出)

各位如有改进意见,欢迎在Github仓库页提交PR :)

抓取新版本的脚本和PKGBUILD在同一层。执行python fetch_uos_wechat_release.py获取UOS仓库内的重打包版本,执行./fetch_tencent_wechat_release.sh获取腾讯官方的版本。如果发现软件过期,请善用本界面的标记过期功能。:)


默认配置下,只有~/Documents/WeChat_Data/home 作为容器内的~,其他宿主文件和文件夹均不暴露在容器内

可以编写~/.config/wechat-universal/binds.list来设置更多的被暴露到容器内的文件/文件夹,每行一个路径,绝对路径或相对于~的相对路径


要将微信文件的主要路径修改至 ~/Documents/WeChat_Data 外的其他路径,请设置环境变量 WECHAT_DATA_DIR,同理为绝对路径或相对于~的相对路径


更多参数与环境变量,请在命令行输入 wechat-universal --help 查看

Latest Comments

« First ‹ Previous 1 .. 32 33 34 35 36 37 38 Next › Last »

leaeasy commented on 2024-03-09 05:19 (UTC) (edited on 2024-03-09 07:03 (UTC) by leaeasy)

稍微分析了一下wechat-beta二进制,wechat将整个qt5都静态链接至二进制,包括fcitx-qt5也在二进制里面,看起来只支持fcitx这个输入法。 可以试试通过QT_PLUGIN_PATH=/usr/lib/qt/plugins /usr/bin/wechat-beta 试试能否正常使用ibus输入法

~/p/w/p/w/o/wechat-beta (master)> strings wechat | grep platforminput                                                                     
/data/devops-xwechat/workspace/xwechat_linux_x86_64_test/third_party/fcitx-qt5/qt5/platforminputcontext/fcitxinputcontextproxy.cpp:36
QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" since plugins are disabled in static builds

wszqkzqk commented on 2024-03-08 14:33 (UTC)

建议使用bsdtar代替dpkg进行解压,移除archlinux不建议的dpkg依赖项:

++ /var/tmp/paru/wechat-beta-bwrap/PKGBUILD 2024-03-08 22:30:46.812348640 +0800
@@ -2,7 +2,7 @@
 #
 pkgname=wechat-beta-bwrap
 pkgver=1.0.0.145
-pkgrel=8
+pkgrel=9
 uosver=2.1.5
 epoch=
 pkgdesc="WeChat Testing with bwrap sandbox"
@@ -11,7 +11,6 @@
 license=('proprietary')
 groups=()
 depends=('nss' 'xdg-utils' 'libxss' 'libnotify' 'bubblewrap' 'xdg-desktop-portal' 'openssl-1.1' 'lsb-release')
-makedepends=('dpkg')
 source=(
    wechat.sh
    wechat-beta.desktop
@@ -21,7 +20,10 @@
    wechat-beta-${pkgver}.deb::"https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb?attname=wechat-beta_${pkgver}_amd64.deb"
 )

-noextract=()
+noextract=(
+   "wechat-beta_${pkgver}_amd64.deb"
+   "com.tencent.weixin_${uosver}_amd64.deb"
+)
 md5sums=('eda5b1524fe570724558ae2eaff4360e'
          '4967385a00db424e596263618335411f'
          'cf971cb2cb01d8a5fd89d3a3555abfaf'
@@ -30,13 +32,17 @@
          '1da072bd774d1b5c08b9545b409e3fcb')
 build() {
    echo "Extract wechat-uos deb file"
-   mkdir -p wechat-uos
-   dpkg -x ${srcdir}/wechat-uos-${uosver}-x86_64.deb wechat-uos
+   mkdir -p ${srcdir}/wechat-uos
+   mkdir -p ${srcdir}/wechat-uos-deb
+   bsdtar -xf ${srcdir}/wechat-uos-${uosver}-x86_64.deb -C ${srcdir}/wechat-uos-deb
+   bsdtar -xf ${srcdir}/wechat-uos-deb/data.tar.xz -C ${srcdir}/wechat-uos
 }

 package() {
    echo "Extract wechat-beta deb file"
-   dpkg -x wechat-beta-${pkgver}.deb ${pkgdir}/
+   mkdir -p ${srcdir}/wechat-beta-deb
+   bsdtar -xpf wechat-beta-${pkgver}.deb -C ${srcdir}/wechat-beta-deb
+   bsdtar -xpf ${srcdir}/wechat-beta-deb/data.tar.xz -C ${pkgdir}
    echo "Fixing licenses"
    mkdir -p ${pkgdir}/usr/share/wechat-uos
    cp -r license/etc ${pkgdir}/usr/share/wechat-uos

xyz_max commented on 2024-03-08 09:29 (UTC)

很奇怪,sudo运行没有问题,普通用户就提示

qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

wszqkzqk commented on 2024-03-08 08:49 (UTC)

deb其实可以用bsdtar处理,没必要依赖在arch下不太常用的dpkg

libook commented on 2024-03-08 08:48 (UTC) (edited on 2024-03-08 08:49 (UTC) by libook)

关于Qt platform plugin错误,详细的解决步骤如下:

1. 安装此AUR包
2. cp /usr/share/applications/wechat-beta.desktop ~/.local/share/applications
3. vim ~/.local/share/applications/wechat-beta.desktop
4. 将Exec一行改为 Exec=env QT_QPA_PLATFORM=xcb wechat-beta %u

faonecze commented on 2024-03-07 15:40 (UTC) (edited on 2024-03-08 00:17 (UTC) by faonecze)

KDE下发现 1.微信图标一直闪烁. 2.顶部点击微信图标右键弹出退出却在底部.(重启后正常)

yuk commented on 2024-03-07 14:15 (UTC) (edited on 2024-03-07 14:17 (UTC) by yuk)

wayland的打不开,提示

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

这种问题的,可以在wayland.sh或者hyprland.conf的Environement variables模块添加env = QT_QPA_PLATFORM,xcb

yjun commented on 2024-03-07 13:09 (UTC) (edited on 2024-03-08 13:55 (UTC) by yjun)

环境变量可以放到desktop entry 里配置。

diff --git a/wechat-beta.desktop b/wechat-beta.desktop
index 7aa9223..7818700 100644
--- a/wechat-beta.desktop
+++ b/wechat-beta.desktop
@@ -2,7 +2,7 @@
 Comment=WeChat Beta
 Comment[zh_CN]=
 TryExec=wechat-beta
-Exec=wechat-beta %u
+Exec=env QT_IM_MODULE=fcitx GTK_USE_PORTAL=1 QT_SCALE_FACTOR=1.5 wechat-beta %u
 Icon=wechat-beta
 Name=WeChat (Beta)
 Name[zh_CN]=微信 Beta
diff --git a/wechat.sh b/wechat.sh
index eac8f87..7c32f48 100644
--- a/wechat.sh
+++ b/wechat.sh
@@ -12,9 +12,6 @@ function launch() {
                --ro-bind /usr/share/wechat-uos/etc/os-release /etc/os-release \
                --ro-bind /usr/share/wechat-uos/etc/lsb-release /etc/lsb-release \
                --ro-bind-try /usr/lib/snapd-xdg-open/xdg-open /usr/bin/xdg-open \
-               --setenv QT_IM_MODULE fcitx \
-               --setenv GTK_USE_PORTAL 1 \
-               --setenv QT_SCALE_FACTOR 1.5 \
                /opt/wechat-beta/wechat $@
 }

如果需要自定义值,可以单独拷贝到~/.local/share/applications/修改,更灵活。

直接写死的脚本里,修改后如果遇到更新就会被覆盖

yifwon commented on 2024-03-07 11:06 (UTC) (edited on 2024-03-07 11:12 (UTC) by yifwon)

可以支持一下arm和loogarch的平台吗,我在arm试了是可用的,版本好像更新到1.5.0了,这是各个架构的链接 https://cloud.cnxclm.com/s/XOxIb?path=%2F