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

Compliance with permission models on Linux installs #2971

Open
alexpyattaev opened this issue Sep 11, 2023 · 3 comments
Open

Compliance with permission models on Linux installs #2971

alexpyattaev opened this issue Sep 11, 2023 · 3 comments

Comments

@alexpyattaev
Copy link
Contributor

Would it be possible to make Zero-K.exe to use the standard linux directories?
This would imply the following changes:

  • Store the game preferences files (player setup, hotkeys, unit settings, campaign progress) in $HOME/.config
  • Store the game downloaded files (maps, engine, replays, whatever else the game downloads post-install) in $HOME/.cache

This would make packaging Zero-K for linux distros a whole lot easier to accomplish, as well as to achieve compliance with distro requirements for package behavior. This would, in turn, help with ZK popularity on linux desktops quite a bit.

I am quite sure that a good way to detect if this behavior should be triggered is to check if the directory where Zero-K.exe is located is writable. There is already a check for it in the code, so the modifications would be truly minimal.

Once this is done I can make packages for at least a few popular distros.

@Licho1
Copy link
Member

Licho1 commented Sep 11, 2023

I believe it is currently configurable. If certain env vars contain writeable directory it should use that instead of current one.
In general this logic is used:

image

This is used if the current folder is not writeable.
So for example if you put launcher into some non writeable dir, it will auto use HOME/.spring

We could change the logic even more but i guess it needs more thinking also because of steam compatibility. Steam on linux is a preferable distribution method and there all is in one folder

@alexpyattaev
Copy link
Contributor Author

alexpyattaev commented Sep 11, 2023 via email

@Licho1
Copy link
Member

Licho1 commented Nov 12, 2023

I think the steam mode all you need to do is to make folder writeable + create a text file called steam_folder.txt then it should work but it might not download updated to certain components like engine

@sprunk sprunk transferred this issue from ZeroK-RTS/Zero-K Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants