Current Steam installations seem to have a much cleaner filesystem
layout on Debian while older ones look quite different.
Older Debian installations ~/.steam/root points to ~/.steam while newer
ones point to ~/.steam/debian-installation and hence BeamMP cannot
find integrity.json. 'steamapps' is at ~/.steam/debian-installation in
newer installations.
On the older installations, 'steamapps' is at ~/.steam/steam/steamapps.
Signed-off-by: Markus Ingalsuo <markus.ingalsuo@gmail.com>
I couldn't launch the game without this.
---
By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
Beforehand, the launcher would check only if the game directory existed.
This would lead to an error if the game was moved through Steam since
Steam leaves the BeamNG.Drive directory behind. Now it checks for to see
if integrity.json is inside. I also removed some commented out code I
seem to have left behind when I was porting it.
I agree to this code (and the whole port to native Linux since the #63
was locked and I couldn't agree there) being licensed under AGPL 3.
As requested:
- Changed 'string' variables that referred to paths to 'filesystem'.
- Added error log for when a valid 'GameDir' isn't found.
Also readded error log for when 'libraryfolders.vdf' is missing for better contextualization for the 'basic_string::_M_replace_aux' error (the code doesn't reach the GameDir segment when that file is not found).
Beforehand, it would check only if the game directory existed. This would lead to an error if the game is moved through Steam since it leaves the BeamNG.Drive directory. Now it checks for integrity.json. I also removed some commented out code I left behind.