总结:
配置Wine纯净版
1. Dash -> 搜索wine,运行Configure Wine配置程序
2. 激活“函数库”页面,在“新增函数库顶替”下拉框里输入“winemenubuilder.exe”,添加,编辑,停用
3. 激活“函数库”页面,在“新增函数库顶替”下拉框里输入“winemine.exe”,添加,编辑,停用
如果已经将int main() { return 0; }编译成main.exe,则可以执行:
cp -f main.exe $HOME/.wine/drive_c/windows/system32/winemenubuilder.exe
cp -f main.exe $HOME/.wine/drive_c/windows/system32/winemine.exe
然后将第2、3两步中的停用改成原装。
4. “驱动器”页面,添加D分区,路径指定为$HOME/qpSOFT/Wine;同时将Z分区路径修改为$HOME
5. “关于”页面,填写Windows注册信息,姓名:loaden,单位:qpsoft
6. 运行Winetricks程序,安装字体:corefonts,然后从XP系统拷贝simhei.ttf simsun.ttc至Fonts目录
7. 视需要安装DLL或组件:winetricks cmd mfc42 vcrun2003
下载:
http://www.winehq.org/download/ubuntu/
https://launchpad.net/~ubuntu-wine/+archive/ppa
彻底清理Wine
删除$HOME/.local/share/applications/mimeapps.list中含有wine的条目
删除$HOME/.wine目录
find $HOME/.config -name '*wine*' -exec rm {} \;
find $HOME/.local -name '*wine*' -exec rm {} \;
find $HOME/.local -name '*wine*' -exec rm -r {} \;
rm -rf $HOME/.local/share/icons/hicolor
rm -f $HOME/.local/share/applications/mimeinfo.cache
Wine调用批处理时字体错误处理
err:wineconsole:WCUSER_SetFont wrong font
err:wineconsole:WINECON_Fatal Couldn't find a decent font, aborting
方案:
$LANG=C
$wineconsole cmd 或$wineconsole XXX.bat
另一方案:
$wine cmd
$XXX.bat
这样就不会存在找不到中文字体的问题了,但要支持中文:
1. 批处理文件编码必须是GBK
2. 行尾必须用Windows风格
64位系统Wine缺少gnome-keyring-pkcs11.so的错误处理
见:http://askubuntu.com/questions/127848/w ... -pkcs11-so
1) Install getlibs:
wget https://launchpad.net/~jcollins/+archiv ... a2_all.deb
sudo dpkg -i getlibs_2.06-0ubuntu1~ppa2_all.deb
2) Install the 32bit library:
sudo getlibs -p gnome-keyring:i386
3) Make the symbolic link:
sudo mkdir /usr/lib/i386-linux-gnu/pkcs11
sudo ln -s /usr/lib32/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so