wine

一、安装

sudo yum -y install wine
很快安装完毕

二、启动配置工具

winecfg
但是弹出框没有文字.汉字都是点号

三、能够运行,但是问题多多

直接运行: wine axx.exe
竟然真能跑起来,还是没有汉字,都是点点。

四、按照网上说明,竟然成功搞定

www.360doc.com/content/12/0911/18/44521/235580987.shtml
---->>> 神操作,在PC浏览器无法复制,但是在手机浏览器竟然让我复制了!!!

 wine中文乱码的解决方法
新装的wine中文全是乱码,需要修改一下几个配置文件,找到一篇比较详细的配置说明,分享一下:
" wine下中文的配置方案
步骤:
1. 初始设置
运行 winecfg,把模拟的 Windows 系统设置为 Windows XP 或者 Windows 2000。
2. 准备字体
为了让 Windows 应用程序看上去更美观,所以需要 Windows 下面的字体。
由于我已经将 simsun.ttc 复制到 /usr/share/fonts/windows/
目录中了。所以我只需要在 ~/.wine/drive_c/windows/fonts/ 目录中为
simsun.ttc 创建一个符号连接:
cd ~/.wine/drive_c/windows/fonts
ln -s /usr/share/fonts/windows/simsun.ttc simsun.ttc
ln -s /usr/share/fonts/windows/simsun.ttc simfang.ttc
创建一个 simfang.ttc 是许多 Windows 应用默认使用 simfang.ttc 字体。
3. 修改 ~/.wine/system.reg
装好字体后,还要修改一下 Wine 的注册表设置,指定与字体相关的设置:
gedit ~/.wine/system.reg
(一定要使用 gedit 或其他支持 gb2312/utf8
编码的编辑器修改这些文件,否则文件中的中文可能变乱码)
搜索: LogPixels
找到的行应该是:[System\\CurrentControlSet\\Hardware
Profiles\\Current\\Software\\Fonts]
将其中的:
"LogPixels"=dword:00000060
改为:
"LogPixels"=dword:00000070
搜索: FontSubstitutes
找到的行应该是:[Software\\Microsoft\\Windows
NT\\CurrentVersion\\FontSubstitutes]
将其中的:
"MS Shell Dlg"="Tahoma"
"MS Shell Dlg 2″="Tahoma"
改为:
"MS Shell Dlg"="SimSun"
"MS Shell Dlg 2″="SimSun"
4. 修改 ~/.wine/drive_c/windows/win.ini
gedit ~/.wine/drive_c/windows/win.ini
在文件末尾加入:
[Desktop]
menufontsize=13
messagefontsize=13
statusfontsize=13
IconTitleSize=13
5.
最关键的一步,网上很多文章中没有提到的一步──把下面的代码保存为zh.reg,然后终端执行regedit
zh.reg。从Windows目录下的Fonts里的simsun.ttc复制到/home/user/.wine/drive_c/windows/fonts里面。
代码:
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"
之后,中文正常显示!

2、linux系统一键安装wine

A、准备好文件,从win7同步 simsun.ttc

B、因为需要分别在 root 和user下面安装,总脚本

# for root install
sudo yum -y install wine && sudo sh cfgFont.sh

# for user install
sh cfgFont.sh

C、核心代码

“`cfgFont.sh

prepare fonts

cp ./simsun.ttc ~/.wine/drive_c/windows/Fonts/simsun.ttc
cp ./simsun.ttc ~/.wine/drive_c/windows/Fonts/simfang.ttc

setup fonts : ~/.wine/system.reg

#”LogPixels”=dword:00000070
sed -i “/\”LogPixels\”\=dword:00000060/ s/00000060/00000070/” ~/.wine/system.reg

#搜索: FontSubstitutes 找到的行应该是:
#[Software\Microsoft\WindowsNT\CurrentVersion\FontSubstitutes]
#将其中的:
#”MS Shell Dlg”=”Tahoma”
#”MS Shell Dlg 2″=”Tahoma”
#改为:
#”MS Shell Dlg”=”SimSun”
#”MS Shell Dlg 2″=”SimSun”
sed -i “/\”MS\ Shell\ Dlg\”\=\”Tahoma\”/ s/Tahoma/SimSun/” ~/.wine/system.reg
sed -i “/\”MS\ Shell\ Dlg\ 2\”\=\”Tahoma\”/ s/Tahoma/SimSun/” ~/.wine/system.reg

#4. 修改 ~/.wine/drive_c/windows/win.ini
#gedit ~/.wine/drive_c/windows/win.ini
#在文件末尾加入:
#[Desktop]
#menufontsize=13
#messagefontsize=13
#statusfontsize=13
#IconTitleSize=13

iniFile=echo ~/.wine/drive_c/windows/win.ini
echo “iniFile is ${iniFile}”
oldStr=sed -n "/[Desktop\]/p" "${iniFile}"
if [[ -z “${oldStr}” ]]; then
sed -i ‘$a[Desktop]’ ${iniFile}
sed -i ‘$amenufontsize=13’ ${iniFile}
sed -i ‘$astatusfontsize=13’ ${iniFile}
sed -i ‘$aIconTitleSize=13’ ${iniFile}
else
echo “[Desktop] font has been set”
fi

#最关键的一步,终端执行regedit zh.reg
regedit zh.reg

### D、注册表文件
```reg
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\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"

五、wine大显神威

最让人头疼的是,在linux下面用不了source insight。
只需三四不即可搞定:
wine sourceInsight_setup.exe
然后: wine keygen.exe,报错,用win7中生成的序列号,同样管用。
几分钟搞定

2、wine 运行bat脚本

执行bat脚本:
   wine cmd < ab.bat
进入dos环境:
   wine cmd

六、相关工具

CrossOver 基于 wine,功能更加好用

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注