Thursday 15 March 2012

Star Wars: The Old Republic under Linux & Mac OS X!

Finally, SWTOR is playable under most Linux distributions, including Ubuntu, Debian, Arch Linux, Gentoo and even Mac OS X.

It seems that newer version of gcc (4.6.x) would not allow us to compile wine properly. That's why I've made a package on the AUR called gcc45-multilib (Mainly for Arch Linux x86_64 users, but you can use this in another distro as well by simply downloading all the tarballs and running ./configure and make).

If you use Arch Linux x86, you can simply use gcc45 package from the AUR.

1) To get things started, first get a hold of wine's source from git:

$ git clone git://source.winehq.org/git/wine.git ~/wine-git
$ cd ~/wine-git

2) Then download this patch and apply it (thanks to Carsten):

$ wget bugs.winehq.org/attachment.cgi?id=39208 -O proof_of_concept.patch
$ cat proof_of_concept.patch |patch -p1

3) Almost ready. Now you need to download and install the older version of gcc. If you're on a different distribution, downgrade your gcc to version 4.5.2-3 for this. If you're on arch, you can simply install

on x86: 'gcc45' package from AUR
on x86_64: 'gcc45-multilib' package from AUR

4) Now time to compile using this older version of gcc:

$ cd ~/wine-git
$ ./configure --prefix=/opt/wine CC=gcc-4.5.2 CXX=c++-4.5.2 CPP=cpp-4.5.2
$ sudo make

Depending on your system, this will take anywhere from 20 minutes up to an hour.

5) Finally when compiling is done, cd into swtor directory and launch the new version of wine (assuming you've already installed the game. If not you can simply cd into the windows directory of the game):

$ cd ~/.wine/drive_c/Program\ Files/Electronic\ Arts/BioWare/Star\ Wars\ -\ The\ Old\ Republic/
$ $HOME/wine-git/wine explorer /desktop=SWTOR,1024x768 launcher.exe

If you want a better resolution, change the line above to the desired value.

Later