Fix ApiKey detection so it works on Linux - #3
Conversation
The Steam Compatibility Layer creates a virtual C: drive for each installed game. Which means the Tsw6Api Key is in a different location than on Windows and the API cannot find it. This patch changes the search logic to detect if we are running on Linux and if so change the search location so it finds the Key.
|
This works for the debian install of steam, but most other linux distributions will use flatpak, where the steamapps dir is located at $HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps Pretty sure this includes the steam deck itself but dragging mine into a position to interrogate its filetree is more effort than I want to go through rn |
Flatpak stores the API key in yet another folder. Add code to search for this too...
OK, in theory I've updated the patch to search for Flatpak locations. I don't seem to have a PC with TSW6 installed running the Flatpak version of Steam on Linux to test it on, but according to the logfiles it's searching here: |
|
trying to test your build myself but unfortunately I'm having issues getting the app to access the API server. I'm sure I'm doing something dumb so we'll see if i can kick it through. |
|
So the actual problem here we both missed is this app cannot handle nonstandard install paths. I had to learn to use a C# Debugger before it slapped me across the face like a wet tuna, but I learned something so 👍 Good news is I can confirm its working with the flatpak path, just someone will probably want to go back later and allow for TSW being stored in a nonstandard location. |
I am 99% sure have a fix for this - I will upload it later. |
Get Steam to tell us where the game is installed (and the associated pfx virtual drive C:) using GameFinder.
|
that also seems to affect
i mean it also seems to affect windows installs, so probably better to handle that in a seperate PR |
|
Not necessary. The reason we have to jump through hoops on Linux is that the c: drive is not real - it is a virtual "container" created by Proton. But the location of that container can vary depending on the user's configuration. Windows doesn't need to do this - the c: drive is real and not a container, so it already knows how to find the user profile. |
The Steam Compatibility Layer creates a virtual C: drive for each installed game. Which means the Tsw6Api Key is in a different location than on Windows and the API cannot find it.
This patch changes the search logic to detect if we are running on Linux and if so change the search location so it finds the Key.