STARCRAFT WINE COMPATIBILITY HACKING
by J. Christopher Pereira ( kripper@users.sourceforge.net) |
Translated by DANKO from SPANISH VERSION |
|
Wine is a miracle...reading some news about judgements against Microsoft, a paragraph attracks my attention. It said something like "In teory, it could be possible to carry the M$ Windows API to Linux, to execute applications written for Windows on Linux. Sin embargo, this would be impossible in the practice because his pour documentation and because M$ surely will keep on developing the Windows API constantly.
however, the Wine developers have been working for some years and today it is posible to execute a big number of applications originally written for M$ Windows on Linux.
Specifically:
Wine is an implementation of the Windows 3.x and Win32 APIs on top of X and Unix. Think of Wine as a Windows compatibility layer. Wine provides both a development toolkit (Winelib) for porting Windows sources to Unix and a program loader, allowing unmodified Windows 3.1/95/NT binaries to run under Intel Unixes. Wine works on most popular Intel Unixes, including Linux , FreeBSD , and Solaris .
Wine does not require Microsoft Windows, as it is a completely alternative implementation consisting of 100% Microsoft-free code, but it can optionally use native system DLLs if they are available. Wine comes with complete sources, documentation and examples and is freely redistributable. (The licensing terms are similar to X11.)
What is Starcraft?
How did you get here if you don´t know what is Starcraft? I Prefer not being me the one that gets you closer to this habit / sport ;-)
The main target of this proyect, is allow Starcraft run over Linux with WINE, the same or better than it´s runs over Windows.
Some versions of WINE allow you to execute Starcraft, however, there are still some problems that have years without a solution and they are related with the multiplayer mode and the DGA (or DGA2) mode, the performance of the game without them llega a ser really disgusting in some machines.
It isn´t necesary to have knowledges about programing. Now you can hel me to make versions regresions how I will describe next:
Regresions Test
The WINE developers are patching it everywere and by the moment, they aren´t concentrated in improving the WINE compatibility with specific applications. Their strategy is simply adding more and more new funcionalities before getting the 1.0 version, that´s why the WINE compatibility with Starcraft gets worse with newer versions and some things that used to work suddenly don´t work any more.
Therefore, it is necesary to keep a historic registry of the WINE compatibility with Starcraft to determine in wich version something stop working.
Especificaly, in this moment there is a problem with the last WINE version of the CVS and the events processing from keyboard and mouse in DGA2 mode (the new DGA mode that get´s into WINE since XFree86 4). There wasn´t any problem, for example in the 20010131 version (January 31, 2001, the last year!).
Another problem really common is the problem with the True Type fonts in the Battle Net screen. With the newest version of WINE, you can apreciate the background images, but not the text. However, in another version before that I don´t remember (could it be a year?) , I thought i have seen the text working, but not the background.
Now I´m concentrating in getting a solution to these problems, it would be better if you tell me in wich WINE versions (aaaammdd) there were text in Battlenet and that worked good in the DGA2 mode.
Como obtener y compilar una versión
You can get the source code of any version from the winehq.com CVS by this way:Important observations
export CVSROOT=:pserver:cvs@cvs.winehq.com:/home/wine
cvs login
The password is "cvs"
Then, to get a version of WINE (ie: 2002-02-28), just write:
cd <el directorio donde dejará los fuentes>
cvs -z 3 -d $CVSROOT checkout -D "2002-02-28 EDT"
Later, to compile and install WINE, write:
wine/tools/wineinstall
To install another version (ie: 2001-01-01), you just have to write:
cvs -z 3 -d $CVSROOT update -D "2001-01-01 EDT"
and recompile and reinstall with:
wine/tools/wineinstall
(In http://www.winehq.com/Docs/wine-devel/cvs-regression.shtmlyou will get more info about making regresions test)
- To run an application in DGA mode, you have to have access to /dev/mem. The easiest way (but so insecure) is just run WINE as a root.
- It is posible that in some versions of WINE, the DGA mode don´t let you get out of Starcraft. With CTRL+ALT+DEL you can reset the X server and start it again. It´s possible to run WINE by this way:
(wine <path to starcraft.exe> &) ; sleep 120 ; killall wine
With this you will be sure that WINE will close automatically afet 2 minutes, in case that the keyboard and the mouse get freeze and you can´t close it manually.
- Frecuently (ever, in my personal case) it is necesary to reset X (a logout/login of the Gnome/KDE is enought), because it isn´t possible to init the DGA mode for second time. This problem is solved in the three latests versions.
- In some cases, in some 2001 year versions, I couldn´t compile the CVS sources because a conflict with the file wine/dlls/wininet/internet.c. A quick solution is simply replacing this file with the latest CVS version:
rm wine/dlls/wininet/internet.c
cvs -d $CVSROOT checkout -D "2002-02-28 EDT" wine/dlls/wininet/internet.c
I guess that all the CVS versions (at least from the 2001) have to be possible to compile them with most distributions, then in error case, please try to get the way to compile them.Results publication
- don´t forget that $CVSROOT have to be defined (export CVSROOT=:pserver:cvs@cvs.winehq.com:/home/wine ) to be able to write the CVS commands previously explained.
Once you have run WINE + Starcraft, please publish your experience in: http://sourceforge.net/tracker/?func=add&group_id=47725&atid=450575, tellng detailly:Conditions
- Error details
- WINE version that presents the error
- WINE version that don´t presents the error
- Distribution, Kernel version, XFree86 version, grafic card driver, etc.
- Fisrtly we will just support Starcraft + WINE with DGA2 activated, thats why you will have to be sure that definively you´re running the application with DGA. Just having the "UseDGA" = "Y" line in .wine/config doesn´t make sure that is running with DGA !
With my personal experience, I had problems with the 90% of the versions that I´ve compiled and runned with DGA, that doesn´t happens without DGA.
To determine that DGA is turned on, run WINE with "--debugmsg +x11drv " and check that "Enabling DGA" appears in the logs.
In any case, running Starcraft without DGA should notice by the slow movement of the mouse. With the DGA mode active, you have the same or better performance than windows IMOPlease, is so important that you don´t report problems if you aren´t using DGA.
To let XFree86 use DGA, you will have to have in /etc/X11/XF86Config-4 :
Section "Module"without the option: Option "omit xfree86-dga"
Load "extmod"
EndSection
- "Complete Starcraft installation and running guide for Linux+Wine-systems"
http://koti.mbnet.fi/~hoppq/sc-howto.html
- "StarCraft Under Wine HOWTO"
http://www.linuxgames.com/starcraft.php3
- "Starcraft support forum at Transgaming"
http://www.transgaming.com/postlist.php?forum=10