Difference between revisions of "Installing WA on Linux"

From Worms Knowledge Base

Jump to: navigation, search
(Muzer's script: - untested support for compiz)
(Playing replays: Add detailed instructions for filetype detection and file association.)
 
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{ParentArticle|[[Guides, FAQs, and ReadMes]]}}
 
{{ParentArticle|[[Guides, FAQs, and ReadMes]]}}
  
This page details how to install Worms Armageddon on Linux via wine. Please note that, unlike in previous versions of Worms Armageddon, '''3.6.30.0 requires no special patches to wine in order to run satisfactorily'''. However, there are still a number of things you may need to do, depending on your distribution of Linux - and there are still some known bugs. This page should provide a good guide to get you started. Do not be put off by its length - much of it probably won't apply to you.
+
=Short version=
 +
 
 +
# Install <tt>wine</tt>
 +
# <tt>mount</tt> the CD or ISO
 +
# Install the game (by running the installer from the CD)
 +
# Install the [[Updates_(Worms_Armageddon)|updates]]
 +
# '''Important''': If using an ISO, you need to symlink <tt>~/.wine/dosdevices/x::</tt> (with two colons) (where <tt>x</tt> is the drive letter for W:A's CD/ISO inside Wine) to the actual <tt>.iso</tt> file. Without this, W:A will not recognize the CD.
 +
 
 +
=Long version (outdated)=
 +
This page details how to install Worms Armageddon on Linux via wine. Please note that, unlike in previous versions of Worms Armageddon, '''3.6.30.0 and above require no special patches to wine in order to run satisfactorily'''. However, there is still a number of things you may need to do, depending on your distribution of Linux - and there are still some known bugs. This page should provide a good guide to get you started. Do not be put off by its length - much of it probably won't apply to you.
  
 
==Getting started==
 
==Getting started==
 +
===Version requirement===
 +
First of all, you need to have a recent version of wine, as there have been some relatively major wine-side fixes recently. If your wine version starts with 1.3 and is '''1.3.3 or later''', or it starts with 1.2 and is '''1.2.1 or later''', you already have a recent enough version of wine to run Worms Armageddon to a satisfactory standard. If your wine version starts with 1.4 or 1.5, it is certainly new enough. Please skip ahead to "Using a CD" or "Using a disc image" for how to continue from here.
  
First of all, you need to have a recent version of wine, as there have been some relatively major wine-side fixes recently. So, go to a terminal, and type:
+
If you are not sure about which version you have, go to a terminal, and type:
  
 
  wine --version
 
  wine --version
  
This should report your wine version. If you get an error message of some description, you probably lack wine entirely - in which case, carry on with these instructions. If your wine version starts with 1.3 and is 1.3.2 or earlier, or it starts with 1.2 and is 1.2.0 or earlier, also carry on with these instructions. However, if your wine version starts with 1.3 and is 1.3.3 or later, or it starts with 1.2 and is 1.2.1 or later, you already have a recent enough version of wine to run Worms Armageddon to a satisfactory standard. Please skip ahead to "Using a CD" or "Using a disc image" for how to continue from here.
+
This should report your wine version. If you get an error message of some description, you probably lack wine entirely - in which case, carry on with these instructions. If your wine version starts with 1.3 and is 1.3.2 or earlier, or it starts with 1.2 and is 1.2.0 or earlier, also carry on with these instructions.
 +
 
 +
Note that some very new versions of wine have some interesting bugs.
 +
 
 +
Wine version 1.3.26 will not run WA at all. Upgrade or downgrade to a newer or older version.
 +
 
 +
Wine version 1.3.27 will run WA, but the frontend will have a very messed-up palette. I don't think there's anything you can do about this.
 +
 
 +
Wines versions 1.3.28 up to and including 1.3.33 will not run WA out of the box, as they are set to use a different method of rendering DirectDraw games, which happens to be buggy enough to cause WA not to work. However, it is a simple matter to change the method back to the old one, which will make this bug go away - I believe the palette bug above was also fixed at some point, but I'm afraid I don't have the exact version in which this happened. The bottom line is, if you have one of these wine versions and just get a black screen when you boot WA (maybe with the WA audio), skip to "Changing the DirectDraw renderer" below.
 +
 
 +
Wine versions 1.3.34 and later should work just as well as the older ones did.
 +
 
 +
===Installing Wine===
  
 
Now, if you're still reading, you either have a version of wine that is too old, or no wine at all. Please find the subsection for the distribution you use:
 
Now, if you're still reading, you either have a version of wine that is too old, or no wine at all. Please find the subsection for the distribution you use:
  
===Ubuntu and derivatives===
+
====Ubuntu and derivatives====
  
 
Installing the latest wine on Ubuntu is very straightforward.
 
Installing the latest wine on Ubuntu is very straightforward.
Line 27: Line 50:
 
Now, to use the new version of wine from their repository, type:
 
Now, to use the new version of wine from their repository, type:
  
  sudo aptitude update
+
  sudo apt-get update
  sudo aptitude install wine1.3
+
  sudo apt-get install wine1.5
  
 
The second command will probably ask if you want to continue at some point - just answer y for yes. These two commands first updated the list of packages from the necessary servers, then installed the latest wine version.
 
The second command will probably ask if you want to continue at some point - just answer y for yes. These two commands first updated the list of packages from the necessary servers, then installed the latest wine version.
  
Now, go back to the start of these instructions, and hopefully you will now have wine 1.3.3 or later (1.3.6 at the time of writing).
+
Now, go back to the start of these instructions, and hopefully you will now have wine 1.5.x.
  
===Gentoo===
+
====Gentoo====
  
Gentoo's repositories are usually not too slow to be updated - you just need to unmask the necessary package to tell Gentoo you want to install later, potentially untested versions of wine. At the time of writing, the repositories contain 1.3.5, which is recent enough to use for Worms Armageddon. So, to install the latest version, at a root terminal, type:
+
Gentoo's repositories are usually not too slow to be updated - you just need to unmask the necessary package to tell Gentoo you want to install later, potentially untested versions of wine. At the time of writing, the repositories contain a sufficiently new version. So, to install the latest version, at a root terminal, type:
  
 
  emerge --sync
 
  emerge --sync
Line 44: Line 67:
 
If you're reasonably new to Gentoo, those commands update the list of packages, allow all versions of wine to be installed, and finally installs (or reinstalls) wine.
 
If you're reasonably new to Gentoo, those commands update the list of packages, allow all versions of wine to be installed, and finally installs (or reinstalls) wine.
  
Now, go back to the start of these instructions, and hopefully you will now have wine 1.3.3 or later (1.3.5 at the time of writing).
+
Now, go back to the start of these instructions, and hopefully you will now have wine 1.3.3 or later.
  
===Debian/Fedora===
+
====Debian====
 +
Debian packages can be obtained here: http://dev.carbon-project.org/debian/wine-unstable/
  
Unfortunately, the latest official wine builds for these distros are ancient, and oddly enough, no packages with recent builds seem to exist. Therefore, users of these distros must compile wine from source, unfortunately. Instructions can be found [http://www.winehq.org/docs/wineusr-guide/installing-wine-source here].
+
As the owner refuses to set up a repository for security concerns (not his security; the security of the users), you will need to manually download the packages for your architecture and install them by running dpkg -i package_name1.deb package_name2.deb etc. as root. You will need most of those packages, so if you don't know what you're doing, you may as well grab all of them. Any unresolved dependencies will be mentioned in the output, and can be installed by running apt-get -f install as root. You will want to check back there regularly for any new packages.
  
===ArchLinux===
+
Do note that these packages were designed to work only in Sid (unstable) - they may or may not work in other versions.
  
The ArchLinux repos should have 1.3.6 (at the time of writing) already. Simply run:
+
====Fedora====
 +
 
 +
Unfortunately, the latest official wine builds for this distro are ancient, and oddly enough, no packages with recent builds seem to exist (at least, that I can find). Therefore, users of this distros must compile wine from source. Instructions can be found [http://www.winehq.org/docs/wineusr-guide/installing-wine-source here].
 +
 
 +
====ArchLinux====
 +
 
 +
The ArchLinux repos should have a sufficiently new version already. Simply run:
  
 
  pacman -S wine
 
  pacman -S wine
Line 58: Line 88:
 
...as root to install it.
 
...as root to install it.
  
===OpenSUSE===
+
====OpenSUSE====
  
 
''Instructions are untested - please correct any errors you find in them''
 
''Instructions are untested - please correct any errors you find in them''
Line 68: Line 98:
 
(assuming you use 11.3)
 
(assuming you use 11.3)
  
Complete the wizard and wait for it to finish. Then, just install wine through your package manager as normal, and you should end up with wine 1.3.3 or later (1.3.6 at the time of writing).
+
Complete the wizard and wait for it to finish. Then, just install wine through your package manager as normal, and you should end up with wine 1.3.3 or later.
  
 
==Using a CD==
 
==Using a CD==
Line 159: Line 189:
  
 
You should now be set up to play Worms Armageddon - happy worming!
 
You should now be set up to play Worms Armageddon - happy worming!
 +
 +
If you get a black screen, and have wine version 1.3.28 up to and including 1.3.33, proceed to the next section - else, you may wish to read the rest of the article for known bugs, as well as hints and tips.
 +
 +
==Changing the DirectDraw renderer==
 +
 +
If you are here, it means you get a black screen on startup of Worms Armageddon, and have a wine version of 1.3.28 up to and including 1.3.33.
 +
 +
All we need to do is to change the way that wine renders DirectDraw programs. This involves changing or adding a registry key. Note that if you have any particularly heavy graphically DirectDraw programs, or a slow computer (but with a good graphics card), you may notice a negative impact on those games' responsiveness. If this is the case, consider making separate wine profiles for WA and other games (how to do this is out of the scope of the tutorial).
 +
 +
* On a terminal, type wine regedit
 +
* Browse to "HKEY_CURRENT_USER\Software\Wine" on the left
 +
* Still on the left, check for a key (looks like a folder) called "Direct3D" inside the Wine key (folder). If you can see one, browse into this. If you can't see one, click Edit --> New --> Key, type Direct3D as the name and hit enter
 +
* Click Edit --> New --> String Value
 +
* Type DirectDrawRenderer and hit enter
 +
* Double-click the new DirectDrawRenderer value to edit it
 +
* Type gdi and hit enter
 +
* Close regedit and start Worms Armageddon to verify you have done it correctly. If it still gives a black screen, make sure you're following the steps exactly.
  
 
==Known bugs and their workarounds==
 
==Known bugs and their workarounds==
Line 174: Line 221:
  
 
* Worms Armageddon freezes when you try to close the dialogue before/after a (training) mission. Workaround: Upgrade to wine 1.3.6 or later.
 
* Worms Armageddon freezes when you try to close the dialogue before/after a (training) mission. Workaround: Upgrade to wine 1.3.6 or later.
 +
 +
* The fill tool and random holes tool in the map editor creates and "interlaced" effect. Workaround: Upgrade to wine 1.3.7 or later.
 +
 +
* Loading the frontend results in a black screen under wine 1.3.28 up to and including 1.3.33. If you have one of these versions, see "Changing the DirectDraw renderer" above. Fixed in wine 1.3.34.
 +
 +
* Crashes sometimes after playing certain audio streams in the frontend. Became more frequent in more recent wine versions. Worked around in WA 3.7.0.0.
 +
 +
* Wormkit doesn't work. Workaround: Use Kawoosh's [[WormKitDS]] (a hacked dsound.dll file). You need to add an exception for dsound.dll in winecfg, so that it uses "native" before "internal". 3.7.0.0 can load WormKit modules natively, rendering this issue moot.
 +
 +
* Pressing escape anywhere in the frontend closes Worms Armageddon. Workaround: Use other keys or buttons to do navigation. This is fixed in 3.7.0.0.
  
 
==== Long-fixed bugs ====
 
==== Long-fixed bugs ====
Line 190: Line 247:
 
(these bugs stop features from working as they should)
 
(these bugs stop features from working as they should)
  
* Wormkit doesn't work. Workaround: None yet, unfortunately.
+
* Worms Armageddon's frontend has focus issues when used outside of a virtual desktop. Worms Armageddon 3.6.30.0 and above by default in wine relaunches itself in a virtual desktop on startup, so this issue is moot unless you really want fullscreen.
 
+
* The fill tool and random holes tool in the map editor creates and "interlaced" effect. Workaround: Don't use these tools, or make maps externally.
+
 
+
* Pressing escape anywhere in the frontend closes Worms Armageddon. Workaround: Use other keys or buttons to do navigation.
+
  
 
=== Bugs that can cause freezes or crashes ===
 
=== Bugs that can cause freezes or crashes ===
Line 211: Line 264:
  
 
Playing replays can be done via the command-line (or you can set up a script or file associations). However, you will need to specify the full path to the replay (either Windows or Linux path, as long as it's full).
 
Playing replays can be done via the command-line (or you can set up a script or file associations). However, you will need to specify the full path to the replay (either Windows or Linux path, as long as it's full).
 +
 +
===Detecting replay files as such===
 +
 +
Add a magic rule for file type detection
 +
 +
    % cat <<EOF >>$HOME/.magic
 +
    0      string  WA
 +
    >2      leshort <0x2f  Worms Armageddon Game version %d
 +
    !:mime  application/wa.replay
 +
    EOF
 +
 +
And compile your updated user rules. This updates .magic.mgc
 +
 +
    % file -C -m $HOME/.magic
 +
 +
Test the changes
 +
 +
    % file /tmp/test.WAgame
 +
    /tmp/test.WAgame: Worms Armageddon Game version 20
 +
    % file /tmp/test.WAgame --mime
 +
    /tmp/test.WAgame: application/wa.replay; charset=binary
 +
 +
===Create a desktop file to replay replays===
 +
 +
Set the "Exec" line according to the path to WA.exe. Make sure you don't have spaces in there, or tell me how to escape them correctly. I just make a symbolic link.
 +
 +
    % cat <<EOF >$HOME/.local/share/applications/wa-replay.desktop
 +
    [Desktop Entry]
 +
    Name=Worms Armageddon game replay
 +
    Comment=Replay WA games
 +
    Exec=wine /home/emeric/.local/share/Steam/steamapps/common/WA/WA.exe /replay %u
 +
    Terminal=false
 +
    Type=Application
 +
    StartupNotify=true
 +
    MimeType=application/wa.replay
 +
    EOF
 +
 +
===Create the file association===
 +
 +
    % echo "application/wa.replay=wa-replay.desktop" >> $HOME/.config/mimeapps.list
 +
 +
Test the setup:
 +
 +
    % xdg-open /tmp/test.WAgame
  
 
==Making your installation easier to use==
 
==Making your installation easier to use==
Line 224: Line 321:
 
* If you wish to play in fullscreen mode, with all the advantages of virtual desktop, tell your window manager not to display window borders for wine virtual desktop windows (how you do this varies between window managers). Then set your resolution in WA to your (real) desktop's resolution and play. Note that this should actually happen automatically in theory, but doesn't always due to multiple monitors and other such complications.
 
* If you wish to play in fullscreen mode, with all the advantages of virtual desktop, tell your window manager not to display window borders for wine virtual desktop windows (how you do this varies between window managers). Then set your resolution in WA to your (real) desktop's resolution and play. Note that this should actually happen automatically in theory, but doesn't always due to multiple monitors and other such complications.
  
* Change the value at HKEY_CURRENT_USER\Control Panel\International\Geo\Nation (creating the keys if necessary - it's a string value whose possible values can be found at http://www.rsdn.ru/forum/other/3332601.1.aspx ) if your flag is wrong in WormNET.
+
* Change the value at HKEY_CURRENT_USER\Control Panel\International\Geo\Nation (creating the keys if necessary - it's a string value whose possible values can be found at https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073(v=vs.85).aspx ) if your flag is wrong in WormNET.
  
 
...some solutions to these are below, others may be posted here at a later date.
 
...some solutions to these are below, others may be posted here at a later date.
Line 232: Line 329:
 
My WA script is geared towards testing different WA/wine versions, along with using Kwin compositing to enable/disable compositing. It also has untested commands to attempt to disable compiz and reenable it at the end - I have no idea if these work or not.
 
My WA script is geared towards testing different WA/wine versions, along with using Kwin compositing to enable/disable compositing. It also has untested commands to attempt to disable compiz and reenable it at the end - I have no idea if these work or not.
  
To use it, copy your WA.exe to WA-3.6.30.0.exe (at the time of writing), edit the paths as necessary, and run the script. Any arguments will be passed to WA, but typing a version followed by -- will launch that version. Note that it's also ready to run Wormkit if that ever works in wine (which I believe is unlikely).
+
To use it, copy your WA.exe to WA-3.7.2.1.exe (at the time of writing), edit the paths as necessary, and run the script. Any arguments will be passed to WA, but typing a version followed by -- will launch that version. Note that it's also ready to run Wormkit if that ever works in wine (which I believe is unlikely).
  
 
Save it as wa and put it in your path somewhere - remember to make it executable.
 
Save it as wa and put it in your path somewhere - remember to make it executable.
Line 243: Line 340:
 
  usingarg=0
 
  usingarg=0
 
   
 
   
  VERSION=3.6.30.0
+
  VERSION=3.7.2.1
 
   
 
   
 
  for arg in "$@"; do
 
  for arg in "$@"; do
Line 288: Line 385:
 
   qdbus org.kde.kwin /KWin toggleCompositing
 
   qdbus org.kde.kwin /KWin toggleCompositing
 
  fi
 
  fi
 
+
 
  if [ "$cmwe" = "1" ]; then
 
  if [ "$cmwe" = "1" ]; then
 
   compiz --replace &
 
   compiz --replace &
 
  fi
 
  fi
 
echo "Worms Armageddon is copyright 1999 Team Seventeen Software Ltd." | festival --tts &
 
  
 
Note that if there is a file called wine in the current directory, it will try to run that instead of wine.
 
Note that if there is a file called wine in the current directory, it will try to run that instead of wine.
Line 346: Line 441:
 
* Type Nation and hit enter
 
* Type Nation and hit enter
 
* Double-click the new Nation value to edit it
 
* Double-click the new Nation value to edit it
* Type the number of your country as on http://www.rsdn.ru/forum/other/3332601.1.aspx and hit enter
+
* Type the number of your country as on https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073(v=vs.85).aspx and hit enter
 
* Close regedit and go into wormnet to verify you have done it correctly.
 
* Close regedit and go into wormnet to verify you have done it correctly.

Latest revision as of 11:11, 13 November 2021

Short version

  1. Install wine
  2. mount the CD or ISO
  3. Install the game (by running the installer from the CD)
  4. Install the updates
  5. Important: If using an ISO, you need to symlink ~/.wine/dosdevices/x:: (with two colons) (where x is the drive letter for W:A's CD/ISO inside Wine) to the actual .iso file. Without this, W:A will not recognize the CD.

Long version (outdated)

This page details how to install Worms Armageddon on Linux via wine. Please note that, unlike in previous versions of Worms Armageddon, 3.6.30.0 and above require no special patches to wine in order to run satisfactorily. However, there is still a number of things you may need to do, depending on your distribution of Linux - and there are still some known bugs. This page should provide a good guide to get you started. Do not be put off by its length - much of it probably won't apply to you.

Getting started

Version requirement

First of all, you need to have a recent version of wine, as there have been some relatively major wine-side fixes recently. If your wine version starts with 1.3 and is 1.3.3 or later, or it starts with 1.2 and is 1.2.1 or later, you already have a recent enough version of wine to run Worms Armageddon to a satisfactory standard. If your wine version starts with 1.4 or 1.5, it is certainly new enough. Please skip ahead to "Using a CD" or "Using a disc image" for how to continue from here.

If you are not sure about which version you have, go to a terminal, and type:

wine --version

This should report your wine version. If you get an error message of some description, you probably lack wine entirely - in which case, carry on with these instructions. If your wine version starts with 1.3 and is 1.3.2 or earlier, or it starts with 1.2 and is 1.2.0 or earlier, also carry on with these instructions.

Note that some very new versions of wine have some interesting bugs.

Wine version 1.3.26 will not run WA at all. Upgrade or downgrade to a newer or older version.

Wine version 1.3.27 will run WA, but the frontend will have a very messed-up palette. I don't think there's anything you can do about this.

Wines versions 1.3.28 up to and including 1.3.33 will not run WA out of the box, as they are set to use a different method of rendering DirectDraw games, which happens to be buggy enough to cause WA not to work. However, it is a simple matter to change the method back to the old one, which will make this bug go away - I believe the palette bug above was also fixed at some point, but I'm afraid I don't have the exact version in which this happened. The bottom line is, if you have one of these wine versions and just get a black screen when you boot WA (maybe with the WA audio), skip to "Changing the DirectDraw renderer" below.

Wine versions 1.3.34 and later should work just as well as the older ones did.

Installing Wine

Now, if you're still reading, you either have a version of wine that is too old, or no wine at all. Please find the subsection for the distribution you use:

Ubuntu and derivatives

Installing the latest wine on Ubuntu is very straightforward.

Although it is possible to do via the GUI, doing it via the command-line will ensure it is the same no matter which specific derivative you are using - so that is what this tutorial will cover. Don't panic if you don't know the first thing about the command-line - it's literally copying and pasting and typing in your password for these commands.

So, open a terminal, and type:

sudo add-apt-repository ppa:ubuntu-wine/ppa

This will probably prompt you for your password, then print a few lines of text and give you your prompt back after a few seconds. This command told Ubuntu to add the wine repository to the list of repositories from which it gets its packages.

Now, to use the new version of wine from their repository, type:

sudo apt-get update
sudo apt-get install wine1.5

The second command will probably ask if you want to continue at some point - just answer y for yes. These two commands first updated the list of packages from the necessary servers, then installed the latest wine version.

Now, go back to the start of these instructions, and hopefully you will now have wine 1.5.x.

Gentoo

Gentoo's repositories are usually not too slow to be updated - you just need to unmask the necessary package to tell Gentoo you want to install later, potentially untested versions of wine. At the time of writing, the repositories contain a sufficiently new version. So, to install the latest version, at a root terminal, type:

emerge --sync
echo "app-emulation/wine" >> /etc/portage/package.keywords
emerge -av wine

If you're reasonably new to Gentoo, those commands update the list of packages, allow all versions of wine to be installed, and finally installs (or reinstalls) wine.

Now, go back to the start of these instructions, and hopefully you will now have wine 1.3.3 or later.

Debian

Debian packages can be obtained here: http://dev.carbon-project.org/debian/wine-unstable/

As the owner refuses to set up a repository for security concerns (not his security; the security of the users), you will need to manually download the packages for your architecture and install them by running dpkg -i package_name1.deb package_name2.deb etc. as root. You will need most of those packages, so if you don't know what you're doing, you may as well grab all of them. Any unresolved dependencies will be mentioned in the output, and can be installed by running apt-get -f install as root. You will want to check back there regularly for any new packages.

Do note that these packages were designed to work only in Sid (unstable) - they may or may not work in other versions.

Fedora

Unfortunately, the latest official wine builds for this distro are ancient, and oddly enough, no packages with recent builds seem to exist (at least, that I can find). Therefore, users of this distros must compile wine from source. Instructions can be found here.

ArchLinux

The ArchLinux repos should have a sufficiently new version already. Simply run:

pacman -S wine

...as root to install it.

OpenSUSE

Instructions are untested - please correct any errors you find in them

In YaST, choose Software Repositories. Click add, and tell it you want to specify a URL. Enter anything for the name, and the following for the URL:

http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_11.3/

(assuming you use 11.3)

Complete the wizard and wait for it to finish. Then, just install wine through your package manager as normal, and you should end up with wine 1.3.3 or later.

Using a CD

Simply mount your CD the same way you would mount any other piece of removable media in your distribution (whatever that way may be). Now, skip ahead to Installation.

Using a disc image

First, make a disc image if you don't have one already. An ISO can be created using the following command:

dd if=/dev/cdrom of=wa.iso

(this command assumes your CD drive is at /dev/cdrom and you want the image to be called wa.iso in the current directory - change the parameters if need be).

Now, mount the image. There are two methods by which to do this - one of which is easy and recommended, but requires installing cdemu which can be hard work for beginners - the other of which is much more fiddly and only works with ISOs, but requires no additional software.

Mounting the image via cdemu (the easy way)

First of all, install the cdemu client (called cdemu in my distribution), and the server (called cdemud in my distribution). Configure the daemon to run, add yourself to the cdemu group, and enable the kernel module - I'm skimming over these steps because most of them are often done automatically in distributions, and they are widely different between them - consult your distro's documentation, IRC channels and forums if in doubt. Reboot to ensure everything is installed correctly.

Right, that was the hardest part, and you only need to do that once - now, simply run the following command:

cdemu load 0 wa.iso

(assuming the disc image is called wa.iso and is in your current directory)

If it gives an error, maybe cdemu is configured differently in your distro. If this is the case, try:

cdemu load -b system 0 wa.iso

...and Worms Armageddon's disc should appear wherever your distro lists your CD drives normally. Finally, mount this as normal in your distro, and you should be good to go. Now, skip ahead to Installation.

Mounting the image via mount (the more fiddly way)

First of all, create a place to mount it. This should always be the same place, so I recommend you make a directory in /mnt so that your distro won't overwrite it (some overwrite things in /media). You'll need to be root to do this:

mkdir /mnt/wa

Now, mount the ISO image using the standard mount command:

mount -o loop,ro wa.iso /mnt/wa

(assuming the disc image is called wa.iso and is in your current dir)

Now, come out of your root terminal or stop using sudo, the next commands need to be run as your user.

Run:

winecfg

Go into "Drives", and make a new drive of type CD-ROM, with the path of /mnt/wa (or whatever you used). Give it a drive letter out-of-the-way - I chose X:

Now, check that your WA CD is mounted:

ls ~/.wine/dosdevices/x:

(assuming you chose x, change the letter if not)

A list of files on the Worms Armageddon CD should appear. If you get nothing or an error, you've done one of the previous steps wrongly - start again.

Finally, you need to tell wine where it can find the ISO. Oddly enough, this can't be done from the GUI at the time of writing. So, do it with the following command:

ln -sv /full/path/to/wa.iso ~/.wine/dosdevices/x::

(note that you need the full path to the ISO, and the double colon at the end of x).

Now, it's all set up. You'll need to mount the image as we did at the beginning:

mount -o loop,ro wa.iso /mnt/wa

...every time you reboot. Alternatively, if you know how, put it in your /etc/fstab.

Installation

Browse to the folder where you mounted the CD (either through GUI or command-line; your preference), and run Install.exe (in the Install directory) through wine. If you're in a GUI and nothing happens, you probably don't have your file associations set up properly - try it in the command-line if this is the case. If it works through the command-line but not the GUI, consult your distro's documentation, IRC channels, and forums for help on how to do set up file associations for exes.

Now install Worms Armageddon as you would on a Windows computer. If you get asked, decline to install DirectX 6, though it doesn't matter if it does get installed by mistake (wine will ignore attempts to install DirectX).

If you cannot get the official installer to run, try the Automatic Installer. Just ensure your CD is mounted then run the exe under wine.

Download the latest beta update (3.8.1) from the Worms Armageddon website, run it, and go through the installation, again as you would on Windows. It is important you use this version (or later), as earlier versions do not have certain workarounds in them which (among other things) make using the frontend possible under wine.

Running Worms Armageddon

Finally, launch Worms Armageddon. The CD must be mounted, not just inserted - otherwise the game will crash when you try to start an actual round. Many distros create a menu entry under "wine" in your applications menu - if yours does, launch it from here (try logging out and back in again if it doesn't appear). Else, you'll need to launch it from the command-line - perhaps you should create a script to do this, as it's a rather tedious process.

Disabling compositing (kwin effects or compiz) is a good idea when launching the game, if you have it enabled - performance is considerably poorer if you don't disable it, though it will still run fine. Kwin's compositing can be disabled (and reenabled) simply by hitting shift+alt+F12.

The first time you run the game, a box should hopefully pop up asking if you want to enable compatibility options. Choose yes to this - otherwise the game will not function under wine.

You should now be set up to play Worms Armageddon - happy worming!

If you get a black screen, and have wine version 1.3.28 up to and including 1.3.33, proceed to the next section - else, you may wish to read the rest of the article for known bugs, as well as hints and tips.

Changing the DirectDraw renderer

If you are here, it means you get a black screen on startup of Worms Armageddon, and have a wine version of 1.3.28 up to and including 1.3.33.

All we need to do is to change the way that wine renders DirectDraw programs. This involves changing or adding a registry key. Note that if you have any particularly heavy graphically DirectDraw programs, or a slow computer (but with a good graphics card), you may notice a negative impact on those games' responsiveness. If this is the case, consider making separate wine profiles for WA and other games (how to do this is out of the scope of the tutorial).

  • On a terminal, type wine regedit
  • Browse to "HKEY_CURRENT_USER\Software\Wine" on the left
  • Still on the left, check for a key (looks like a folder) called "Direct3D" inside the Wine key (folder). If you can see one, browse into this. If you can't see one, click Edit --> New --> Key, type Direct3D as the name and hit enter
  • Click Edit --> New --> String Value
  • Type DirectDrawRenderer and hit enter
  • Double-click the new DirectDrawRenderer value to edit it
  • Type gdi and hit enter
  • Close regedit and start Worms Armageddon to verify you have done it correctly. If it still gives a black screen, make sure you're following the steps exactly.

Known bugs and their workarounds

There should be no major bugs in Worms Armageddon under wine - however, minor ones still exist.

Fixed bugs

(these are bugs which have been fixed in later versions of wine than the minimum required for reasonable WA operation)

  • Clicking anywhere in the main window of the options menu when the cheat dialogue is open causes focus to be lost, necessitating you to close Worms Armageddon. Workaround: Upgrade to wine 1.3.6 or later.
  • The mouse cursor is visible when you start an actual game when the window isn't focused. Workaround: Upgrade to wine 1.3.4 or later, or 1.2.1 or later.
  • Help text does not appear in the map editor at all. Workaround: Upgrade to wine 1.3.6 or later.
  • Worms Armageddon freezes when you try to close the dialogue before/after a (training) mission. Workaround: Upgrade to wine 1.3.6 or later.
  • The fill tool and random holes tool in the map editor creates and "interlaced" effect. Workaround: Upgrade to wine 1.3.7 or later.
  • Loading the frontend results in a black screen under wine 1.3.28 up to and including 1.3.33. If you have one of these versions, see "Changing the DirectDraw renderer" above. Fixed in wine 1.3.34.
  • Crashes sometimes after playing certain audio streams in the frontend. Became more frequent in more recent wine versions. Worked around in WA 3.7.0.0.
  • Wormkit doesn't work. Workaround: Use Kawoosh's WormKitDS (a hacked dsound.dll file). You need to add an exception for dsound.dll in winecfg, so that it uses "native" before "internal". 3.7.0.0 can load WormKit modules natively, rendering this issue moot.
  • Pressing escape anywhere in the frontend closes Worms Armageddon. Workaround: Use other keys or buttons to do navigation. This is fixed in 3.7.0.0.

Long-fixed bugs

(if you have followed the tutorial correctly, you should not encounter these bugs)

  • Loading the frontend results in a black screen. Workaround: Ensure you have enabled the "Use Desktop Window" tweak in Worms Armageddon (this option was added in 3.6.30.0).
  • Cannot send text in wormnet or in host/join screen. Workaround: Ensure your wine version is 1.3.3 or greater, or 1.2.1 or greater.

Bugs that do not affect function

(these are bugs that only affect visuals in a way that does not impair usage, or that can be so easily worked around as to not affect function at all)

  • Help text can behave oddly, disappearing and not reappearing if you move your mouse out and back in too fast. Workaround: Simply move your mouse back out, wait about half a second, then move it back in, to see the help text again.

Bugs that impair function

(these bugs stop features from working as they should)

  • Worms Armageddon's frontend has focus issues when used outside of a virtual desktop. Worms Armageddon 3.6.30.0 and above by default in wine relaunches itself in a virtual desktop on startup, so this issue is moot unless you really want fullscreen.

Bugs that can cause freezes or crashes

(these bugs can cause freezes or crashes, and therefore cause you to lose unsaved data - treat these with caution)

  • Minimising ingame doesn't actually minimise the game - it appears frozen but stays on top. Workaround: Do not minimise via the escape menu, use your window manager instead. If you've done this when in fullscreen mode, you can get back to your game simply by pressing Alt+Tab - I don't know of any equivalent for a virtual desktop, however, so at this stage it is as good as frozen. This bug is caused by the way in which WA works when combined with wine compatibility options (specifically, Force Desktop Window), and is therefore not likely to be fixed before 4.0.

Invalid bugs

(there bugs aren't really bugs, but instead problems in your setup, for example)

  • Sound does not work: this is most likely an issue with your setup. Please go into winecfg and configure your sound correctly. Try to set the sound driver to whatever sound backend you are using - if you can't do this, try setting it to ALSA with emulated hardware acceleration. Note that even if sound works in other wine apps, it may not work in Worms Armageddon, because the latter requires more features than many applications, such as acceleration.
  • Two virtual desktop windows come up whenever I start Worms Armageddon, one of them empty. This is caused by you having enabled force virtual desktop in both winecfg and in the Advanced Options of Worms Armageddon. Disable either "Emulate a virtual desktop" under the "Graphics" tab of winecfg (to disable virtual desktop for everything except Worms Armageddon), or "Force Wine virtual desktop" in the Advanced options menu of Worms Armageddon (to keep virtual desktop enabled for every app, but to prevent Worms Armageddon spawning a second one for itself).

Playing replays

Playing replays can be done via the command-line (or you can set up a script or file associations). However, you will need to specify the full path to the replay (either Windows or Linux path, as long as it's full).

Detecting replay files as such

Add a magic rule for file type detection

   % cat <<EOF >>$HOME/.magic
   0       string  WA
   >2      leshort <0x2f   Worms Armageddon Game version %d
   !:mime  application/wa.replay
   EOF

And compile your updated user rules. This updates .magic.mgc

   % file -C -m $HOME/.magic

Test the changes

   % file /tmp/test.WAgame
   /tmp/test.WAgame: Worms Armageddon Game version 20
   % file /tmp/test.WAgame --mime
   /tmp/test.WAgame: application/wa.replay; charset=binary

Create a desktop file to replay replays

Set the "Exec" line according to the path to WA.exe. Make sure you don't have spaces in there, or tell me how to escape them correctly. I just make a symbolic link.

   % cat <<EOF >$HOME/.local/share/applications/wa-replay.desktop
   [Desktop Entry]
   Name=Worms Armageddon game replay
   Comment=Replay WA games
   Exec=wine /home/emeric/.local/share/Steam/steamapps/common/WA/WA.exe /replay %u
   Terminal=false
   Type=Application
   StartupNotify=true
   MimeType=application/wa.replay
   EOF

Create the file association

   % echo "application/wa.replay=wa-replay.desktop" >> $HOME/.config/mimeapps.list

Test the setup:

   % xdg-open /tmp/test.WAgame

Making your installation easier to use

There are many things you can do to boost the usability of your installation. These include:

  • Making a script to run Worms Armageddon, possibly with options (like playing replays, getting logs, etc.)
  • Setting up file associations for WA with WAgame files in your distro, and with wa:// URLs.
  • If you already run wine in a virtual desktop by default, disable the "Force Wine virtual desktop" option in the advanced settings menu to prevent two virtual desktops from appearing. Do not disable "Use desktop window", or the game will stop functioning.
  • If you wish to play in fullscreen mode, with all the advantages of virtual desktop, tell your window manager not to display window borders for wine virtual desktop windows (how you do this varies between window managers). Then set your resolution in WA to your (real) desktop's resolution and play. Note that this should actually happen automatically in theory, but doesn't always due to multiple monitors and other such complications.

...some solutions to these are below, others may be posted here at a later date.

Muzer's script

My WA script is geared towards testing different WA/wine versions, along with using Kwin compositing to enable/disable compositing. It also has untested commands to attempt to disable compiz and reenable it at the end - I have no idea if these work or not.

To use it, copy your WA.exe to WA-3.7.2.1.exe (at the time of writing), edit the paths as necessary, and run the script. Any arguments will be passed to WA, but typing a version followed by -- will launch that version. Note that it's also ready to run Wormkit if that ever works in wine (which I believe is unlikely).

Save it as wa and put it in your path somewhere - remember to make it executable.

#!/bin/bash
#
# WA wrapper script
#

usingarg=0

VERSION=3.7.2.1

for arg in "$@"; do
  if [ "$arg" = "--" ]; then
    usingarg=1
  fi
done

if [ "$usingarg" = "1" ]; then
  VERSION="$1"
  shift 2
fi

cmwe=0 # These 5 untested lines are for disabling compiz and enabling metacity - if you are running compiz and have issues with the script, please comment these out and try again, and report your findings.
if ps -A | grep compiz; then
  metacity --replace &
  cmwe=1
fi

cwe=0
if [ "`qdbus org.kde.kwin /KWin compositingActive`" = "true" ]; then
  cwe=1
  qdbus org.kde.kwin /KWin toggleCompositing
fi

echo "Starting Worms Armageddon version $VERSION" | festival --tts &

if [ "$VERSION" != "wormkit" ]; then
  VERSION=WA-$VERSION
fi

wine=wine
if [ -f wine ]; then
  wine=./wine
fi

if [ $# != 0 ]; then
  $wine "c:\\Team17\\Worms Armageddon\\${VERSION}.exe" ${1+"$@"}
else
  $wine "c:\\Team17\\Worms Armageddon\\${VERSION}.exe"
fi

if [ "$cwe" = "1" ]; then
  qdbus org.kde.kwin /KWin toggleCompositing
fi

if [ "$cmwe" = "1" ]; then
  compiz --replace &
fi

Note that if there is a file called wine in the current directory, it will try to run that instead of wine.

Examples of use:

wa

Launches the default version of WA

wa /playat /home/muzer/test.wagame

Loads test.wagame in the default version of WA, launching the playback at dialogue (note that due to a lack of support for relative paths in WA, you must supply the full path to replays - either Windows path or Unix path, but it must be full.)

wa 3.6.29.0 --

Loads WA-3.6.29.0.exe (obviously to actually run this version you will need a patched wine - this can be just in the current directory, as I mentioned)

File associations

If you have a script like the above, file associations are easy. Here are instructions for KDE, assuming you have installed the script above as I described.

  • Right click on a WAgame file
  • Hit Properties
  • Click the spanner icon to create a new MIME type for WAgame files
  • Enter a description, select an icon if you want, and click Add... under Application Preference Order. Type wa /playat %F into the box and hit OK. Keep on hitting OK and it should work!

Fullscreen mode

As stated, apparently this should happen automatically in wine, but in some situations eg multiple monitors it doesn't - the window should go fullscreen when WA is running in your desktop resolution.

Here is a workaround for Kwin if yours doesn't happen automatically - note that this has the side effect of making all the wine virtual desktop windows borderless.

  • Launch WA
  • Right-click the title bar
  • Go to Advanced
  • Click "Special Window settings…"
  • In the "Preferences" tab, click "No border"
  • Select "Apply Initially" in the drop-down
  • Click the checkbox on the far right in that row
  • Click OK
  • Restart WA

Flag fix

  • Type wine regedit
  • Browse to "HKEY_CURRENT_USER\Control Panel\International" on the left
  • Click Edit --> New --> Key
  • Type Geo as the name and hit enter
  • Click into the newly-created Geo key
  • Click Edit --> New --> String Value
  • Type Nation and hit enter
  • Double-click the new Nation value to edit it
  • Type the number of your country as on https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073(v=vs.85).aspx and hit enter
  • Close regedit and go into wormnet to verify you have done it correctly.
Personal tools