Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chais

Pages: [1]
1
Bug Reports / Write access for level files requested (Linux)
« on: September 14, 2014, 12:12:07 AM »
I'm maintaining a Hammerwatch package for Archlinux. Sadly the game currently can't be played as, according to error.txt, it seems to request write access to the level files.
Since they're not stored in a user directory the user doesn't usually have write access. Also the game doesn't seem to actually write to these files, it just won't start if write access is denied.

2
Bug Reports / Saves and logs written to game directory (Linux)
« on: September 12, 2014, 09:25:47 AM »
Currently the savegames and log/error files are written to the directory the game resides in.
That behaviour may be acceptable for the Steam version but is ill fitted for the DRM-free version.
With Linux it's a healthy habit to have your installations managed by your distro's package manager. Packages are usually installed systemwide and on a correctly configured system only root can write to most directories outside /home.

So as a packager I have several ways to deal with this:
a) Run the game as root - That's a no-go and probably won't work anyway
b) Give everyone write access to the gamedir - That also is a no-go
c) Create a double indirection with symlinks to actually write to the user's home - The best solution so far, but requires careful link management in the startup script and results in users having access to other users' savegames on multi user systems (ugly)

The perfect solution:
The game stores its configurations in $XDG_CONFIG_HOME/Hammerwatch, which defaults to $HOME/.config/Hammerwatch if $XDG_CONFIG_HOME is unset and the savegames in $XDG_DATA_HOME/Hammerwatch, which defaults to $HOME/.local/share/Hammerwatch if $XDG_DATA_HOME is unset.
This way the game makes sure the user running it can write all necessary files and still gives the user the possibility to store the game's config and saves whereever he wants.

Pages: [1]