PaulCombal / SamRewritten

Steam Achievement Manager For Linux. Rewritten in C++.
GNU General Public License v3.0
334 stars 32 forks source link

Flatpak steam support #84

Closed pehsa closed 3 years ago

pehsa commented 3 years ago

I tried to use SamRewritten with a Flatpak Steam installation. First it don't found the Steam installation. I added the next to MySteam.cpp (54): else if (file_exists(home_path + "/.var/app/com.valvesoftware.Steam/.local/share/Steam/appcache/appinfo.vdf")) { m_steam_install_dir = std::string(home_path + "/.var/app/com.valvesoftware.Steam/.local/share/Steam"); return; }

Now it worked, but when I tried to open any game it crashed with the following errors:

$ ./bin/launch.sh [S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam. dlopen failed trying to load: /home/krisztian/.steam/sdk64/steamclient.so with error: /home/krisztian/.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory [S_API] SteamAPI_Init(): Sys_LoadModule failed to load: /home/krisztian/.steam/sdk64/steamclient.so An error occurred launching the Steam API. Aborting. Read pipe encountered fatal error.

I tried to debug it, but I don't able to find where the program determine the path to the steamclient.so

PaulCombal commented 3 years ago

Hi, Thank you for your feedback. I don't have so much knowledge about the inner workings of Flatpak, but my first impression is that the Steamworks SDK isn't able to interact with Steam when packaged with Flatpak. I'm not sure sure we can do anything about this, since it is inherent to Valve's code. By the way, isn't it flatpak's aim to provide a sandbox for applications? What do you think? Thanks!

pehsa commented 3 years ago

Oh... Good point! My bad! I totally forgot the sandbox! I will try to run the app from the sandbox.

Thanks for your answer!