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 read in the PC Gamer review that it was not much of an update to the game like just a re-release
  • Ghan Ghan:
    It's a good remaster. They did not want to change the game much because there are still many die-hard players out there that wouldn't like it to be a new game.
  • Ghan Ghan:
    They've said they are open to adding new content in the future, but wanted to get what's there correct first. As it is, for what you get the $40 asking price is a bit steep.
  • The Helper The Helper:
    Yeah that is a high price think I am going to wait a minute and see if it goes down some.
  • The Helper The Helper:
    Looking forward to doing some dungeon grinding again though.
  • The Helper The Helper:
    still 101 bots on the site constantly
  • midnight8 midnight8:
    my bots got out of their cage? oh no
  • The Helper The Helper:
    these bots are from russia, china and asia they are less than they were but more than they need to be I have no idea why they hover here
  • tom_mai78101 tom_mai78101:
    Probably because of my Headline News
  • The Helper The Helper:
    Facebook is getting fucked right now lol
  • The Helper The Helper:
    I learned one thing from the Facebook outage - BGP - I am sure Ghan is an expert in it but I did not know what the name of it was I knew there was something like that there though
  • The Helper The Helper:
    What is up Tom?
  • jonas jonas:
    We once considered doing a project on BGP looking for problems in the implementations. But we didn't get sufficient interest and Tony Li was mean to us so we said whatever
  • Varine Varine:
    hello, peeps. I got most of my computer back up to Idaho so I have passwords again after that nightmare of like 4 months
  • Varine Varine:
    We're all trying to get time off now, but holy shit. I did not expect it to be that busy. Every day was a historical record, and every week was a total sales record for like all of summer. My pay is going to almost double next summer, which makes cooking finally a viable career, I might actually afford to change industries soon!
  • Varine Varine:
    We had people ask if there was anything we could do about the fucking sun. There's like 30 inside tables and every outside table has a sunbrella thing.
  • Varine Varine:
    No, I'm sorry, I cannot move the sun and the umbrella doesn't go 90 degrees sideways. They unfortunately had to deal with a sunset across mountains and a lake, we can only imagine the horror they had to undergo by visiting our restaurant
  • Varine Varine:
    Well, they do, but they're big and blow away and a 10 foot runaway umbrella is a much bigger problem than some cunt with the sun sorta in her eyes
  • The Helper The Helper:
    What is up Varine? Good to see you buddy! Too bad you are not in Houston I have a friend that needs Cooking staff like desperately remember if you ever want to get a different landscape, not sunsets over mountains and a lake Houston has opportunity!
  • tom_mai78101 tom_mai78101:
    Nice to see Varine back in action.
  • The Helper The Helper:
    Welcome back Varine!
  • The Helper The Helper:
    can someone answer a question in the World Editor Help forum?
  • jonas jonas:
    ok
  • The Helper The Helper:
    thank you jonas!
  • Varine Varine:
    I'll probably be here through next summer at least, I get paid decent at the moment and I expect it to go up significantly next year. Plus I'm on contract through the end of the year
    +1

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top