原理
其实原理很简单就是打开两个deepin-wine允许微信。按照这个原理理论上运行多少个微信都是没问题的。
具体实现
1.需要登录一个微信,然后成功后退出。
2.进入/home/自己用户名/.deepinwine目录,复制Deepin-WeChat文件夹到Deepin-WeChat2。
3.然后编辑/opt/deepinwine/apps/Deepin-WeChat/run.sh:
#!/bin/sh
# Copyright (C) 2016 Deepin, Inc.
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>BOTTLENAME="Deepin-WeChat"
APPVER="2.6.2.31deepin0"
#/opt/deepinwine/tools/run.sh $BOTTLENAME $APPVER "$1" "$2" "$3"BOTTLENAME="Deepin-WeChat"
/opt/deepinwine/tools/run.sh $BOTTLENAME $APPVER "$1" "$2" "$3"
BOTTLENAME="Deepin-WeChat2"
/opt/deepinwine/tools/run.sh $BOTTLENAME $APPVER "$1" "$2" "$3"
4.修改/opt/deepinwine/tools/run.sh
1)CallApp函数内的case $BOTTLENAME in 下添加如下代码
"Deepin-WeChat2")CallWeChat2 "$1" "$2";;
2) 在CallWeChat函数下面添加如下函数
CallWeChat2()
{
if [ "autostart" == "$1" ]; thenenv WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &elsedebug_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=1export ATTACH_FILE_DIALOG=1debug_log "start running..."env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\WeChat\\WeChat.exe" &fi
}
方法利弊
此方法方便快捷,但是此方法修改了deepin底层的shell文件所以弊端显而易见更新deepin这些内容会被覆盖掉。对此我准备自己重新打一个微信双开的安装包供大家使用!