Open lhark opened 7 years ago
Long story short, neither my launcher nor TruckersMP has support for wine.
As for my launcher, wine is missing some functions which my launcher uses during intilazation. I have a couple of DLL's intergrated within the exe of the launcher and some code at the start of it which reads the internal assembiliy and loads those DLL's so the launcher can use them during operation.
The Official TruckersMP Launcher does infact have DLL's it use aswell, but they are not intergrated into their exe which can be why you wont get the same error with it.
The big issue with using wine on my tools for TruckersMP, and the TruckersMP Mod itself is that they are all desgined to run on windows, there are functions which are specific to windows and wont work on any other OS. And yes, wine emulates a fair bit of them, but not enough for proper emulation of my tools, and certainly not the multiplayer mod
Even if you were able to get a launcher working, you are still going to have problems when launching the game. The mod is buildt with windows dependencies and functions specific to windows and its not guaranteed that wine will be able to emulate them all.
To bad :/ Though i'm pretty sure I saw on the forum that the mod worked with wine with the previous launcher, so all hope isn't lost ^^
At the very least do you know which DLLs it's missing ? I already managed to get over one error message by copying Newtonsoft.Json.dll in the same directory, might work for the others too, who knows ?
In any case, thanks for your fast and precise answer.
As a closing note, to any linux user who happens to followthe same steps as i did, i managed to solve the problem... by writing my own launcher : https://github.com/lhark/truckersmp-cli , which is designed to work with wine. By the way, thank you @TheUnknownNO, your code was a great help :)
I however, have one last question for you: how did you fix (if you had to fix it at all) the steam dialog "allow game launch ?" that pops up when you launch the game while steam isn't already running ?
As for my launcher it has two DLL's intergrated, as you found out, Newtonsoft.Json.dll is one of them and the other one is called NAudio, which you can find here
As to how I "got rid of" the allow game launch dialog, I cant say for certain it will show that dialog if you try to run the game without having steam open, but by default my launcher starts steam automaticly when you open the launcher, and hopefully the steam logo popping up prompts you to wait until steam gets launched. I've acctually never tested if it starts the game without that prompt if steam is not open. But all in all its up to the way you launch the game, you can see my code for it in the Launcher.cs file
Right. I've finally sat down and investigated this issue properly. Progress so far:
Next up is redoing some backend so you can set paths for your installs manually ;)
Hi, i'm trying to get your launcher working with wine (long story short, the official launcher simply won't work), but it crashes right at the start. Here is the stack trace that wine gave me (I hope it's somewhat standard, i've never touched C# before) :
I'm sorry I can't help you more, but as I've said, I know nothing about C# :/