Installing WA on Linux
From Worms Knowledge Base
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.
Contents
Getting started
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:
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.
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 aptitude update sudo aptitude install wine1.3
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).
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:
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 (1.3.5 at the time of writing).
Debian/Fedora
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 here.
ArchLinux
The ArchLinux repos should have 1.3.6 (at the time of writing) 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 (1.3.6 at the time of writing).
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!
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.
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)
- Wormkit doesn't work. Workaround: None yet, unfortunately.
- 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
(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).
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.
- 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.
...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 - so it's probably only really useful to KDE users (I have no idea whether or not it will work outside of KDE).
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).
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.6.30.0 for arg in "$@"; do if [ "$arg" = "--" ]; then usingarg=1 fi done if [ "$usingarg" = "1" ]; then VERSION="$1" shift 2 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 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.
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 http://www.rsdn.ru/forum/other/3332601.1.aspx and hit enter
- Close regedit and go into wormnet to verify you have done it correctly.