Ubuntu 18.04 系统上安装微信桌面客户端。
Installing WineHQ
Install WineHQ according to the instruction in https://wiki.winehq.org/Ubuntu.
Install the staging branch for the most up-to-date packages.
Setup Wine
Open a terminal (Ctrl + Alt + T) and run the following commands:
export WINEARCH=win32
export WINEPREFIX=~/.wine32
winecfg
When you run the winecfg
command for the first time, Wine will start to setup the required environment under the specified WINEPREFIX
, which in this case we set to ~/.wine32
.
You should be prompted with the dialogues below. Choose Install for both.
Finally, once both installers are finished, this window should appear:
If you are using a HiDPI screen, it might be worth scaling the interface under Screen resolution, in the Graphics tab:
Providing a Chinese font
For the Chinese characters to be rendered correctly we need to provide Wine with a Chinese font. We will use winetricks
for this, which is a helper script to download and install extra Wine stuff.
Download winetricks
:
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
Set the executable flag:
chmod +x winetricks
Some winetricks “packages” require a few external tools to be installed. We need cabextract
:
sudo apt install cabextract
And now we install the fonts and some other libraries:
./winetricks corefonts gdiplus riched20 riched30 wenquanyi
Finally, we need to edit regedit
to enable the font we just installed. Download this .reg file.
Open regedit
with the command:
./winetricks regedit
The following window should show up:
In the Menu bar, click Registry and select Import Registry File…
When the browser shows up, select the .reg file you have just downloaded. If successful, the following dialogue should greet you:
Installing WeChat
We are now ready to install WeChat itself. Download the installer from here:
Once the download has finished, install it by running:
wine ~/Downloads/WeChat_C1018.exe
Please note that your installer might be more recent than the version shown here. As such, you might need to change
WeChat_C1018.exe
to whichever installer you have downloaded.
The installer should start. Click on Install WeChat.
Final result
After the installation has completed, you may launch WeChat. The application should be listed in the Applications drawer:
Stickers work too!
System Tray on Gnome
If you are using Gnome on Ubuntu 18.04 or a more recent release, chances are you will be greeted by this nasty windowed legacy system tray:
Install this Gnome Extension and the problem will be gone: