Jump to content
Nebelfeuer

Il-2 Sturmovik: Battle of Stalingrad on Linux

Recommended Posts

On 1/28/2019 at 6:31 AM, Nick_R said:

I got everything working! to get it working decompile BoS.LogParser.Offline.exe with ILSpy. After that recompile it with Visual Studio setting the target version to .NET 4.0. Finally replace the old BoS.LogParser.Offline.exe with the newly recompiled one.

Great effort man! Updated the initial post. Would be awesome if you could contact one of the Officials about a way to provide the recompiled version to the masses. Otherwise if you find the time and heart a step by step tutorial for coding  noobs like me that are unfamiliar with the required programs might find quite a bit of appreciation.

Share this post


Link to post
Share on other sites

I sent them a message asking them to compile it with .NET 4. I haven't gotten a reply yet, but hopefully it gets done.

 

Imight make a tutorial sometime when I have spare time.

  • Like 1

Share this post


Link to post
Share on other sites

With the new update 3.010 I had to run winetricks vcrun2015 otherwise it crashes when starting a mission.

 

Edit:

I think I could script the decompiling and recompiling of the Lparser. That would make it really simple for those unfamiliar with it. You'd only need to download and run my script. I'll work on that this weekend.

Edited by Nick_R

Share this post


Link to post
Share on other sites

When i decompile and compile BoS.LogParser.Offline.exe i get mscoores.dll error on my dserver. Any help?

Share this post


Link to post
Share on other sites

Maybe run winetricks --force -q dotnet40 again. I'll make a tutorial tonight probably.

Share this post


Link to post
Share on other sites

I now made a script to recompile BoS.LogParser.Offline.exe. Use the below commands to download and run the script.

wget https://git.io/fhQfM -O recompile-lparser.sh
chmod +x recompile-lparser.sh
./recompile-lparser.sh

If the script can't find BoS.LogParser.Offline.exe It'll tell you how to solve the problem. The script will rename the old BoS.LogParser.Offline.exe to BoS.LogParser.Offline.exe.orig.

Let me know if you run into any issues. I'll start writing a tutorial or a script to install IL-2.

Edited by Nick_R

Share this post


Link to post
Share on other sites

Nick's Guide to Installing IL-2: Great Battles in Wine

 

1. Make sure you have wine 4.0 or newer installed. Instructions for Ubuntu can be found here: https://www.omgubuntu.co.uk/2019/01/wine-4-0

Also install winetricks since you'll need that.

 

2. Set your WINEPREFIX value. This is where wine will install everything. The default location is ~/.wine and if you don't already have anything installed there you can skip this step. Otherwise you may wanna set your wine prefix to ~/.wine_il by running export WINEPREFIX=~/.wine_il

 

3. Set your WINEARCH variable to win64 like this export WINEARCH=win64

 

4. This step is optional. Doing this step will let you click any windows exe and it’ll automatically use ~/.wine_il as your wine prefix. This way you can navigate to where the DServer.exe is located and just click it to run it. Otherwise you’ll get an error because it’s trying to run it with the wrong wine prefix. To make ~/.wine_il your default wine prefix run:

echo "export WINEPREFIX=~/.wine_il" >> ~/.bash_profile

After that logout and log back in. To confirm that your wine prefix is now set to ~/.wine_il you can run echo $WINEPREFIX  in a terminal.

 

5. While still in the same terminal as where you set WINEPREFIX run the following winetricks command:

winetricks -q corefonts vcrun2015 dxvk dotnet40 

 

6. Download and install IL-2:

wget "http://cdn.il2sturmovik.net/x64/IL2_setup_Great_Battles.exe"
wine IL2_setup_Great_Battles.exe /VERYSILENT /SUPPRESSMSGBOXES

You don’t have to download and install it from the command line, but this makes sure that your wine prefix is correct (this is if you are still in the same terminal as you were for step 2). If you did step 4 than it will be the correct wine prefix even if you don’t run it from the command line. When it prompts you to install .NET you can skip or cancel it. When prompted to install DirectX complete the installation. Do not cancel it.

 

7. The installer should have created a desktop launcher for IL-2 Sturmovik Great Battles on your desktop or in you application launcher. Launch it and let IL-2 finish downloading and installing then go to step 8.

 

8. I made a script to recompile BoS.LogParser.Offline.exe against .NET 4 since .NET 3.5 doesn’t work in a 64 bit wine prefix. If you skip this step IL-2 will still work, but you’ll get dialogs saying that BoS.LogParser.Offline.exe can’t find the .NET Framework. To fix this download and run my script by running the follwing commands in the terminal:

wget "https://git.io/fhQfM" -O recompile-lparser.sh
chmod +x recompile-lparser.sh
./recompile-lparser.sh

After that you should be able to start the game and everything will work except that the performance isn’t quite that of running the game on Windows.

 

9. Multiplayer servers may not show ping. To fix that run:

sudo setcap cap_net_raw+epi /usr/bin/wine64-preloader

You may need to alter the command depending on where your wine64-preloader is.

Edited by Nick_R
  • Thanks 3
  • Upvote 1

Share this post


Link to post
Share on other sites

Nice one, really appreciated.

This could be a great step forward for upcoming potential server operators, as it could save you from having to spend roughly $25 or more per month just for the required Windows Server License.

Unfortunately in order to really become an option for Server Operators, IL-2 Devs would have to agree not to break Server functionality on Wine in future updates.

That's probably the hardest part of the deal.

 

:drinks:

Mike

Share this post


Link to post
Share on other sites

Today I discovered that servers don't show ping. I got it working by running the following command:

sudo setcap cap_net_raw+epi /usr/bin/wine64-preloader

You might need to alter the command depending on where your wine64-preloader is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×