Howto: Starcraft II under Wine (Ubuntu Linux)

phyrex1an

Staff Member and irregular helper
Reaction score
447
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

Mega Super Ultra Cool Member
Reaction score
608
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.
Reaction score
188
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
Reaction score
447
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.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615

xPheRe

New Member
Reaction score
43
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
Reaction score
1,663
I do hope this should be stickied for future reference and after SC2 had been released.
 

Sevion

The DIY Ninja
Reaction score
413
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
Reaction score
0
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
Reaction score
447
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
Reaction score
0
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
Reaction score
0
"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.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top