zq1997 / deepin-wine

【deepin源移植】Debian/Ubuntu上的QQ/微信快速安装方式
https://deepin-wine.i-m.dev
GNU General Public License v3.0
5.07k stars 382 forks source link

安装微信后运行desktop会重置容器,导致修改的dpi失效 #217

Open thep0y opened 2 years ago

thep0y commented 2 years ago

修改 dpi 为 192:

env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" /opt/deepin-wine6-stable/bin/wine winecfg

然后运行微信,会重新生成微信容器,导致上面修改的 dpi 失效。 但不止 dpi 失效,是所有注册表文件都重置了。

/opt/apps/com.qq.weixin.deepin/files/run.sh

下面的命令才能正常使用自定义过的容器:

env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" /opt/deepin-wine6-stable/bin/wine $HOME/.deepinwine/Deepin-WeChat/drive_c/Program\ Files/Tencent/WeChat/WeChat.exe

没有仔细看run.shrun_v4.sh里的代码,但我觉得可能有些问题。

qq524967747 commented 2 years ago

我也是 每次启动微信都会更新生成新的容器,导致配置的字体无法使用

ghost commented 2 years ago

每次启动微信都会重新生成 ~/.deepinwine/wechat file文件夹,有解决办法吗

qq524967747 commented 2 years ago

每次启动微信都放大生成~/.deepinwine/wechat文件文件夹,有解决办法吗

用体主的方法是可行的

thep0y commented 2 years ago

每次启动微信都会重新生成 ~/.deepinwine/wechat file文件夹,有解决办法吗

解决办法就是我说的,复制一个微信的desktop文件放在$HOME/.local/applications中,将Exec命令修改为/opt/deepin-wine6-stable/bin/wine $HOME/.deepinwine/Deepin-WeChat/drive_c/Program\ Files/Tencent/WeChat/WeChat.exe即可。 有些发行版可能无法识别desktop中的$HOME,需要修改为/home/用户名

deepin 本身的 wine 是放在 $HOME/.deepinwine目录中的,使用此库的 deb 却放在了对用户只读的/opt目录中。

你完全可以不用使用此库的 deb ,只需要将 deepin-wine6-stable 放在 $HOME/.deepinwine 中,以后所有的 exe 程序都用类似上面的命令启动。

jmp0x7c00 commented 2 years ago

如果是wechat容器,解决办法: 在/opt/deepinwine/tools/run_v4.sh中找到CallWeChat函数,将删除注册表和配置的代码注释掉即可,如下:

CallWeChat()
{
    debug_log "Disable auto update"
    # _DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "UpdateFailCnt"
    # _DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "NeedUpdateType"
    # rm "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WeChat/All Users/config/configEx.ini"

    export DISABLE_RENDER_CLIPBOARD=1
    export ATTACH_FILE_DIALOG=1
    CallProcess "$@"
}
Hoking007 commented 2 years ago

如果是wechat容器,解决办法: 在/opt/deepinwine/tools/run_v4.sh中找到CallWeChat函数,将删除注册表和配置的代码注释掉即可,如下:

CallWeChat()
{
    debug_log "Disable auto update"
    # _DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "UpdateFailCnt"
    # _DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "NeedUpdateType"
    # rm "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WeChat/All Users/config/configEx.ini"

    export DISABLE_RENDER_CLIPBOARD=1
    export ATTACH_FILE_DIALOG=1
    CallProcess "$@"
}

这个方法也不行,不知道是不是新版本改了什么

WalkerGH commented 1 year ago

有效的

sakylian commented 1 year ago
case $BOTTLENAME in
    "Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding")
        #rm -rf "$WINEPREFIX"
        #DeployApp
        return
        ;;

尝试不要重新Deploy,目测可行,就是不知道还有什么问题。我用的最新这个版本的包,已经找不到注册表的重新初始化信息了,所以在这里注释了两句。