前言
有很多時候我們需要在Ubuntu系統上使用釘釘、微信等Windows下的軟件,因爲在釘釘網頁版中無法顯示加密了的消息,必須安裝釘釘軟件纔行,所以有了這篇文章,這篇文章主要記錄Wine和這些軟件的安裝過程
1 安裝Wine 4.0
在Ubuntu上使用
sudo apt-get install wine
安裝的往往是比較低的版本,比如Wine 1.7,如果用太老的版本,那麼釘釘、微信等軟件根本安裝不了
1.1 Ubuntu 18.10
- 下載祕鑰
wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
- 導入祕鑰
sudo apt-key add Release.key
- 添加倉儲
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard ./'
- 更新程序包
sudo apt-get update
- 安裝wine穩定版
sudo apt-get install --install-recommends winehq-stable
1.2 Ubuntu其他版本
- 下載祕鑰
wget -nc https://dl.winehq.org/wine-builds/Release.key
- 導入祕鑰
sudo apt-key add Release.key
- 添加倉儲
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
- 更新程序包
sudo apt-get update
- 安裝wine穩定版
sudo apt-get install --install-recommends winehq-stable
1.3 Wine配置
根據不同的Ubuntu版本安裝好Wine之後,在終端執行
winecfg
執行完畢之後,等待彈框出現,它會提示有些軟件沒有安裝,全部同意安裝完畢之後,可以在關於處看到版本信息
2 安裝釘釘
首先到釘釘官網下載釘釘安裝包
下載完成之後雙擊安裝包即可安裝,安裝流程和在Windows系統下一致,需要注意的是,如果Wine版本太低,會報錯
安裝好後在桌面可以找到釘釘啓動圖標,也可以在下面這個路徑啓動釘釘
/home/yourname/.wine/drive_c/Program Files (x86)/DingDing/main/current/DingTalk.exe
如果直接啓動釘釘的話,會遇到下面的問題
輸入框無法顯示光標和輸入的文字
這怎麼能忍?這裏就需要替換一個dll
2.1 安裝riched20.dll
爲了方便大家下載,我把這個庫上傳到了CSDN,點擊riched20.dll即可下載
這個庫可以在win7 或 xp (32位的) 的c:/windows/system32/riched20.dll找到,riched20.dll必須是3.1的版本,不然你又會遇到很多錯誤,包括釘釘卡死等,下載好之後是這樣的
然後把這個庫替換到下面的路徑
/home/yourname/.wine/drive_c/windows/syswow64/riched20.dll
2.2 配置釘釘運行環境
執行winecfg命令,點擊增加程序設置按鈕,找到釘釘可執行文件,千萬不要找錯,找錯了就沒有用了
/home/yourname/.wine/drive_c/Program Files (x86)/DingDing/main/current/DingTalk.exe
再點擊函數庫選項卡,在新增函數庫頂替中分別輸入msvcp60、riched20、riched32,再點擊添加,最終如下所示
點擊應用之後,再重啓釘釘,然後輸入框就正常了
2.3 釘釘中文亂碼問題
新建wine_font.reg文件,輸入以下內容,simsun是很多應用默認的字體
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"
在終端執行
wine regedit wine_font.reg
然後重啓釘釘,看看效果,不行的話再重啓電腦
不過釘釘還是有其他BUG,不一定要下載官網最新版,可以找一個穩定版安裝,不過只聊天看消息的話足夠用了
微信安裝的過程也類似,趕快試試吧