Difference between revisions of "World of Warcraft"

From ArchWiki
Jump to: navigation, search
(Fixed commentary loc.)
(Patching and Build Wine)
Line 138: Line 138:
Before we edit the PKGBUILD, get the md5 sums for the files,
Before we edit the PKGBUILD, get the md5 sums for the files,
   # md5sums Wine-CVS-20051208.tar.gz wine-wow.patch
   # md5sum Wine-CVS-20051208.tar.gz wine-wow_patches.patch
   9bd3940851c23cc51db7c275278b2afb  Wine-20051208.tar.gz
   9bd3940851c23cc51db7c275278b2afb  Wine-20051208.tar.gz
   3537367ec50ff6c812223de77d46afce  wine-wow.patch
   3537367ec50ff6c812223de77d46afce  wine-wow.patch
Line 159: Line 159:
  source=(Wine-20051208.tar.gz wine-wow.patch)
  source=(Wine-20051208.tar.gz wine-wow_patches.patch)
  md5sums=('9bd3940851c23cc51db7c275278b2afb' \
  md5sums=('9bd3940851c23cc51db7c275278b2afb' \

Revision as of 08:45, 25 December 2005

World of Warcraft is a Massive Multiplayer Online Role-Playing Game (MMORPG) by Blizzard Entertainment taking place in the fictional world of Azeroth; The world that previous Blizzard titles in the real-time strategy Warcraft game series has presented to the players.

This article will describe how to get it runing on Arch Linux, even though it's a Windows (Win32) game.

Patches from the Gentoo forum thread http://forums.gentoo.org/viewtopic-t-246098.html

This REQUIRES a bought copy of World of Warcraft (of course you need a copy of the game, duh!).


As Blizzard so kindly also shipped World of Warcraft with OpenGL support, we don't need Transgaming's Cedega software (which is a implementation of the Microsoft DirectX libraries). Basically, we just need a out-of-the-box wine installation and run WoW with opengl


I had WoW already installed and patched on a Windows machine, so I simply copied the WoW folder to my Linux system to save me some time. If you have installed WoW on ArchLinux from the retail CD/DVD copy, please add it to this article.

Post-Installation Tasks

Updating World of Warcraft

I had WoW already installed and patched on a Windows machine, so I simply copied the WoW folder to my Linux system to save me some time.

No sound

Edit /path to your World of Warcraft folder/WTF/Config.wtf and add or change:

SET SoundOutputSystem "1"
SET SoundBufferSize "100"

OK, I have sound, but it's all crappy

I solved this by running

# winecfg

In the "Audio" tab, selected OSS as the sound driver, using "Standard" hardware acceleration and driver emulation enabled.

Running World of Warcraft

After patching and installing my custom wine package (see further down on this page) and fixed the sound, the only bug I've noticed in WoW (compared to running it on Windows using Microsoft's DirectX) is that characters/mobs (etc.) doesn't have that ring on the ground around them. But that's it.

# wine /home/jdoe/.wine/c_drive/Program\ Files/World\ of\ Warcraft/WoW.exe -opengl

Patching and Build Wine

Like said above, you need wine. Wich isn't that difficult to install, but currently (Thu 08 Dec 2005) there's some bugs in World of Warcraft (1.8.4) that requires us to patch and re-compile Wine. I was able to start WoW with the package in ArchLinux repo, but I was unable to select NPCs/Objects/players etc in-game.

First, we need the wine package from ArchLinux, which we get by running:

# pacman -Sy cvsup
# abs

Then begin the creation of the new custom wine package.

# cd /var/abs/local
# mkdir wine
# cd wine
# cp ../../extra/x11/wine/PKGBUILD ../../extra/x11/wine/wine.install .

Now get a CVS snapshot of Wine.

# pacman -Sy cvs
# cvs -d:pserver:cvs@cvs.winehq.org:/home/wine login
# Logging in to :pserver:cvs@cvs.winehq.org:2401/home/wine
CVS password: cvs
# cvs -z3 -d:pserver:cvs@cvs.winehq.org:/home/wine checkout wine

Because we want to make it a proper ArchPackage build, we tarball the source:

# tar cf Wine-CVS-20051208.tar
# gzip Wine-CVS-20051208.tar

Now we need the patch,

--- dlls/opengl32/opengl_norm.c.old     2005-11-09 17:38:20.000000000 -0500
+++ dlls/opengl32/opengl_norm.c 2005-11-09 17:38:35.000000000 -0500
@@ -2367,7 +2367,7 @@
 void WINAPI wine_glPolygonOffset( GLfloat factor, GLfloat units ) {
   TRACE("(%f, %f)\n", factor, units );
-  glPolygonOffset( factor, units );
+  glPolygonOffset(-factor, units );
--- libs/wine/mmap.c.old	2005-06-20 13:43:47.000000000 +0200
+++ libs/wine/mmap.c	2005-10-14 21:49:54.794346832 +0200
@@ -161,6 +161,26 @@Gentoo forum 
 #endif  /* (__svr4__ || __NetBSD__) && !MAP_TRYFIXED */
+static void *get_anon_mmap_null_address(size_t size)
+    static int got_override = 0;
+    static void *low_alloc_ptr = NULL;
+    void * current_low_alloc_ptr;
+    if (!got_override)
+    {
+            low_alloc_ptr = (void*)0x10000000;
+            got_override = 1;
+            //printf("gaak!\n");
+    }
+    current_low_alloc_ptr = low_alloc_ptr;
+    if (low_alloc_ptr)
+        low_alloc_ptr += size;
+    return current_low_alloc_ptr;
+    }
  *		wine_anon_mmap
@@ -209,6 +229,9 @@
             return start;
+    if ((start == NULL) && !(flags & MAP_FIXED))
+       start = get_anon_mmap_null_address(size);
     return mmap( start, size, prot, flags, fdzero, 0 );
     return (void *)-1;
--- loader/preloader.c.old	2005-06-02 12:30:08.000000000 +0200
+++ loader/preloader.c	2005-10-14 21:51:16.529921136 +0200
@@ -110,7 +110,7 @@
     { (void *)0x00000000, 0x00110000 },  /* DOS area */
     { (void *)0x80000000, 0x01000000 },  /* shared heap */
-    { (void *)0x00110000, 0x1fef0000 },  /* PE exe range (may be set with WINEPRELOADRESERVE), defaults to 512mb */
+    { (void *)0x10000000, 0x00f00000 },  /* PE exe range (may be set with WINEPRELOADRESERVE), defaults to 512mb */
     { 0, 0 }                             /* end of list */

Before we edit the PKGBUILD, get the md5 sums for the files,

 # md5sum Wine-CVS-20051208.tar.gz wine-wow_patches.patch
 9bd3940851c23cc51db7c275278b2afb  Wine-20051208.tar.gz
 3537367ec50ff6c812223de77d46afce  wine-wow.patch

What you need to modify in your PKGBUILD (as we copied it from the ArchLinux abs tree) is the pkgver, source & md5sums variables; plus a small addition to the build() function. My PKGBUILD based on the 0.9.2-1 package looks like follows,

# $Id: PKGBUILD,v 1.2 2005/11/23 22:09:47 judd Exp $
# Maintainer: judd <jvinet@zeroflux.org>
# Contributor: Matt Smith (Majik) <darkknight@helpdesk.zaz.net>
# ugh, have to use the force switch to work around the version format
# change -- remove the force switch after an upgrade or two
pkgdesc="Emulator of the Windows 3.x and Win32 APIs"
depends=('x-server' 'libjpeg' 'libungif' 'alsa-lib' 'glut')
source=(Wine-20051208.tar.gz wine-wow_patches.patch)
md5sums=('9bd3940851c23cc51db7c275278b2afb' \

build() {
  cd $startdir/src/$pkgname

  # Apply WoW patch!
  patch -Np0 -i ../wine-wow.patch || return 1

  ./configure --prefix=/usr --sysconfdir=/etc --enable-opengl --with-x
  make depend
  make || return 1
  make prefix=$startdir/pkg/usr install
  # conflicts with textutils
  rm -f $startdir/pkg/usr/bin/expand
  mkdir -p $startdir/pkg/etc/wine
  mkdir -p $startdir/pkg/etc/profile.d
  #cp -r $startdir/src/$pkgname-$pkgver/documentation/samples $startdir/pkg/etc/wine

Now simply run

# makepkg
# pacman -A wine-20051208.pkg.tar.gz

and you have a patched Wine package installed!