Hello @nettnikl, preliminary question, are you able to reproduce the issue you're seeing with mainline Proton run from the Steam for Linux client? Proton is not intended to be used by third party launchers and this scenario as you've presented it is a third party build of proton being used by a third party application.
Note that Proton installation and game installation can be in different libraries in different drives (different mount points). Plain relative path might not handle this correctly.
What is your case for "base path changes"? Automount-generated paths or something?
able to reproduce the issue you're seeing with mainline Proton
In the mentioned and linked code i can see the lines responsible for the issue. Dont't you think that the behaviour described is the currently intended behaviour?
What is your case for "base path changes"? Automount-generated paths or something?
Yes, for example. To clarify the mentioned
for example in different environments or after reboots, a disk mount path may change
In my case, i am using different distros using a shared disk for storing games. So the mount path changes because one mounts it under /run/media, the other under /media.
So while you are right, it makes sense to have immutable paths and a clean solution in that case would be to ensure that, that's sadly not possible/adviseable/good practise here.
Note that Proton installation and game installation can be in different libraries in different drives (different mount points). Plain relative path might not handle this correctly.
Not quite sure about this, could you give me an example? In my case, a working workaround, was to replace the softlink at
/run/media/username/disk_name/Heroic/prefix/pfx/drive_c/users/steamuser/Documents
from
/run/media/username/disk_name/Heroic/prefix/pfx/drive_c/users/steamuser/My Documents
to
./My Documents
(as far as i remember)
This is a reasonable request, but I'd like to pin down exactly what's happening here.
For the Documents symlink you mention, we should be updating it automatically if it is run with a new path, see this chunk from the proton script:
def migrate_user_paths(self):
#move winxp-style paths to vista+ paths. we can't do this in
#upgrade_pfx because Steam may drop cloud files here at any time.
for (old, new, link) in \
[
("drive_c/users/steamuser/Local Settings/Application Data",
self.prefix_dir + "drive_c/users/steamuser/AppData/Local",
"../AppData/Local"),
("drive_c/users/steamuser/Application Data",
self.prefix_dir + "drive_c/users/steamuser/AppData/Roaming",
"./AppData/Roaming"),
("drive_c/users/steamuser/My Documents",
self.prefix_dir + "drive_c/users/steamuser/Documents",
"./Documents"),
]:
#running unofficial Proton/Wine builds against a Proton prefix could
#create an infinite symlink loop. detect this and clean it up.
if os.path.lexists(new) and os.path.islink(new) and os.readlink(new).endswith(old):
os.remove(new)
old = self.prefix_dir + old
if os.path.lexists(old) and not os.path.islink(old):
merge_user_dir(src=old, dst=new)
os.rename(old, old + " BACKUP")
if not os.path.lexists(old):
makedirs(os.path.dirname(old))
os.symlink(src=link, dst=old)
>>> elif os.path.islink(old) and not (os.readlink(old) == link):
>>> os.remove(old)
>>> os.symlink(src=link, dst=old)
Can you look into why the symlink isn't being recreated with the correct path after your prefix path has changed?
@aeikum I'm sorry, but i cannot reproduce my own issue now. After switching the different Proton versions and deleting the soft links the issue disappeared and links are created as they should. Sorry for wasting your time, if the problem arises again i will reopen.
No problem, always happy to field well-written bug reports like this. If you do figure out repro steps, let us know.
proton 6.14-ge-2x1 2021-12proton 6.3x1 2021-12
Feature Request
I confirm:
contain this feature already.
Description
Please create relative paths in the environment instead of absolute ones. This should affect all symbolic links created by proton.
This would allow for more flexible setups, as described below. I'd love to hear your thoughts on this.
Justification [optional]
os.path.dirname(sys.argv[0])is used as prefix in many symbolic prefixes (self.prefix_dir +). This however results in issues when the base path changes - for example in different environments or after reboots, a disk mount path may change - leading to errors like the following.Please be aware that while i used a fork in this example, this should also affect vanilla proton. If you believe this is not the case, i'd love to hear why and report this issue to the respective maintainer of the fork.
Risks [optional]
I don't see any risk to be honest - but i don't think it has been written like that for no good reason. Doesn't mean the situation hasn't changed since the decisio though.