#######################
安裝 wine
#######################
如果有關閉自動安裝推薦套件,先移除設定檔
sudo rm /etc/apt/apt.conf
Ubuntu
sudo rm /var/lib/apt/lists/*
sudo dpkg --add-architecture i386
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
Debian
sudo rm /var/lib/apt/lists/*
sudo dpkg --add-architecture i386
wget https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo sh -c 'echo "deb http://dl.winehq.org/wine-builds/debian sid main" >> /etc/apt/sources.list.d/wine-official.list'
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
winetricks
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo cp winetricks /usr/local/bin
$ rm winetricks
64-bit OS 建立 wine 32-bit 環境
WINEARCH=win32 winecfg
64-bit OS 建立 wine 64-bit 環境 / 32-bit OS 建立 wine 32-bit 環境
winecfg
#######################
Wine系統字型設定
#######################
文泉驛微米黑
$ sudo apt-get install fonts-wqy-microhei
$ cp /usr/share/fonts/truetype/wqy/wqy-microhei.ttc ~/.wine/drive_c/windows/Fonts/
$ leafpad ~/.wine/drive_c/windows/cht_font.reg
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
$ wine regedit cht_font.reg
或
微軟新細明體
$ wget https://raw.githubusercontent.com/Mint-Fans/linux-package/master/mingliu.ttc
$ cp mingliu.ttc ~/.wine/drive_c/windows/Fonts/
$ leafpad ~/.wine/drive_c/windows/mingliu.reg
REGEDIT4
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionFontSubstitutes]
"Arial"="Arial"
"Arial CE,238"="PMingLiU"
"Arial CYR,204"="PMingLiU"
"Arial Greek,161"="PMingLiU"
"Arial TUR,162"="PMingLiU"
"Courier New"="Courier New"
"Courier New CE,238"="PMingLiU"
"Courier New CYR,204"="PMingLiU"
"Courier New Greek,161"="PMingLiU"
"Courier New TUR,162"="PMingLiU"
"MingLiU"="MingLiU"
"PMingLiU"="PMingLiU"
"FixedSys"="PMingLiU"
"Helv"="PMingLiU"
"Helvetica"="PMingLiU"
"MS Sans Serif"="PMingLiU"
"MS Shell Dlg"="PMingLiU"
"MS Shell Dlg 2"="PMingLiU"
"System"="PMingLiU"
"Tahoma"="PMingLiU"
"Times"="Times"
"Times New Roman"="Times New Roman"
"Times New Roman CE,238"="PMingLiU"
"Times New Roman CYR,204"="PMingLiU"
"Times New Roman Greek,161"="PMingLiU"
"Times New Roman TUR,162"="PMingLiU"
"Tms Rmn"="PMingLiU"
$ wine regedit mingliu.reg
#######################
常用函式庫
#######################
winetricks comctl32
winetricks vb6run
#######################
移除 wine
#######################
sudo apt-get --purge remove winehq-devel
sudo apt-get autoremove
######################
其他
######################
WINE 執行 EXE 與 MSI
EXE
$ wine XXX.EXE
MSI
wine msiexec /i xxx.msi
或
打開終端機輸入 winecfg 選擇Add application... 進入windows>system32 看看有無msiexec.exe
$ wine ~/.wine/drive_c/windows/system32/msiexec.exe -- /i xxx.msi
移除 Windows 記事本
rm ~/.local/share/applications/wine-extension-txt.desktop