广告

本站里的文章大部分经过自行整理与测试

2017年10月13日星期五

wine - TIM

1) 安装 wine + winetricks

http://jasonmun.blogspot.my/2017/10/wine-microsoft-office-2013-32-bit.html

2) 创建 ~/.wine/TIM

$ env LC_ALL=zh_CN.UTF-8 WINEPREFIX=~/.wine/TIM WINEARCH=win32 winecfg

将 App -> Windows ver. -> 改为 Windows 7 (如果中英文显示有问题, 可以先跳过)

3) wine 和 winetricks 如果显示的是中文 (需要安装字型)

$ cp /usr/share/fonts/truetype/wqy/wqy-microhei.ttc ~/.wine/TIM/drive_c/windows/Fonts/
$ sudo chown <userID>:<userID> ~/.wine/TIM/drive_c/windows/Fonts/wqy-microhei.ttc

$ sudo gedit /wqy.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"

$ WINEPREFIX=~/.wine/TIM WINEARCH=win32 wine regedit

将 /wqy.reg 导入到注册表中后退出, 然后再运行以上看看, 
这时候应该可以正常显示中英文了

$ WINEPREFIX=~/.wine/TIM WINEARCH=win32 winecfg

将 App -> Windows ver. -> 改为 Windows 7

4) 需要的字型和 library

$ WINEPREFIX=~/.wine/TIM WINEARCH=win32 winetricks

安装字体: corefonts cjkfonts
安装 Windows DLL 或组件: winetricks msxml6 riched20 riched30 vcrun6

5) 加入 [函数库] - [DLL 顶替] - [新增函数库顶替]

$ WINEPREFIX=~/.wine/TIM WINEARCH=win32 winecfg

msxml6
riched20
riched32

6) 创建连接文件 TIM.sh

$ sudo gedit ~/.wine/TIM/TIM.sh

#!/usr/bin/env bash

EXEPATH=$(cd `dirname $0`;pwd)

export WINEPREFIX=$EXEPATH
export WINEDEBUG=-all
export LANG=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8

cd "$EXEPATH/drive_c/Program Files/Tencent/TIM/Bin"
wine TIM.exe

给予执行权限
$ sudo chmod +x TIM.sh
$ bash TIM.sh

没有评论:

发表评论