-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[WIP] Rough example of using custom WINE installations #697
Conversation
Related to issue #22
There is no CONTRIBUTING.md, so I am not sure what expectations are for merging back / pull request formats |
env = dict(os.environ) | ||
dlloverrides = {} | ||
|
||
basedir = env.get("WINE_BASEDIR", os.path.dirname(sys.argv[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just use os.environ.get
here and leave the env
and dlloverrides
definition where they were
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. But in my mind that is a tad redundant and begs the question why set the os.environ
into it's own dict in the first place.
I just was working within the code that was already set up by Valve and trying to avoid being opinionated. They're handling environment variables that way in the code, so maintain status quo unless another person wants to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they probably do so because they inject a bunch of variables into env
that maybe they don't want to inject into the runtime environment, but they already do access os.environ
further down in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to respond. I see yeah. I did not read their code completely. I glanced at it and did this in about 5 minutes. If you're pretty sure that is the intention I don't mind going with the approach of using os.environ
👍
Btw your patch does not work for me, I know I'm supposed to mimick the file structure (dist folder, version file, default_pfx folder) but it still won't launch, does it work for you? If so, can you share your wine dir structure? |
My local wine configuration (From lutris download):
Dist structure:
There is a chance I might have missed something. This was just a rough draft from discussions on #22 Figured I'd open a PR for discussion. You can see some details in there on how the default_pfx wineprefix works. As I said, i didn't test without having the default_pfx created. I'm not sure the process Steam takes to create that. It honestly looks like the default_pfx prefix is created via extraction of the Might need to just override the basedir for prefix related needs, and allow the basedir to remain default for the prefix , and give an override for now. Line https://github.com/ValveSoftware/Proton/pull/697/files#diff-91df09b569af69b5e64d1506f50fa4bbR127 Leads me to think it SHOULD create the default_pfx Can ya add some details with "It does not work"? Enable the logging https://github.com/ValveSoftware/Proton#runtime-config-options and let me know what it is saying. |
I tried this again just now and did not notice steam seeing the game a 'running'. not sure how to approach that. |
Created issue #724 (Steamclient dll) Hopefully there is some nice way to resolve it. I have commented in the IRC:
|
Actually proton will copy the necessary steam client files into the wine prefix [1] so that shouldn't be a problem. I tried debugging why it wouldn't work, first I found out that proton was crashing because it was trying to copy some vrclient dlls that are not in the lib/lib64 of a standard wine installation.
So I ended up merging the libs from my lutris wine installation with the ones from the proton dist, and that seemed to work, kinda; Proton no longer crashes, but wine does:
[1] https://github.com/ValveSoftware/Proton/blob/proton_3.7/proton#L196 |
@Elkasitu So I've been working on something to make this PR more robust. I am going to have to do some re-installations, it seems, though. I've some reason stopped seeing environment variables get passed into my proton python file this morning in the midst of working on this. I actually had something working, but I can't get the changes to work anymore. I got stopped at "No steamapps" error, regarding validation of onwership failing or something. Steam was seeing the wine process running, and I was seeing everything pretty much work otherwise. Even had creation, and requirements. The PR will be nasty, though. No "easy" solution for some of the issues I've noticed. I've attached the diff here, if you want to have a play with it. I also added a really quick/dirty logging for the proton file. the version of git is not the same as the version on my linux system for some reason, so your miles may vary. I will work on this again later today if I get the time. Unfortunately my work day begins now, so I can't invest more time. However I discovered I was running about 40 wine kingdomcome.exe processes, and numerous steam processes. My issues are very likely linked to not cleaning up my system regularly, and having some sort of weird issue due to that. |
I'm taking an approach of:
|
The build system has been reworked since this. We describe how to use custom builds in the README now. Improvements welcome, but I think we're in decent state now. |
Related to issue #22
This is just a quick throw together. There are considerations with how the script works I did not at all care about for a quick example:
Creation of a new prefix shouldn't be a big deal, so i'm not worried about that.
From there it would just be a case of setting your WINE_BASEDIR or something similar in the game launch options as
WINE_BASEDIR=/home/USERNAME/.local/share/lutris/runners/wine/staging-3.12-x86_64/ %command%