Open General on Linux with Wine

Discussing the game, editor (Suite) and the related tools.
Post Reply
User avatar
Llewen
Private
Private
Posts: 23
Joined: 2019-10-25 01:24, Friday

Open General on Linux with Wine

Post by Llewen » 2020-01-23 15:58, Thursday

Now for the obligatory joke about how Open General and Wine go perfectly together, although you might want to avoid multiplayer or campaign/scenario design with too much wine. Having said that, I now have Open General working with all the bells and whistles including weather effects, audio and video playback, on a multi-monitor setup.

Note that this is a recreation of the thread on the topic originally posted on JP's, updated.

Linux Distro: Debian Bullseye
Desktop: KDE Plasma
Application Launcher: Lutris
Wine Version: system
Architecture: 32 bit
Hardware Wrinkles: multiple monitors

The first problem was that I have a multiple monitor setup and the app wasn't opening on the correct monitor. My two monitors have different resolutions, both monitors are identical but the second one sits a bit further away from me so I have it on a lower resolution to make it easier to work with and read--old eyes. The app was opening as if it was in full screen mode on the primary monitor, but it was opening on the secondary monitor, which meant it was opening in a resolution that rendered much of the game window off the screen. When I tried to move the game window it would deform.

I had no access to the menu buttons for one thing, but even when I did, changing the resolution in the game settings didn't seem to make any difference. On top of that there was no menu bar for the window, so I couldn't set KDE/Plasma window settings from the menu bar. (I initially blamed this on sdl2, but sdl2 is fully supported under linux and wine.)

The break through came when I remembered that KDE/Plasma lists all custom window settings (System Settings / Window Management / Window Rules). At that point I exported the rules for another game that I played using WINE, then edited that file in a text editor. I gave it an appropriate name and changed the executable name to OpenGen.exe. Then I imported that rule and modified the settings on the Size and Position tab, Size and Position respectively, to open the window in a size that matched my main monitor, on my main monitor ( Position 0,0 and Size 2560,1440 respectively, if you are interested). I set them both to "Apply Initially".

Note that there is a problem with this solution in that all windows in the game will now open in the top left corner of the screen. You can fix this by unchecking the Size and Position boxes and instead check the Screen option on the same tab, choose "Apply Initially" and choose the correct screen number, then hit ok, etc. Note that that screen numbers start from 1, not from 0, as they do in most Linux configuration settings.

Getting video playback working:

Note that this was accomplished under Debian Bullseye, but should be able to be modified to work under other distros. I have also found that Lutris is the best launcher for WINE games, so this answer will assume you are familiar with Lutris and with winetricks. It is beyond the scope of this post to go into detail on how to use those, but that information is available on the web.

First off, Open General is a 32 bit application, so you should already have multiarch enabled in your distro, if you don't, see the following Debian FAQ.

https://wiki.debian.org/Multiarch/HOWTO

You will need in install the following Debian packages or their equivalent, depending on your distro. You can run the following command on Debian:

sudo apt install ffmpeg:i386 gstreamer1.0-plugins-bad:i386 gstreamer1.0-plugins-ugly:i386

You will want to install lutris and winetricks if you haven't already:

sudo apt install lutris winetricks

You will want to use the default system version of wine, not the patched versions available through Lutris. You will need to install the Shark007 standard codec past. You can choose full install and default settings. After you have created a menu item for Open General in Lutris, you should be able to right click on the shortcut, choose "Run EXE inside wine prefix" and select the Shark007 installation executable to install it.

You can download the Shark007 Standard Codes here:
https://www.majorgeeks.com/files/detail ... odecs.html

You will need to set your wine prefix to run in Windows 7 mode or later. Your Open General videos should now play.

Note that in older Linux and wine versions you could use winetricks to install ffdshow, however, that no longer seems to work. The Shark007 codecs however, do seem to work.

User avatar
Llewen
Private
Private
Posts: 23
Joined: 2019-10-25 01:24, Friday

Re: Open General on Linux with Wine

Post by Llewen » 2020-01-23 16:28, Thursday

It appears that the audio in the intro video to Open General is not working. Not sure why that doesn't work, it is working in the campaign videos. Suffice to say that you may need to mess around with Shark007's settings to get that working, and if you do, please post here with the solution so I can add it to the op.

Post Reply