参考
参考:Wine完全使用指南
参考wiki
How to Install and Use Wine on Ubuntu 18.04:推荐
1. Check installed architectures
1.1 Verify 64-bit architecture. The following command should respond with “amd64”.
dpkg --print-architecture
1.2 See if 32-bit architecture is installed. The following command should respond with “i386”.
dpkg --print-foreign-architectures
1.3 If “i386” is not displayed, execute the following.
sudo dpkg --add-architecture i386
1.4 Recheck with.
dpkg --print-foreign-architectures
1.5 Verify the installation succeeded.
#安装wine 推荐
sudo apt-get install wine64 win32
#看wine版本信息
wine --version
wine-3.0 (Ubuntu 3.0-3ubuntu1)
winecfg #至少需要运行一次winecfg来设置wine的目录和硬件,选用win7模式
2. 卸载Wine
根据您的需要,可以通过两种方式卸载Wine。如果只需要将Wine重置为默认值,则只需删除.wine文件夹,然后通过运行再次创建它winecfg。如果您.wine要备份的文件夹中有应用程序,那么现在是删除该文件夹的好时机。要删除该文件夹,只需执行以下操作,它将处理整个Wine环境:
rm -fr ~/.wine
rm -fr ~/.cache/wine
现在,如果您想从Ubuntu上实际卸载Wine,可以执行以下操作,但是请注意,这不会删除您.wine或缓存的文件夹:
sudo apt remove wine
sudo apt autoremove
#或者
sudo apt purge wine*
3. 使用
wine的命令:
你至少需要运行一次winecfg来设置wine的目录和硬件。
# wine安装软件(三种):
wine xxx.exe
./ xxx.exe
# 直接双击软件包
winecfg (wine的设置~)
wine taskmgr (任务管理器)
wine uninstaller (卸载软件,先cd到需要卸载的软件安装目录)
wine regedit (注册表)
wine notepad (记事本)
wineboot ( 重启wine)
4. 安装微信
推荐参考:Ubuntu20.04中安装微信
如何在ubuntu 20.04以及ubuntu 18.04安装微信
#安装微信依赖库和字体
#使用winetricks安装win支持库。
sudo apt install winetricks
winetricks
#然后勾选你软件需要的如:colorprofile、corefonts、d3dx9、fontfix、fontsmooth-gray、fontsmooth-rgb、fontsmooth-bgr、gdiplus、mfc40、mfc42、msxml3、msxml4、msxml6、riched20、riched30、tahoma、urlmon、vb6run、vcrun6、vcrun2003、vcrun2005、vcrun2008、ie6、allfonts
winetricks corefonts riched20 riched30
sudo apt-get install fonts-wqy-microhei #文泉驿-微米黑
sudo apt-get install fonts-wqy-zenhei #文泉驿-正黑
cp /usr/share/fonts/truetype/wqy/wqy-zenhei.ttc ~/.wine/drive_c/windows/Fonts
#將字体注册到 Wine
vim ~/.wine/font.reg
#键入以下内容,并保存:
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-zenhei.ttc"
"Microsoft Sans Serif"="wqy-zenhei.ttc"
"MS Sans Serif"="wqy-zenhei.ttc"
"Tahoma"="wqy-zenhei.ttc"
"Tahoma Bold"="wqy-zenhei.ttc"
"SimSun"="wqy-zenhei.ttc"
"Arial"="wqy-zenhei.ttc"
"Arial Black"="wqy-zenhei.ttc"
regedit ~/.wine/font.reg
#安装微信
# 直接从官网上下载微信最新版本,下载完成之后用wine运行安装即可。
wine WeChatSetup.exe
#删除桌面WeChat.Desktop图表(建议)
#在applications中找到WeChat图标打开微信即可正常运行
更高版本
Installing Wine 5.0 on Ubuntu(need waiwang)
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key
sudo apt-key add Release.key
sudo add-apt-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'
#sudo sh -c 'echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./" > /etc/apt/sources.list.d/obs.list'
sudo apt update
sudo apt install --install-recommends winehq-stable wine-mono wine-geco winetricks
wine --version
wine-6.0.2