Conversation
|
Sorry for the confusion, i'm reopening the PR soon |
|
No worries, it has to be reviewed anyway. |
|
Feel free to just force push and clean the commit. |
|
FYI the CI is broken and doesn't actually pull changes from branches outside the repository, so the CI build will be based on the |
orowith2os
left a comment
There was a problem hiding this comment.
Why does UR need to know if it's running under Flatpak? If you need to look for specific files, you should be looking inside of the folders you own under the XDG base directory spec.
|
Why do we need a filesystem check? What was wrong with the environment variable approach? |
|
I don't think there's any difference, but if libportal uses this approach it's good to do the same imo. |
Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
|
This approach is not reliable if a Flatpak application launches a native binary. |
|
Checking it out, most of these Flatpak specific codes can be thrown away if Unleashed Recomp is compliant with XDG Base Directory Specification. These env vars are used to figure out which directories are to be used for user data, if the env vars are not set or is empty, the fallback directories are used.
This is relevant to Flatpak because flatpak sets the following env vars automatically:
but it seems currently Where it should attempt to use EDIT: This is related #679 |
This PR removes flatpak-specific preprocessor macros, leaving the game to figure out at runtime whether it's running under a flatpak environment or not.
To be more specific, this relies on checking the
FLATPAK_IDenvironment variable, which is always set for sandboxed environments as described in the official documentationFor Unleashed Recompiled,
FLATPAK_IDis set toio.github.hedge_dev.unleashedrecomp. This can be checked by entering the sandboxed environment and checking directly:For Windows builds, the present PR bears no effect.