微信配置 - David-DHC/Ubuntu-22.04 GitHub Wiki
微信配置:
- 支持:4k屏幕适配、中文显示适配、双开
- 克隆deepin仓库到本地:
git clone https://github.com/wszqkzqk/deepin-wine-ubuntu.git - 在文件夹中执行
bash install.sh进行安装 - 点击此链接下载deepin-wechat
- 在下载到的文件夹中执行
sudo dpkg -i deepin.com.wechat_2.6.2.31deepin0_i386.deb以安装微信
解决微信4k屏幕适配的方法
(参考资料)
- 执行
sudo apt-get install winetricks安装winetricks(或许这一步可以省略?) - 执行
env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" /usr/bin/deepin-wine winecfg打开wine configuration - 在graphics中调节dpi。对于4k屏幕,大概需要调节到240左右。
解决微信中文显示适配的办法
(参考资料)
- 下载simsun.ttc并将其复制到~/.deepinwine/Deepin-WeChat/drive_c/windows/Fonts文件夹下
- 新建一个font.reg文件(内容如下)
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial"="simsun"
"Arial CE,238"="simsun"
"Arial CYR,204"="simsun"
"Arial Greek,161"="simsun"
"Arial TUR,162"="simsun"
"Courier New"="simsun"
"Courier New CE,238"="simsun"
"Courier New CYR,204"="simsun"
"Courier New Greek,161"="simsun"
"Courier New TUR,162"="simsun"
"FixedSys"="simsun"
"Helv"="simsun"
"Helvetica"="simsun"
"MS Sans Serif"="simsun"
"MS Shell Dlg"="simsun"
"MS Shell Dlg 2"="simsun"
"System"="simsun"
"Tahoma"="simsun"
"Times"="simsun"
"Times New Roman CE,238"="simsun"
"Times New Roman CYR,204"="simsun"
"Times New Roman Greek,161"="simsun"
"Times New Roman TUR,162"="simsun"
"Tms Rmn"="simsun"
- 执行
WINEPREFIX=~/.deepinwine/Deepin-WeChat/ deepin-wine regedit ~/Desktop/font.reg以写入该注册表,注意改变font.reg的绝对路径(我的是~/Desktop)
微信双开的解决办法
(参考资料)
- 首先确保已经能够正确打开一个微信。
- 进入~/.deepinwine目录,复制Deepin-WeChat文件夹到Deepin-WeChat2。
- 在终端中执行
sudo su进入超级管理员模式,分别修改/opt/deepinwine/apps/Deepin-WeChat/run.sh和/opt/deepinwine/tools/run.sh的内容:
// /opt/deepinwine/apps/Deepin-WeChat/run.sh的原有内容可以全部删除,改为如下内容
BOTTLENAME="Deepin-WeChat"
APPVER="2.6.2.31deepin0"
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"
// 以下是对/opt/deepinwine/tools/run.sh的修改
// CallApp函数内,在Deepin-WeChat一条的后面,添加如下一条代码
"Deepin-WeChat2")
CallWeChat2 "$1" "$2"
;;
// 在CallWeChat函数后面,添加如下函数
CallWeChat2()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
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
debug_log "start running..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\WeChat\\WeChat.exe" &
fi
}