docker-wechat icon indicating copy to clipboard operation
docker-wechat copied to clipboard

隐藏程序运行错误窗口

Open joezhouchenye opened this issue 1 year ago • 2 comments

启动时会跳出程序运行错误窗口,但不影响实际使用

建议增加winetricks nocrashdialog

目前去掉--rm选项,在容器中修改后,后续通过启动创建的容器的方式运行,没有问题

joezhouchenye avatar Feb 06 '24 08:02 joezhouchenye

Thanks for sharing!

I'd love to accept a Pull Request for it.

huan avatar Feb 06 '24 22:02 huan

回复晚了,不过我已经不用DoChat了,新的wine 9,源码重新编译,透明框遗留的问题解决了,也没这个报错。主要是最近需要发送文档,DoChat不能拖拽进取实在不能接受。

不过之前尝试了一下,在Dockerfile中添加winetricks nocrashdialog无效,不管使用root还是user用户,wine的注册表始终无法被更改。

以下方法可行。

container_rroot/dochat/目录下增加一个nocrashdialog.sh:

#!/usr/bin/env bash
set -eo pipefail

tmpRegFile=$(mktemp /tmp/regedit.XXXXXXXXX.reg)
trap 'rm -f "$tmpRegFile"' EXIT

cat <<_EOF_ > "$tmpRegFile"
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Wine\WineDbg]
"ShowCrashDialog"=dword:00000000
_EOF_

#
# Setup Wine nocrashdialog in Windows Registry
#
wine regedit.exe /s "$tmpRegFile"

实际作用和wintricks nocrashdialog相同,就是修改注册表,但是似乎只能在wine运行起来过后才有用,构建image的时候无效。

然后在entrypoint.sh中,startWechat函数里面增加

image

重新编译成image,dochat.sh里面修改image后测试没有问题。

joezhouchenye avatar Feb 14 '24 06:02 joezhouchenye