• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(155561)

Private
1 Badges
Aug 17, 2009
10
0
  • Hearts of Iron III
Welcome!

This is a small HowTo on running Hearts of Iron III on Linux. Remember Linux is not officially supported, this is a unofficial HowTo. ;)

First of all: What do I need and what is supposed to work?

Requirements:
  • Read your HOI3 box / manual for hardware requirements
  • PixelShader 2.0 is probably the most important one
  • A running 32bit or 64bit Linux host
  • WINE 1.1.28 or higher
  • Internet connection
  • Basic Linux knowledge
What to expect:

Since WINE 1.1.28 the bug known as "border issue" (region borders drawn incorrectly or disturbed) is fixed. This is the only known issue we ever had. Hence you will receive a installation of HOI3 which is as stable as the Windows installation. If you have tons of crashes, this is most likely a configuration problem.
  • Game will run as stable as possible
  • hoi3.exe, the loader will run but not be usable (use hoi3game.exe instead)
  • Bugs which occur on Windows will also occur on Linux. Make sure to check the bug report sub forum before posting
The installation

Note: It's neither the purpose of this guide to help on installing and configuring the Linux distribution nor on installing WINE. I assume both things are ready to use. There are dozens of tutorials on how to set those things up in the net. :)

Okay, let's start!
  • Make sure to use a fresh and unused wine directory (wineprefix). To do so, I will just call the new prefix ".wine-hoi3". Let's create it:
    Code:
    $ env WINEPREFIX=$HOME/.wine-hoi3 winecfg
    This will also open up the winecfg dialog which we will need next.
  • In the winecfg dialog we jump to the "Drives" tab. Being there, we want to "Autodetect" the drives, which hopefully will give us a CD/DVD drive located at /media/cdrom0 or similar. It depends on your Linux distribution, but Ubuntu/Kubuntu use this path for mounting these drives. If you got it there we are ready to close the dialog via "OK".
  • Back to the console we want to navigate to the path where our CD is mounted. I assume it's "/media/cdrom0" so the command would be
    Code:
    $ cd /media/cdrom0
    If you can't find any file in there you probably didn't insert the disk into your drive, or you didn't mount it properly. You may try
    Code:
    $ sudo mount /dev/cdrom /media/cdrom0
    or any other suitable directory. If you don't have sudo installed, try
    Code:
    $ su -
    and use all following commands without "sudo". (Make sure to leave the root shell with an "exit" if there is a command without sudo to not mess up user rights)
  • Now it's time for the installation. We are in /media/cdrom0 (or wherever your CD is mounted to). Type
    Code:
    $ env WINEPREFIX=$HOME/.wine-hoi3 wine Setup.exe
    and wait for the installer to appear. Now accept all the defaults and just press "Next" until the file copying process starts. Get yourself a cup of coffee, because this is going to take a couple of minutes.
  • After the files are all copied to our HOI directory, the installation of Microsoft .NET Framwork will appear. We don't want to install this one, because there are a bunch of tweaks we need to install .NET Framwork... So just press the "Cancel" button and go ahead.
  • The Microsoft Visual C++ Redistributable will pop up, just as the .NET Framwork did. This time however, we want to install it. It's set up quick, but that's just fine.
  • And again, an installer pops up. We don't want Microsoft DirectX, "Cancel" is what we want to do.
  • The HOI3 installer should finish now, and if you want you even might create a desktop icon... Finish the installer and advance to the next step. (The installation will not exit properly (at least for me) so kill the process via CTRL+C in your console)
  • Now navigate your console to /usr/bin and download winetricks via
    Code:
    $ cd /usr/bin
    $ sudo wget http://www.kegel.com/wine/winetricks
    $ sudo chmod +x winetricks
  • We now want to install the previously canceled DirectX and .NET Framework. Do it with
    Code:
    $ env WINEPREFIX=$HOME/.wine-hoi3 winetricks directx9 dotnet20
    Please ignore the warning "You probably shouldn't be using this. It's VERY invasive." as the installation of dotnet20 is running good enough for our purpose. Winetricks will start both installers after downloading all the dependencies and you should just press "Next" whenever it asks you to.
    Note that winetricks should set your wine's Windows version to Windows 2000 while installing. If the installer fails or you are just paranoid you may set it to Windows 2000 manually via winecfg (Applications tab). Just make sure to set it back to Windows XP afterwards.
  • Hopefully everything went straight through, we now want to make sure WINE is still set to run as Windows XP.
    Code:
    $ env WINEPREFIX=$HOME/.wine-hoi3 winecfg
    will show us the configuration. Choosing the tab "Application" will show us a drop down at the bottom which should state "Windows XP". If not change it to "Windows XP" and exit with "OK".
  • Time for some registry tweaks. Start your WINE registry via
    Code:
    $ env WINEPREFIX=$HOME/.wine-hoi3 wine regedit
    and navigate to
    Code:
    HKEY_CURRENT_USER/Software/Wine/Direct3D
    If the Direct3D key does not exist, please create it (right click on "Wine" -> New -> Key). Inside that registry key we want to create the following string values (right click in empty space on the right -> New -> String Value)
    Code:
    VideoMemorySize
    OffscreenRenderingMode
    Assign a value to the data fields by double clicking the item and writing down the value in the dialog box. Set OffscreenRenderingMode to "fbo" (without "").
    Note that we didn't assign a value to the VideoMemorySize string yet. You have to enter the amount of your video card's memory which is normally something like "256" or "512". Please read your video card's manual to find out.
  • Move upwards one level in the registry, so that we are back to "Wine". We need to navigate to a key called "DirectSound". If it's not there, create it. Move into that key, just as we did before and create a new string value called
    Code:
    MaxShadowSize
    Set the value (data field) of MaxShadowSize to "0" (without "").
  • This is all we need to do. If you want (and you surely want) to install any patch, go to the stickies in the HOI3 forums and download them (e.g. 1.1 and 1.1c). Extract the files (if necessary) and install them just like you installed HOI3. Just don't forget to use the "env WINEPREFIX=$HOME/.wine-hoi3" to install it to the proper location.
Running the game

Pretty straight forward, just use the Desktop icon or navigate manually to your WINE installation directory. This should be similar to
Code:
$ cd $HOME/.wine-hoi3/drive_c/Program\ Files/Paradox\ Interactive/Hearts\ of\ Iron\ III/
$ env WINEPREFIX=$HOME/.wine-hoi3 wine hoi3game.exe

That's it! Enjoy playing Hearts of Iron III on your operation system of right choice. :)

I hope this guide covers everything needed. It is likely I will update it over the time. If you have issues with the HowTo, let me know. Any other tweak, suggestion, whatever: Shoot me a PM.

Some links for further information:
Wine AppDB Entry for HoI3
Current "HOI3 on Linux" discussion thread
Usefull WINE registry keys
More information on how to use winetricks
 
Last edited:
This looks very complicated and makes me reconsider whether switching to Linux is really worthwhile...Irrlicht's guide is excellent but makes me wonder what it'd be like for other games!
 
Linux and their ilk (I use that word affectionately. :D) isn't for the normal computer using-populace. That would equate to most of the readership on these boards. Nothing wrong with that mind you...Windows and Apple's OS are great in their own rights and being a personal Win 7 user myself, I've had zero issues. Linux though is a superior operating system overall if you know how to use it properly.
 
Linux and their ilk (I use that word affectionately. :D) isn't for the normal computer using-populace. That would equate to most of the readership on these boards. Nothing wrong with that mind you...Windows and Apple's OS are great in their own rights and being a personal Win 7 user myself, I've had zero issues. Linux though is a superior operating system overall if you know how to use it properly.

Actually, I've had a lot of luck deploying Linux for users who don't want to pay for Windows and weren't that skilled at Windows in the first place. If you don't have to re-learn anything, it's not much more trouble to learn Linux right the first time (or just scrape by without learning much at all).

I'm not sure it's a superior operating system overall, but I prefer it personally. Like all OSes it has its good points and its bad points.

That having been said, running a full-featured modern game that was designed for an entirely different platform is an incredibly difficult task that no other OS even really bothers to attempt. Getting HOI3 to run on Linux is difficult but the fact that it runs well after being configured is almost miraculous.

This looks very complicated and makes me reconsider whether switching to Linux is really worthwhile...Irrlicht's guide is excellent but makes me wonder what it'd be like for other games!

I like Linux, but if you switch to Linux expecting to be able to play games that were designed for Windows, you will be disappointed... Although you might have better luck using Cedega (http://www.cedega.com/), commercial software specifically designed to run Windows games on Linux.

This is offtopic, but if you want to play games on Linux, maybe try Playstation games via an emulator (which often run faster/clearer/better on Linux than they do on native hardware); same for Sega Saturn and most other CD-ROM based game systems. If you can extract ROMs from your cartridges you can also play cartridge-based games from any cartridge-based console other than (I think) the Nintendo DS. There's even an emulator for Playstation 2 games, although it is somewhat hit and miss.
 
Last edited:
well, I hadn't planned on trying hoi3 on linux for some time ('cause, well, y'know, with so many bugs in the game itself adding one more layer of possible issues just doesn't sound fun..) but after seeing this I had to give it a try. No problems. Slightly offtopic: for testing purposes i declared war on austria, in my italy game. had only reserve divisions on the border, and the austrians attacked with mountaineers. actually got the message "your division has been overrun and shattered", first time i got to see that :)
 
It's very likely this would work. I never used PLayOnLinux personally, but I heard several times it's great. Reading from their website it seems we just need someone to create the script :) I could probably do it, but I can't promise anything. I have very limited time available at the moment...

About the "complicated look" of this guide: If it just looks complicated I'm okay with it. Because really, it isn't. It's a copy & paste tutorial most times. You should also keep in mind this game is not designed for Linux. So what to expect? I guess PlayOnLinux is what you guys would like to see...
 
Trust me, this is not as frightening as it looks. The point of this thread is not to evangelize people into linux, but to remind people (like me) they don't need to reboot their computer in order to play HOI3. I am sure, this is also a good news for people who look into switching to linux. If you are happy with Windows, that's also ok. :D

Concerning Wine version, you may find yourself stuck with last stable release of Wine (1.0.1) on most linux distribution. This is the case of Ubuntu (and Kubuntu, Xubuntu, Edubuntu, ...). Please check the "Wine Binary Downloads" page in order to upgrade your system depending on your linux distribution.
(Please also note that 1.0.1 version is much slower may not suffer from the "border issue".)
 
It's very likely this would work. I never used PLayOnLinux personally, but I heard several times it's great. Reading from their website it seems we just need someone to create the script :) I could probably do it, but I can't promise anything. I have very limited time available at the moment...

If you download PlayonLinux, you can also download a script creator.

It will probably make it easier for making a script.
 
As a quick note, some of the winetricks packages aren't fully installed if the windows version (set in winecfg) is different from windows 2000.

I recommend to set it to win2k before installing anything with winecfg, then switching to whatever version you use before running your apps.
Also the game launcher does work fully (only thing it can't do is download new patches) you need to install dotnet20, gecko, vcrun2005 and vcrun2005sp1 from winetricks. Then you'll need to remove a couple of fonts from your system, otherwise the launcher crashes at startup. The two fonts are : ukai.ttf and Samyak-Oriya.ttf

Under Debian this done by this command :
Code:
apt-get remove ttf-arphic-ukai ttf-oriya-fonts

I hope this helps.
 
Just out of curiosity, how does performance seem to be when running in Wine vs Win? I used Linux almost exclusively for about a year, but didn't do much in Wine.

Unfortunately, my new comp will not run Linux in anything other than VESA. Maybe one day it will be solved. . .
 
Just out of curiosity, how does performance seem to be when running in Wine vs Win? I used Linux almost exclusively for about a year, but didn't do much in Wine.

Unfortunately, my new comp will not run Linux in anything other than VESA. Maybe one day it will be solved. . .

For me it's slower than using win7.

Why must you use VESA?
 
I have a rather old system here (1.8ghz, 2gb) so the game just runs "too slow" anyway, don't notice much of a difference.. the great advantage when running in wine for me: i can just use my system as usual and the game keeps running in the background :)
 
Hi

Am having problems getting game to run - i have installed OK but when it loads it crashes after a bit - i get the following terminal output (sorry for the spam - i'll edit it out when its sorted)

Does this help in identifying what i have done wrong? I should mention thats its the latest 64bit Ubuntu formatted using Ext4 with a 896meg graphics card and wine is version 1.1.28 - if thats any help:

===============================================
===============================================
doctoxic@quad-64:~$ cd $HOME/.wine-hoi3/drive_c/Program\ Files/Paradox\ Interactive/Hearts\ of\ Iron\ III/
doctoxic@quad-64:~/.wine-hoi3/drive_c/Program Files/Paradox Interactive/Hearts of Iron III$ env WINEPREFIX=$HOME/.wine-hoi3 wine hoi3game.exe
fixme:win:EnumDisplayDevicesW ((null),0,0x32e130,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x32e1c4,0x00000000), stub!
fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface
fixme:cursor:CURSORICON_CreateIconFromANI Loading all frames for .ani cursors not implemented.
fixme:cursor:CURSORICON_CreateIconFromANI Loading all frames for .ani cursors not implemented.
fixme:cursor:CURSORICON_CreateIconFromANI Loading all frames for .ani cursors not implemented.
fixme:cursor:CURSORICON_CreateIconFromANI Loading all frames for .ani cursors not implemented.
fixme:cursor:CURSORICON_CreateIconFromANI Loading all frames for .ani cursors not implemented.
fixme:cursor:CURSORICON_CreateIconFromANI Loading all frames for .ani cursors not implemented.
fixme:dsalsa:IDsDriverBufferImpl_SetVolumePan (0x143910,0x143f80): stub
err:eek:le:apartment_getclassobject DllGetClassObject returned error 0x80040111
err:eek:le:CoGetClassObject no class object {da4e3da0-d07d-11d0-bd50-00a0c911ce86} could be created for context 0x1
err:eek:le:CoGetClassObject class {2721ae20-7e70-11d0-a5d6-28db04c10000} not registered
err:eek:le:CoGetClassObject no class object {2721ae20-7e70-11d0-a5d6-28db04c10000} could be created for context 0x1
fixme:dsound:DSPROPERTY_Description1 (pPropData=0x32e398,cbPropData=40,pcbReturned=0x32e3c0) GUID_NULL not implemented!
fixme:win:EnumDisplayDevicesW ((null),0,0x32e894,0x00000000), stub!
fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 4
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d9:Direct3DShaderValidatorCreate9 stub
fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x1e3ae8) Unhandled query type 5
wine: Unhandled exception 0xc000000d at address 0x7bc40023:0x00a49c7e (thread 0009), starting debugger...
Killed
doctoxic@quad-64:~/.wine-hoi3/drive_c/Program Files/Paradox Interactive/Hearts of Iron III$ couldn't load main module (2)
Process of pid=0008 has terminated
No process loaded, cannot execute 'echo Modules:'
Cannot get info on module while no process is loaded
No process loaded, cannot execute 'echo Threads:'
process tid prio (all id:s are in hex)
0000000e
00000014 0
00000010 0
0000000f 0
00000011
00000017 0
00000016 0
00000013 0
00000012 0
00000018
00000019 0
You must be attached to a process to run this command.
No process loaded, cannot execute 'detach'
==============================================
==============================================

thanks

doc
 
I have a rather old system here (1.8ghz, 2gb) so the game just runs "too slow" anyway, don't notice much of a difference.. the great advantage when running in wine for me: i can just use my system as usual and the game keeps running in the background :)

Epic fail on your side theres something like window mode in windows... :rofl:
 
window mode has the disadvantage of not being fullscreen, and fullscreen takes a second or two switching to other applications.. but the emphasis here was on "usual" - as i usually use linux there's not much i feel like doing on windows

Then use alt + tab and you got your fullscreen takes 1 sec to get into windows and back :) you can even set resolution so you can have window mode in full screen so i really don't see those advantages in Linux...

Any way goodnight no point into geting into arguments with linux user...