Howto: Starcraft II under Wine (Ubuntu Linux)

phyrex1an

Staff Member and irregular helper
Staff member
This is a short tutorial on how to run the Starcraft II Beta under Wine. The tutorial assumes that you run Ubuntu 9.10, but it can be modified to work with other distributions as well. The Beta installer works just fine under the latest development release of wine (1.1.40) but sc2 will crash on the login screen. Because of this we'll have to download the sources for wine, patch them manually and compile. We'll do all this through the terminal (Alt + F2, type gnome-terminal + ENTER), just copy and paste the commands I give here should work flawlessly. Sometimes I post links with more info, if a command doesn't work you might want to follow that link and see if it contains help on your issue. Please mention your problem and solution and I'll update the Howto accordingly.

First we need to install git since that is needed to fetch the wine sources:
Code:
sudo aptitude install git
Next step is to download the latest wine code to a directory and change to that.
Code:
git clone git://source.winehq.org/git/wine.git ~/wine-git && cd ~/wine-git
More info: http://wiki.winehq.org/GitWine?acti...head-f90aa63f963ccd6f1b34f59e4fdaafaecc72ad18

Next we have to patch wine with a fix for the login screen crash:
Code:
wget -q -O - http://phyrex1an.net/sc2-login.diff | patch -p1
This will download a patch from my server and apply it to the wine sources. The patch isn't written by me but only packaged in a format that the patch program supports. Original can be found here: http://www.winehq.org/pipermail/wine-patches/2010-March/085817.html
More info: http://wiki.winehq.org/Patching

We're now almost ready to start compiling, but first we need all build dependencies and some build tools:
Code:
sudo aptitude install build-essential
Code:
sudo apt-get build-dep wine
We can now start the build process:
Code:
tools/make_requests && ./configure && make depend && make
And finally install it:
Code:
sudo make install
Restart wineserver and you should now be able to login into bnet!
Code:
wineserver -k
However, there are still some stuff to do before the games run smoothly:

Fixing forever loading times
Starting a game takes forever with certain settings in wine. To fix this you have to change the emulator mode to either Vista or Windows 7:
Code:
winecfg
Under the Applications tab change the Windows Version to either Vista or Windows 7.

Fixing sound
Starcraft II uses the mmdevapi which is only partly implemented in Wine, disabling that library will enable the fallback audio system that works perfectly (I'm unsure if this is a wine fallback or a sc2 one, regardless I haven't noticed any problems with it)
Code:
winecfg
Press Libraries tab, add a new override for mmdevapi and edit it to Disabled.
 

ReVolver

Moderator
Staff member
Good to know for me :) now only if I got the beta key invite :eek:
 

BlowingKush

I hit the blunt but the blunt hit me.
They call it Wine, "whine" because that's what people do when they realize what pain in the ass it is to do the most simple shit.
 

phyrex1an

Staff Member and irregular helper
Staff member
It's a Windows compatibility layer after all. Whining is a sign that they are becoming more compatible.
</feeding-the-trolls>

On a more related note, some discoveries:
Changing to native direct3d doesn't seem to improve performance or remove any of the remaining graphic glitches.
Restarting sc2 after each pvp game reduces the number of crashes to 0.
The patch didn't get into the wine tree in time to todays release (1.1.41), first attempt was rejected.
 

xPheRe

New Member
Thanks!!

I found this post while searching how to improve WINE performance on my system.
I'm also the proud owner of a SC2 beta key, but can't play at home because it doesn't run under Ubuntu.

A coincidence? I think it's not :) Thank you, phyrex1an
Kind regards
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
I do hope this should be stickied for future reference and after SC2 had been released.
 

Sevion

The DIY Ninja
I like the credit that winehq gave Phyrex <3 The only reference I can find is a link for a patch download. Lol.
 

livelife686

New Member
Help!

Help me, I can't get in here: git clone git://source.winehq.org/git/wine.git ~/wine-git && cd ~/wine-git
I have just got my PC reformatted. What do you think is the problem?:nuts:
 

phyrex1an

Staff Member and irregular helper
Staff member
Help me, I can't get in here: git clone git://source.winehq.org/git/wine.git ~/wine-git && cd ~/wine-git
I have just got my PC reformatted. What do you think is the problem?:nuts:
In the case you weren't just spamming advertising links:

If you have an internet connection there is no reason for (just) that line to fail (save wine git being down or your system is very strangely configured. Eg, no cd command or no write permission to your own home directory -_-).

Did you get any errors from the
Code:
sudo aptitude install git
line?
 

ronduncan

New Member
This is a short tutorial on how to run the Starcraft II Beta under Wine. The tutorial assumes that you run Ubuntu 9.10, but it can be modified to work with other distributions as well. The Beta installer works just fine under the latest development release of wine (1.1.40) but sc2 will crash on the login screen. Because of this we'll have to download the sources for wine, patch them manually and compile. We'll do all this through the terminal (Alt + F2, type gnome-terminal + ENTER), just copy and paste the commands I give here should work flawlessly. Sometimes I post links with more info, if a command doesn't work you might want to follow that link and see if it contains help on your issue. Please mention your problem and solution and I'll update the Howto accordingly.

First we need to install git since that is needed to fetch the wine sources:
Code:
sudo aptitude install git
Next step is to download the latest wine code to a directory and change to that.
Code:
git clone git://source.winehq.org/git/wine.git ~/wine-git && cd ~/wine-git
More info: http://wiki.winehq.org/GitWine?acti...head-f90aa63f963ccd6f1b34f59e4fdaafaecc72ad18

Next we have to patch wine with a fix for the login screen crash:
Code:
wget -q -O - http://phyrex1an.net/sc2-login.diff | patch -p1
This will download a patch from my server and apply it to the wine sources. The patch isn't written by me but only packaged in a format that the patch program supports. Original can be found here: http://www.winehq.org/
More info: http://wiki.winehq.org/Patching

We're now almost ready to start compiling, but first we need all build dependencies and some build tools:
Code:
sudo aptitude install build-essential
Code:
sudo apt-get build-dep wine
We can now start the build process:
Code:
tools/make_requests && ./configure && make depend && make
And finally install it:
Code:
sudo make install
Restart wineserver and you should now be able to login into bnet!
Code:
wineserver -k
However, there are still some stuff to do before the games run smoothly:

Fixing forever loading times
Starting a game takes forever with certain settings in wine. To fix this you have to change the emulator mode to either Vista or Windows 7:
Code:
winecfg
Under the Applications tab change the Windows Version to either Vista or Windows 7.

Fixing sound
Starcraft II uses the mmdevapi which is only partly implemented in Wine, disabling that library will enable the fallback audio system that works perfectly (I'm unsure if this is a wine fallback or a sc2 one, regardless I haven't noticed any problems with it)
Code:
winecfg
Press Libraries tab, add a new override for mmdevapi and edit it to Disabled.

Hey everyone, new here..

So I was extremely happy to find this guide thank you phyrex1an

I know this was for the Beta, and may have been updated but I could not find it..

When applying it to SC2 I am unable to get the sound working properly, when I disable it, nothing happens

Thanks!

-Ron
 

MdRM

New Member
"source' URIs

Thank you phyrex1an for the help.

In working it trough this deviation to your script appears. As I'm totally out of my league with this scripting, I don't know what to do about it.
Could you help/advise me?

code:
sudo apt-get build-dep wine

response:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I think I killed the chat
  • The Helper The Helper:
    I am going to save the last NUON controller for a good time
  • The Helper The Helper:
    now is not that time for the NUON
  • Ghan Ghan:
    Maybe summertime killed the chat.
  • tom_mai78101 tom_mai78101:
    More like the never-ending rain.
  • midnight8 midnight8:
    everything is dead right now, people starting to do all the stuff they could not do for the lat year and a half. My youtube channel, and all of my facebook astronomy groups also dyiing out right now
  • midnight8 midnight8:
    i may have some time, pretty sure I brought covid home from vegas, got tested today, will know for sure tomorrow or next day
  • The Helper The Helper:
    that sucks
  • jonas jonas:
    @midnight8 how is it looking
  • midnight8 midnight8:
    meh, me, wife and her friend thaty traveled with us all have covid, seems to be winding down some for me at least. Felt like complete shit, been sleeping a lot, just bieng lazy as hell. I feel like that today has probably been like 11 or 12 days since exposure. Have not had any fever today, and have not taken any meds, so hopefully by monday or tuesday I will be good to go, sadly have passed it on to our teen son, I guess that was pretty much unavoidable
  • The Helper The Helper:
    hope you get to feeling better and get vaccinated my friend
  • midnight8 midnight8:
    I will at some point, but so many vaccinated people still getting it. One of the bands we watch in vegas, all 4 had been vaccinated and are now positive.
  • Ghan Ghan:
    Symptoms?
  • Ghan Ghan:
    I think the symptoms are typically less severe if previously vaccinated.
  • midnight8 midnight8:
    I have had all of the symptoms, taste is slightly starting to come back, but smell, no. Honestly, just been a little miserable, have never felt in any danger from it. Being trapped at home sucks. lol
  • midnight8 midnight8:
    meh, got a little fever again this morning, guess gonna be a few more days
  • The Helper The Helper:
    I went to Comicon this last weekend I hope I dont get it I feel fine and I am not vaccinated and did not wear a mask
  • The Helper The Helper:
    Comicon really was not packed though like it was in the past. I am not really worried though it was the most people I have been around in a year.
  • tom_mai78101 tom_mai78101:
    Still, getting vaccinated is a good idea. We're getting Delta variant spikes here in Boston.
  • The Helper The Helper:
    I am not against vaccination at all I just have a serious procrastination problem I plan on getting vaccinated soon
  • midnight8 midnight8:
    was kinda same with me, I was gonna do it, and life got in the way.
  • midnight8 midnight8:
    we wore mask in some places, but at 118 degrees outside, little rough. :)
  • The Helper The Helper:
    yeah i had another friend in Vegas talking about that heat damn
  • The Helper The Helper:
    Well I do not think I got Covid from the Comicon

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top