Thanks to: easycompany, Evil~Ryu, iL, tupac, Crash3r and Disgruntled for the discussions in the forum http://forum.war2.ru/index.php/topic,2165.0.html.
Step 1: Install and configure wine
sudo apt-get install wine winetricks
winecfg
For the purposes of this guide I will use the Default Settings profile but one can add each Warcraft 2 related executable to the list and duplicate the settings for each one.
Tab Applications
Windows Version: Windows XP
Tab Libraries (This settings are optional and are used in order to fix Battle.net chat and create game colors.)
New override for library: ddraw → click Add → click Yes
For more information: https://www.winehq.org/docs/wineusr-guide/config-wine-main
Tab Graphics
Step 2: Configure X server
sudo dpkg-reconfigure x11-common
Choose: Anyone
For more information: http://karuppuswamy.com/wordpress/2010/09/26/how-to-fix-x-user-not-authorized-to-run-the-x-server-aborting/
sudo adduser $USER audio
This gives permission to the current user to use the audio devices
sudo ubuntu-drivers autoinstall
This will auto-install/update your video drivers
Restart PC
Step 3: Install War2Combat
Download the latest version from en.war2.ru
The following stuff could be included in the installer as options
Create a war2.bat
war2.bat |
% Use start to launch before War2Ploader.exe any other tools you want to use. % For example: start War2Observer.exe start War2PLoader.exe |
Create a war2.sh
war2.sh |
#!/bin/bash #Lets change our screen resolution to 640×480 xrandr -s 640×480 #Lets set the wine environment env WINEPREFIX=”/home/$USER/.wine” #Lets execute war2.bat and any associated utility with cpu affinity 0 taskset -c 0 wine start /unix “/home/$USER/.wine/drive_c/War2Combat/war2.bat” |
chmod +x war2.sh
Step 4: Executing the game
The most robust and better performance way to execute the game is by creating a separate X server for Warcraft 2.
xinit -- :1
This will create an X server with identity 1 and execute an xterm. If you do not have focus, move around your mouse.
Under ubuntu this new X server is assigned the keys: ctrl+alt+F8.
You can toggle among your original X server and this one by using ctrl+alt+F7/F8
Then you simply need to execute war2.sh
war2.sh
and you are ready to play!
Reasons to do this:
1) For the game to play faster
2) In case you have keyboard focus problems
3) Warcraft 2 usually changes the resolution of your X server and does not restore it
4) Taskbars and other objects that are on top appear in Warcraft 2
Optional Step 1: War2Observer.exe
War2Observer.exe is working fine under linux. If you want to use it you can add it at war2.bat as shown above.
Optional Step 2: Disabling the touchpad
If you are using a laptop you can disable the touchpad by adding this to war2.sh
#Lets find and disable the touchpad: ID=$(xinput list | sed -n ‘s/.*touchpad[[:blank:]]*id=\([0-9]\+\)[[:blank:]]*.*/\1/Ip’) xinput set-prop $ID “Device Enabled” 0 |
Optional Step 3: Game is sluggish
If performance is low it means you need to update your video drivers. It is possible you will need to disable them first and re-enable them. Also it is possible if you have multiple options that some work better than others. Always reboot after a change on drivers.
Furthermore, ensure you are using drivers that support opengl for 32bit.
Optional Step 4: ddraw.dll
One of the first problems you will notice is that the Battle.net screens: login, create account, chat, create game, etc. have corrupted colors like illustrated in the following image.
While this does not stop you from playing it can be esthetically ugly and give you troubles in hosting games.
In order to solve that you need to override ddraw.dll. At step 1 we already configured wine to allow overrides for ddraw.dll but now you need to add a new ddraw.dll in your war2 folder.
One that worked for me is: http://www.bitpatch.com/downloads/war2_ddraw_test4.zip
This fix is not perfect! While you now are going to see a much nicer screen the performance of the Battle.net chat is much worse! Also there are still some graphic glitches as illustrated in the following image.
This ddraw.dll adds also a cool function that will allow us to use Warvideo.exe and War2Inshight.exe under linux.
Now you can use Alt+Enter to toggle war2 from full screen to window mode.
Optional Step 5: WarVideo.exe and War2BNEInSight105RC1.exe
First you need to use winetricks to install missing DLLs. If the programs do not start just run them at a terminal with wine infront. This will tell you what DLLs are missing.
First update your repository
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update && sudo apt-get upgrade
Then get the DLLs you need like:
winetricks mfc42
In order to be able to use either WarVideo/War2InSight you need to be able to toggle from Warcraft 2 to WarVideo/War2InSight. To do so we will need to use the ddraw.dll presented at step 4 and the Alt+Enter functionality.
To execute Warvideo or War2Inshight just add them to your war2.bat file.
war2.bat |
% Use start to launch before War2Ploader.exe any other tools you want to use. % For example: start War2Video.exe % or start War2BNEInSight105RC1.exe start War2Observer.exe start War2PLoader.exe |
While it might be possible to use both, I suggest you use one of the two only.
It is important that you start these utilities at the same batch file and it is also important to use the taskset -c 0 wine in front of the linux command in order to set the affinity to 0.
Optional Step 6: CPU Scaling Utility
For the time being noone has managed to use the cpusavior_cmd.exe tool under linux to solve the problem of 100% cpu usage. It is suggested to use the following tool to reduce the heating effect on your cpu.
sudo add-apt-repository ppa:artfwo/ppa
sudo apt-get update
sudo apt-get install indicator-cpufreq
For more information: http://www.webupd8.org/2010/12/cpu-frequency-scaling-appindicator.html?m=1
PlayOnLinux Install Instructions
by Crash3r
- Download War2 from en.war2.ru
- Get wine (sudo apt-get install wine)
- Get PlayOnLinux (sudo apt-get install playonlinux)
- Open PlayOnLinux
# You need to have Wine version 1.9.9 installed, to install it/check if installed, open PlayOnLinux and click Tools > Manage Wine Versions - Click ‘Install a Program’
- Click ‘Install a non listed Program’ (bottom left)
# Important: - During install, Click ‘Use Another Version of Wine’ and select version 1.9.9 (you might have to install this beforehand)
- Next, next, next (create virtual drive and name it War2Drive, select 32bit install)
- Browse for War2Combat-4.exe from Downloads, Install Warcraft2. During install I chose not to ‘create desktop icon’ just to keep wine desktop uncluttered
# Important: - For the shortcut, select ‘War2Launcher.bat’, and name it ‘Warcraft II’
- It will create the shortcut and then another shortcut creation screen will pop-up. Click cancel on that one
# At this point, the install is fully working - Change default icon to war2 icon — Right click on the shortcut and select ‘Set the icon’
- Open the ‘hicolor’ folder > 32×32 > apps > 8742_Warcraft II BNE.0.png
Amara says
Cannot find shortcut:
Hey, I’m on Step 10 of the PlayOnLinux install. It says:
“For the shortcut, select ‘War2Launcher.bat’, and name it ‘Warcraft II’”
I cannot find “War2Launcher.bat” ANYWHERE. I’ve searched basically my entire computer. Lol. Please help!