Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wine Support #102

Open
nea89o opened this issue May 13, 2023 · 12 comments
Open

Wine Support #102

nea89o opened this issue May 13, 2023 · 12 comments
Assignees
Labels
Enhancement Request to add a new feature or to enhance an existing feature.

Comments

@nea89o
Copy link

nea89o commented May 13, 2023

I would love for this to allow selecting the game location manually for non standard installation locations. More specifically I am requesting this because on Linux (using wine) the steam games are in the Z drive in a non standard (not a ProgramData folder) location, which makes it impossible (without linking directories) to use this software. See also #101.
I am not sure if this would fix all Linux issues and work with all games, but this seems like a somewhat easy-ish to implement solution, and like something that might be useful for linux gamers as well.

@nea89o nea89o added the Enhancement Request to add a new feature or to enhance an existing feature. label May 13, 2023
@pointfeev
Copy link
Owner

WinForms simply doesn't support Linux, this isn't a directory issue, nor are games ever found in ProgramData.

The program doesn't have any standard location it looks through for games, for Steam in particular it parses ACF and VDF files branching from the base installation directory to all library directories to eventually all game directories. The same can be said with slightly different methodologies for the other supported game platforms.

Thus, assuming your games are installed properly, this feature should not be necessary at all and you're likely trying to use the DLC unlockers on games they don't support (such as illegitimate base games).

@nea89o
Copy link
Author

nea89o commented May 14, 2023

No, winforms does work on linux with wine (which is a compatibility layer). It behaves like a VM that just puts your real file system in a different spot from what this program expects. So selecting your steam base directory (instead of assuming which place it is in) would be what would be needed.

@pointfeev
Copy link
Owner

In that case then, I suppose the real issue then is the absence of the registry to point the way towards the Steam installation directory automatically. You need to realize that the discovery of the Steam directory and all other directories required for that matter work flawlessly on Windows, their location is not just "assumed".

I'd have to look into how wine operates their file system and/or installations to see if automation of finding the Steam directory or game directories is possible, and fall back to a manual directory selection function should it not be.

The goal of the program is to automate as much as possible for the user, so I'm hesitant to add manual functions where they could easily be automated of course.

@nea89o
Copy link
Author

nea89o commented May 14, 2023

I don't think I can be much of help in that case, C# is not exactly my forte.

The entire linux file system is mounted at Z:, so any path on the linux system at /home/nea/.local/share/steam/steamapps would just become Z:\home\nea\.local\share\steam\steamapps in wine. You can just use normal file apis to handle almost all of these files (of course not some of the linux specific operations like terminals, sockets, etc., but i doubt that games use any of these file types). That standard drive of Z: can be changed using a config, so the more robust solution is to invoke winepath.exe -w "linuxpath" which prints to stdout the path of where that linux file would be in the simulated windows file system.
image

Sadly automatically finding the root directory for steam isn't that easy. By convention it would be in /home/<username>/.steam/root (This is where you would find things like the steamapps folder). However steam also puts the folder in a second location at /home/<username>/.local/share/steam, which is the actual real location of the files (and is the only one that is also guaranteed to be present even with steam closed). However both of these can be changed by environment variables (namely XDG_STATE_HOME and just HOME).

More specifically the "real" files are stored at $XDG_STATE_HOME/steam, and if XDG_STATE_HOME isn't set it instead defaults to $HOME/.local/share, and if HOME isn't set it defaults to /home/$USER (or /users/$USER on Mac).

Similarly the "fake" files (which are only available while steam is running) can be found at $HOME/.steam, with home defaulting the same way as before.

@pointfeev pointfeev changed the title Allow manually selecting game/save game location Wine Support / Manual Game Directory Selection May 22, 2023
@matter19
Copy link

I would love manual directory selection also .... I have some games that I am "trying" that are stream games before buying as my daughter changes her mind about games so much I don't like to put out the money just to have her quit them a week later. I use Windows 11.

@pointfeev
Copy link
Owner

I would love manual directory selection also .... I have some games that I am "trying" that are stream games before buying as my daughter changes her mind about games so much I don't like to put out the money just to have her quit them a week later. I use Windows 11.

You don't need manual directory selection, and matter of fact for your case you don't even need this program at all, the unlockers this program uses are for legitimately owned base games. An illegitimately owned game would come with a completely different crack that includes DLC.

@pointfeev pointfeev changed the title Wine Support / Manual Game Directory Selection Wine Support May 25, 2023
@MikedaSpike
Copy link

MikedaSpike commented Jul 14, 2023

I would love to see this working with proton on the steamdeck.
I'm a pinball addicted and bought on steam all the dlc's for zen pinball fx3, pinball arcade, zaccaria pinball, and some other small programs that has to do with pinball..
I thought with a family group, my wife could have her own account and she could play my games. The big pinball games are all free to play and uses dlc's.
As family groups can play the games and not the dlc's, my wife is not able to play those games (i wasn't aware of that )

I know its not your fault, but if your program can be get to work on proton or wine and have the dlc's unlocked, it would be awesome
I just dont know much about linux (proton and wine),I'm just a windows person and was stumped that this device emulates a windows container and runs pretty good. My qife bought several games (some I have on my ps5 as well) and it was running good.

So not sure if it is a container issue or path issue (not sure if those are the correct terms). I can access via some kind of "explorer" the files, and see the windows files as well
Anyway, thanks for reading this and hope you will make more people happy

@FlySlime
Copy link

FlySlime commented Jul 22, 2023

For now we can follow this guide on Reddit to get it working on some games. It uses the SmokeAPI files from this repo. Works flawlessly with Tabletop Simulator.

Instructions copied from the Reddit post:

  1. Navigate to https://github.com/pointfeev/CreamInstaller/tree/main/CreamInstaller/Resources/SmokeAPI
  2. Download steam_api.dll and steam_api64.dll
  3. Right click your game on steam, go to manage, and browse local files
  4. Find where your game stores its steam_api and navigate to it
    1. You can use the following command in the terminal to find it easily: find . -name "steam_api*"
    2. In my case with Tabletop Simulator, it is stored at Tabletop Simulator_Data/Plugins/x86_64
  5. The file found can be called steam_api.dll or steam_api64.dll
    1. In the case of Tabletop Simulator it is steam_api64.dll that is used
  6. Rename this file to steam_api_o.dll or steam_api64_o.dll depending on which one you got
  7. Now the last part is to move the downloaded files from step 2 into here.
    1. Technically you only need the one you renamed, so in the case of Tabletop Simulator we don't need steam_api.dll
  8. Boot up the game and give it a go

@MikedaSpike
Copy link

MikedaSpike commented Jan 12, 2024

For now we can follow this guide on Reddit to get it working on some games. It uses the SmokeAPI files from this repo. Works flawlessly with Tabletop Simulator.

Instructions copied from the Reddit post:

  1. Navigate to https://github.com/pointfeev/CreamInstaller/tree/main/CreamInstaller/Resources/SmokeAPI

  2. Download steam_api.dll and steam_api64.dll

  3. Right click your game on steam, go to manage, and browse local files

  4. Find where your game stores its steam_api and navigate to it

    1. You can use the following command in the terminal to find it easily: find . -name "steam_api*"
    2. In my case with Tabletop Simulator, it is stored at Tabletop Simulator_Data/Plugins/x86_64
  5. The file found can be called steam_api.dll or steam_api64.dll

    1. In the case of Tabletop Simulator it is steam_api64.dll that is used
  6. Rename this file to steam_api_o.dll or steam_api64_o.dll depending on which one you got

  7. Now the last part is to move the downloaded files from step 2 into here.

    1. Technically you only need the one you renamed, so in the case of Tabletop Simulator we don't need steam_api.dll
  8. Boot up the game and give it a go

Too bad, this won't work anymore with Steamv158 dll
Gives the following error :
image

@FlySlime
Copy link

For now we can follow this guide on Reddit to get it working on some games. It uses the SmokeAPI files from this repo. Works flawlessly with Tabletop Simulator.
Instructions copied from the Reddit post:

  1. Navigate to main/CreamInstaller/Resources/SmokeAPI

  2. Download steam_api.dll and steam_api64.dll

  3. Right click your game on steam, go to manage, and browse local files

  4. Find where your game stores its steam_api and navigate to it

    1. You can use the following command in the terminal to find it easily: find . -name "steam_api*"
    2. In my case with Tabletop Simulator, it is stored at Tabletop Simulator_Data/Plugins/x86_64
  5. The file found can be called steam_api.dll or steam_api64.dll

    1. In the case of Tabletop Simulator it is steam_api64.dll that is used
  6. Rename this file to steam_api_o.dll or steam_api64_o.dll depending on which one you got

  7. Now the last part is to move the downloaded files from step 2 into here.

    1. Technically you only need the one you renamed, so in the case of Tabletop Simulator we don't need steam_api.dll
  8. Boot up the game and give it a go

Too bad, this won't work anymore with Steamv158 dll Gives the following error : image

Could you elaborate a little more? It still seems to work on my end, using Tabletop Simulator as mentioned in the post. I'm using the latest Steam Beta client and dll files provided in this repo.

@MikedaSpike
Copy link

MikedaSpike commented Jan 13, 2024

Could you elaborate a little more? It still seems to work on my end, using Tabletop Simulator as mentioned in the post. I'm using the latest Steam Beta client and dll files provided in this repo.

Pinball FX was updated lately and the DLL was moved to another place : Engine\Binaries\ThirdParty\Steamworks\Steamv158\Win64
I renamed the newly created steam_api64.dll to steam_api64_o.dll and place the steam_api64.dll.dll from the download above.
Also added cream_api.ini,.
All worked before the steam Pinball FX update. But now it gives the error in the previous post
Edit : with cream api 5.0.0 all is working again

@wolfone88
Copy link

wolfone88 commented Jan 20, 2024

I want to add that i had some limited success in running CreamInstaller on Nobara. Adding it as a non steam game successfully lets me see and successfully use CreamInstaller on any game i have installed on my primary partition. However it doesn't let me see any game I installed in my secondary partition, listed in steam in another library. Letting me manually select an additional library would definitely solve the problem. That, or looking "harder" for more libraries i guess. But adding a manual folder check does sound easier.

This was referenced Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Request to add a new feature or to enhance an existing feature.
Projects
None yet
Development

No branches or pull requests

6 participants