Starcraft2 on Debian
In my stats I saw that many people were translating this page (via google translator). And because my english is not the best but don't suck neither, I decided to translate the page 'Starcraft2 sur Debian'. Please do not hesitate to correct some mistake I could write on the discussion's page.
Note: Pour les francophones qui se seraient perdu, la version française ce cette page ce trouve ici: Starcraft2 sur Debian.
I had pain and fun in trying to run Stracraft 2 on my Linux. Because I had some difficulties and I found only few info, I create this article to centralise my feedback and the information that I found.
Some troubles that I had was link to my hardware configuration. Here is the environment where I installed Starcraft2. You still have to extrapolate to the specificities of your case.
- Intel i7
- nVidia GForce GT 220
More details can be found here... (in French)
- Debian Squeeze adm64
- Kernel 2.6.32-5-amd64
- wine 1.2 (compiled), but I also tested with wine 1.3.0 (also compiled)
- nvidia-kernel-source v195.36.24-4
Mount the DVD
Make an iso image of the DVD and mount it:
dd if=/dev/sr0 of=/home/user/Games/StarCraft2/StarCraft2.iso mount -o ro,unhide,uid=1000,loop /home/user/Games/StarCraft2/StarCraft2.iso /media/cd-iso
Install the last version of wine
The version of wine on the repositories of Debian is the 1.0.1-3. And the version 1.2 is at least needed or better 1.3. I didn't found any depot that I like and with the right versions of wine. So I had to compile it.
First of all, install of the dependencies:
apt-get build-dep wine
For the owner of 64bits CPU, you have to install also the glx 32bits libs. Otherwise, the game will not run and will complain that the OpenGL is missing (see my post here).
aptitude install nvidia-glx-ia32
We get the sources of wine. In the example here under it is the 1.30 version. But you can find other versions more up to day on http://sourceforge.net/projects/wine/files/Source/.
We extract the archive. And by the way, we rename it correctly.
mv download wine-1.3.0.tar.bz2 tar -xjf wine-1.3.0.tar.bz2
$ ./configure $ make
Installation done by root:
# make install
Installation of the game
Launch the installer.exe with wine:
Normally, everything should goes right. You just need to follow the instructions. At the end of installation (or at the first start of the game I don't remember), an update of the software start automatically.
However, if you get nothing happen, had a look in the troubleshoot chapter here under.
Launch the game
The game should run normally when executed by wine.
wine C:\\Program\ Files\\StarCraft\ II\\StarCraft\ II.exe
If nothing happen, and/or you get a error message of DirectX, see in the troubleshootings.
Initalisation of DirectX failed
The installation goes well, the update also. But when you start the game for the first time, you get an error message about DirectX. And next times, when you try to rerun the game, you get no reaction (no error message and nothing happen).
Error Message (in French do not hesitate to give the english version into the discussion's page)
Echec de l'initialisation de DirectX. Il faudrait sans doute réinstaller DirectX. Si le problem persiste, pour plus d'informations,veuillez consulter notre site Internet d'assistance à l'addresse starcraft2.com/support.
Error message in the terminal:
fixme:process:GetLogicalProcessorInformation (0x33fa5c,0x33fd5c): stub fixme:hnetcfg:fw_profile_get_FirewallEnabled 0x139ad0, 0x43cf0e8 fixme:process:GetProcessWorkingSetSize (0xffffffff,0x43ced78,0x43ced7c): stub fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly err:d3d_caps:WineD3D_CreateFakeGLContext Can't find a suitable iPixelFormat. err:d3d:InitAdapters Failed to get a gl context for default adapter Direct3D9 is not available without OpenGL.
I get the same results with win 1.2 and with 1.3.0.
The 3D and OpenGL is well working on your Linux:
$ glxinfo | grep "direct rendering" direct rendering: Yes
Actually the trouble comes from the 64bits architecture of my CPU, and the game is a 32bits binary. By searching my disk, certain libraries ia32 where well installed but without OpenGL.
You just need to install this package:
aptitude install nvidia-glx-ia32
And then recompile wine:
$ ./configure $ make # make install
Differences of output of ./configure with and without the libs glx-ia32
Without ia32 libs
checking for GL/gl.h... yes checking for GL/glx.h... yes checking for GL/glu.h... yes checking for up-to-date OpenGL version... yes checking for -lGL... not found checking for -lGL... not found checking for -lGLU... not found
With ia32 libs
checking for GL/gl.h... yes checking for GL/glx.h... yes checking for GL/glu.h... yes checking for up-to-date OpenGL version... yes checking for -lGL... libGL.so.1 checking for -lGLU... libGLU.so.1
After the install of the libs glx-ia32 and the compilation of wine, I also reinstalled the game. It's maybe not necessary, it's why I didn't write it in the solution (only in this note).
During the download of the update, a message box appears and says that the program failed. Nevertheless, the download continues but block a bit later.
Launch winecfg. And in the tab Libraries add the msthtml DLL and give it the 'native' value.
No more sound in game
During the installation you get the sound in the animation. But once in the game you didn't get any more sound.
Launch winecfg. And in the tab Libraries add the DLL 'mmdevapi'; and then change the value to 'Disabled'
Fog on the mission 'Safe Haven'
The mission Safe Haven is unplayable because there is a big grey fog (See this screenshoot). Note that the other mission 'Haven's Fall' works well.
you tested a certain number of wine version without any success.
Description of the Bug n°23906 on winehq.
You should reinnstalling Starcraft without keeping the configurations!
Personally, I solved the trouble by coincidence when I upgraded my desktop with the last Debian and new file systems in ext4. I'm not sure about the exact root cause, but in a comment on winehq we can read this: "it was solves by deleting Variables.txt found in /home/user/Starcraft II/. When you restart you lost all your settings however when you reconfigure those the fog seems to be gone."
So, it seems possible that only remove this file will be enough to solve the fog.