没想到在wine中使用中投证券这么麻烦,会一直提示mfc42.dll不存在,
要想运行,需要进行下面的设置:
http://wiki.winehq.org/FAQ#head-d10f6828f4c34da2ef34f0bf8a9d576ae78bb2aa
6.5. My application says some DLL or font is missing. What do I do?
Applications should come with all the DLLs they need (except for core Windows DLLs). They sometimes forget to, and rely on you to already have the DLL or font installed. You can install the missing DLL or font in several ways:
-
downloading them from the original creators of the runtime (eg. Microsoft). The easiest way to do this is with winetricks (see below ).
- installing other applications which do include them
- copying them from a licensed version of Windows installed on the same machine
Do not download DLLs or scripts from websites you do not know and trust! Fake or infected DLLs can cause you great pain, even on Wine.
Missing DLLs that can be installed with winetricks include:
-
MFC40.DLL and friends: run winetricks and select mfc40 (Microsoft Foundation Classes from Visual C++ 4).
-
MFC42.DLL, MSVCP60.DLL and friends: run winetricks and select vcrun6 (MS Visual C++ 6 sp4 libraries: mfc42, msvcp60, msvcrt).
-
MFC71.DLL, MSVCP71.DLL and friends: run winetricks and select vcrun2003 (MS Visual C++ 2003 libraries: mfc71,msvcp71,msvcr71).
-
MFC80.DLL, MSVCP80.DLL and friends: run winetricks and select vcrun2005 (MS Visual C++ 2005 libraries: mfc80,msvcp80,msvcr80).
-
MFC90.DLL, MSVCP90.DLL and friends: run winetricks and select vcrun2008 (MS Visual C++ 2008 libraries: mfc90,msvcp90,msvcr90).
-
MDAC: run winetricks and select mdac27 (MS MDAC 2.7).
See the winetricks wiki page for a complete list of winetricks commands.
通过上面的这段英文可以看到,需要使用winetricks这个文件进行tricks mfc42.dll这个文件。点击上面winetricks的链接,进到下面的网页中。
http://wiki.winehq.org/winetricks
Using winetricks
Once you've obtained winetricks you can run it simply by typing sh winetricks at the console. If ran without parameters a winetricks displays a GUI with a list of available packages. If you know the name of the package(s) you wish to install, you can append the name(s) to the winetricks command line and it will immediately start the installation process. For example,
sh winetricks corefonts vcrun6
will install both the corefonts and vcrun6 packages.
当使用#sh winetricks命令后,选中mfc42.dll,运行一下,就可以上中投证券了。
但是里面对中文的支持有些不够,会出现乱码:
修改~/.bashrc 添加一句
alias wine='env LANG=zh_CN.UTF-8 wine'
不行就改下zh_CN.UTF-8为zh_CN.GBK之类的。
重新登录生效。等于虚拟了一个环境