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.
  • M Mulciberxp:
    My power has been off most of the last 2 days. We had a generator installed 3 years ago though, so we're staying warm. Water is another issue...
  • The Helper The Helper:
    Where I live has a pool so we are using that to get water to flush the toilets. We have enough bottled water to drink and brush teeth and stuff but it has been a few days and no shower though....
  • Varine Varine:
    I had some water in gallon jugs, and got our water back on yesterday. We don't seem to have any leaks, but I haven't crawled down there to look yet.
  • The Helper The Helper:
    still no water I cannot remember when I last showered now I know how they felt in the old west lol
  • Varine Varine:
    My poor plants are happy, they aren
  • Varine Varine:
    aren't used to going this long without water or lights or normal heat. I think a couple of them froze, but they look like they'll make it
  • Varine Varine:
    Well one of them is pretty rough but I think it was sick to begin with, that one always had some problems.
  • jonas jonas:
  • jonas jonas:
    ???
  • Ghan Ghan:
    That is such a Texas thing to say lol
  • midnight8 midnight8:
    a positive could come out of this. So many people trapped at home could put a dent in the covid numbers in Texas
  • Varine Varine:
    That dude, Tom Boyd, is really upset about the backlash from his "it's your fault you're freezing" thing because he claims he resigned before saying it, so it wasn't like he said it in his official capacity or anything.
  • jonas jonas:
    Almost as if he was saying "screw you guys, I'm going home"
  • Varine Varine:
    I'm fairly new here still but that seems to be the analogous message by several of our politicians.
  • vypur85 vypur85:
    Nobody?
  • jonas jonas:
    Hi vypur85, long time no see
  • tom_mai78101 tom_mai78101:
    Hi vypur85, long time no see.
  • The Helper The Helper:
    We are all somebody
  • Varine Varine:
    I kinda like being nobody tho.
  • The Helper The Helper:
    Voting for the NUON Controller Contest is open in the NUON-Dome NUON forum
  • vypur85 vypur85:
    Yeaaa! It's been a year since my last chat posting. Not that I chat a lot anyways.
  • vypur85 vypur85:
    Hope everyone is safe and sound throughout the pandemic.
  • The Helper The Helper:
    I think most of us that post here spend more time behind the computer then in places that we would catch coronavirus :)
  • Varine Varine:
    The bar I'm at is still requiring masks anyway, and most of the people that come there are pretty good about sanitizing their hands and shit.

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top