基于deepin-wine在Ubuntu20.04上安装新版微信

wechat on ubuntu20.04

nojsja 2020-10-23
字数:669丨 阅读时间:3 分钟

预览

wechat3.0

操作系统:ubuntu 20.04.1 LTS (Kernel: 5.4.0-47-generic )

支持微信(2.9.5+)以及3.0版本

运行deepin-wine-depends.sh安装依赖

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
mkdir /tmp/deepintemp
cd /tmp/deepintemp
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-wine_2.18-19_all.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-wine32_2.18-19_i386.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-wine32-preloader_2.18-19_i386.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-helper/deepin-wine-helper_1.2deepin8_i386.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-plugin/deepin-wine-plugin_1.0deepin2_amd64.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-plugin-virtual/deepin-wine-plugin-virtual_1.0deepin3_all.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-uninstaller/deepin-wine-uninstaller_0.1deepin2_i386.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/u/udis86/udis86_1.72-2_i386.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-fonts-wine_2.18-19_all.deb
wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-libwine_2.18-19_i386.deb
wget https://mirrors.aliyun.com/deepin/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
wget https://mirrors.aliyun.com/deepin/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_i386.deb

echo '准备添加32位支持'
sudo dpkg --add-architecture i386
echo '添加成功,准备刷新apt缓存信息...'
sudo apt update
echo '即将开始安装...'
sudo dpkg -i *.deb
echo '安装完成,正在自动安装依赖...'
sudo apt install -fy

rm -vfr /tmp/deepintemp

安装deepin-wine环境

下载 https://community-packages.deepin.com/deepin/pool/main/d/deepin-wine5/ 里几个deb,并安装 (备用下载链接: https://pan.baidu.com/s/1aENeezzyRrxW_b5U5e0s8w 密码: t2cr)

建立软链接

1
$: sudo ln -s  /usr/lib/i386-linux-gnu/deepin-wine5/wine* /usr/bin/ -f

建立32位的wine环境

  • 创建WINEPREFIX
1
$: WINEARCH=win32 WINEPREFIX=~/.wine wine wineboot
  • 安装winetricks图形工具安装msls31 msxml6 riched20 riched30 ole32等dll依赖,msxml6下载失败时亦可手动安装:
1
2
$: wget -P /tmp https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x86.msi
$: wine msiexec /i /tmp/msxml6_x86.msi

安装新版微信 2.9.5+

1
$: wine WechatSetup.exe

解决字体问题

从 windows 中系统盘所在的位置 C:\windows\Fonts 中拷贝全部的字体,
将拷贝的字体数据放在 ubuntu 系统中 ~/.wine/drive_c/windows/Fonts 中.

配置wineconfig

终端运行winecfg,选择Windows 版本:Windows 7

创建应用程序列表启动图标

  • 创建Wechat启动脚本wechat,内容如下:
1
2
#!/bin/bash
LC_ALL=zh_CN.UTF-8 wine /home/nojsja/.wine/drive_c/Program\ Files/Tencent/WeChat/WeChat.exe > $&
  • 同文件夹放入wechat.png作为图标

  • 使用makeIconLink脚本创建启动图标,使用帮助bash makeIconLink --help,相关命令如下:

1
$: sudo makeIconLink --directory /home/nojsja/software/wechat --icon wechat.png --target wechat

微信安装后使用正常,能发图片(之前的方法装新版会有大图片发不出去,一直转圈的问题)、文件,阴影框也不见了,剪贴板也好用了(可直接粘贴图片、url)

[ loading ]⇷⇷